mbolotov / intellij-playwright

1 stars 0 forks source link

[Feature Request] Add support for playwright fixtures #12

Closed zakhenry closed 1 year ago

zakhenry commented 2 years ago

First off, I have to say that I am really loving Maestro, keep up the great work!

I'm currently introducing playwright fixtures to my workflow, and unfortunately this means that Maestro is unable to present the play buttons in the margin which is my primary workflow.

I'm guessing the plugin does something like finding usages of the test function imported from @playwright/test, however this doesn't work with fixtures as the test function import come from a local path instead.

I wonder if this can be fixed by adding a configuration panel to the plugin with a field to configure a regex that defines how the test function import should be matched?

mbolotov commented 2 years ago

Hi Zak! thanks for the idea! could you try this bundle: Maestro-1.2-EAP.zip I've added matching the test function by it's type, so the plugin now recognizes all the tests of the TestType type from @playwright/test/types/test.d.ts

zakhenry commented 2 years ago

Nice one! that works pretty much exactly as intended, one very minor (non blocking) issue though - the play button also appears alongside calls to member functions of the test object. I think the expected behavior would be to have only the direct invoke call of the test type to create a margin symbol

example here on line 14 - it doesn't make sense to play the timeout line:

Screenshot 2022-08-30 at 12 17 47
mbolotov commented 1 year ago

fixed in 1.2 version