From 2505012746802f3858890332051e6f54a0326a9a Mon Sep 17 00:00:00 2001 From: wojteknowacki <124166231+wojteknowacki@users.noreply.github.com> Date: Tue, 30 May 2023 14:06:54 +0200 Subject: [PATCH] tests - removed test for img thumbnail, commented payment test, bump mail fetching retries (#3701) * removed test for img thumbnail since during triage it was decided it is possible img will not be available, also commented test for payment status since there is bug created and we are waiting to fix it, also increased retries for mail fetching * CR fixes - xit instead comment, get mail retry var declaration --- cypress/e2e/orders/transactionsForOrders.js | 4 ++-- cypress/e2e/products/images.js | 21 --------------------- cypress/support/api/utils/users.js | 4 ++-- 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/cypress/e2e/orders/transactionsForOrders.js b/cypress/e2e/orders/transactionsForOrders.js index ca2876020..fd5a773b8 100644 --- a/cypress/e2e/orders/transactionsForOrders.js +++ b/cypress/e2e/orders/transactionsForOrders.js @@ -13,7 +13,6 @@ import { } from "../../support/api/requests"; import { createOrder, - createReadyToFulfillOrder, createShipping, getDefaultTaxClass, productsUtils, @@ -136,7 +135,8 @@ describe("Orders", () => { }, ); - it( + // TODO uncomment when bug: https://github.com/saleor/saleor/issues/12757 if fixed + xit( "should be able to grant and send refund TC: 3902", { tags: ["@orders", "@allEnv", "@stable"] }, () => { diff --git a/cypress/e2e/products/images.js b/cypress/e2e/products/images.js index c5d7ae498..d2214c8dc 100644 --- a/cypress/e2e/products/images.js +++ b/cypress/e2e/products/images.js @@ -10,7 +10,6 @@ import { deleteCollectionsStartsWith } from "../../support/api/utils/catalog/col import { createNewProductWithNewDataAndDefaultChannel, deleteProductsStartsWith, - iterateThroughThumbnails, } from "../../support/api/utils/products/productsUtils"; describe("Tests for images", () => { @@ -70,24 +69,4 @@ describe("Tests for images", () => { }); }, ); - - it( - "should create thumbnail url after entering image url", - { tags: ["@products", "@allEnv", "@stable"] }, - () => { - let failedRequests; - getFirstProducts(100) - .then(products => { - const productsWithThumbnails = products.filter( - product => product.node.thumbnail !== null, - ); - failedRequests = iterateThroughThumbnails(productsWithThumbnails); - }) - .then(() => { - if (failedRequests && failedRequests.length > 0) { - throw new Error(failedRequests.join("\n")); - } - }); - }, - ); }); diff --git a/cypress/support/api/utils/users.js b/cypress/support/api/utils/users.js index ce99c64d2..45fd9fca0 100644 --- a/cypress/support/api/utils/users.js +++ b/cypress/support/api/utils/users.js @@ -119,8 +119,8 @@ export function getMailWithResetPasswordLink(email, subject, i = 0) { export function getMailsForUser(email, i = 0) { const serverStoredEmail = email.toLowerCase(); - - if (i > 5) { + const getMailRetries = 9; + if (i > getMailRetries) { throw new Error( `There is no email invitation for user ${serverStoredEmail}`, );