Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
magbeat opened this issue Feb 27, 2023 · 11 comments
Closed

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

magbeat opened this issue Feb 27, 2023 · 11 comments

Comments

@magbeat
Copy link

magbeat commented Feb 27, 2023

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
Copy link
Owner

mbolotov commented Mar 9, 2023

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

@sterschl
Copy link

sterschl commented Apr 26, 2023

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
Copy link

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:

  • MacOS 13.3.1
  • WebStorm 2023.1.1
  • playwright.config.ts:
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;
  • I also tried changing the name of the test file to test.ts and giving the test itself name test:
test('test', async ({ page }) => {

@mbolotov
Copy link
Owner

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

@oantoshchenko
Copy link

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

@mbolotov
Copy link
Owner

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
Copy link

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
Copy link

@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
Copy link
Owner

mbolotov commented Jun 8, 2023

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

@mbolotov
Copy link
Owner

mbolotov commented Jun 14, 2023

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
Copy link
Owner

fixed in 1.3.2 version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants