Skip to content

Commit

Permalink
chore: increase timeout of cy.readFile to address flaky WebKit test (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-shehane authored Jun 9, 2023
1 parent d2ca58a commit 0d26b0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions system-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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) => {
Expand Down Expand Up @@ -62,16 +62,16 @@ describe('<form> 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', () => {
Expand Down

10 comments on commit 0d26b0f

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 0d26b0f Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.15.0/linux-arm64/develop-0d26b0fa23b438cee71f36a13cd3cc508fd5a220/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 0d26b0f Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.15.0/linux-x64/develop-0d26b0fa23b438cee71f36a13cd3cc508fd5a220/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 0d26b0f Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.15.0/darwin-x64/develop-0d26b0fa23b438cee71f36a13cd3cc508fd5a220/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 0d26b0f Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.15.0/win32-x64/develop-0d26b0fa23b438cee71f36a13cd3cc508fd5a220/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 0d26b0f Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.15.0/darwin-arm64/develop-0d26b0fa23b438cee71f36a13cd3cc508fd5a220/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 0d26b0f Jun 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.15.0/linux-arm64/develop-0d26b0fa23b438cee71f36a13cd3cc508fd5a220/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 0d26b0f Jun 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.15.0/linux-x64/develop-0d26b0fa23b438cee71f36a13cd3cc508fd5a220/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 0d26b0f Jun 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.15.0/darwin-x64/develop-0d26b0fa23b438cee71f36a13cd3cc508fd5a220/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 0d26b0f Jun 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.15.0/darwin-arm64/develop-0d26b0fa23b438cee71f36a13cd3cc508fd5a220/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 0d26b0f Jun 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.15.0/win32-x64/develop-0d26b0fa23b438cee71f36a13cd3cc508fd5a220/cypress.tgz

Please sign in to comment.