Cypress tests slow down or fail, UI is unresponsive in 3.3.1
See original GitHub issueCurrent behavior:
I noticed the some of our API, mainly XHR requests were continuously getting looped indefinitely when i upgraded Cypress from 3.2.0 to 3.3.0. So we rolled it back. Now we hit some other bugs, for which we wanted to upgrade to Cypress 3.3.1, once again i am getting a similar issue.
- For some of the tests some XHR requests are loading indefinitely.
- The Timer is not incrementing
- The Test Runner is not responding
------------ Configuration -------
{
animationDistanceThreshold: 5,
baseUrl: null,
blacklistHosts: null,
chromeWebSecurity: true,
defaultCommandTimeout: 20000,
env: {
CLIENT: 'demoaccount',
failOnSnapshotDiff: false},
execTimeout: 60000,
fileServerFolder: '',
fixturesFolder: 'cypress/fixtures',
hosts: null,
integrationFolder: 'cypress/integration',
modifyObstructiveCode: true,
numTestsKeptInMemory: 1,
pageLoadTimeout: 60000,
pluginsFile: 'cypress/plugins',
port: null,
reporter: 'spec',
reporterOptions: null,
requestTimeout: 5000,
responseTimeout: 30000,
screenshotsFolder: 'cypress/screenshots',
supportFile: 'cypress/support',
taskTimeout: 60000,
testFiles: '**/*.{spec.js,feature}',
trashAssetsBeforeRuns: true,
userAgent: null,
video: true,
videoCompression: 32,
videoUploadOnPasses: true,
videosFolder: 'cypress/videos',
viewportHeight: 660,
viewportWidth: 1000,
waitForAnimations: true,
watchForFileChanges: true}
-----------
Scenario failing- Validating the time/date picker yields a correct date in the calendar while scheduling email message (we are using cucumber library)
Desired behavior:
Things are fine in 3.2.0, except some known issues like forwarding of socket failures related error in HTTP api level, which causes some parse error (Internal Error 500) in cypress.
Steps to reproduce: (app code and test code)
I am sharing some snippet of the login code, which we use to login.
Cypress.Commands.add(
'login',
{
prevSubject: 'true'
},
(client, user) => {
cy.logout();
return cy.visit(`${BASE_URL}`).then(() => {
return cy.getCookie('csrftoken').then(({ value }) => {
return cy
.request({
url: `${client.url}/accounts/login`,
form: true,
method: 'POST',
body: {
username: client.users[user].email,
password: client.users[user].password,
csrfmiddlewaretoken: value
}
})
.then(() => client);
});
});
}
);
Versions
cypress - 3.3.1 electron - 61 OS - Mac OS Mojave 10.14.5
Attachments
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:20 (8 by maintainers)
Top Results From Across the Web
Troubleshooting | Cypress Documentation
Isolate the Problem. When debugging a failing test, follow these general principles to isolate the problem: Look at the video recordings and screenshots....
Read more >Slow Down Cypress Tests - YouTube
This video shows how to slow down a Cypress test by adding a delay to every Cypress command in the test using the...
Read more >End-to-End Testing | Gatsby
This method can slow down Cypress and make the window unresponsive if you have a lot of elements on the page. To overcome...
Read more >cypress-io/cypress - Gitter
Oops...we found an error preparing this test file: cypress/support/index.js The error was: Error: ENOENT: no such file or directory, ...
Read more >Running Cypress tests with TestContainers for a Spring Boot ...
blog/2019/06/16/ensure-junit-test-fails-when-cypress-tests-fail/[Ensure ... After that unzip cypress.zip and drag the Cypress application to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@joydeep100 Let’s move discussion of this issue to #4668, since the history of this issue has become about something else. I thought we fixed the issue you’re experiencing in 3.3.2, but apparently I reproducing another potential cause of XHR flakiness all along 😛
@joydeep100 Yes, this issue was intended to be completely fixed in version 3.3.2.
@flotwig can you take a look at the HAR file?