iTwin / auth-clients

MIT License
6 stars 3 forks source link

Replace playwright `type` calls with `fill` #225

Closed johnnyd710 closed 7 months ago

johnnyd710 commented 7 months ago

Using locator.fill is the recommended way to fill out input, and Page.type is now deprecated.

I made these changes using pnpm patch for my Electron application, and I think it will close https://github.com/iTwin/auth-clients/issues/224 but I can't be sure because the issue is flaky and doesn't happen frequently.

ben-polinsky commented 7 months ago

Looks good, but integration tests are now failing. Could you look into why?

johnnyd710 commented 7 months ago

Looks good, but integration tests are now failing. Could you look into why?

The basic.test.t > failure with invalid Bentley federated user integration test was entering the invalid@bentley.com username twice (another reason not to use type) and the test was checking for Enter a valid email address, phone number, or Skype name. which is the incorrect thing to test for. image

It should be checking for This username may be incorrect. Make sure you typed it correctly. for the case of an invalid username but correctly formatted email, like it does now that fill replaces the input text instead of adding to it.

image

johnnyd710 commented 7 months ago

Now its failing on mac because ErrorResponse: Authorization code is invalid or expired. ?

ben-polinsky commented 7 months ago

Now its failing on mac because ErrorResponse: Authorization code is invalid or expired. ?

Re-running...

ben-polinsky commented 7 months ago

Thanks @johnnyd710