Skip to content

Conversation

@gchan
Copy link
Contributor

@gchan gchan commented Oct 30, 2025

Updates Playwright test expectations after the Playwright upgrade in #121.

The Playwright upgrade changed the fixture lifecycle timing. When a 1ms timeout is set, the timeout now occurs during the context fixture setup rather than browserName fixture setup.

This PR updates the test assertions to reflect the new error message format.

AMP LLM model told me this:

In Playwright, tests use fixtures like browserName, browser, context, and page. When you set a very short timeout (1ms), the test fails during fixture setup. The newer version of Playwright now times out during the "context" fixture setup (creating the browser context) rather than the "browserName" fixture setup. This is likely because newer Playwright optimizes browser launching to be faster or lazy-loads certain operations, so the timeout now hits later in the setup chain.

Playwright fixtures follow a hierarchical setup order:

browserName - Simple string constant (chromium/firefox/webkit)
browser - Worker-scoped; launches once per worker process (expensive operation)
context - Test-scoped; creates isolated browser context (like incognito mode) per test
page - Test-scoped; creates a page/tab within the context per test

When you set a 1ms timeout, the test fails during fixture setup. The newer Playwright version changed where the timeout triggers—from "browserName" to "context". This suggests the browser launch (browser fixture) now completes faster or is optimized differently, so the 1ms timeout now expires during the context creation step instead of earlier in the chain.
@gchan gchan force-pushed the te-4877-soc2-vulnerability-detected-in-test-collector-javascript branch from 5bdeecc to 95d68e0 Compare October 30, 2025 21:36
@gchan gchan requested a review from a team October 30, 2025 21:36
@gchan
Copy link
Contributor Author

gchan commented Oct 30, 2025

@nprizal could you please take a look at the spec changes and verify they are sensible and still correctly verify behaviour?

@gchan gchan merged commit f948395 into main Nov 3, 2025
1 check passed
@gchan gchan deleted the te-4877-soc2-vulnerability-detected-in-test-collector-javascript branch November 3, 2025 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants