Skip to content

Commit

Permalink
Merge branch 'develop' into ignore-chrom-prefs
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-shehane committed May 6, 2024
2 parents f432813 + 555a924 commit 435e3d6
Show file tree
Hide file tree
Showing 84 changed files with 1,711 additions and 303 deletions.
2 changes: 1 addition & 1 deletion .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,7 @@ jobs:
<<: *defaultsParameters
resource_class:
type: string
default: medium
default: large
percy:
type: boolean
default: false
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update-browser-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
env:
CYPRESS_BOT_APP_ID: ${{ secrets.CYPRESS_BOT_APP_ID }}
BASE_BRANCH: develop
# Prevent from running this workflow on forks
if: github.repository == 'cypress-io/cypress'
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/update_v8_snapshot_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@ on:
push:
branches:
- 'release/**'
paths-ignore:
- .husky/**
- .vscode/**
- .eslintrc.js
- .gitattributes
- .gitignore
- .percy.yml
- .prettierignore
- .releaserc.js
- .yarnclean
- CHANGELOG.md
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- LICENSE
- README.md
- ROADMAP.md
- SECURITY.md
workflow_dispatch:
inputs:
branch:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/upload_release_asset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
FOSSA_API_KEY: ${{secrets.FOSSAAPIKEY}}
repo-token: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand Down
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,12 @@ You must have the following installed on your system to contribute locally:
`python` is pre-installed on Debian-based systems including Ubuntu.
The Python versions shipped with Ubuntu versions `20.04`, `23.10` and `22.04` are compatible with Cypress requirements.

Only on Ubuntu `24.04` install Python `3.11` by executing the following command:
Only on Ubuntu `24.04` install Python `3.11` by executing the following commands:

```shell
sudo apt install python3.11
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11
```

Add the environment variable `NODE_GYP_FORCE_PYTHON` to `~/.bashrc`:
Expand All @@ -225,6 +227,8 @@ Add the environment variable `NODE_GYP_FORCE_PYTHON` to `~/.bashrc`:
export NODE_GYP_FORCE_PYTHON=/usr/bin/python3.11
```

For Ubuntu `24.04` refer also to the [Release notes](https://discourse.ubuntu.com/t/noble-numbat-release-notes/39890) in the section [Unprivileged user namespace restrictions](https://discourse.ubuntu.com/t/noble-numbat-release-notes/39890#unprivileged-user-namespace-restrictions-15) and apply one of the workarounds to disable unprivileged user namespace restrictions for the entire system, either for one boot or persistently, as described. If you do not do this you may receive an error which includes the text `FATAL:setuid_sandbox_host.cc` when you try to run Cypress on this version of Ubuntu after building Cypress from source.

#### Windows

When installing the Visual Studio C++ environment recommended by [node-gyp](https://github.com/nodejs/node-gyp), install also a Windows 10 SDK. The currently used version of `node-gyp` may otherwise fail to recognise the Visual Studio installation.
Expand Down
4 changes: 2 additions & 2 deletions browser-versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"chrome:beta": "125.0.6422.14",
"chrome:stable": "124.0.6367.91",
"chrome:beta": "125.0.6422.26",
"chrome:stable": "124.0.6367.118",
"chrome:minimum": "64.0.3282.0"
}
15 changes: 13 additions & 2 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,22 @@ _Released 5/7/2024 (PENDING)_

**Features:**

- Add the option to ignore chrome preferences when launching the browser. Addressed in [#29332](https://github.com/cypress-io/cypress/pull/29332).
- Added more descriptive error messages when Test Replay fails to record or upload. Addresses [#29022](https://github.com/cypress-io/cypress/issues/29022).
- Added an `IGNORE_CHROME_PREFERENCES` environment variable to ignore Chrome preferences when launching Chrome. Addressed in [#29332](https://github.com/cypress-io/cypress/pull/29332).

**Bugfixes:**

- Fixed a bug where promises rejected with `undefined` were failing inside `cy.origin()`. Addresses [#23937](https://github.com/cypress-io/cypress/issues/23937).
- We now pass the same default Chromium flags to Electron as we do to Chrome. As a result of this change, the application under test's `navigator.webdriver` property will now correctly be `true` when testing in Electron. Fixes [#27939](https://github.com/cypress-io/cypress/issues/27939).
- Fixed an issue where extra windows weren't being closed between specs in Firefox causing potential issues in subsequent specs. Fixes [#29473](https://github.com/cypress-io/cypress/issues/29473).

**Misc:**

- Improved accessibility of the Cypress App in some areas. Addressed in [#29322](https://github.com/cypress-io/cypress/pull/29322).

**Dependency Updates:**

- Updated electron from `27.1.3` to `27.3.10` to address [CVE-2024-3156](https://nvd.nist.gov/vuln/detail/CVE-2024-3156). Addressed in [#29367](https://github.com/cypress-io/cypress/pull/29367).
- Updated electron from `27.1.3` to `27.3.10` to address [CVE-2024-3156](https://nvd.nist.gov/vuln/detail/CVE-2024-3156). Addressed in [#29431](https://github.com/cypress-io/cypress/pull/29431).

## 13.8.1

Expand Down
12 changes: 12 additions & 0 deletions npm/eslint-plugin-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# [@cypress/eslint-plugin-dev-v6.0.0](https://github.com/cypress-io/cypress/compare/@cypress/eslint-plugin-dev-v5.3.3...@cypress/eslint-plugin-dev-v6.0.0) (2024-05-06)


### breaking

* the supported eslint version is 8 for @cypress/eslint-plugin-dev. ([3b799a1](https://github.com/cypress-io/cypress/commit/3b799a158d7af419637d524e811561cd25143c3f))


### BREAKING CHANGES

* The supported eslint version is 8. @see f14a11aecfbc1e3854daae02b69fb40b4ec801b7 for breaking changes to the plugin.

# [@cypress/eslint-plugin-dev-v5.3.3](https://github.com/cypress-io/cypress/compare/@cypress/eslint-plugin-dev-v5.3.2...@cypress/eslint-plugin-dev-v5.3.3) (2024-01-12)


Expand Down
8 changes: 3 additions & 5 deletions npm/eslint-plugin-dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ eslint-plugin-json-format
@typescript-eslint/parser
@typescript-eslint/eslint-plugin
eslint-plugin-mocha
eslint-plugin-import

# if you have react/jsx files
eslint-plugin-react
Expand Down Expand Up @@ -94,6 +95,7 @@ _Should usually be used at the root of the package._

**requires you to install the following `devDependencies`**:
```sh
eslint-plugin-import
eslint-plugin-json-format
@typescript-eslint/parser
@typescript-eslint/eslint-plugin
Expand Down Expand Up @@ -178,11 +180,7 @@ After installing, add the following to your User or Workspace (`.vscode/settings
{
"language": "json",
"autoFix": true
},
{
"language": "coffeescript",
"autoFix": false
},
}
],
}
```
Expand Down
2 changes: 2 additions & 0 deletions npm/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# [@cypress/react-v8.0.1](https://github.com/cypress-io/cypress/compare/@cypress/react-v8.0.0...@cypress/react-v8.0.1) (2024-05-06)

# [@cypress/react-v8.0.0](https://github.com/cypress-io/cypress/compare/@cypress/react-v7.0.3...@cypress/react-v8.0.0) (2023-08-29)


Expand Down
2 changes: 1 addition & 1 deletion npm/react/cypress/component/basic/error-boundary.cy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ describe('Error Boundary', () => {
)

cy.get('header h1').should('contain', 'Something went wrong.')
cy.get('header h3').should('contain', 'ChildWithError failed to load')
cy.get('header h2').should('contain', 'ChildWithError failed to load')
})
})
2 changes: 1 addition & 1 deletion npm/react/cypress/component/basic/error-boundary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class ErrorBoundary extends React.Component {
<React.Fragment>
<header>
<h1>Something went wrong.</h1>
<h3>{`${name} failed to load`}</h3>
<h2>{`${name} failed to load`}</h2>
</header>
<section>
<pre>
Expand Down
4 changes: 2 additions & 2 deletions packages/app/cypress/e2e/cypress-in-cypress.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('Cypress in Cypress', { viewportWidth: 1500, defaultCommandTimeout: 100
ctx.coreData.servers.cdpSocketServer?.emit('automation:disconnected')
})

cy.contains('h3', 'The Cypress extension has disconnected')
cy.contains('h2', 'The Cypress extension has disconnected')

cy.withCtx((ctx, { sinon }) => {
sinon.stub(ctx.actions.project, 'launchProject').resolves()
Expand Down Expand Up @@ -84,7 +84,7 @@ describe('Cypress in Cypress', { viewportWidth: 1500, defaultCommandTimeout: 100
connectedCallback(false)
})

cy.contains('h3', 'The Cypress extension is missing')
cy.contains('h2', 'The Cypress extension is missing')

// cy.percySnapshot() // TODO: restore when Percy CSS is fixed. See https://github.com/cypress-io/cypress/issues/23435

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe('errorWarningChange subscription', () => {
})

function assertLoadingIntoErrorWorks (errorName: string) {
cy.contains('h3', errorName).should('be.visible')
cy.contains('h2', errorName).should('be.visible')
cy.contains('[role="alert"]', 'Loading').should('not.exist')
}

Expand Down Expand Up @@ -48,7 +48,7 @@ module.exports = {
})

it('shows expected error for malformed config file', () => {
cy.contains('h3', 'SyntaxError').should('not.exist')
cy.contains('h2', 'SyntaxError').should('not.exist')
cy.withCtx(async (ctx) => {
await ctx.actions.file.writeFileInProject('cypress.config.js',
`
Expand All @@ -75,7 +75,7 @@ module.exports = {
})

cy.contains(cy.i18n.launchpadErrors.generic.retryButton).click()
cy.contains('h3', 'SyntaxError').should('not.exist')
cy.contains('h2', 'SyntaxError').should('not.exist')
})
})
})
Expand Down
8 changes: 4 additions & 4 deletions packages/app/src/debug/DebugContainer.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ describe('<DebugContainer />', () => {
mountTestRun('allSkipped')

cy.findByTestId('collapsible').should('be.visible')
cy.contains('h3', 'Incomplete')
cy.contains('h2', 'Incomplete')
cy.contains('The browser server never connected.').should('be.visible')
cy.contains('2 of 3 specs skipped').should('be.visible')
})
Expand All @@ -181,7 +181,7 @@ describe('<DebugContainer />', () => {
mountTestRun('noTests')

cy.findByTestId('collapsible').should('be.visible')
cy.contains('h3', 'Incomplete')
cy.contains('h2', 'Incomplete')
cy.contains('Run has no tests').should('be.visible')
})
})
Expand All @@ -191,7 +191,7 @@ describe('<DebugContainer />', () => {
mountTestRun('timedOutWithCi')

cy.findByTestId('collapsible').should('be.visible')
cy.contains('h3', 'Incomplete')
cy.contains('h2', 'Incomplete')
cy.contains('Circle CI #1234').should('have.attr', 'href', 'https://circleci.com').should('be.visible')
cy.contains('Archive this run to remove it').should('be.visible')
})
Expand All @@ -200,7 +200,7 @@ describe('<DebugContainer />', () => {
mountTestRun('timedOutWithoutCi')

cy.findByTestId('collapsible').should('be.visible')
cy.contains('h3', 'Incomplete')
cy.contains('h2', 'Incomplete')
cy.contains('Circle CI #1234').should('not.exist')
cy.contains('Archive this run to remove it').should('be.visible')
})
Expand Down
12 changes: 6 additions & 6 deletions packages/app/src/debug/DebugRunStates.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Debug page states', () => {
cy.mount(<DebugErrored errors={[mockError]} totalSkippedSpecs={1} totalSpecs={1} />)

cy.findByTestId('collapsible').should('be.visible')
cy.get('h3').contains('Incomplete')
cy.get('h2').contains('Incomplete')
cy.contains(mockError)
cy.contains('1 of 1 spec skipped').should('be.visible')
})
Expand All @@ -46,7 +46,7 @@ describe('Debug page states', () => {
cy.mount(<DebugErrored errors={[mockError]} totalSkippedSpecs={4} totalSpecs={50} />)

cy.findByTestId('collapsible').should('be.visible')
cy.get('h3').contains('Incomplete')
cy.get('h2').contains('Incomplete')
cy.contains(mockError)
cy.contains('4 of 50 specs skipped').should('be.visible')
})
Expand All @@ -57,7 +57,7 @@ describe('Debug page states', () => {
cy.mount(<DebugNoTests />)

cy.findByTestId('collapsible').should('be.visible')
cy.get('h3').contains('Incomplete')
cy.get('h2').contains('Incomplete')
cy.contains('Run has no tests')
})
})
Expand All @@ -67,7 +67,7 @@ describe('Debug page states', () => {
cy.mount(<DebugTimedout totalSkippedSpecs={4} totalSpecs={50} />)

cy.findByTestId('collapsible').should('be.visible')
cy.get('h3').contains('Incomplete')
cy.get('h2').contains('Incomplete')
cy.contains('The run started but never completed. This can happen when the run is cancelled from CI or when Cypress crashes while running tests. Archive this run to remove it from the runs list and analytics.')
cy.contains('4 of 50 specs skipped')
})
Expand All @@ -77,7 +77,7 @@ describe('Debug page states', () => {
ci={{ id: '123', url: 'https://circleci.com/', formattedProvider: 'CircleCI', ciBuildNumberFormatted: '12345' }} totalSkippedSpecs={4} totalSpecs={50} />)

cy.findByTestId('collapsible').should('be.visible')
cy.get('h3').contains('Incomplete')
cy.get('h2').contains('Incomplete')
cy.contains('The run started but never completed. This can happen when the run is cancelled from CI or when Cypress crashes while running tests. Check your CircleCI #12345 logs for more information. Archive this run to remove it from the runs list and analytics.')
cy.findByTestId('external').contains('CircleCI #12345').should('have.attr', 'href', 'https://circleci.com/')
cy.contains('4 of 50 specs skipped')
Expand Down Expand Up @@ -189,7 +189,7 @@ describe('Debug page states', () => {
it('renders', () => {
cy.mount(<DebugCancelledAlert totalSpecs={5} totalSkippedSpecs={2} cancellation={{ cancelledAt: '2019-01-25T02:00:00.000Z', cancelledBy: { email: 'adams@cypress.io', fullName: 'Test Tester' } }} />)
cy.findByTestId('collapsible').should('be.visible')
cy.get('h3').contains('Manually cancelled')
cy.get('h2').contains('Manually cancelled')
cy.contains('2 of 5 specs skipped')
cy.findByTestId('cancelled-by-user-avatar').should('have.attr', 'style', 'background-image: url("https://s.gravatar.com/avatar/402f6cafb6c02371c2c23c5215ae3d85?size=48&default=mm");')
cy.contains('Test Tester')
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/debug/DebugSpec.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ describe('Run Failures button', () => {
))

cy.findByTestId('run-failures')
.should('have.attr', 'aria-disabled', 'disabled')
.should('have.attr', 'aria-disabled', 'true')
.should('not.have.attr', 'href')

cy.findByTestId('run-failures').realHover()
Expand All @@ -517,7 +517,7 @@ describe('Run Failures button', () => {
))

cy.findByTestId('run-failures')
.should('have.attr', 'aria-disabled', 'disabled')
.should('have.attr', 'aria-disabled', 'true')
.should('not.have.attr', 'href')

cy.findByTestId('run-failures').realHover()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('AutomationDisconnected', () => {
cy.mount(<AutomationDisconnected />)

cy.findByTestId('collapsible').should('be.visible')
cy.contains('h3', 'The Cypress extension has disconnected.')
cy.contains('h2', 'The Cypress extension has disconnected.')
cy.contains('p', 'Cypress cannot run tests without this extension.')
cy.get('a').contains('Read more about browser management').should('have.attr', 'href', 'https://on.cypress.io/launching-browsers')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('AutomationMissing', () => {
})

cy.findByTestId('collapsible').should('be.visible')
cy.contains('h3', 'The Cypress extension is missing.')
cy.contains('h2', 'The Cypress extension is missing.')
cy.contains('p', 'Cypress cannot run tests without this extension. Please choose another browser.')
cy.findByTestId('external').contains('Read more about browser management').should('have.attr', 'href', 'https://on.cypress.io/launching-browsers')

Expand Down
8 changes: 4 additions & 4 deletions packages/app/src/runs/RunsContainer.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ describe('<RunsContainer />', { keystrokeDelay: 0 }, () => {
},
})

cy.get('h3').contains(defaultMessages.runs.empty.gitRepositoryNotDetected)
cy.get('h2').contains(defaultMessages.runs.empty.gitRepositoryNotDetected)
cy.contains(defaultMessages.runs.empty.ensureGitSetupCorrectly)
})

Expand All @@ -146,7 +146,7 @@ describe('<RunsContainer />', { keystrokeDelay: 0 }, () => {
},
})

cy.get('h3').contains(defaultMessages.runs.empty.gitRepositoryNotDetected)
cy.get('h2').contains(defaultMessages.runs.empty.gitRepositoryNotDetected)
cy.contains(defaultMessages.runs.empty.ensureGitSetupCorrectly)
cy.get('[data-cy=alert-suffix-icon]').click()
cy.get('[data-cy=alert-header]').should('not.exist')
Expand Down Expand Up @@ -175,7 +175,7 @@ describe('<RunsContainer />', { keystrokeDelay: 0 }, () => {
},
})

cy.get('h3').contains(defaultMessages.runs.empty.noRunsFoundForBranch)
cy.get('h2').contains(defaultMessages.runs.empty.noRunsFoundForBranch)
cy.get('p').contains(defaultMessages.runs.empty.noRunsForBranchMessage)
// The utm_source will be Binary%3A+App in production`open` mode but we assert using Binary%3A+Launchpad as this is the value in CI
cy.contains(defaultMessages.links.learnMoreButton).should('have.attr', 'href', 'https://on.cypress.io/git-info?utm_source=Binary%3A+Launchpad&utm_medium=Runs+Tab&utm_campaign=No+Runs+Found')
Expand All @@ -202,7 +202,7 @@ describe('<RunsContainer />', { keystrokeDelay: 0 }, () => {
},
})

cy.get('h3').contains(defaultMessages.runs.empty.noRunsFoundForBranch)
cy.get('h2').contains(defaultMessages.runs.empty.noRunsFoundForBranch)
cy.get('p').contains(defaultMessages.runs.empty.noRunsForBranchMessage)
// The utm_source will be Binary%3A+App in production`open` mode but we assert using Binary%3A+Launchpad as this is the value in CI
cy.contains(defaultMessages.links.learnMoreButton).should('have.attr', 'href', 'https://on.cypress.io/git-info?utm_source=Binary%3A+Launchpad&utm_medium=Runs+Tab&utm_campaign=No+Runs+Found')
Expand Down
2 changes: 1 addition & 1 deletion packages/data-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"dataloader": "^2.0.0",
"dayjs": "^1.9.3",
"dedent": "^0.7.0",
"ejs": "^3.1.8",
"ejs": "^3.1.10",
"endent": "2.0.1",
"execa": "1.0.0",
"front-matter": "^4.0.2",
Expand Down
Loading

4 comments on commit 435e3d6

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 435e3d6 May 6, 2024

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/13.9.0/linux-arm64/ignore-chrom-prefs-435e3d691beeb0315572def3d2d6a56ccb0821d4/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 435e3d6 May 6, 2024

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/13.9.0/linux-x64/ignore-chrom-prefs-435e3d691beeb0315572def3d2d6a56ccb0821d4/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 435e3d6 May 6, 2024

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/13.9.0/darwin-arm64/ignore-chrom-prefs-435e3d691beeb0315572def3d2d6a56ccb0821d4/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 435e3d6 May 6, 2024

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/13.9.0/darwin-x64/ignore-chrom-prefs-435e3d691beeb0315572def3d2d6a56ccb0821d4/cypress.tgz

Please sign in to comment.