Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion playwright/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default defineConfig({
use: { ...devices["Desktop Safari"] },
},
],
timeout: 5 * 60 * 1000,
timeout: 1 * 60 * 1000,
expect: {
timeout: 30 * 1000,
},
Expand Down
7 changes: 6 additions & 1 deletion playwright/tests/eshop/eshop.app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ test("eShop on Containers App Basic UI and Functionality Checks", async ({

while (attempts < maxAttempts) {
try {
// If the item is not found in the first attempt,
// reload the page to trigger the API call again.
if (attempts > 0) {
await page.reload();
}

await page.waitForSelector(firstItemSelector);
firstItem = page.locator(firstItemSelector);
await expect(firstItem).toBeVisible();
Expand All @@ -102,7 +108,6 @@ test("eShop on Containers App Basic UI and Functionality Checks", async ({
} catch (error) {
// If the item is not found within 5 seconds, an error will be thrown here, then the page will be reloaded
console.error("Item not found:", error);
await page.reload();
attempts++;
}
}
Expand Down