fix tests for vouchers (#2012)

This commit is contained in:
Karolina Rakoczy 2022-04-28 09:52:57 +02:00 committed by GitHub
parent eabc944604
commit bd15c52ee5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -133,6 +133,7 @@ Cypress.Commands.add(
Cypress.Commands.add("softExpectSkeletonIsVisible", () => {
cy.get(SHARED_ELEMENTS.circularProgress).should("not.exist");
cy.get(SHARED_ELEMENTS.progressBar).should("be.visible");
cy.get("body").then($body => {
if ($body.find(SHARED_ELEMENTS.skeleton).length) {
cy.softAssertVisibility(SHARED_ELEMENTS.skeleton);

View file

@ -1,7 +1,6 @@
import { VOUCHERS_SELECTORS } from "../../../elements/discounts/vouchers";
import { BUTTON_SELECTORS } from "../../../elements/shared/button-selectors";
import { voucherDetailsUrl } from "../../../fixtures/urlList";
import { urlList } from "../../../fixtures/urlList";
import { urlList, voucherDetailsUrl } from "../../../fixtures/urlList";
import { ONE_PERMISSION_USERS } from "../../../fixtures/users";
import { createCheckoutWithVoucher } from "../../api/utils/ordersUtils";
import { selectChannelInDetailsPages } from "../channelsPage";
@ -57,7 +56,7 @@ export function createVoucher({
}
cy.get(BUTTON_SELECTORS.confirm)
.click()
.confirmationMessageShouldDisappear();
.confirmationMessageShouldAppear();
}
export function setVoucherDate({