Skip to content

Commit

Permalink
Update tests for closing animations
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Mar 22, 2024
1 parent 9dd0844 commit b4475c3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/modal_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ describe('ModalController', () => {

const closeModalButton = document.querySelector("[data-action='modal#close']")
closeModalButton.click()
expect(dialog.hasAttribute("closing")).to.equal(true)

await Promise.all(dialog.getAnimations().map((animation) => animation.finished))

expect(dialog.hasAttribute("closing")).to.equal(false)
expect(dialog.hasAttribute("open")).to.equal(false)
})

Expand Down

0 comments on commit b4475c3

Please sign in to comment.