Skip to content

Commit 5db317c

Browse files
committed
Harden UI test route bootstrap on CI
1 parent 9187967 commit 5db317c

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

full-suite-stabilization.plan.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,16 @@ Tracked failing tests from the current baseline:
175175
- the shared reader route helper treated the routed page root as "ready" too early, so slower CI could advance into shortcut/playback assertions before the interactive learn or teleprompter controls were actually present
176176
Fix path:
177177
- strengthen `ReaderRouteDriver` to wait for production-owned interactive sentinels (`learn` progress/play controls, teleprompter stage/play toggle, settings title) instead of stopping at the top-level page shell
178+
- [x] `Release Pipeline` run `24220487918` fails remotely in `Reader`, `Shell`, and `Studio` after commit `9187967`
179+
Symptom:
180+
- the local full-solution baseline stayed green, but GitHub macOS jobs timed out during initial route opens across `/library`, `/settings`, `/editor?id=...`, and `/go-live?id=...`
181+
- remote job logs showed shared route helpers blocking inside `GotoAsync(... WaitUntil = NetworkIdle)` before the routed surface assertions even began
182+
Root cause:
183+
- the shared browser route driver still used `WaitUntilState.NetworkIdle`, which is too strict for production-shaped pages that keep browser activity alive on CI
184+
- this created a remote-only harness divergence where route-open retries could stall before the explicit page sentinel checks had a chance to run
185+
Fix path:
186+
- switch shared route open and blank-page bounce navigation in `BrowserRouteDriver` from `NetworkIdle` to `Load`
187+
- continue treating route readiness as an explicit contract enforced by URL and `data-test` sentinels rather than by global network quiescence
178188

179189
## Ordered Plan
180190

@@ -228,3 +238,12 @@ Tracked failing tests from the current baseline:
228238
- if any job fails, inspect logs, apply the fix, rerun local validation, and push the follow-up
229239
Verification:
230240
- the release path is green or an explicit external blocker is documented
241+
242+
## Latest Validation Snapshot
243+
244+
- [x] Follow-up local verification after the `BrowserRouteDriver` route-open change
245+
Result:
246+
- `dotnet format ./PrompterOne.slnx` passed
247+
- `dotnet build ./PrompterOne.slnx -warnaserror` passed
248+
- `dotnet test @./tests/dotnet-test-progress.rsp --project ./tests/PrompterOne.Web.UITests.Studio/PrompterOne.Web.UITests.Studio.csproj` passed with `38/38`
249+
- `dotnet test @./tests/dotnet-test-progress.rsp --solution ./PrompterOne.slnx --max-parallel-test-modules 1` passed with `1162/1162` green in `7m 50.591s`

tests/PrompterOne.Web.UITests/Support/BrowserRouteDriver.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ internal static class BrowserRouteDriver
99
{
1010
private const int RouteBootstrapAttemptCount = 2;
1111
private const string RouteFailurePrefix = "route-open";
12+
private const WaitUntilState RouteNavigationReadyState = WaitUntilState.Load;
1213

1314
internal static async Task OpenPageAsync(
1415
IPage page,
@@ -23,7 +24,9 @@ internal static async Task OpenPageAsync(
2324

2425
for (var attempt = 1; attempt <= RouteBootstrapAttemptCount; attempt++)
2526
{
26-
await page.GotoAsync(route, new() { WaitUntil = WaitUntilState.NetworkIdle });
27+
// Route readiness is validated by explicit URL and page-level sentinels below.
28+
// NetworkIdle is too strict for pages that keep long-lived browser activity alive on CI.
29+
await page.GotoAsync(route, new() { WaitUntil = RouteNavigationReadyState });
2730
await WaitForRouteAsync(page, route);
2831
if (await IsPageVisibleAsync(page, pageTestId, BrowserTestConstants.Timing.ExtendedVisibleTimeoutMs))
2932
{
@@ -32,7 +35,7 @@ internal static async Task OpenPageAsync(
3235

3336
if (attempt < RouteBootstrapAttemptCount && TestEnvironment.IsCiEnvironment)
3437
{
35-
await page.GotoAsync(UiTestHostConstants.BlankPagePath, new() { WaitUntil = WaitUntilState.NetworkIdle });
38+
await page.GotoAsync(UiTestHostConstants.BlankPagePath, new() { WaitUntil = RouteNavigationReadyState });
3639
}
3740
}
3841

0 commit comments

Comments
 (0)