fix test for home page analitics (#2216)
This commit is contained in:
parent
df55dba571
commit
fefaeb00a8
1 changed files with 6 additions and 2 deletions
|
@ -6,13 +6,14 @@ import faker from "faker";
|
||||||
import { HOMEPAGE_SELECTORS } from "../../elements/homePage/homePage-selectors";
|
import { HOMEPAGE_SELECTORS } from "../../elements/homePage/homePage-selectors";
|
||||||
import { urlList } from "../../fixtures/urlList";
|
import { urlList } from "../../fixtures/urlList";
|
||||||
import { createCustomer } from "../../support/api/requests/Customer";
|
import { createCustomer } from "../../support/api/requests/Customer";
|
||||||
|
import { deleteChannelsStartsWith } from "../../support/api/utils/channelsUtils";
|
||||||
import * as homePageUtils from "../../support/api/utils/homePageUtils";
|
import * as homePageUtils from "../../support/api/utils/homePageUtils";
|
||||||
import {
|
import {
|
||||||
createReadyToFulfillOrder,
|
createReadyToFulfillOrder,
|
||||||
createWaitingForCaptureOrder,
|
createWaitingForCaptureOrder,
|
||||||
} from "../../support/api/utils/ordersUtils";
|
} from "../../support/api/utils/ordersUtils";
|
||||||
import * as productsUtils from "../../support/api/utils/products/productsUtils";
|
import * as productsUtils from "../../support/api/utils/products/productsUtils";
|
||||||
import filterTests from "../../support/filterTests";
|
import { deleteShippingStartsWith } from "../../support/api/utils/shippingUtils";
|
||||||
import {
|
import {
|
||||||
changeChannel,
|
changeChannel,
|
||||||
getOrdersReadyForCaptureRegex,
|
getOrdersReadyForCaptureRegex,
|
||||||
|
@ -46,6 +47,9 @@ describe("As an admin I want to see correct information on dashboard home page",
|
||||||
|
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.clearSessionData().loginUserViaRequest();
|
cy.clearSessionData().loginUserViaRequest();
|
||||||
|
productsUtils.deleteProductsStartsWith(startsWith);
|
||||||
|
deleteShippingStartsWith(startsWith);
|
||||||
|
deleteChannelsStartsWith(startsWith);
|
||||||
|
|
||||||
productsUtils
|
productsUtils
|
||||||
.createProductWithShipping({
|
.createProductWithShipping({
|
||||||
|
@ -98,7 +102,7 @@ describe("As an admin I want to see correct information on dashboard home page",
|
||||||
homePageUtils.getSalesAmount(defaultChannel.slug).then(salesAmount => {
|
homePageUtils.getSalesAmount(defaultChannel.slug).then(salesAmount => {
|
||||||
salesAmountRegexp = getSalesAmountRegex(
|
salesAmountRegexp = getSalesAmountRegex(
|
||||||
salesAmount,
|
salesAmount,
|
||||||
productPrice * 2 + shippingPrice,
|
(productPrice + shippingPrice) * 2,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue