Skip to content

Commit

Permalink
Merge pull request #2301 from alphagov/ldeb-fix-accordion-test-isolation
Browse files Browse the repository at this point in the history
Fix test isolation of accordion component tests
  • Loading branch information
lfdebrux authored Aug 10, 2021
2 parents e64a8e4 + 1198bda commit f86488e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/govuk/components/accordion/accordion.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ describe('/components/accordion', () => {
})

describe('when JavaScript is available', () => {
afterEach(async () => {
// clear accordion state
await page.evaluate(() => window.sessionStorage.clear())
})

it('should indicate that the sections are not expanded', async () => {
await page.goto(baseUrl + '/components/accordion/preview', { waitUntil: 'load' })

Expand Down

0 comments on commit f86488e

Please sign in to comment.