From 2277eb92fd911096249e4d310244ce0526433161 Mon Sep 17 00:00:00 2001 From: Javi Velasco Date: Tue, 25 Oct 2022 03:33:05 +0200 Subject: [PATCH] Enable appDir e2e deploy tests #1 (#41759) Enables `appDir` test for `deploy` in the `test/e2e/app-dir/index.test.ts` test suite. --- test/e2e/app-dir/index.test.ts | 148 +++++++++++++++++---------------- 1 file changed, 76 insertions(+), 72 deletions(-) diff --git a/test/e2e/app-dir/index.test.ts b/test/e2e/app-dir/index.test.ts index a8740a0d0d10385..9e38a16ffbd1c27 100644 --- a/test/e2e/app-dir/index.test.ts +++ b/test/e2e/app-dir/index.test.ts @@ -15,12 +15,6 @@ import webdriver from 'next-webdriver' describe('app dir', () => { const isDev = (global as any).isNextDev - - if ((global as any).isNextDeploy) { - it('should skip next deploy for now', () => {}) - return - } - let next: NextInstance function runTests() { @@ -139,22 +133,24 @@ describe('app dir', () => { expect(html).toContain('hello from app/dashboard') }) - it('should serve /index as separate page', async () => { - const html = await renderViaHTTP(next.url, '/dashboard/index') - expect(html).toContain('hello from app/dashboard/index') - // should load chunks generated via async import correctly with React.lazy - expect(html).toContain('hello from lazy') - // should support `dynamic` in both server and client components - expect(html).toContain('hello from dynamic on server') - expect(html).toContain('hello from dynamic on client') - }) + if (!(global as any).isNextDeploy) { + it('should serve /index as separate page', async () => { + const html = await renderViaHTTP(next.url, '/dashboard/index') + expect(html).toContain('hello from app/dashboard/index') + // should load chunks generated via async import correctly with React.lazy + expect(html).toContain('hello from lazy') + // should support `dynamic` in both server and client components + expect(html).toContain('hello from dynamic on server') + expect(html).toContain('hello from dynamic on client') + }) - it('should serve polyfills for browsers that do not support modules', async () => { - const html = await renderViaHTTP(next.url, '/dashboard/index') - expect(html).toMatch( - /