diff --git a/system-tests/README.md b/system-tests/README.md index f17dcf2b424d..57f9788574fe 100644 --- a/system-tests/README.md +++ b/system-tests/README.md @@ -5,7 +5,7 @@ This package contains Cypress's suite of system tests. These tests launch the [Cypress server](../packages/server) process for each test and run different specs and projects under specific environment conditions, to get tests that can be as close to "real world" as possible. -These tests run in CI in Electron, Chrome, and Firefox under the `system-tests` job family. +These tests run in CI in Electron, Chrome, Firefox, and WebKit under the `system-tests` job family. ## Running System Tests @@ -106,7 +106,7 @@ Running `yarn test node-versions` would spin up a local Docker container for `cy These tests run in the `binary-system-tests` CI job. -### Updating Snaphots +### Updating Snapshots Prepend `SNAPSHOT_UPDATE=1` to any test command. See [`snap-shot-it` instructions](https://github.com/bahmutov/snap-shot-it#advanced-use) for more info. diff --git a/system-tests/projects/e2e/cypress/e2e/form_submission_multipart.cy.js b/system-tests/projects/e2e/cypress/e2e/form_submission_multipart.cy.js index 3a3965ac2a37..353f9891b023 100644 --- a/system-tests/projects/e2e/cypress/e2e/form_submission_multipart.cy.js +++ b/system-tests/projects/e2e/cypress/e2e/form_submission_multipart.cy.js @@ -1,7 +1,7 @@ /* eslint-disable no-undef */ const { Blob, _ } = Cypress -Cypress.Commands.add('setFile', { prevSubject: 'element' }, (element, filePath) => { +Cypress.Commands.add('setFile', { prevSubject: 'element' }, (element, filePath, commandTimeoutOpts) => { const mimeTypes = { jpeg: 'image/jpeg', jpg: 'image/jpeg', @@ -14,10 +14,10 @@ Cypress.Commands.add('setFile', { prevSubject: 'element' }, (element, filePath) const fixtureOrReadFile = function (filePath) { if (_.startsWith(filePath, '/')) { - return cy.readFile(filePath, 'base64') + return cy.readFile(filePath, 'base64', commandTimeoutOpts) } - return cy.fixture(filePath, 'base64') + return cy.fixture(filePath, 'base64', commandTimeoutOpts) } return fixtureOrReadFile(filePath).then((image) => { @@ -62,16 +62,16 @@ describe('
submissions', () => { }) context('can submit a multipart/form-data form with attachments', () => { - const testUpload = (fixturePath, containsOpts = {}) => { + const testUpload = (fixturePath, commandTimeoutOpts = {}) => { cy.visit(`/multipart-with-attachment?fixturePath=${fixturePath}`) cy.get('input[type=file]') - .setFile(fixturePath) + .setFile(fixturePath, commandTimeoutOpts) cy.get('input[type=submit]') .click() cy.document() - .contains('files match', containsOpts) + .contains('files match', commandTimeoutOpts) } it('image/png', () => {