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

Expand the production sanity test #814

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rwood-moz
Copy link
Contributor

@rwood-moz rwood-moz commented Jan 2, 2025

Add the following scenarios to the production sanity playwright E2E test:

  • able to access the booking page via short link
  • able to access the booking page via long link
  • able to request a new booking

Here is a link to the new updated test running via GitHub actions on this branch.

And here is the corresponding recorded video of the test running in BrowserStack (if you need BrowserStack credentials just let me know and I can set you up!).

@rwood-moz rwood-moz linked an issue Jan 2, 2025 that may be closed by this pull request
@rwood-moz rwood-moz added the testing Issues specific to automated testing label Jan 2, 2025
@rwood-moz rwood-moz changed the title [WIP] Expand the production sanity test Expand the production sanity test Jan 2, 2025
@rwood-moz rwood-moz marked this pull request as draft January 2, 2025 20:55
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from 9957a2d to bb011b7 Compare January 2, 2025 21:31
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from bb011b7 to e3c8691 Compare January 3, 2025 14:27
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from e3c8691 to 611d683 Compare January 3, 2025 14:39
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from 611d683 to 8159527 Compare January 3, 2025 14:48
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from 8159527 to ca0be02 Compare January 3, 2025 17:35
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from ca0be02 to 3671143 Compare January 3, 2025 17:36
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from 3671143 to 9b4f24a Compare January 3, 2025 21:45
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from 9b4f24a to 4a88cc2 Compare January 7, 2025 19:32
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from 4a88cc2 to a1fdb51 Compare January 7, 2025 21:19
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from a1fdb51 to 6f8725d Compare January 7, 2025 22:00
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from 6f8725d to 4766788 Compare January 8, 2025 17:07
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from cc22b43 to 5ccdb50 Compare January 8, 2025 21:28
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from 5ccdb50 to 9b18edf Compare January 9, 2025 15:38
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from 9b18edf to e6b0933 Compare January 9, 2025 16:28
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from e6b0933 to 993d06a Compare January 9, 2025 17:03
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from 993d06a to cdeb653 Compare January 9, 2025 19:14
@rwood-moz rwood-moz marked this pull request as ready for review January 9, 2025 19:58
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from cdeb653 to 854d329 Compare January 9, 2025 20:49
Copy link
Collaborator

@devmount devmount left a comment

Choose a reason for hiding this comment

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

Just some feedback on the way 😇 Great work, thank you so much!

test/e2e/README.md Outdated Show resolved Hide resolved
test/e2e/browserstack.yml Outdated Show resolved Hide resolved
test/e2e/pages/booking-page.ts Show resolved Hide resolved
@rwood-moz
Copy link
Contributor Author

Just some feedback on the way 😇 Great work, thank you so much!

Thanks for the feedback! Updated accordingly.


// booking request sent dialog should display the correct time slot that was requested
// our requested time slot is stored in this format, as example: 'event-2025-01-14 14:30'
// the dialog reports the slot in this format, as example: 'Tuesday, January 14, 2025 02:30 PM'
Copy link
Contributor

Choose a reason for hiding this comment

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

do you know what code generates the time displayed in the dialog? can that logic be turned into a util and used instead of writing the getTimeFromSlotString custom function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm interesting idea, thanks! Another thing that might be easier or more consistent with test automation would be to add a data-testid attribute to the available time slots and it could be formatted like

data-testid='Tuesday, January 14, 2025 02:30 PM' then when the test selects an available time slot it could grab the data-testid attribute value for the selected time slot; and it would already be formatted for what we need.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like the code that generates the event time in the request sent dialog is actually generated right in the frontend itself:

https://github.com/thunderbird/appointment/blob/main/frontend/src/components/BookingModal.vue#L54

const time = computed(() => dj(props.event.start).format(dddd, MMMM D, YYYY ${timeFormat()}));

So I don't think we can go that route.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@malini Would you mind approving this as it is? I don't see any easy way to get rid of the custom getTimeFromSLotString function unfortunately.

@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from 747f5cb to b597cc2 Compare January 16, 2025 15:46
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from b597cc2 to f87afb8 Compare January 21, 2025 14:55
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from f87afb8 to d171ce7 Compare January 21, 2025 18:09
@rwood-moz rwood-moz force-pushed the testing/787-expand-prod-sanity-test branch from d171ce7 to d3d5f8d Compare January 22, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Issues specific to automated testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand the post-deployment sanity test suite
3 participants