Skip to content

Commit

Permalink
filled out test to toggle from user dismissable state
Browse files Browse the repository at this point in the history
  • Loading branch information
FireLemons committed Oct 7, 2023
1 parent 259c1aa commit e267e48
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/javascript/__tests__/notifier.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,12 @@ describe('Notifications', () => {
test('will remove the dismiss button for the user if is present', (done) => {
$(() => {
try {
expect(notificationsElement[0].innerHTML).toContain(notificationDefaultMessage)
expect(notification.notificationElement.children('button').length).toBe(1)

notification.toggleUserDismissable()

expect(notification.notificationElement.children('button').length).toBe(0)
done()
} catch (error) {
done(error)
Expand Down

0 comments on commit e267e48

Please sign in to comment.