Skip to content

Cypress is running really slow after upgrading to v10 #22868

@SadiqRahim

Description

@SadiqRahim

Current behavior

We were on 9.5.4. Then did the upgrade to the latest version of cypress 10.3.1.
Now the test execution time takes too long. This appears to occur when loading a page.
Just the cypress package and cypress.config.js file changed. Screenshot attached with the differences on the same test code. Hopefully the information provided helps

Screenshot 2022-07-20 at 15 52 30
Screenshot 2022-07-20 at 15 52 54

Desired behavior

We expect to run faster or at the same speed

Test code to reproduce

it('Create new forecast', () => {
cy.intercept('/transformation/').as('wait')
cy.visit(${global.url}/company/adient/forecasting/annual-iu62wfojz8iourjk74wn)
cy.wait('@wait').its('response.statusCode').should('be.oneOf', [200, 307])
cy.wait('@wait').its('response.statusCode').should('be.oneOf', [200, 307])
cy.wait(1500)

cy.window().then((appWindow) => {
  let spreadHostElement = appWindow.document.querySelector(pageObj.forecastObj.hostElement)
  let spread = appWindow.GC.Spread.Sheets.findControl(spreadHostElement)
  let activeSheet = spread.getActiveSheet()
  activeSheet.setActiveCell(4, 5)
  activeSheet.startEdit(true, '10')
  cy.get('.cc-forecasting.cc-ui-block').type('{enter}')
  cy.wait(300)
})

cy.get(':nth-child(3) > .cc-ui-button').click({force: true})
cy.get('.cc-company-forecasting-save > .cc-ui-field > input').type('New forecast')

cy.intercept('POST', '/graphql', (req) => {
  aliasMutation(req, 'SaveForecast')
})
cy.get('.cc-company-forecasting-save__actions > .cc-ui-button').click({force: true})
cy.wait('@SaveForecast')
cy.get('.is-active > .cc-ui-icon > .iconPlus').click({ force: true })
cy.wait(1500)

})

Cypress Version

10.3.1

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions