Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Percy: mobile snapshots, separate key for calltaker, mock geocoder #993

Merged
merged 16 commits into from
Sep 19, 2023

Conversation

binh-dam-ibigroup
Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup commented Sep 7, 2023

Description

This PR changes the percy test so it runs and keeps the mobile snapshots, and uses a separate percy key for calltaker mode and runs calltaker snapshots in a separate job to avoid race conditions. Geocoder is mocked too now. Feedback welcome on how to reduce run time or reuse the checkout steps.

PR Checklist:

  • Does the code follow accessibility standards (WCAG 2.1 AA Compliant)?
  • Are all languages supported (Internationalization/Localization)?
  • Are appropriate Typescript types implemented?

@binh-dam-ibigroup binh-dam-ibigroup changed the title Percy: Keep mobile snapshots, use separate key for calltaker Percy: mobile snapshots, separate key for calltaker, mock geocoder Sep 8, 2023
Copy link
Collaborator

@miles-grant-ibigroup miles-grant-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great and snapshots look fantastic. I think this is as clean as something like this can get well done!

@@ -196,7 +218,8 @@ async function executeTest(page, isMobile, isCallTaker) {
)
await page.waitForSelector('.intermediate-place-0-form-control')
await page.focus('.intermediate-place-0-form-control')
await page.keyboard.type('arts center')
// FIXME: Characters are typed very fast, but each stroke still triggers a geocoder call.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The call should be being aborted, but because the geocoder is at localhost the connection is established before it can be aborted.

test('OTP-RR Mobile', async () => {
const page = await loadPath('/')
page.isMobile = true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever!

Copy link
Contributor

@daniel-heppner-ibigroup daniel-heppner-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good assortment of screenshots, thank you! This should make the percy tests more useful.

@binh-dam-ibigroup binh-dam-ibigroup merged commit 68f9b31 into dev Sep 19, 2023
6 checks passed
@binh-dam-ibigroup binh-dam-ibigroup deleted the fix-percy-2 branch September 19, 2023 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants