vitalets / playwright-magic-steps

Auto-transform JavaScript comments into Playwright steps
MIT License
29 stars 2 forks source link

Blank lines within test steps #3

Open ajsteenkamp opened 2 weeks ago

ajsteenkamp commented 2 weeks ago

I managed to get this to work although strangely enough even though I use esnext, I only managed to get it to work using the commonjs syntax in my script.

One suggestion though is that we should be allowed to have blank lines within test steps.

I use that to make the code more readable and group logical functions together that all might still fall within the same test step.

But I see that I can't have any blank lines even if I try to use // stepend or it will see it as the end of the test step.

So would be nice if you can do something like this

// step: this is my test step function1

function2

function3 // stepend

vitalets commented 2 weeks ago

Good point. Published v0.4.0 with blank lines support. Could you check on your side?