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

fix: throw error so test failures are not swallowed #17926

Merged
merged 15 commits into from
Oct 11, 2023
Merged

Conversation

pauldambra
Copy link
Member

@pauldambra pauldambra commented Oct 11, 2023

So obvious in retrospect

If you listen to the Cypress fail event without re-throwing then you swallow all test failures

"fun"


When reviewing #17919 I knew the Cypress tests would have to be failing which is what prompted me to check

Introduced in bbb7ed9 (July 10th!)

@neilkakkar
Copy link
Contributor

nice, thank you!

I just wrote some today and was very confused why the asserts error out but still pass overall. You saved me A TON of digging :D

@@ -74,7 +74,8 @@ describe('Signup', () => {
cy.get('.Toastify [data-attr="error-toast"]').contains('Inactive social login session.')
})

it('Shows redirect notice if redirecting for maintenance', () => {
// skip this because it seems to be missing necessary setup feature flag, preflight cloud check...
it.skip('Shows redirect notice if redirecting for maintenance', () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

@raquelmsmith can this Cypress test be deleted or should it be fixed?

Copy link
Member

Choose a reason for hiding this comment

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

It shouldn't be deleted, we want to make sure this functionality works for when we do use the flag in production. It shouldn't be broken and was working before.. The bit we need for the flag is on line 83 below where we define what is in the decide response.

Copy link
Member Author

Choose a reason for hiding this comment

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

Just to check... did the test pass for you running locally before?

The problem we've had is that the tests were passing in CI no matter what. I've had to change the code a little...

  • I had to set preflight to cloud in the test itself
  • the redirect is hard-coded to use prod US or prod EU URLs so have had to change the redirect code to not redirect from Cypress to production

Copy link
Member

Choose a reason for hiding this comment

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

Yeah it did work locally! Thanks for the fix.

@pauldambra pauldambra marked this pull request as ready for review October 11, 2023 23:51
@pauldambra pauldambra merged commit 5da50e6 into master Oct 11, 2023
@pauldambra pauldambra deleted the chore/stupid branch October 11, 2023 23:51
daibhin pushed a commit that referenced this pull request Oct 23, 2023
So obvious in retrospect

If you listen to the Cypress fail event without re-throwing then you swallow all test failures

"fun"

When reviewing #17919 I knew the Cypress tests would have to be failing which is what prompted me to check

Introduced in bbb7ed9 (July 10th!)
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.

4 participants