mmcknett / loggr

Time logging system
https://loggr-a3f89.web.app/
0 stars 0 forks source link

test: Add cypress tests for the happy path. (Fixes #42) #43

Closed mmcknett closed 1 year ago

mmcknett commented 1 year ago

Initial Cypress tests

This is the initial set of cypress tests, running against the firebase emulators. My initial test plan ended up looking like this:

  1. Create an account
  2. Log out
  3. Log in with the account just created
  4. Create a draft a. Check that the draft exists on firebase
  5. Make a note and submit it a. Make sure the note appears on the page. b. Check that firebase has a note, too.
  6. Delete the note

Followup

Some things that should get broken out separately:

github-actions[bot] commented 1 year ago

Visit the preview URL for this PR (updated for commit 12d0a78):

https://loggr-a3f89--pr43-cypress-f3lvgtew.web.app

(expires Mon, 27 Feb 2023 20:19:06 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: dcba139c17e47dff84a60c5907b98fbd13d724df

mmcknett commented 1 year ago

I wanted to see if I could get the cypress tests to check Firestore instead of sensing whether the database had been updated via UI updates. It didn't go well; using the firebase client SDK (e.g. calling getDoc(...)) via Cypress is flakey. Integrating with cypress-firebase was a mess, too, because it's hard to keep track of the uid for the newly-created user. For now, I'm leaving it as is.