Skip to content
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

Axios not starting request since 3.3.0 #4252

Closed
skjnldsv opened this issue May 20, 2019 · 5 comments

Comments

3 participants
@skjnldsv
Copy link

commented May 20, 2019

Has anything changed that can impact this on 3.3.0?
I checked the changelog, but cannot find anything related. I'm no expert though :)

Changing browser (chromium, electron...) does not fix this.

Current behavior:

  • On large files (it seems to be the pattern here), axios request does not even starts
    Capture d’écran_2019-05-20_10-28-39
    Capture d’écran_2019-05-20_10-29-01

Desired behavior:

  • axios request starts as it used ot be

Steps to reproduce: (app code and test code)

Command is working fine on 3.2.0
All tests are passing and upload properly.

Cypress.Commands.add('uploadFile', (fileName, mimeType) => {
	cy.fixture(fileName, 'base64')
		.then(Cypress.Blob.base64StringToBlob)
		.then(blob => {
			const file = new File([blob], fileName, { type: mimeType })
			const url = `${Cypress.env('baseUrl')}/remote.php/webdav/${fileName}`
			return cy.window().then({ timeout: 10000 }, window => {
				return axios.put(url, file, {
					headers: {
						requesttoken: window.OC.requestToken,
						'Content-Type': mimeType
					}
				}).then(response => {
					expect(response.status).to.eq(201)
					cy.log(`Uploaded ${fileName}`, response.status)
				})
			})
		})
})

Versions

3.2.0
Linux
CI: Drone.io

@jennifer-shehane

This comment has been minimized.

Copy link
Member

commented May 20, 2019

Thanks for opening! Will close as duplicate of #4253 to keep the discussion in one place.

@skjnldsv

This comment has been minimized.

Copy link
Author

commented May 20, 2019

Awesome thanks @jennifer-shehane :)

@skjnldsv

This comment has been minimized.

Copy link
Author

commented May 20, 2019

@jennifer-shehane
To reproduce:

  1. clone https://github.com/nextcloud/viewer/
  2. checkout the 3.3.0 branch dependabot/npm_and_yarn/cypress-3.3.0
  3. npm install
  4. start the server ./cypress/start.sh viewer
    (it just copy the app into the nextcloud container, set some default config and run in background on port 8000)
  5. run test cypress run --spec cypress/integration/video.mp4.spec.js
  6. (kill the server make test-cypress-kill)
@cypress-bot

This comment has been minimized.

Copy link

commented May 22, 2019

The code for this is done in cypress-io/cypress#4241, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot

This comment has been minimized.

Copy link

commented May 23, 2019

Released in 3.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.