mbolotov / intellij-playwright

1 stars 0 forks source link

Doesn't pick up the configuration automatically #3

Closed carlosflorencio closed 2 years ago

carlosflorencio commented 2 years ago

Hi,

I'm giving a try to this extension but found an issue for my use case:

Configuration file not set automatically

My folder structure:

/app
  /tests
    /e2e
      test.spec.ts
  playwright.config.ts

The playwright.config.ts is not used when running the tests, which makes the tests fail (because I have a dedicated webServer.command).

Works after changing the Run Configuration setting, Program arguments option with the value -c /app/playwright.config.ts.

rickirunge commented 2 years ago

I guess this is the same as https://github.com/mbolotov/intellij-playwright/issues/6.

Also works if you manual change "Project Base" to the root of your project.

Don't know why this is set to the folder of the test being run - don't know when that would be needed? IMO it should (almost) always be the project root - the same ways as when you run playwright using "npm run"

mbolotov commented 2 years ago

Fixed in 1.1.2. The working directory is now set to the project root folder (by searching for a ‘package.json’ file through the file tree up starting from the test file/folder)