webdriverio / codemod

A codemod to transform Protractor into WebdriverIO tests
MIT License
25 stars 12 forks source link

Wrapping in multiple awaits #97

Open BWPerrine opened 1 year ago

BWPerrine commented 1 year ago

Is there a way to make the async codemod automatically wrap multiple items in parentheses like this?

image
christian-bromann commented 1 year ago

Hey, thanks for filing the issue. This seems indeed like bug. We would appreciate any help on this so please help us out! Have a look at our contributing guidelines and reach out if you have any questions. Cheers!

BWPerrine commented 1 year ago

Oh cool, I'll check it out. I'm actually trying to get the async codemod to work like in the screenshot. When I run the codemod, it only awaits the whole line. But if that's what it's supposed to be doing, then there must be an edit I need to make to the script.

moddx commented 1 year ago

I might be confused, but are you aware of the simplification mechanism introduced in wdio v7.9? https://webdriver.io/blog/2021/07/28/sync-api-deprecation/