Closed
Description
openedon Mar 24, 2023
System info
- Playwright Version: [v1.32.0]
- Operating System: [macOS 13.2.1]
- Browser: [All]
Source code
- I provided exact source code that allows reproducing the issue locally.
Config file
// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: "./tests",
testMatch: "*.spec.ts",
use: {
baseURL: "https://www.saucedemo.com",
},
projects: [
{
name: "setup",
testMatch: "global.setup.spec.ts",
},
{
name: "chromium",
use: devices["Desktop Chrome"],
dependencies: ["setup"],
},
{
name: "firefox",
use: devices["Desktop Firefox"],
dependencies: ["setup"],
},
{
name: "webkit",
use: devices["Desktop Safari"],
dependencies: ["setup"],
},
],
});
Test file (self-contained)
// global.setup.spec.ts
import { test as setup, expect } from "@playwright/test";
setup("should do some setup", async ({ page }) => {
await page.goto("");
await expect(page).toHaveURL("https://www.saucedemo.com");
});
});
Steps
- Create some test files e.g.
login-page.spec.ts
andinventory-page.spc.ts
and put them intotests
directory
- Copy the config file from this issue
- Run th tests using:
npx playwright test --ui
command
Actual
I see only the global.setup.spec.ts
file and I can run it
Expected
There are all of my tests which can I run and play with them because I set the testMatch
global property as testMatch: "*.spec.ts",
in my config file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels