FordLabs / retroquest

DEPRECATED ⛔️: RetroQuest is a website that enables teams to run retrospectives online.
Apache License 2.0
57 stars 37 forks source link

Add cypress test to test changing team password flow #509

Closed RandomAshes closed 1 year ago

RandomAshes commented 1 year ago

Overview

Adding cypress tests to test the password reset flow and reset board owners flow as best we can until we can test the actual email that is sent.

Testing Instructions

1) Ensure that the password reset flow for when a user is not logged in is sufficiently tested. 2) Ensure that the password reset flow for when a user is logged in is sufficiently tested. 3) Ensure that the reset board owners flow for when a user is logged in is sufficiently tested. 4) Ensure that recovering team names by email is sufficiently tested.

RandomAshes commented 1 year ago

As an explanation for all the messy commits, cypress was having issues testing certain pages because when running cypress tests in github actions against the build, some pages such as the password reset page url were returning a status code of 404, even though in locally, in dev, and in prod, the pages were loading perfectly fine to the user. For example, if you go to https://dev.retroquest.ford.com/password/reset/expired-link, the page loads perfectly fine, but if you open the dev console, you'll see that that page is returning a 404 status code for some unknown reason.

I got around this issue, I added failOnStatusCode: false to the cy.visit calls that were failing, which allows the page to load as normal and not fail the cypress test just because the page is returning a status of 404. Getting to the root of the issue would obviously be best, but I currently have no idea why this is happening at the moment.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information