Skip to content

Commit

Permalink
Update src/components/Toast/Toast.test.js
Browse files Browse the repository at this point in the history
Co-authored-by: Vlad Ifrim <ifrimvlad@gmail.com>
  • Loading branch information
Yasintrm and ifrim authored Nov 17, 2023
1 parent 8f648cf commit 9e1d523
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions src/components/Toast/Toast.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,17 @@ describe('Toast', () => {
cy.mount(<Component onClick={onClick} />)
.get('button')
.click()
.then(() => {
cy.get(selectors.toastContainer)
.should('exist')
.find(`.${classNames.message}.${className}`)
.should('exist')
.find(selectors.icons.icon)
.should('exist')
.and('have.class', theme === 'success' ? classNames.icons.success : classNames.icons.warning)
.closest(selectors.message)
.find(selectors.messageContent)
.should('exist')
.and('have.text', `demo ${theme}`);
});
.get(selectors.toastContainer)
.should('exist')
.find(`.${classNames.message}.${className}`)
.should('exist')
.find(selectors.icons.icon)
.should('exist')
.and('have.class', theme === 'success' ? classNames.icons.success : classNames.icons.warning)
.closest(selectors.message)
.find(selectors.messageContent)
.should('exist')
.and('have.text', `demo ${theme}`);
});
});
});

0 comments on commit 9e1d523

Please sign in to comment.