Add datagrid support in vouchers e2e tests (#4054)

This commit is contained in:
Paweł Chyła 2023-08-03 10:51:19 +02:00 committed by GitHub
parent 9037c9cfd1
commit 440f5e6674
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 11 deletions

View file

@ -0,0 +1,5 @@
---
"saleor-dashboard": minor
---
Add datagrid support in vouchers e2e tests

View file

@ -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;

View file

@ -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,