Skip to content

Commit fc78b67

Browse files
committed
stabilize ui browser suite on linux
1 parent 902596f commit fc78b67

File tree

5 files changed

+20
-6
lines changed

5 files changed

+20
-6
lines changed

ci-workflows-release-pr-validation.plan.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,16 @@ Root-cause note:
217217
- `node /Users/ksemenenko/Developer/PrompterLive/tests/PrompterLive.App.UITests/bin/Debug/net10.0/.playwright/package/cli.js install chromium`
218218
- `dotnet test /Users/ksemenenko/Developer/PrompterLive/tests/PrompterLive.App.UITests/PrompterLive.App.UITests.csproj --no-build`
219219
- `dotnet format /Users/ksemenenko/Developer/PrompterLive/PrompterLive.slnx`
220+
- GitHub runs `23814810144` and `23814814816` proved that workflow-level isolation alone was not enough; the browser suite still failed under GitHub Linux with 25-28 flaky editor, go-live, and teleprompter tests.
221+
- The remaining GitHub-only root causes were narrowed to:
222+
- mac-only keyboard shortcuts in UI tests (`Meta+A`, `Meta+Z`, `Meta+Shift+Z`) that broke Linux editor shortcuts and typing flows
223+
- browser-suite self-contention from `4` parallel xUnit workers inside one process on the slower GitHub runner
224+
- route/readiness assertions still relying on Playwright's short default timeouts instead of the suite's WASM-specific timeout budget
225+
- Local validation after the browser-suite stability fixes passed:
226+
- `dotnet build /Users/ksemenenko/Developer/PrompterLive/PrompterLive.slnx -warnaserror`
227+
- `dotnet test /Users/ksemenenko/Developer/PrompterLive/tests/PrompterLive.Core.Tests/PrompterLive.Core.Tests.csproj --no-build`
228+
- `dotnet test /Users/ksemenenko/Developer/PrompterLive/tests/PrompterLive.App.Tests/PrompterLive.App.Tests.csproj --no-build`
229+
- `dotnet test /Users/ksemenenko/Developer/PrompterLive/tests/PrompterLive.App.UITests/PrompterLive.App.UITests.csproj --no-build`
220230

221231
## Final Validation Skills And Commands
222232

tests/PrompterLive.App.UITests/AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
- This suite is the primary acceptance gate for the product.
3232
- Major workflows must be covered by long scenario tests, not only narrow regression tests.
3333
- Major scenario tests must save screenshots under `output/playwright/`.
34-
- This suite resolves its origin at runtime and uses one `dotnet test` process with up to `4` parallel xUnit workers.
34+
- This suite resolves its origin at runtime and uses one `dotnet test` process with up to `2` parallel xUnit workers.
3535
- Do not keep separate concurrent `dotnet build` or `dotnet test` processes alive against the same test assets.
3636
- Prefer `PrompterLive.Shared.Contracts.AppRoutes`, `UiTestIds`, and other named constants over inline route or selector strings.
3737
- Use `data-testid` first. Raw text, role-name, and CSS selectors are allowed only when no stable `data-testid` contract exists yet and the missing contract is fixed in the same task.

tests/PrompterLive.App.UITests/Infrastructure/StandaloneAppFixture.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ public async Task<IPage> NewPageAsync()
5353
});
5454
await ConfigureMediaHarnessAsync(context);
5555
_contexts.Add(context);
56-
return await context.NewPageAsync();
56+
var page = await context.NewPageAsync();
57+
page.SetDefaultNavigationTimeout(BrowserTestConstants.Timing.DefaultNavigationTimeoutMs);
58+
page.SetDefaultTimeout(BrowserTestConstants.Timing.ExtendedVisibleTimeoutMs);
59+
return page;
5760
}
5861

5962
private static class SharedRuntime

tests/PrompterLive.App.UITests/Infrastructure/TestAssemblyConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ namespace PrompterLive.App.UITests;
44

55
internal static class UiTestExecution
66
{
7-
public const int MaxParallelThreads = 4;
7+
public const int MaxParallelThreads = 2;
88
}

tests/PrompterLive.App.UITests/Support/BrowserTestConstants.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ public static class Localization
412412

413413
public static class Timing
414414
{
415+
public const int DefaultNavigationTimeoutMs = 20_000;
415416
public const int FastVisibleTimeoutMs = 5_000;
416417
public const int DefaultVisibleTimeoutMs = 10_000;
417418
public const int ExtendedVisibleTimeoutMs = 15_000;
@@ -448,10 +449,10 @@ public static class Regexes
448449
public static class Keyboard
449450
{
450451
public const string ArrowRight = "ArrowRight";
451-
public const string SelectAll = "Meta+A";
452+
public const string SelectAll = "ControlOrMeta+A";
452453
public const string Backspace = "Backspace";
453-
public const string Undo = "Meta+Z";
454-
public const string Redo = "Meta+Shift+Z";
454+
public const string Undo = "ControlOrMeta+Z";
455+
public const string Redo = "ControlOrMeta+Shift+Z";
455456
public const string Shift = "Shift";
456457
}
457458

0 commit comments

Comments
 (0)