codemod icon indicating copy to clipboard operation
codemod copied to clipboard

Missing await keyword

Open AlexandreBonneau opened this issue 2 years ago • 1 comments

The async scripts works very well, thank you!

One note though, is that it forgets to add the await keyword on lines like this one: const inputClassic = $(selectors.inputClassic); where it should transform those into: const inputClassic = await $(selectors.inputClassic);.

Do note that it does add the await keyword in lines like that: expect($(selectors.elementP1).getText()).toEqual('2.140%'); (to: expect(await $(selectors.elementP1).getText()).toEqual('2.140%');)

AlexandreBonneau avatar Feb 19 '23 23:02 AlexandreBonneau

Thanks for reporting, this should indeed be changed, ideally to:

await expect($(selectors.elementP1)).toHaveText('2.140%');

christian-bromann avatar Feb 20 '23 17:02 christian-bromann