-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails with Chrome 73 #3699
Comments
Hey @streamnsight, could you provide an example of the test code you are running when you experience this? |
Last time we had an issue, it was Cypress not connecting to Chrome at all. This time, it seems linked to our upload command. The code goes like this to simulate a browser event: cy.get(selector).then(subject =>
cy
.fixture(fileName, 'base64')
.then(Cypress.Blob.base64StringToBlob)
.then(blob => {
const el = subject[0];
const testFile = new File([blob], fileName, {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
});
const dataTransfer = new DataTransfer();
dataTransfer.items.add(testFile);
el.files = dataTransfer.files;
})
); it then waits for the POST api call to happen (registered as an alias) and now it just waits, but the POST never happens, so this code doesn't work anymore. |
cy.get(selector).then(subject =>
cy
.fixture(fileName, 'base64')
.then(Cypress.Blob.base64StringToBlob)
.then(blob => {
const el = subject[0];
const testFile = new File([blob], fileName, {
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
});
const dataTransfer = new DataTransfer();
dataTransfer.items.add(testFile);
el.files = dataTransfer.files;
el.dispatchEvent(new Event('change', { bubbles: true }));
// ^^^ adding this line seems to fix it.
})
); |
thanks @streamnsight that solution worked well to me, I was having the issue running cypress tests in docker, so you saved me |
Current behavior:
before update to Chrome 73, everything was running fine. Since update Cypress fails, timeout, does not connect to Chrome it seems
Steps to reproduce: (app code and test code)
just update Chrome and relaunch.
Versions
Cypress 3.1.5
Chrome 73
Linux, Mac OS X
The text was updated successfully, but these errors were encountered: