graphql-engine/console/cypress/support/notifications.ts
Stefano Magni 5764174087 test(console): Skip a lot of flaky E2E tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5535
GitOrigin-RevId: 0544edf4d8fdd1a6a8cc326a8b107ee47d2389c3
2022-08-31 08:02:51 +00:00

34 lines
949 B
TypeScript

Cypress.Commands.add('expectSuccessNotification', () => {
cy.get('.notification-success').should('be.visible');
});
Cypress.Commands.add('expectSuccessNotificationWithTitle', (title: string) => {
cy.get('.notification-success').should('be.visible').should('contain', title);
});
Cypress.Commands.add(
'expectSuccessNotificationWithMessage',
(message: string) => {
cy.get('.notification-success')
.should('be.visible')
.should('contain', message);
}
);
Cypress.Commands.add('expectErrorNotification', () => {
cy.get('.notification-error').should('be.visible');
});
Cypress.Commands.add('expectErrorNotificationWithTitle', (title: string) => {
cy.get('.notification-error').should('be.visible').should('contain', title);
});
Cypress.Commands.add(
'expectErrorNotificationWithMessage',
(message: string) => {
cy.get('.notification-error')
.should('be.visible')
.should('contain', message);
}
);