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 { urlList } from "../../fixtures/urlList";
|
||||
import { createCustomer } from "../../support/api/requests/Customer";
|
||||
import { deleteChannelsStartsWith } from "../../support/api/utils/channelsUtils";
|
||||
import * as homePageUtils from "../../support/api/utils/homePageUtils";
|
||||
import {
|
||||
createReadyToFulfillOrder,
|
||||
createWaitingForCaptureOrder,
|
||||
} from "../../support/api/utils/ordersUtils";
|
||||
import * as productsUtils from "../../support/api/utils/products/productsUtils";
|
||||
import filterTests from "../../support/filterTests";
|
||||
import { deleteShippingStartsWith } from "../../support/api/utils/shippingUtils";
|
||||
import {
|
||||
changeChannel,
|
||||
getOrdersReadyForCaptureRegex,
|
||||
|
@ -46,6 +47,9 @@ describe("As an admin I want to see correct information on dashboard home page",
|
|||
|
||||
before(() => {
|
||||
cy.clearSessionData().loginUserViaRequest();
|
||||
productsUtils.deleteProductsStartsWith(startsWith);
|
||||
deleteShippingStartsWith(startsWith);
|
||||
deleteChannelsStartsWith(startsWith);
|
||||
|
||||
productsUtils
|
||||
.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 => {
|
||||
salesAmountRegexp = getSalesAmountRegex(
|
||||
salesAmount,
|
||||
productPrice * 2 + shippingPrice,
|
||||
(productPrice + shippingPrice) * 2,
|
||||
);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue