mbolotov / intellij-playwright

1 stars 0 forks source link

"No tests were found", but running the command output by yarn does work #7

Closed zakhenry closed 2 years ago

zakhenry commented 2 years ago

I've had an issue that I think I managed to fix temporarily by uninstalling the plugin and reinstalling, but it has come back now.

When I run a test by clicking play in the margin, I get the following output:

/Users/zak/.nvm/versions/node/v16.14.2/bin/node /Users/zak/.nvm/versions/node/v16.14.2/lib/node_modules/yarn/bin/yarn.js run playwright test --headed --config ./apps/my-app-e2e/playwright.config.ts --reporter /var/folders/j8/hkdrcxfn7819nyspt0mqq0tm0000gn/T/intellij-playwright-reporter8187597544205581974.js test.spec.ts -g "^test.spec.ts.Example.should foo bar$"
yarn run v1.22.18
$ playwright test --headed --config ./apps/my-app-e2e/playwright.config.ts --reporter /var/folders/j8/hkdrcxfn7819nyspt0mqq0tm0000gn/T/intellij-playwright-reporter8187597544205581974.js test.spec.ts -g '^test.spec.ts.Example.should foo bar'

If I run the first command that was output, I get the same result:

$ playwright test --headed --config ./apps/my-app-e2e/playwright.config.ts --reporter /var/folders/j8/hkdrcxfn7819nyspt0mqq0tm0000gn/T/intellij-playwright-reporter8187597544205581974.js test.spec.ts -g '^test.spec.ts.Example.should foo bar'
##teamcity[enteredTheMatrix]
##teamcity[testingStarted]
##teamcity[testCount count='0']
##teamcity[testingFinished]
error Command failed with exit code 1.

however, if I then run the exact command that was printed by yarn, it works fine:

➜ playwright test --headed --config ./apps/my-app-e2e/playwright.config.ts --reporter /var/folders/j8/hkdrcxfn7819nyspt0mqq0tm0000gn/T/intellij-playwright-reporter8187597544205581974.js test.spec.ts -g '^test.spec.ts.Example.should foo bar'
##teamcity[enteredTheMatrix]
##teamcity[testingStarted]
##teamcity[testCount count='1']
##teamcity[testSuiteStarted nodeId='1756085739' parentNodeId='0' name='chromium' running='false' nodeType='suite' location
...etc

Any idea what I can fix to resolve this issue?

zakhenry commented 2 years ago

I have a suspicion that this issue might relate to requiring an npm rebuild, as this time I have managed to fix it by running that. I wonder if the intellij-playwright-reporter is consuming this error (and any other possible node/yarn/npm error) making it hard to debug where an issue might be?

mbolotov commented 2 years ago

Hi Zak! Could you please try this bundle and check if it does not hide the error anymore? Maestro-1.2-EAP.zip

zakhenry commented 2 years ago

Hey yes! This is much better, the errors are nicely propagated. This also fixes another case where I might have a bad import that playwright doesn't understand (like importing symbols from files that have decorators) and Maestro was reporting "No tests were found" when really it was that playwright was erroring out. Nice one :)

StarHosea commented 2 years ago

same error

je117er commented 2 years ago

When will the official version get updated? @mbolotov

mbolotov commented 2 years ago

When will the official version get updated? @mbolotov

I think the next week. I will try to fix some other issues (such as #3)

mbolotov commented 2 years ago

Fixed in 1.1.2