diff --git a/cypress/e2e/homePage/homePageAnalitics.js b/cypress/e2e/homePage/homePageAnalitics.js index 470ede347..9f4e26402 100644 --- a/cypress/e2e/homePage/homePageAnalitics.js +++ b/cypress/e2e/homePage/homePageAnalitics.js @@ -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, ); });