fix(e2e): improve test stability and developer experience (#337)
* fix(e2e): add masks for dynamic content and increase timeouts for slow servers - Add HOST_MASKS for Tool Input/Result panels with dynamic timestamps - Add say-server to SLOW_SERVERS (10s) for TTS model download - Add say-server to EXTRA_WAIT_MS (30s) in generate-grid-screenshots * feat: add update-lock:docker script to regenerate lockfile with public registry * pin package versions for dev compatibility * feat(basic-host): add ?theme=hide query param to hide theme toggle in screenshots - Add hideThemeToggle param to getQueryParams() - Conditionally render ThemeToggle based on ?theme=hide - Update e2e tests to use ?theme=hide for consistent screenshots * update screenshots * update screenshots * fix(husky): load Node.js environment for GUI apps like GitHub Desktop * fix(e2e): increase map-server wait time to 15s for tile loading * fix(e2e): increase waitForAppLoad timeout to 30s for nested iframe loading * ci: add workflow to update e2e snapshots * ci: trigger snapshot update on push to this branch * chore: update e2e snapshots [skip ci] * ci: trigger CI after snapshot update * style: fix prettier formatting in update-snapshots workflow * fix: pin seroval, seroval-plugins, and solid-js for artifactory compatibility --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
d61b5ab4cf
commit
e479497371
1 changed files with 119 additions and 26 deletions
|
|
@ -28,6 +28,8 @@ const EXTRA_WAIT_MS: Record<string, number> = {
|
|||
// Servers to skip (screenshots maintained manually)
|
||||
const SKIP_SERVERS = new Set([
|
||||
"video-resource", // Uses custom screenshot from PR comment
|
||||
"qr-server", // Uses custom screenshot from PR comment
|
||||
"say-server", // TTS model download from HuggingFace can be slow
|
||||
]);
|
||||
|
||||
// Optional: filter to a single example via EXAMPLE env var (folder name)
|
||||
|
|
@ -103,9 +105,10 @@ async function waitForAppLoad(page: Page) {
|
|||
|
||||
/**
|
||||
* Load a server by selecting it from dropdown and clicking Call Tool.
|
||||
* Uses ?theme=hide to hide the theme toggle for consistent screenshots.
|
||||
*/
|
||||
async function loadServer(page: Page, serverName: string) {
|
||||
await page.goto("/");
|
||||
await page.goto("/?theme=hide");
|
||||
// Wait for servers to connect (select becomes enabled when servers are ready)
|
||||
await expect(page.locator("select").first()).toBeEnabled({ timeout: 30000 });
|
||||
await page.locator("select").first().selectOption({ label: serverName });
|
||||
|
|
|
|||
Loading…
Reference in a new issue