saleor-dashboard/cypress/support/customCommands/sharedElementsOperations/confirmationMessages.js
Karol e69eb9cc5f
Cypress 2608 staff member tests (#2902)
* fix existing

* add SALEOR_3508

* add data-test-id needed for 3509

* add TODOs

* 3509 done, work on 3510

* done 3510

* found bug blocking test 3507, gh 2847

* pr review adjustments

* pr adjustments

* additional pr adjustments
2022-12-23 11:30:21 +01:00

16 lines
570 B
JavaScript

import { SHARED_ELEMENTS } from "../../../elements/shared/sharedElements";
Cypress.Commands.add("confirmationMessageShouldDisappear", () => {
cy.get(SHARED_ELEMENTS.notificationSuccess)
.should("be.visible")
.get(SHARED_ELEMENTS.notificationSuccess)
.should("not.exist");
});
Cypress.Commands.add("confirmationMessageShouldAppear", () => {
cy.get(SHARED_ELEMENTS.notificationSuccess).should("be.visible");
});
Cypress.Commands.add("confirmationErrorMessageShouldAppear", () => {
cy.get(SHARED_ELEMENTS.notificationFailure).should("be.visible");
});