test: unflake instant-navs-devtools test #94171
<!-- __NEXT_TEST_REPORT_COMMENT__ -->
Failing test suites
Commit: 99f5a60e718aee06a5740b517a4f18b171e58501 | About building and testing Next.js
<!-- J"test cache components dev (3/6) / build" -->pnpm test-dev test/development/app-dir/hmr-intercept-routes/hmr-intercept-routes.test.ts (job)
<details>
<summary>Expand output</summary>
● hmr-intercept-routes › should update intercept routes via HMR
page.waitForSelector: Timeout 10000ms exceeded.
Call log:
- waiting for locator('#default-intercept') to be visible
545 |
546 | return this.startChain(async () => {
> 547 | const el = await page.waitForSelector(selector, {
| ^
548 | timeout,
549 | state,
550 | })
at waitForSelector (lib/browsers/playwright.ts:547:29)
at Playwright._chain (lib/browsers/playwright.ts:677:23)
at Playwright._chain [as startChain] (lib/browsers/playwright.ts:658:17)
at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:546:17)
at Object.waitForElementByCss (development/app-dir/hmr-intercept-routes/hmr-intercept-routes.test.ts:38:21)
</details>
<!-- /J"test cache components dev (3/6) / build" -->
<!-- J"test cache components dev (4/6) / build" -->pnpm test-dev test/development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts (job)
<details>
<summary>Expand output</summary>
● instant-nav-panel › SPA captures › should re-arm capture and return to awaiting navigation after Continue Rendering from SPA state
expect(received).toMatch(expected)
Expected pattern: /next-instant-navigation-testing=[^;]+/
Received string: ""
37 | await retry(async () => {
38 | const cookie = await browser.eval(() => document.cookie)
> 39 | expect(cookie).toMatch(/next-instant-navigation-testing=[^;]+/)
| ^
40 | })
41 | }
42 |
at toMatch (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:39:22)
at retry (lib/next-test-utils.ts:867:14)
at waitForInstantModeCookie (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:37:5)
at Object.<anonymous> (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:543:7)
● instant-nav-panel › transitions between capture types › should avoid showing stale SPA state when reloading from a captured SPA state into captured MPA state
locator.waitFor: Timeout 30000ms exceeded.
Call log:
- waiting for locator('[data-testid="dynamic-skeleton"]') to be visible
208 | await browser
209 | .locator('[data-testid="dynamic-skeleton"]')
> 210 | .waitFor({ state: 'visible', timeout: 30000 })
| ^
211 | await browser
212 | .locator('[data-testid="param-skeleton"]')
213 | .waitFor({ state: 'visible' })
at waitFor (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:210:8)
at Object.expectTargetPageMpaShell (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:580:13)
</details>
<!-- /J"test cache components dev (4/6) / build" -->
<!-- J"test node streams cache components dev (3/6) / build" -->pnpm test-dev test/development/app-dir/hmr-intercept-routes/hmr-intercept-routes.test.ts (job)
<details>
<summary>Expand output</summary>
● hmr-intercept-routes › should update intercept routes via HMR
page.waitForSelector: Timeout 10000ms exceeded.
Call log:
- waiting for locator('#default-intercept') to be visible
545 |
546 | return this.startChain(async () => {
> 547 | const el = await page.waitForSelector(selector, {
| ^
548 | timeout,
549 | state,
550 | })
at waitForSelector (lib/browsers/playwright.ts:547:29)
at Playwright._chain (lib/browsers/playwright.ts:677:23)
at Playwright._chain [as startChain] (lib/browsers/playwright.ts:658:17)
at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:546:17)
at Object.waitForElementByCss (development/app-dir/hmr-intercept-routes/hmr-intercept-routes.test.ts:38:21)
</details>
<!-- /J"test node streams cache components dev (3/6) / build" -->
<!-- J"test node streams cache components dev (4/6) / build" -->pnpm test-dev test/development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts (job)
<details>
<summary>Expand output</summary>
● instant-nav-panel › SPA captures › should re-arm capture and return to awaiting navigation after Continue Rendering from SPA state
expect(received).toMatch(expected)
Expected pattern: /next-instant-navigation-testing=[^;]+/
Received string: ""
37 | await retry(async () => {
38 | const cookie = await browser.eval(() => document.cookie)
> 39 | expect(cookie).toMatch(/next-instant-navigation-testing=[^;]+/)
| ^
40 | })
41 | }
42 |
at toMatch (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:39:22)
at retry (lib/next-test-utils.ts:867:14)
at waitForInstantModeCookie (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:37:5)
at Object.<anonymous> (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:543:7)
● instant-nav-panel › transitions between capture types › should avoid showing stale SPA state when reloading from a captured SPA state into captured MPA state
locator.waitFor: Timeout 30000ms exceeded.
Call log:
- waiting for locator('[data-testid="dynamic-skeleton"]') to be visible
208 | await browser
209 | .locator('[data-testid="dynamic-skeleton"]')
> 210 | .waitFor({ state: 'visible', timeout: 30000 })
| ^
211 | await browser
212 | .locator('[data-testid="param-skeleton"]')
213 | .waitFor({ state: 'visible' })
at waitFor (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:210:8)
at Object.expectTargetPageMpaShell (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:580:13)
</details>
<!-- /J"test node streams cache components dev (4/6) / build" -->
<!-- J"test node streams dev (4/6) / build" -->pnpm test-dev test/development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts (job)
<details>
<summary>Expand output</summary>
● instant-nav-panel › SPA captures › should re-arm capture and return to awaiting navigation after Continue Rendering from SPA state
expect(received).toMatch(expected)
Expected pattern: /next-instant-navigation-testing=[^;]+/
Received string: ""
37 | await retry(async () => {
38 | const cookie = await browser.eval(() => document.cookie)
> 39 | expect(cookie).toMatch(/next-instant-navigation-testing=[^;]+/)
| ^
40 | })
41 | }
42 |
at toMatch (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:39:22)
at retry (lib/next-test-utils.ts:867:14)
at waitForInstantModeCookie (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:37:5)
at Object.<anonymous> (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:543:7)
● instant-nav-panel › transitions between capture types › should avoid showing stale SPA state when reloading from a captured SPA state into captured MPA state
locator.waitFor: Timeout 30000ms exceeded.
Call log:
- waiting for locator('[data-testid="dynamic-skeleton"]') to be visible
208 | await browser
209 | .locator('[data-testid="dynamic-skeleton"]')
> 210 | .waitFor({ state: 'visible', timeout: 30000 })
| ^
211 | await browser
212 | .locator('[data-testid="param-skeleton"]')
213 | .waitFor({ state: 'visible' })
at waitFor (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:210:8)
at Object.expectTargetPageMpaShell (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:580:13)
</details>
<!-- /J"test node streams dev (4/6) / build" -->
<!-- J"test prod (10/10) / build" -->pnpm test-start test/production/app-dir/metadata-static-route-cache/metadata-static-route-cache.test.ts (job)
<details>
<summary>Expand output</summary>
● app dir - metadata static routes cache › should generate different content after replace the static metadata file
next already started
65 | ) {
66 | if (this.childProcess) {
> 67 | throw new Error('next already started')
| ^
68 | }
69 |
70 | this._cliOutput = ''
at NextStartInstance.start (lib/next-modes/next-start.ts:67:13)
at Object.start (production/app-dir/metadata-static-route-cache/metadata-static-route-cache.test.ts:17:16)
</details>
<!-- /J"test prod (10/10) / build" -->
<!-- J"test turbopack dev (3/7) / build" -->pnpm test-dev-turbo test/development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts (turbopack) (job)
<details>
<summary>Expand output</summary>
● instant-nav-panel › SPA captures › should re-arm capture and return to awaiting navigation after Continue Rendering from SPA state
expect(received).toMatch(expected)
Expected pattern: /next-instant-navigation-testing=[^;]+/
Received string: ""
37 | await retry(async () => {
38 | const cookie = await browser.eval(() => document.cookie)
> 39 | expect(cookie).toMatch(/next-instant-navigation-testing=[^;]+/)
| ^
40 | })
41 | }
42 |
at toMatch (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:39:22)
at retry (lib/next-test-utils.ts:867:14)
at waitForInstantModeCookie (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:37:5)
at Object.<anonymous> (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:543:7)
● instant-nav-panel › transitions between capture types › should avoid showing stale SPA state when reloading from a captured SPA state into captured MPA state
locator.waitFor: Timeout 30000ms exceeded.
Call log:
- waiting for locator('[data-testid="dynamic-skeleton"]') to be visible
208 | await browser
209 | .locator('[data-testid="dynamic-skeleton"]')
> 210 | .waitFor({ state: 'visible', timeout: 30000 })
| ^
211 | await browser
212 | .locator('[data-testid="param-skeleton"]')
213 | .waitFor({ state: 'visible' })
at waitFor (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:210:8)
at Object.expectTargetPageMpaShell (development/app-dir/instant-navs-devtools/instant-navs-devtools.test.ts:580:13)
</details>
<!-- /J"test turbopack dev (3/7) / build" -->
<!-- J"test turbopack dev (4/7) / build" -->pnpm test-dev-turbo test/e2e/app-dir/instant-navigation-testing-api/instant-navigation-testing-api.test.ts (turbopack) (job)
<details>
<summary>Expand output</summary>
● instant-navigation-testing-api › renders runtime-prefetched content instantly during navigation
locator.waitFor: Timeout 60000ms exceeded.
Call log:
- waiting for locator('[data-testid="search-param-value"]') to be visible
105 | '[data-testid="search-param-value"]'
106 | )
> 107 | await searchParamValue.waitFor({ state: 'visible' })
| ^
108 | expect(await searchParamValue.textContent()).toContain(
109 | 'myParam: testValue'
110 | )
at waitFor (e2e/app-dir/instant-navigation-testing-api/instant-navigation-testing-api.test.ts:107:30)
at instant (../packages/next-playwright/dist/index.js:50:16)
at Object.<anonymous> (e2e/app-dir/instant-navigation-testing-api/instant-navigation-testing-api.test.ts:99:5)
</details>
<!-- /J"test turbopack dev (4/7) / build" -->
<!-- __NEXT_STATS_COMMENT__ -->
Stats cancelled
Commit: 99f5a60e718aee06a5740b517a4f18b171e58501
View workflow run
Approved these changes.
samselikoff
lubieowoce
The
elementByCssInstantcall seems flaky (shows up in failed test runs 500 times today: see datadog). It doesn't seem to be load bearing (the test suite still passes after replacing it with a normalelementByCss), so i'm gonna get rid of this. This also lets us remove a unecessary retry loop.