- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.8k
Closed
Labels
Description
System info
- Playwright Version: v1.34.1
- Operating System: macOS 13.2.1
- Browser: N/A
- Other info: Terminal, CLI, Node 18.16.0 LTS
Source code
Config file
// playwright.config.js
const { defineConfig } = require('@playwright/test');
module.exports = defineConfig({
    preserveOutput: 'failures-only',
    snapshotPathTemplate: '{testDir}/__snapshots__/{testFilePath}/{arg}{ext}',
    testDir: './assets',
    use: {
        viewport: {
            width: 1440,
            height: 900,
        },
    },
});Test file (self-contained)
Simple tests like:
test('builds CSS correctly', () => {
    expect(fs.readFileSync(`${PUBLIC_PATH}${MANIFEST['build/app/app.css']}`, 'utf-8')).toMatchSnapshot();
});
test('renders homepage correctly', async ({ page }) => {
    await page.goto('<REMOVED_URL>');
    await expect(page).toHaveScreenshot({ fullPage: true });
});
// Etc...Steps
- Run npx playwright test(executed byyarn test)
Expected
To start running tests by executing npx playwright test, like it did in previous versions (1.34.0 and down).
Actual
Getting the following message:
➜ yarn test
Please install @playwright/test package to use Playwright Test.
  npm install -D @playwright/testAlready rules out a few things
- Reinstalling @playwright/test
- Completely removing node_modulesand reinstalling withyarn
- Works with yarn add @playwright/[email protected] -D
- Package playwrightis not installed
LisBerndt, nelypetrova, rajtslegr, Tommaso-FLYR, bamarch and 11 more