Skip to content

Commit c3cbe6f

Browse files
chore: fix flaky debug progress test (#28958)
* chore: fix flaky debug progress test * empty commit
1 parent 3cfca89 commit c3cbe6f

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

packages/app/cypress/e2e/debug.cy.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ describe('App - Debug Page', () => {
185185

186186
const run = options.testRun
187187

188-
run.totalInstanceCount = 5
188+
run.totalInstanceCount = 3
189189
if (run.completedInstanceCount === undefined) {
190190
run.completedInstanceCount = 0
191191
run.createdAt = (new Date()).toISOString()
@@ -213,10 +213,10 @@ describe('App - Debug Page', () => {
213213
}
214214

215215
if (obj.operationName === 'RelevantRunSpecsDataSource_Specs' && obj.result.data) {
216-
//NOTE Figure out how to manually trigger polling instead of adjusting polling intervals
216+
// NOTE Figure out how to manually trigger polling instead of adjusting polling intervals
217217
obj.result.data.pollingIntervals = {
218218
__typename: 'CloudPollingIntervals',
219-
runByNumber: 1, //Increase polling interval for debugging test
219+
runByNumber: 1.5, //Increase polling interval for debugging test
220220
}
221221

222222
if (run.totalInstanceCount === run.completedInstanceCount) {
@@ -239,15 +239,14 @@ describe('App - Debug Page', () => {
239239
cy.findByTestId('sidebar-link-debug-page').click()
240240
cy.findByTestId('debug-container').should('be.visible')
241241

242-
cy.findByTestId('header-top').contains('chore: testing cypress')
243-
244-
cy.findByTestId('debug-testing-progress').as('progress')
242+
cy.findByTestId('header-top').contains('chore: testing cypress').should('be.visible')
245243

246-
cy.get('@progress').contains('Testing in progress...')
247244
cy.get('[data-cy="debug-badge"]').contains('0').should('be.visible')
248-
cy.get('@progress').contains('1 of 5 specs completed')
249-
cy.get('@progress').contains('2 of 5 specs completed')
250-
cy.get('@progress').contains('3 of 5 specs completed')
245+
246+
cy.get('[data-cy=debug-testing-progress]').contains('Testing in progress...')
247+
cy.findByTestId('debug-testing-progress').contains('1 of 3 specs completed')
248+
cy.findByTestId('debug-testing-progress').contains('2 of 3 specs completed')
249+
cy.findByTestId('debug-testing-progress').contains('3 of 3 specs completed')
251250
cy.get('[data-cy="debug-badge"]').contains('1').should('be.visible')
252251

253252
cy.findByTestId('spec-contents').within(() => {

0 commit comments

Comments
 (0)