Skip to content

Commit

Permalink
conditionally skip flaky test on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiller1990 committed Nov 8, 2022
1 parent 12174a4 commit aeaae33
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/app/cypress/e2e/runs.cy.ts
Expand Up @@ -848,9 +848,10 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
})
})

const RUNNING_COUNT = 3

describe('refetching', () => {
let obj: {toCall?: Function} = {}
const RUNNING_COUNT = 3

beforeEach(() => {
cy.scaffoldProject('component-tests')
Expand All @@ -874,7 +875,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
const setTimeout = win.setTimeout

// @ts-expect-error
win.setTimeout = function (fn, time) {
win.setTimeout = function (fn: () => void, time: number) {
if (fn.name === 'fetchNewerRuns') {
obj.toCall = fn
} else {
Expand All @@ -885,7 +886,9 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
})
})

it('should re-query for executing runs', () => {
const itSkipIfWindows = Cypress.platform === 'win32' ? it.skip : it

itSkipIfWindows('should re-query for executing runs', () => {
cy.get('[data-cy="run-card-icon-RUNNING"]').should('have.length', RUNNING_COUNT).should('be.visible')

cy.remoteGraphQLIntercept(async (obj) => {
Expand Down Expand Up @@ -918,7 +921,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
completeNext(1)
})

it('should fetch newer runs and maintain them when navigating', () => {
itSkipIfWindows('should fetch newer runs and maintain them when navigating', () => {
cy.get('[data-cy="run-card-icon-RUNNING"]').should('have.length', RUNNING_COUNT).should('be.visible')

cy.remoteGraphQLIntercept(async (obj) => {
Expand Down

0 comments on commit aeaae33

Please sign in to comment.