diff --git a/.changeset/sour-carpets-collect.md b/.changeset/sour-carpets-collect.md new file mode 100644 index 000000000..16c3372af --- /dev/null +++ b/.changeset/sour-carpets-collect.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": minor +--- + +Add datagrid support in vouchers e2e tests diff --git a/cypress/e2e/discounts/vouchers/createVouchers.js b/cypress/e2e/discounts/vouchers/createVouchers.js index f47a5bf99..cce781103 100644 --- a/cypress/e2e/discounts/vouchers/createVouchers.js +++ b/cypress/e2e/discounts/vouchers/createVouchers.js @@ -10,11 +10,9 @@ import { addPayment, createCheckoutWithVoucher, } from "../../../support/api/utils/ordersUtils"; -import * as productsUtils - from "../../../support/api/utils/products/productsUtils"; -import { - updateTaxConfigurationForChannel, -} from "../../../support/api/utils/taxesUtils"; +import * as productsUtils from "../../../support/api/utils/products/productsUtils"; +import { updateTaxConfigurationForChannel } from "../../../support/api/utils/taxesUtils"; +import { ensureCanvasStatic } from "../../../support/customCommands/sharedElementsOperations/canvas"; import { createVoucher, discountOptions, @@ -166,7 +164,7 @@ describe("As an admin I want to create voucher", () => { const voucherCode = `${startsWith}${faker.datatype.number()}`; cy.clearSessionData().loginUserViaRequest().visit(urlList.vouchers); - cy.expectSkeletonIsVisible(); + ensureCanvasStatic(); createChannel({ name }).then(channel => { createdChannel = channel; diff --git a/cypress/support/pages/discounts/vouchersPage.js b/cypress/support/pages/discounts/vouchersPage.js index dbe8c9b01..36be9c3d5 100644 --- a/cypress/support/pages/discounts/vouchersPage.js +++ b/cypress/support/pages/discounts/vouchersPage.js @@ -1,10 +1,8 @@ import { VOUCHERS_SELECTORS } from "../../../elements/discounts/vouchers"; import { BUTTON_SELECTORS } from "../../../elements/shared/button-selectors"; -import { - urlList, - voucherDetailsUrl, -} from "../../../fixtures/urlList"; +import { urlList, voucherDetailsUrl } from "../../../fixtures/urlList"; import { ONE_PERMISSION_USERS } from "../../../fixtures/users"; +import { ensureCanvasStatic } from "../../../support/customCommands/sharedElementsOperations/canvas"; import { createCheckoutWithVoucher } from "../../api/utils/ordersUtils"; import { selectChannelInDetailsPages } from "../channelsPage"; @@ -103,7 +101,7 @@ export function loginAndCreateCheckoutForVoucherWithDiscount({ cy.clearSessionData() .loginUserViaRequest("auth", ONE_PERMISSION_USERS.discount) .visit(urlList.vouchers); - cy.expectSkeletonIsVisible(); + ensureCanvasStatic(); createVoucher({ voucherCode, voucherValue,