Skip to content

Commit 4354d36

Browse files
committed
test + base for AI
1 parent 0217eb1 commit 4354d36

26 files changed

Lines changed: 35 additions & 5 deletions

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,11 @@ Rule format:
114114
- Browser and component tests must use one selector format only: `data-test`; do not mix in any alternate test-attribute naming variants.
115115
- Shared test-support libraries that contain no runnable test cases must not reference the TUnit engine package directly; keep them on non-engine TUnit packages so solution-level `dotnet test` does not discover zero-test support DLLs as runnable test apps.
116116
- Every runnable test project must declare `MaxParallelTestsForPipeline : EnvironmentAwareParallelLimitBase` with `LocalLimit = 15`; do not keep lower per-project local parallel caps unless the user explicitly asks for an exception.
117-
- Browser-suite CI parallelism is user-tunable. When suite duration becomes a bottleneck and the user asks for higher throughput, prefer splitting work into `4` or `8` parallel GitHub Actions test jobs before reaching for timeout increases; only keep lower `CiLimit` caps when a specific flake requires them.
117+
- Browser-suite CI parallelism is user-tunable. When the user wants higher throughput, keep in-suite browser-test CI parallelism in the `6-9` worker range when the harness can sustain it, and prefer extra GitHub Actions job splitting on top of that before reaching for timeout increases; do not pin browser suites back to `2` workers as a blanket fix.
118118
- Local regression verification must include solution-level `dotnet test --solution ./PrompterOne.slnx --max-parallel-test-modules 1` so test-project split changes are proven under the real all-tests entrypoint, not only as isolated per-project runs.
119119
- When the user explicitly asks to validate a test fix in actual GitHub Actions, do not spend more time on local `CI=true` emulation; push the fix and monitor the real CI run instead.
120120
- Selector-contract remediation requests must be handled repo-wide across all relevant test files (`Web.Tests` and `Web.UITests`), not as partial per-file cleanups.
121+
- Browser and editor acceptance tests must be stable against seeded demo content, user-entered text, and import filename variations: assert invariant UI behavior, use shared fixtures/constants, and wait on explicit ready or completion signals instead of incidental page titles, transient text, or race-prone intermediate chrome.
121122
- Repo-wide quality audits and agent-generated review handoff artifacts must be written as root-level task files so other coding agents can pick them up quickly; do not bury those temporary audit results under `docs/` unless the task is explicitly about durable product documentation.
122123
- Repo-wide cleanup and review passes must explicitly inventory forbidden implementation string literals, `MarkupString` or raw-HTML UI composition, duplicated JS/CSS patterns, architecture-boundary drift, and `foreach`-driven test scenarios that should become isolated TUnit cases.
123124
- Repo-wide audits should use multiple independent reviewers with distinct focuses when the tooling is available, including external CLI reviewers such as Claude and Copilot plus internal agents, and all review outputs should be captured in root-level task files before remediation starts.

Directory.Packages.props

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,18 @@
1414
<PackageVersion Include="ManagedCode.Storage.GoogleDrive" Version="10.0.5" />
1515
<PackageVersion Include="ManagedCode.Storage.OneDrive" Version="10.0.5" />
1616
<PackageVersion Include="ManagedCode.Storage.VirtualFileSystem" Version="10.0.5" />
17+
<PackageVersion Include="Microsoft.Agents.AI" Version="1.0.0" />
18+
<PackageVersion Include="Microsoft.Agents.AI.Anthropic" Version="1.0.0-rc6" />
19+
<PackageVersion Include="Microsoft.Agents.AI.AzureAI" Version="1.0.0-rc5" />
20+
<PackageVersion Include="Microsoft.Agents.AI.OpenAI" Version="1.0.0" />
1721
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="10.0.5" />
1822
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.5" />
1923
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.5" />
2024
<PackageVersion Include="Microsoft.Extensions.Localization" Version="10.0.5" />
2125
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.5" />
2226
<PackageVersion Include="Microsoft.Extensions.Logging.Configuration" Version="10.0.5" />
2327
<PackageVersion Include="Microsoft.Playwright" Version="1.58.0" />
28+
<PackageVersion Include="OllamaSharp" Version="5.4.25" />
2429
<PackageVersion Include="Sentry.AspNetCore.Blazor.WebAssembly" Version="6.3.0" />
2530
<PackageVersion Include="Sentry" Version="6.3.0" />
2631
<PackageVersion Include="PDFtoImage" Version="5.2.1" />
@@ -30,4 +35,4 @@
3035
<PackageVersion Include="TUnit.Core" Version="1.28.7" />
3136
<PackageVersion Include="TUnit.Playwright" Version="1.28.7" />
3237
</ItemGroup>
33-
</Project>
38+
</Project>

