mbolotov / intellij-playwright

1 stars 0 forks source link

Extension taking wrongly handling the action on a Jest/Puppeteer test #1

Closed mattalxndr closed 2 years ago

mattalxndr commented 2 years ago

When I click the inlay hint next to a test in a project that uses Jest/Puppeteer, this extension tries to run the tests. I've been disabling the extension while I work on Puppeteer projects.

mbolotov commented 2 years ago

Hi Matt, yes, this works as expected. By default, when the plugin discovers a test can be run by Playwright, it suppress other test configurations to simplify the UI. Without that feature a run gutter may look like this: image So the user have to choose the framework each time that requires an additional action.

That being said, you can disable this suppress behavior. In the current version, this setting can be found inside the IDE's registry. Please call the Tools -> Internal Actions -> Registry... action and start typing playwright to find the setting: image

Please also note that in the next version of plugin I'm planning to create a dedicated Maestro setting page inside the common IDE Settings and move this suppress setting inside it (along with some other new settings)

mattalxndr commented 2 years ago

By default, when the plugin discovers a test can be run by Playwright, it suppress other test configurations to simplify the UI.

But the test was unable to be run by playwright. Playwright wasn't installed, nor was it referenced in package.json.

This is my opinion, but having a setting that by default suppresses all other test runners is an anti-feature.

It may benefit people who only work on playwright, but I would much rather click that second time than have to keep enabling and disabling the Playwright plugin to work on other projects. That second click is how the IDE works, and I'm used to it. Plus, once I click it, it gets added to the Run Configuration list, and I just need to click the keyboard or the Run button to get a repeated action. Not a big deal.

Even if the setting was more available (under Settings instead of in the Registry), I would suggest defaulting suppress to false.

mattalxndr commented 2 years ago

By the way, I wanted to add that when I first used the plugin on a playwright project, it worked perfectly with no fiddling, and I haven't run into any problems at all while running tests in that project. And I appreciate the checkboxes that enable certain CLI flags. Looking forward to working with it more.

mbolotov commented 2 years ago

Fixed in 1.1 version. By default the Suppress... checkbox is disabled now. Also, this checkbox has been moved into the Playwright settings page

mattalxndr commented 2 years ago

Oh, cool :-) Can't wait to fire up my Playwright tests again (hopefully soon)