Skip to content

Commit

Permalink
Add e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
imagoiq committed Sep 27, 2023
1 parent 95aa0d3 commit 635e428
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/documentation/cypress/e2e/toast.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
describe('toast', () => {
describe('default', () => {
beforeEach(() => {
cy.visit(`/iframe.html?id=components-toast--auto-close`);
cy.get('button.btn').as('triggerCreateToast');
});

it('should hide on close button click', () => {
cy.get('@triggerCreateToast').click();
cy.get('.toast').should('exist');
cy.get('.toast-close-button').click();
cy.get('.toast').should('not.exist');
});
});
});

0 comments on commit 635e428

Please sign in to comment.