-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: throw error so test failures are not swallowed (#17926)
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!)
- Loading branch information
1 parent
1f9b42c
commit 5da50e6
Showing
22 changed files
with
245 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ describe('Signup', () => { | |
cy.visit('/signup') | ||
}) | ||
|
||
it('Cannot create acount with existing email', () => { | ||
it('Cannot create account with existing email', () => { | ||
cy.get('[data-attr=signup-email]').type('[email protected]').should('have.value', '[email protected]') | ||
cy.get('[data-attr=password]').type('12345678').should('have.value', '12345678') | ||
cy.get('[data-attr=signup-start]').click() | ||
|
@@ -75,19 +75,27 @@ describe('Signup', () => { | |
}) | ||
|
||
it('Shows redirect notice if redirecting for maintenance', () => { | ||
cy.visit('/logout') | ||
cy.location('pathname').should('include', '/login') | ||
cy.intercept('https://app.posthog.com/decide/*', (req) => | ||
req.reply( | ||
decideResponse({ | ||
'redirect-signups-to-instance': 'us', | ||
}) | ||
) | ||
) | ||
cy.visit('/signup?maintenanceRedirect=true') | ||
cy.get('.Toastify__toast-body').should( | ||
'contain', | ||
`You have been redirected to signup on our US instance while we perform maintenance on our other instance.` | ||
) | ||
|
||
cy.visit('/logout') | ||
cy.location('pathname').should('include', '/login') | ||
|
||
cy.visit('/signup?maintenanceRedirect=true', { | ||
onLoad(win: Cypress.AUTWindow) { | ||
win.POSTHOG_APP_CONTEXT.preflight.cloud = true | ||
}, | ||
}) | ||
|
||
cy.get('[data-attr="info-toast"]') | ||
.contains( | ||
`You've been redirected to signup on our US instance while we perform maintenance on our other instance.` | ||
) | ||
.should('be.visible') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.