From 7dcd07de49d5536fc5886527a68e1ca1b0c5cbf3 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Fri, 22 Nov 2024 20:18:31 +0100 Subject: [PATCH] Change in behavior with async metadata and prefetch --- test/e2e/app-dir/navigation/navigation.test.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/test/e2e/app-dir/navigation/navigation.test.ts b/test/e2e/app-dir/navigation/navigation.test.ts index a38a12a931d0a..6964967a88d1a 100644 --- a/test/e2e/app-dir/navigation/navigation.test.ts +++ b/test/e2e/app-dir/navigation/navigation.test.ts @@ -891,23 +891,10 @@ describe('app dir - navigation', () => { .elementByCss("[href='/metadata-await-promise/nested']") .click() - if (!isNextDev) { - // next-dev has no prefetch - expect( - await browser - .waitForElementByCss( - '#loading', - // Wait a bit longer than the prefetch duration since the click takes a while to register and the fallback render also takes time. - resolveMetadataDuration + 500 - ) - .text() - ).toEqual('Loading') - expect(await browser.elementByCss('title').text()).toBe('Async Title') - } - await waitFor(resolveMetadataDuration) expect(await browser.elementById('page-content').text()).toBe('Content') + expect(await browser.elementByCss('title').text()).toBe('Async Title') }) it('shows a fallback when prefetch completed', async () => {