mbolotov / intellij-playwright

1 stars 0 forks source link

Pattern Matching of Test Not Working -> Error: No tests found #25

Closed magbeat closed 1 year ago

magbeat commented 1 year ago

Hi there,

I am trying to run a specific test.

When I run the test, it cannot find the test using the provided pattern.

image

Result:

image

If I copy over the command to a terminal and change it to something like this:

/var/lib/snapd/snap/bin/npx playwright test --reporter /tmp/intellij-playwright-reporter3214380591270717897.js tests/example.spec.ts -g get started link$

it works.

OS: Linux (Fedora) IDE: Webstorm 2022.3.2 Plugin Version: 1.3.1

mbolotov commented 1 year ago

Hi Markus, I'm unable to reproduce the issue. Could you provide a sample project to reproduce it?

sterschl commented 1 year ago

I have the same problem when I run a single test and the test name contains spaces:

test('should test this page', async () => {
...
}

The command to execute the test is the following:

playwright test --headed --project=chromium --reporter intellij-playwright-reporter11841165207304899153.js tests/example.spec.ts -g "^(.*[\\\/])?example.spec.ts.should test this page$"

oantoshchenko commented 1 year ago

Have the same issue. I couldn't figure out a way to run any test. I tried running from the margin button from the project structure (directory context menu > run > Playwright). Environment:

import type { PlaywrightTestConfig } from '@playwright/test';

const config: PlaywrightTestConfig = {
    webServer: {
        command: 'npm run build && npm run preview',
        port: 4173
    },
    testDir: 'e2e-tests'
};

export default config;
mbolotov commented 1 year ago

hi folks, could anyone provide a sample project to reproduce the problem? I still can't do that.

oantoshchenko commented 1 year ago

Dude, you are charging money for this product, and expecting your customers to also work on it?

mbolotov commented 1 year ago

Dude, you are charging money for this product, and expecting your customers to also work on it?

Yes, I am. I'm expecting that my customers are interested in fixing their problems.

yparenteau commented 1 year ago

Same issue here "No tests found" while trying the run the test examples from the default Playwright installation. yarn create playwright

/Users/xyz/Projects/poc/playwright/node_modules/.bin/playwright test --reporter /var/folders/m3/fhnlfkp91sj648w3_8m0ng980000gn/T/intellij-playwright-reporter6414323199617572113.js tests/demo-todo-app.spec.ts -g '^(.*[\\/])?demo-todo-app.spec.ts.New Todo'

sw-tracker commented 1 year ago

@mbolotov we are having the same issue as the others are reporting.

Would you be able to provide an example project for us that works? Then we can compare we our setup with your working setup. Please also include the intellij run config in your example repository and some docs.

Thanks!

mbolotov commented 1 year ago

seems the problem can be reproduced with a new playwright version only. I will look into it.

mbolotov commented 1 year ago

Can anyone try this bundle with fix? Maestro-1.3.2-SNAPSHOT.zip I've relaxed the pattern for selecting the test. I wonder if such a pattern does not select a wider scope than expected

mbolotov commented 1 year ago

fixed in 1.3.2 version