Skip to content

Commit

Permalink
fix: added middleware file to tests via files ref
Browse files Browse the repository at this point in the history
  • Loading branch information
wyattjoh committed Aug 31, 2022
1 parent cd02e9e commit 13d87eb
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions test/e2e/app-dir/index.test.ts
Expand Up @@ -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',
Expand Down Expand Up @@ -735,6 +727,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 {
Expand Down

0 comments on commit 13d87eb

Please sign in to comment.