diff --git a/tests/e2e/old-tab-chunk-recovery.spec.ts b/tests/e2e/old-tab-chunk-recovery.spec.ts index 36dc61d1..d43f549d 100644 --- a/tests/e2e/old-tab-chunk-recovery.spec.ts +++ b/tests/e2e/old-tab-chunk-recovery.spec.ts @@ -179,25 +179,21 @@ async function preloadedWith(dist: string, page: string): Promise { } // 1103/11-09. Vite preloads a chunk together with the chunks it imports, so a -// missing chunk leaves itself and the chunks preloaded with it unused: in the -// A tab those of A's platform page (the tab is still on A while recovery -// reads the release manifest), in the B tab those of B's context routes -// module for the feature's list page. The fixture's preload check reports them in every -// engine (WebKit's own three-second warning only did when its timer ran -// before the test ended). They are the provoked failure's own effect; only -// those chunks are allowed. +// missing chunk leaves itself and the chunks preloaded with it unused. The +// fixture's preload check reads only the documents open at the end +// (tests/support/browser/preload-use.ts), and the A tab has become a B +// document by then, so only B's: those of B's context routes module for the +// feature's list page. The check reports them in every engine (WebKit's own +// three-second warning only did when its timer ran before the test ended). +// They are the provoked failure's own effect; only those chunks are allowed +// (1112/03-06: the A list here covered nothing but a B chunk of the same name). test.use({ allowedBrowserFailure: async ({ browserName: _engine }, provide) => { if (!builds) throw new Error("Fixture builds were not prepared."); - const aManifest = await viteManifest(builds.dist.a); const bManifest = await viteManifest(builds.dist.b); - const files = [ - ...(await preloadedWith(builds.dist.a, pageSource(aManifest, PLATFORM))), - ...(await preloadedWith( - builds.dist.b, - routesSource(bManifest, pageSource(bManifest, FEATURE())), - )), - ].map((file) => file.replaceAll(".", String.raw`\.`)); + const files = ( + await preloadedWith(builds.dist.b, routesSource(bManifest, pageSource(bManifest, FEATURE()))) + ).map((file) => file.replaceAll(".", String.raw`\.`)); await provide( new RegExp( [