Skip to content

Commit

Permalink
[QA] playwright config improvements (#4842)
Browse files Browse the repository at this point in the history
* playwright config improvements

* adding test.slow() to slow tests
  • Loading branch information
yellowee authored May 8, 2024
1 parent be40ffd commit f6d44a9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/lovely-deers-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Manipulating timeouts of Playwright tests
6 changes: 3 additions & 3 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export default defineConfig({
],
]
: [["html"], ["list"]],
expect: { timeout: 10000 },
maxFailures: 5,
timeout: env.CI ? 45000 : 60000,
expect: { timeout: 5000 },
maxFailures: 2,
timeout: 30000,
use: {
baseURL: env.BASE_URL || "",
trace: env.CI ? "on-all-retries" : "on",
Expand Down
2 changes: 2 additions & 0 deletions playwright/tests/giftCards.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ test.beforeEach(async ({ page, request }) => {
await giftCardsPage.waitForDOMToFullyLoad();
});
test("TC: SALEOR_105 Issue gift card @e2e @gift", async () => {
test.slow();
await giftCardsPage.clickIssueCardButton();
await giftCardsPage.issueGiftCardDialog.typeAmount("50");
await giftCardsPage.issueGiftCardDialog.typeTag("super ultra automation discount");
Expand Down Expand Up @@ -42,6 +43,7 @@ test("TC: SALEOR_105 Issue gift card @e2e @gift", async () => {
.waitFor({ state: "attached", timeout: 30000 });
});
test("TC: SALEOR_106 Issue gift card with specific customer and expiry date @e2e @gift", async () => {
test.slow();
await giftCardsPage.clickIssueCardButton();
await giftCardsPage.issueGiftCardDialog.clickSendToCustomerCheckbox();
await giftCardsPage.issueGiftCardDialog.typeCustomer("Allison Freeman");
Expand Down
3 changes: 3 additions & 0 deletions playwright/tests/orders.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ test("TC: SALEOR_78 Capture partial amounts by manual transactions and fulfill o
const firstManualTransactionAmount = "100";
const secondManualTransactionAmount = "20";

test.slow();

await ordersPage.goToExistingOrderPage(
ORDERS.ordersWithinTransactionFlow.captureManualTransactionOrder.orderId,
);
Expand Down Expand Up @@ -230,6 +232,7 @@ test("TC: SALEOR_83 Draft orders bulk delete @e2e @draft", async () => {
});

test("TC: SALEOR_84 Create draft order @e2e @draft", async () => {
test.slow();
await draftOrdersPage.goToDraftOrdersListView();
await draftOrdersPage.clickCreateDraftOrderButton();
await draftOrdersPage.draftOrderCreateDialog.completeDraftOrderCreateDialogWithFirstChannel();
Expand Down

0 comments on commit f6d44a9

Please sign in to comment.