diff --git a/packages/documentation/cypress/e2e/toast.cy.ts b/packages/documentation/cypress/e2e/toast.cy.ts new file mode 100644 index 0000000000..9626b67d3c --- /dev/null +++ b/packages/documentation/cypress/e2e/toast.cy.ts @@ -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'); + }); + }); +});