From 6ad189fcac69b648b66b7d28b6779416d71c9e82 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Fri, 26 Aug 2022 11:35:29 +0100 Subject: [PATCH] fix: added middleware file to tests via files ref --- test/e2e/app-dir/index.test.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test/e2e/app-dir/index.test.ts b/test/e2e/app-dir/index.test.ts index 62d4a6b9ee0e61d..3f9b076c2aa2765 100644 --- a/test/e2e/app-dir/index.test.ts +++ b/test/e2e/app-dir/index.test.ts @@ -22,15 +22,7 @@ describe('app dir', () => { function runTests({ assetPrefix }: { assetPrefix?: boolean }) { beforeAll(async () => { next = await createNext({ - files: { - public: new FileRef(path.join(__dirname, 'app/public')), - styles: new FileRef(path.join(__dirname, 'app/styles')), - pages: new FileRef(path.join(__dirname, 'app/pages')), - app: new FileRef(path.join(__dirname, 'app/app')), - 'next.config.js': new FileRef( - path.join(__dirname, 'app/next.config.js') - ), - }, + files: new FileRef(path.join(__dirname, 'app')), dependencies: { react: 'experimental', 'react-dom': 'experimental', @@ -748,6 +740,7 @@ describe('app dir', () => { // middleware sees any flight data on the request it'll redirect to // a page with an element of #failure, otherwise, we'll see the // element for #success. + await browser.waitForElementByCss(`#navigate-${method}`) await browser.elementById(`navigate-${method}`).click() await browser.waitForElementByCss('#success') } finally {