Skip to content

Commit

Permalink
Remove mailpit checks in E2E tests (#5211)
Browse files Browse the repository at this point in the history
Co-authored-by: Paweł Chyła <[email protected]>
  • Loading branch information
Cloud11PL and poulch authored Oct 24, 2024
1 parent e269b46 commit 402acf2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 61 deletions.
5 changes: 5 additions & 0 deletions .changeset/dull-glasses-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Mailpit service uses has been removed due to issues with checking email during E2E runs on PRs. This means the tests no longer check if export emails have been received.
37 changes: 0 additions & 37 deletions playwright/pages/setUpNewPasswordPage.ts

This file was deleted.

4 changes: 0 additions & 4 deletions playwright/pages/staffMembersPage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { MailpitService } from "@api/mailpit";
import { URL_LIST } from "@data/url";
import { BasePage } from "@pages/basePage";
import { InviteStaffMembersDialog } from "@pages/dialogs/inviteStaffMemberDialog";
Expand All @@ -10,8 +9,6 @@ export class StaffMembersPage extends BasePage {

readonly basePage: BasePage;

readonly mailpitService: MailpitService;

readonly inviteStaffMembersDialog: InviteStaffMembersDialog;

constructor(
Expand All @@ -30,7 +27,6 @@ export class StaffMembersPage extends BasePage {
super(page);
this.request = request;
this.basePage = new BasePage(page);
this.mailpitService = new MailpitService(request);
this.inviteStaffMembersDialog = new InviteStaffMembersDialog(page);
}

Expand Down
13 changes: 1 addition & 12 deletions playwright/tests/giftCards.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { MailpitService } from "@api/mailpit";
import { GIFT_CARDS } from "@data/e2eTestData";
import { GiftCardsPage } from "@pages/giftCardsPage";
import { expect } from "@playwright/test";
Expand All @@ -7,12 +6,10 @@ import { test } from "utils/testWithPermission";
test.use({ permissionName: "admin" });

let giftCardsPage: GiftCardsPage;
let mailpitService: MailpitService;

test.beforeEach(async ({ page, request }) => {
test.beforeEach(async ({ page }) => {
test.slow();
giftCardsPage = new GiftCardsPage(page);
mailpitService = new MailpitService(request);
await giftCardsPage.gotoGiftCardsListView();
await giftCardsPage.waitForDOMToFullyLoad();
});
Expand Down Expand Up @@ -125,10 +122,6 @@ test("TC: SALEOR_182 Export gift card codes in XLSX file @e2e @gift", async () =
state: "hidden",
timeout: 30000,
});
await mailpitService.checkDoesUserReceivedExportedData(
process.env.E2E_USER_NAME!,
"Your exported gift cards data is ready",
);
});
test("TC: SALEOR_183 Export gift card codes in CSV file @e2e @gift", async () => {
await giftCardsPage.clickShowMoreMenu();
Expand All @@ -138,8 +131,4 @@ test("TC: SALEOR_183 Export gift card codes in CSV file @e2e @gift", async () =>
state: "hidden",
timeout: 30000,
});
await mailpitService.checkDoesUserReceivedExportedData(
process.env.E2E_USER_NAME!,
"Your exported gift cards data is ready",
);
});
9 changes: 1 addition & 8 deletions playwright/tests/product.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { MailpitService } from "@api/mailpit";
import { AVAILABILITY } from "@data/copy";
import { PRODUCTS } from "@data/e2eTestData";
import { ProductCreateDialog } from "@pages/dialogs/productCreateDialog";
Expand All @@ -12,13 +11,11 @@ test.use({ permissionName: "admin" });
let productPage: ProductPage;
let productCreateDialog: ProductCreateDialog;
let variantsPage: VariantsPage;
let mailpitService: MailpitService;

test.beforeEach(({ page, request }) => {
test.beforeEach(({ page }) => {
productPage = new ProductPage(page);
productCreateDialog = new ProductCreateDialog(page);
variantsPage = new VariantsPage(page);
mailpitService = new MailpitService(request);
});
test("TC: SALEOR_3 Create basic product with variants @e2e @product", async () => {
await productPage.gotoProductListPage();
Expand Down Expand Up @@ -177,10 +174,6 @@ test("TC: SALEOR_56 As an admin, I should be able to export products from single
await productPage.exportProductsDialog.clickExportAllProductsRadioButton();
await productPage.exportProductsDialog.clickSubmitButton();
await productPage.expectInfoBanner();
await mailpitService.checkDoesUserReceivedExportedData(
process.env.E2E_USER_NAME!,
"Your exported products data is ready",
);
});
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();
Expand Down

0 comments on commit 402acf2

Please sign in to comment.