Closed Silvest89 closed 8 months ago
Hi @Silvest89,
Can you reproduce this in a simple test case?
I've tried to do it as follows:
import { test, Page } from "@playwright/test";
test.describe.serial("Timeout test", () => {
let page: Page;
test.setTimeout(2000);
test.beforeAll(async ({ browser }) => {
page = await browser.newPage();
await page.goto("https://www.google.com/", {
waitUntil: "domcontentloaded",
});
});
test.afterAll(async ({ browser }) => {
await page.close();
await browser.close();
});
test("Fake timeout 1", async () => {
await page.waitForTimeout(100);
throw new Error("Fake error");
});
test("Fake timeout 2", async () => {
await page.waitForTimeout(3000);
});
test("Fake timeout 3", async () => {
await page.waitForTimeout(3000);
});
});
But the above doesn't trigger your test case.
@estruyf Let me give you an example
When using this setup with dependencies in playwright.config,
{
name: 'setup',
},
{
name: 'tests',
dependencies: ['setup'],
},
Lets say I have this test in the setup folder
test.describe.serial("Setup", () => {
let page: Page;
test.setTimeout(5000);
test.beforeAll(async ({ browser }) => {
page = await browser.newPage();
await page.goto("https://www.google.com/", {
waitUntil: "domcontentloaded",
});
});
test("Fake timeout 1", async () => {
await page.waitForURL('ssss');
});
});
Which is bound to fail. Other tests which have setup as dependency will have a results array with 0 results
Thanks! I've been able to reproduce it, and it seems it is related to some changes in the new version of Playwright Testing. In earlier versions, those tests were returned with a status of skipped
.
Can you try out if version @estruyf/github-actions-reporter@1.5.0-beta.7972167
fixes your issue?
Works fine now! Thanks :)
Thanks!
This is what happens when your tests are depending on other tests. (eg other tests are not run which means 0 results)