From 635e42846beb3da6a630b276f382bf8717fc8751 Mon Sep 17 00:00:00 2001 From: imagoiq <12294151+imagoiq@users.noreply.github.com> Date: Wed, 27 Sep 2023 14:47:56 +0200 Subject: [PATCH] Add e2e test --- packages/documentation/cypress/e2e/toast.cy.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 packages/documentation/cypress/e2e/toast.cy.ts 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'); + }); + }); +});