playwright
playwright copied to clipboard
[BUG] beforeAll is not skipped when baseURL is referenced in skip callback
Context:
- Playwright Version: 1.22.1
- Operating System: Windows
- Node.js version: 16.13.2
- Browser: Chrome
Code Snippet
import { test } from "@playwright/test";
// This works as expected
test.describe("Skip", () => {
test.skip(() => true);
test.beforeAll(() => {
console.log("Should not show");
});
test("skip test", () => {
console.log("should not run");
});
});
// This does not. Note the only difference is the baseURL parameter.
test.describe("Skip with baseURL", () => {
test.skip(({ baseURL }) => true);
test.beforeAll(() => {
console.log("Should not show with baseURL");
});
test("skip test with baseURL", () => {
console.log("should not run with baseURL");
});
});
Describe the bug
When skip
references baseURL, the beforeAll
code is not skipped which is unexpected. Is this intended?
I have the same issue but when using isMobile
instead of baseURL
. It also works as expected and skips the beforeAll
if I don't reference anything. It looks like it's also the same with beforeEach
I was on v. 1.22.2
but just tried on latest 1.24.2
and have the same issue.
Should be fixed!
@pavelfeldman
Thank you. Do we know what version this was fixed in? Or the PR/commit that fixes this?
@nzacca Appears to be fixed for me in 1.36.1
. Thanks!