From 3a4496a09f5ac941aa6171da65ba8a920ab76e47 Mon Sep 17 00:00:00 2001 From: Wojciech Date: Fri, 11 Oct 2024 10:45:15 +0200 Subject: [PATCH] Revert "Don't run export tests on PRs (#5206)" This reverts commit 3ec3cf35ffe35fa14b62a75836ab52b5130ca285. --- .changeset/gold-penguins-check.md | 5 ---- .github/workflows/run-test-cron.yml | 2 +- .github/workflows/run-test-manual.yml | 2 +- .github/workflows/run-tests-on-release.yml | 2 +- playwright.config.ts | 6 ----- playwright/tests/giftCards.spec.ts | 4 ++-- playwright/tests/product.spec.ts | 28 +++++++++++----------- 7 files changed, 19 insertions(+), 30 deletions(-) delete mode 100644 .changeset/gold-penguins-check.md diff --git a/.changeset/gold-penguins-check.md b/.changeset/gold-penguins-check.md deleted file mode 100644 index 160c8a8e86e..00000000000 --- a/.changeset/gold-penguins-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": patch ---- - -Tests that check mailpit for exported items now run only on release, manual run and nightly. diff --git a/.github/workflows/run-test-cron.yml b/.github/workflows/run-test-cron.yml index 468598e4f47..a4fa5a93aad 100644 --- a/.github/workflows/run-test-cron.yml +++ b/.github/workflows/run-test-cron.yml @@ -93,7 +93,7 @@ jobs: PW_WORKERS: ${{ vars.PW_WORKERS }} PW_RETRIES: ${{ vars.PW_RETRIES }} URL_TO_RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - PROJECT: "e2e apps-e2e release" + PROJECT: "e2e apps-e2e" - name: submit-results-to-testmo if: always() diff --git a/.github/workflows/run-test-manual.yml b/.github/workflows/run-test-manual.yml index 9f14aff6fa1..e2c9beb5c0f 100644 --- a/.github/workflows/run-test-manual.yml +++ b/.github/workflows/run-test-manual.yml @@ -101,7 +101,7 @@ jobs: PW_WORKERS: ${{ vars.PW_WORKERS }} PW_RETRIES: ${{ vars.PW_RETRIES }} URL_TO_RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - PROJECT: "e2e apps-e2e release" + PROJECT: "e2e apps-e2e" - name: submit-results-to-testmo if: always() diff --git a/.github/workflows/run-tests-on-release.yml b/.github/workflows/run-tests-on-release.yml index 12478edb0e9..6b06ab2afe1 100644 --- a/.github/workflows/run-tests-on-release.yml +++ b/.github/workflows/run-tests-on-release.yml @@ -230,7 +230,7 @@ jobs: URL_TO_RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} PW_WORKERS: ${{ vars.PW_WORKERS }} PW_RETRIES: ${{ vars.PW_RETRIES }} - PROJECT: "e2e apps-e2e release" + PROJECT: "e2e apps-e2e" - name: submit-results-to-testmo if: always() diff --git a/playwright.config.ts b/playwright.config.ts index b0e6fe93a4c..4357dbbae11 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -62,11 +62,5 @@ export default defineConfig({ use: { ...devices["Desktop Chrome"] }, testMatch: "playwright/tests/apps.spec.ts", }, - { - name: "release", - dependencies: ["setup"], - use: { ...devices["Desktop Chrome"] }, - testIgnore: "playwright/tests/apps.spec.ts", - }, ], }); diff --git a/playwright/tests/giftCards.spec.ts b/playwright/tests/giftCards.spec.ts index 8f1d797d5e3..40db2157b49 100644 --- a/playwright/tests/giftCards.spec.ts +++ b/playwright/tests/giftCards.spec.ts @@ -117,7 +117,7 @@ test("TC: SALEOR_181 Set gift card balance @e2e @gift", async () => { await giftCardsPage.setGiftCardsBalanceDialog.setBalance("34"); await giftCardsPage.expectSuccessBanner(); }); -test("TC: SALEOR_182 Export gift card codes in XLSX file @gift @release", async () => { +test("TC: SALEOR_182 Export gift card codes in XLSX file @e2e @gift", async () => { await giftCardsPage.clickShowMoreMenu(); await giftCardsPage.clickExportGiftCards(); await giftCardsPage.exportGiftCardsDialog.exportGiftCardCodes("XLSX"); @@ -130,7 +130,7 @@ test("TC: SALEOR_182 Export gift card codes in XLSX file @gift @release", async "Your exported gift cards data is ready", ); }); -test("TC: SALEOR_183 Export gift card codes in CSV file @gift @release", async () => { +test("TC: SALEOR_183 Export gift card codes in CSV file @e2e @gift", async () => { await giftCardsPage.clickShowMoreMenu(); await giftCardsPage.clickExportGiftCards(); await giftCardsPage.exportGiftCardsDialog.exportGiftCardCodes("CSV"); diff --git a/playwright/tests/product.spec.ts b/playwright/tests/product.spec.ts index c570b6c9ac6..dfb41122e32 100644 --- a/playwright/tests/product.spec.ts +++ b/playwright/tests/product.spec.ts @@ -20,7 +20,7 @@ test.beforeEach(({ page, request }) => { variantsPage = new VariantsPage(page); mailpitService = new MailpitService(request); }); -test("TC: SALEOR_3 Create basic product with variants @e2e", async () => { +test("TC: SALEOR_3 Create basic product with variants @e2e @product", async () => { await productPage.gotoProductListPage(); await productPage.clickCreateProductButton(); await productCreateDialog.selectProductTypeWithVariants(); @@ -33,7 +33,7 @@ test("TC: SALEOR_3 Create basic product with variants @e2e", async () => { await productPage.clickSaveButton(); await productPage.expectSuccessBanner(); }); -test("TC: SALEOR_5 Create basic - single product type - product without variants @e2e", async () => { +test("TC: SALEOR_5 Create basic - single product type - product without variants @e2e @product", async () => { await productPage.gotoCreateProductPage(PRODUCTS.singleProductType.id); await productPage.rightSideDetailsPage.selectOneChannelAsAvailableWhenMoreSelected("Channel-PLN"); await productPage.typeNameDescAndRating(); @@ -46,7 +46,7 @@ test("TC: SALEOR_5 Create basic - single product type - product without variants await productPage.clickSaveButton(); await productPage.expectSuccessBanner(); }); -test("TC: SALEOR_26 Create basic info variant - via edit variant page @e2e", async () => { +test("TC: SALEOR_26 Create basic info variant - via edit variant page @e2e @product", async () => { const variantName = `TC: SALEOR_26 - variant name - ${new Date().toISOString()}`; await productPage.gotoExistingProductPage(PRODUCTS.productWithOneVariant.id); @@ -68,7 +68,7 @@ test("TC: SALEOR_26 Create basic info variant - via edit variant page @e2e", asy `New variant name: ${variantName} should be visible on the list`, ).toBeVisible(); }); -test("TC: SALEOR_27 Create full info variant - via edit variant page @e2e", async () => { +test("TC: SALEOR_27 Create full info variant - via edit variant page @e2e @product", async () => { const variantName = `TC: SALEOR_27 - variant name - ${new Date().toISOString()}`; await productPage.gotoExistingProductPage(PRODUCTS.productWithOneVariant.id); @@ -98,7 +98,7 @@ test("TC: SALEOR_27 Create full info variant - via edit variant page @e2e", asyn await variantsPage.clickSaveVariantButton(); await variantsPage.expectSuccessBanner(); }); -test("TC: SALEOR_44 As an admin I should be able to delete a several products @e2e", async () => { +test("TC: SALEOR_44 As an admin I should be able to delete a several products @basic-regression @product @e2e", async () => { await productPage.gotoProductListPage(); await productPage.searchAndFindRowIndexes("a product to be deleted via bulk"); @@ -115,7 +115,7 @@ test("TC: SALEOR_44 As an admin I should be able to delete a several products @e `Given products: ${PRODUCTS.productsToBeBulkDeleted.names} should be deleted from the list`, ).toEqual([]); }); -test("TC: SALEOR_45 As an admin I should be able to delete a single products @e2e", async () => { +test("TC: SALEOR_45 As an admin I should be able to delete a single products @basic-regression @product @e2e", async () => { await productPage.gotoExistingProductPage( PRODUCTS.productWithOneVariantToBeDeletedFromDetails.id, ); @@ -130,7 +130,7 @@ test("TC: SALEOR_45 As an admin I should be able to delete a single products @e2 }), ).not.toBeVisible(); }); -test("TC: SALEOR_46 As an admin, I should be able to update a product by uploading media, assigning channels, assigning tax, and adding a new variant @e2e", async () => { +test("TC: SALEOR_46 As an admin, I should be able to update a product by uploading media, assigning channels, assigning tax, and adding a new variant @basic-regression @product @e2e", async () => { const newVariantName = "variant 2"; await productPage.gotoExistingProductPage(PRODUCTS.singleProductTypeToBeUpdated.id); @@ -167,7 +167,7 @@ test("TC: SALEOR_46 As an admin, I should be able to update a product by uploadi "Newly added single image should be present", ).toEqual(1); }); -test("TC: SALEOR_56 As an admin, I should be able to export products from single channel as CSV file @release", async () => { +test("TC: SALEOR_56 As an admin, I should be able to export products from single channel as CSV file @basic-regression @product @e2e", async () => { await productPage.gotoProductListPage(); await productPage.clickCogShowMoreButtonButton(); await productPage.clickExportButton(); @@ -182,7 +182,7 @@ test("TC: SALEOR_56 As an admin, I should be able to export products from single "Your exported products data is ready", ); }); -test("TC: SALEOR_57 As an admin, I should be able to search products on list view @e2e", async () => { +test("TC: SALEOR_57 As an admin, I should be able to search products on list view @basic-regression @product @e2e", async () => { await productPage.gotoProductListPage(); await productPage.searchAndFindRowIndexes(PRODUCTS.productToAddVariants.name); await productPage.checkListRowsBasedOnContainingText([PRODUCTS.productToAddVariants.name]); @@ -191,7 +191,7 @@ test("TC: SALEOR_57 As an admin, I should be able to search products on list vie "There should be only one product visible on list", ).toEqual(1); }); -test("TC: SALEOR_58 As an admin I should be able use pagination on product list view @e2e", async () => { +test("TC: SALEOR_58 As an admin I should be able use pagination on product list view @basic-regression @product @e2e", async () => { await productPage.gotoProductListPage(); const firstPageProductName = await productPage.getGridCellText(0, 0); @@ -216,7 +216,7 @@ test("TC: SALEOR_58 As an admin I should be able use pagination on product list `Product from first page: ${firstPageProductName} should be visible again`, ).toContainText(firstPageProductName); }); -test("TC: SALEOR_59 As an admin I should be able to filter products by channel on product list view @e2e", async () => { +test("TC: SALEOR_59 As an admin I should be able to filter products by channel on product list view @basic-regression @product @e2e", async () => { await productPage.gotoProductListPage(); await productPage.searchAndFindRowIndexes(PRODUCTS.productAvailableOnlyInUsdChannel.name); expect( @@ -236,7 +236,7 @@ test("TC: SALEOR_59 As an admin I should be able to filter products by channel o `Product: ${PRODUCTS.productAvailableOnlyInPlnChannel.name} should be visible on grid table`, ).toContainText(PRODUCTS.productAvailableOnlyInPlnChannel.name); }); -test("TC: SALEOR_60 As an admin I should be able update existing variant @e2e", async () => { +test("TC: SALEOR_60 As an admin I should be able update existing variant @basic-regression @product @e2e", async () => { const variantName = `TC: SALEOR_60 - variant name - ${new Date().toISOString()}`; const sku = `SALEOR_60-sku-${new Date().toISOString()}`; @@ -269,7 +269,7 @@ test("TC: SALEOR_60 As an admin I should be able update existing variant @e2e", ).toBeVisible(); await productPage.productImage.waitFor({ state: "visible" }); }); -test("TC: SALEOR_61 As an admin I should be able to delete existing variant @e2e", async () => { +test("TC: SALEOR_61 As an admin I should be able to delete existing variant @basic-regression @product @e2e", async () => { await productPage.waitForNetworkIdleAfterAction(() => variantsPage.gotoExistingVariantPage( PRODUCTS.singleVariantDeleteProduct.productId, @@ -288,7 +288,7 @@ test("TC: SALEOR_61 As an admin I should be able to delete existing variant @e2e "Deleting last variant from variant details page should redirect to product page", ).toContain(PRODUCTS.singleVariantDeleteProduct.productId); }); -test("TC: SALEOR_62 As an admin I should be able to bulk delete existing variants @e2e", async () => { +test("TC: SALEOR_62 As an admin I should be able to bulk delete existing variants @basic-regression @product @e2e", async () => { await productPage.waitForNetworkIdleAfterAction(() => productPage.gotoExistingProductPage(PRODUCTS.multipleVariantsBulkDeleteProduct.productId), );