Skip to content

Commit

Permalink
Fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthemanuel committed Jun 10, 2022
1 parent 0456b00 commit a39cbc6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe('authChange subscription', () => {

it('responds to authChange subscription for login', () => {
cy.contains('Log In')
cy.wait(500)
cy.withCtx(async (ctx) => {
await ctx.actions.auth.login()
})
Expand All @@ -42,6 +43,7 @@ describe('authChange subscription', () => {
setActiveUser()
cy.reload() // Reload to show the latest state
cy.contains('Test User')
cy.wait(500)
cy.withCtx(async (ctx) => {
await ctx.actions.auth.logout()
})
Expand All @@ -58,6 +60,7 @@ describe('authChange subscription', () => {

it('responds to authChange subscription for login', () => {
cy.contains('Log In')
cy.wait(500)
cy.withCtx(async (ctx) => {
await ctx.actions.auth.login()
})
Expand All @@ -69,6 +72,7 @@ describe('authChange subscription', () => {
setActiveUser()
cy.reload() // Reload to show the latest state
cy.contains('Test User')
cy.wait(500)
cy.withCtx(async (ctx) => {
await ctx.actions.auth.logout()
})
Expand All @@ -84,6 +88,7 @@ describe('authChange subscription', () => {

it('responds to authChange subscription for login', () => {
cy.contains('Log In')
cy.wait(500)
cy.withCtx(async (ctx) => {
await ctx.actions.auth.login()
})
Expand All @@ -95,6 +100,7 @@ describe('authChange subscription', () => {
setActiveUser()
cy.visitLaunchpad()
cy.contains('Test User')
cy.wait(500)
cy.withCtx(async (ctx) => {
await ctx.actions.auth.logout()
})
Expand Down
1 change: 1 addition & 0 deletions packages/app/cypress/e2e/top-nav.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ describe('App Top Nav Workflows', () => {
const oldFetch = ctx.util.fetch

o.sinon.stub(ctx.util, 'fetch').callsFake(async (url: RequestInfo | URL, init?: RequestInit) => {
await new Promise((resolve) => setTimeout(resolve, 500))
if (['https://download.cypress.io/desktop.json', 'https://registry.npmjs.org/cypress'].includes(String(url))) {
throw new Error(String(url))
}
Expand Down
1 change: 1 addition & 0 deletions packages/launchpad/cypress/e2e/slow-network.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ describe('slow network: launchpad', () => {
cy.visitLaunchpad()
cy.get('[data-cy=top-nav-cypress-version-current-link]').should('not.exist')
cy.contains('Log In')
cy.wait(500)
cy.withCtx(async (ctx, o) => {
o.testState.pendingFetches.map((f) => f.resolve())
})
Expand Down

0 comments on commit a39cbc6

Please sign in to comment.