From ea8d5020965cfa79b50fe54a8de4c1c20bc83385 Mon Sep 17 00:00:00 2001 From: Zack Tanner <1939140+ztanner@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:49:09 -0700 Subject: [PATCH] fix failing ppr deploy test --- test/e2e/app-dir/ppr-full/ppr-full.test.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/e2e/app-dir/ppr-full/ppr-full.test.ts b/test/e2e/app-dir/ppr-full/ppr-full.test.ts index 9b636ac3aa3b8..0a070ba5f6b45 100644 --- a/test/e2e/app-dir/ppr-full/ppr-full.test.ts +++ b/test/e2e/app-dir/ppr-full/ppr-full.test.ts @@ -458,7 +458,14 @@ describe('ppr-full', () => { // We expect to get the fallback shell. $ = await next.render$(pathname) - expect($('[data-layout]').data('layout')).toBe(fallbackID) + + // When deployed to Vercel, it will serve a stale version of the dynamic shell + // Whereas with `next start` it will serve the fallback shell + if (isNextDeploy) { + expect($('[data-layout]').data('layout')).toBe(dynamicID) + } else { + expect($('[data-layout]').data('layout')).toBe(fallbackID) + } // Let's wait for the page to be revalidated. let revalidatedDynamicID: string