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

[Task] Create integration tests #8

Open
1 task
JasonBarahan opened this issue Jun 29, 2024 · 0 comments
Open
1 task

[Task] Create integration tests #8

JasonBarahan opened this issue Jun 29, 2024 · 0 comments

Comments

@JasonBarahan
Copy link
Member

Task

Create (partial) integration tests. We want to ensure
(Here I propose mocking the OTP as it involves an external service. We can test email reception separately.)

  • Given a mock OTP the user registration process is complete with no malformed data
  • Given a mock OTP the user login process is complete with no malformed data
  • When a QR code is generated the user is able to scan that QR code, and the database record is modified appropriately
  • The same QR code is scanned and a duplicate code prompt (you already scanned this booth!) appears
  • The same QR code is scanned after the code refreshes, but before it is invalidated (staggered invalidation) and the duplicate code prompt appears again
  • The same QR code is scanned after the code is invalidated and the "invalid code" prompt appears.
  • Check that the stamps associated with already scanned QR codes are fully coloured, and those which are not have been greyed out
  • Since we already tested QR codes we can then modify the user record to indicate that it has scanned all required stamps. Then we test that receiving the prize works.
  • Test that the prize claim prompt appears.
  • Test that the "quest already completed" prompt appears once the prize is confirmed to be claimed, and that the appropriate record is modified.
  • Test that all buttons actually work

Steps

  • Complete those tests

(Feel free to modify the above as needed.)

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

No branches or pull requests

1 participant