From c3cbe6fc141fe94ce6c400fe3c93e7637a714dac Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Thu, 22 Feb 2024 11:24:37 -0500 Subject: [PATCH] chore: fix flaky debug progress test (#28958) * chore: fix flaky debug progress test * empty commit --- packages/app/cypress/e2e/debug.cy.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/app/cypress/e2e/debug.cy.ts b/packages/app/cypress/e2e/debug.cy.ts index 6918d77f44a2..00996344cd23 100644 --- a/packages/app/cypress/e2e/debug.cy.ts +++ b/packages/app/cypress/e2e/debug.cy.ts @@ -185,7 +185,7 @@ describe('App - Debug Page', () => { const run = options.testRun - run.totalInstanceCount = 5 + run.totalInstanceCount = 3 if (run.completedInstanceCount === undefined) { run.completedInstanceCount = 0 run.createdAt = (new Date()).toISOString() @@ -213,10 +213,10 @@ describe('App - Debug Page', () => { } if (obj.operationName === 'RelevantRunSpecsDataSource_Specs' && obj.result.data) { - //NOTE Figure out how to manually trigger polling instead of adjusting polling intervals + // NOTE Figure out how to manually trigger polling instead of adjusting polling intervals obj.result.data.pollingIntervals = { __typename: 'CloudPollingIntervals', - runByNumber: 1, //Increase polling interval for debugging test + runByNumber: 1.5, //Increase polling interval for debugging test } if (run.totalInstanceCount === run.completedInstanceCount) { @@ -239,15 +239,14 @@ describe('App - Debug Page', () => { cy.findByTestId('sidebar-link-debug-page').click() cy.findByTestId('debug-container').should('be.visible') - cy.findByTestId('header-top').contains('chore: testing cypress') - - cy.findByTestId('debug-testing-progress').as('progress') + cy.findByTestId('header-top').contains('chore: testing cypress').should('be.visible') - cy.get('@progress').contains('Testing in progress...') cy.get('[data-cy="debug-badge"]').contains('0').should('be.visible') - cy.get('@progress').contains('1 of 5 specs completed') - cy.get('@progress').contains('2 of 5 specs completed') - cy.get('@progress').contains('3 of 5 specs completed') + + cy.get('[data-cy=debug-testing-progress]').contains('Testing in progress...') + cy.findByTestId('debug-testing-progress').contains('1 of 3 specs completed') + cy.findByTestId('debug-testing-progress').contains('2 of 3 specs completed') + cy.findByTestId('debug-testing-progress').contains('3 of 3 specs completed') cy.get('[data-cy="debug-badge"]').contains('1').should('be.visible') cy.findByTestId('spec-contents').within(() => {