src/PrompterOne.Core/PrompterOne.Core.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
<ItemGroup>
44
<PackageReference Include="ManagedCode.MarkItDown" />
55
<PackageReference Include="ManagedCode.MimeTypes" />
6+
<PackageReference Include="Microsoft.Agents.AI" />
7+
<PackageReference Include="Microsoft.Agents.AI.Anthropic" />
8+
<PackageReference Include="Microsoft.Agents.AI.AzureAI" />
9+
<PackageReference Include="Microsoft.Agents.AI.OpenAI" />
610
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
11+
<PackageReference Include="OllamaSharp" />
712
</ItemGroup>
813

914
<ItemGroup>

tests/PrompterOne.Web.UITests.Editor/Editor/EditorAiAvailabilityTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
namespace PrompterOne.Web.UITests;
55

6+
[NotInParallel(UiTestParallelization.EditorAuthoringConstraintKey)]
67
[ClassDataSource<StandaloneAppFixture>(Shared = SharedType.PerClass)]
78
public sealed class EditorAiAvailabilityTests(StandaloneAppFixture fixture)
89
{

tests/PrompterOne.Web.UITests.Editor/Editor/EditorCueRenderingFlowTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace PrompterOne.Web.UITests;
66

7+
[NotInParallel(UiTestParallelization.EditorAuthoringConstraintKey)]
78
[ClassDataSource<StandaloneAppFixture>(Shared = SharedType.PerClass)]
89
public sealed class EditorCueRenderingFlowTests(StandaloneAppFixture fixture)
910
{

tests/PrompterOne.Web.UITests.Editor/Editor/EditorDatePickerThemeTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace PrompterOne.Web.UITests;
66

7+
[NotInParallel(UiTestParallelization.EditorAuthoringConstraintKey)]
78
[ClassDataSource<StandaloneAppFixture>(Shared = SharedType.PerClass)]
89
public sealed class EditorDatePickerThemeTests(StandaloneAppFixture fixture) : AppUiTestBase(fixture)
910
{

tests/PrompterOne.Web.UITests.Editor/Editor/EditorDocumentSplitFlowTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace PrompterOne.Web.UITests;
66

7+
[NotInParallel(UiTestParallelization.EditorAuthoringConstraintKey)]
78
[ClassDataSource<StandaloneAppFixture>(Shared = SharedType.PerClass)]
89
public sealed class EditorDocumentSplitFlowTests(StandaloneAppFixture fixture) : AppUiTestBase(fixture)
910
{

tests/PrompterOne.Web.UITests.Editor/Editor/EditorDragDropFlowTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace PrompterOne.Web.UITests;
66

7+
[NotInParallel(UiTestParallelization.EditorAuthoringConstraintKey)]
78
[ClassDataSource<StandaloneAppFixture>(Shared = SharedType.PerClass)]
89
public sealed class EditorDragDropFlowTests(StandaloneAppFixture fixture) : AppUiTestBase(fixture)
910
{

tests/PrompterOne.Web.UITests.Editor/Editor/EditorFileSaveFlowTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace PrompterOne.Web.UITests;
66

7+
[NotInParallel(UiTestParallelization.EditorAuthoringConstraintKey)]
78
[ClassDataSource<StandaloneAppFixture>(Shared = SharedType.PerClass)]
89
public sealed class EditorFileSaveFlowTests(StandaloneAppFixture fixture)
910
{

tests/PrompterOne.Web.UITests.Editor/Editor/EditorFindFlowTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
namespace PrompterOne.Web.UITests;
55

6+
[NotInParallel(UiTestParallelization.EditorAuthoringConstraintKey)]
67
[ClassDataSource<StandaloneAppFixture>(Shared = SharedType.PerClass)]
78
public sealed class EditorFindFlowTests(StandaloneAppFixture fixture) : AppUiTestBase(fixture)
89
{

0 commit comments

Comments
 (0)