export class Snackbar { static successShouldBeVisible(): void { cy.get('.mat-mdc-snack-bar-container.success').should('be.visible'); this.close(); } static errorShouldBeVisible(): void { cy.get('.mat-mdc-snack-bar-container.error').should('be.visible'); this.close(); } private static close(): void { this.snackBarContainer.contains('close').click(); this.snackBarContainer.should('not.exist'); } private static get snackBarContainer(): Cypress.Chainable> { return cy.get('.mat-mdc-snack-bar-container'); } }