Skip to content

Commit

Permalink
Enable new "use cache" test now that manifest singleton is page-scoped
Browse files Browse the repository at this point in the history
  • Loading branch information
unstubbable committed Oct 23, 2024
1 parent 53d1faf commit 0807add
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions test/e2e/app-dir/use-cache/use-cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,13 @@ describe('use-cache', () => {
})
}

// TODO: There's a bug with the server actions manifest singleton during next
// build that would make this test flaky. Enable the test for isNextStart when
// the singleton has been replaced with a proper solution.
if (!isNextStart) {
it('can reference server actions in "use cache" functions', async () => {
const browser = await next.browser('/with-server-action')
expect(await browser.elementByCss('p').text()).toBe('initial')
await browser.elementByCss('button').click()
it('can reference server actions in "use cache" functions', async () => {
const browser = await next.browser('/with-server-action')
expect(await browser.elementByCss('p').text()).toBe('initial')
await browser.elementByCss('button').click()

await retry(async () => {
expect(await browser.elementByCss('p').text()).toBe('result')
})
await retry(async () => {
expect(await browser.elementByCss('p').text()).toBe('result')
})
}
})
})

0 comments on commit 0807add

Please sign in to comment.