Skip to content

Commit

Permalink
misc: allow HiDPI Screen running wayland to use cypress window/browse…
Browse files Browse the repository at this point in the history
…r [run ci] (#30109)
  • Loading branch information
AtofStryker committed Aug 26, 2024
1 parent 507be6c commit 50335a0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ mainBuildFilters: &mainBuildFilters
- /^release\/\d+\.\d+\.\d+$/
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- 'update-v8-snapshot-cache-on-develop'
- 'jquery-patch-remove-unload'
- 'publish-binary'
- 'fix/8599'
- 'chore/support_hidpi_wayland'

# usually we don't build Mac app - it takes a long time
# but sometimes we want to really confirm we are doing the right thing
Expand All @@ -43,6 +42,7 @@ macWorkflowFilters: &darwin-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'chore/support_hidpi_wayland', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -53,7 +53,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'jquery-patch-remove-unload', << pipeline.git.branch >> ]
- equal: [ 'chore/support_hidpi_wayland', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -76,7 +76,7 @@ windowsWorkflowFilters: &windows-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'cacie/29880/unload-in-chromium', << pipeline.git.branch >> ]
- equal: [ 'chore/support_hidpi_wayland', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -152,7 +152,7 @@ commands:
name: Set environment variable to determine whether or not to persist artifacts
command: |
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "fix/8599" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "chore/support_hidpi_wayland" ]]; then
export SHOULD_PERSIST_ARTIFACTS=true
fi' >> "$BASH_ENV"
# You must run `setup_should_persist_artifacts` command and be using bash before running this command
Expand Down
4 changes: 4 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ _Released 8/27/2024 (PENDING)_
- Fixed an issue where files outside the Cypress project directory were not calculating the bundle output path correctly for the `file:preprocessor`. Addresses [#8599](https://github.com/cypress-io/cypress/issues/8599).
- Correctly determines current browser family when choosing between `unload` and `pagehide` options in App Runner. Fixes [#29880](https://github.com/cypress-io/cypress/issues/29880).

**Misc:**

- Allow HiDPI Screen running wayland to use cypress window/browser by adding `--ozone-platform-hint=auto` flag to the electron's runtime argument. Addresses [#20891](https://github.com/cypress-io/cypress/issues/20891).

**Dependency Updates:**

- Updated `detect-port` from `1.3.0` to `1.6.1`. Addressed in [#30038](https://github.com/cypress-io/cypress/pull/30038).
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/exec/spawn.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ module.exports = {

const { onStderrData } = overrides
const envOverrides = util.getEnvOverrides(options)
const electronArgs = []
const electronArgs = ['--ozone-platform-hint=auto']
const node11WindowsFix = isPlatform('win32')

let startScriptPath
Expand Down
4 changes: 4 additions & 0 deletions cli/test/lib/exec/spawn_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ describe('lib/exec/spawn', function () {
return spawn.start('--foo', { foo: 'bar' })
.then(() => {
expect(cp.spawn).to.be.calledWithMatch('/path/to/cypress', [
'--ozone-platform-hint=auto',
'--',
'--foo',
'--cwd',
Expand Down Expand Up @@ -148,6 +149,7 @@ describe('lib/exec/spawn', function () {
const args = cp.spawn.firstCall.args.slice(0, 2)
// it is important for "--no-sandbox" to appear before "--" separator
const expectedCliArgs = [
'--ozone-platform-hint=auto',
'--no-sandbox',
'--',
'--foo',
Expand All @@ -173,6 +175,7 @@ describe('lib/exec/spawn', function () {
.then(() => {
expect(cp.spawn).to.be.calledWithMatch('node', [
p,
'--ozone-platform-hint=auto',
'--',
'--foo',
'--cwd',
Expand All @@ -198,6 +201,7 @@ describe('lib/exec/spawn', function () {
.then(() => {
expect(cp.spawn).to.be.calledWithMatch('node', [
p,
'--ozone-platform-hint=auto',
'--',
'--foo',
'--cwd',
Expand Down

5 comments on commit 50335a0

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 50335a0 Aug 26, 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.14.0/linux-x64/develop-50335a0d2bbcdb99babed7f8fb038132dede11b9/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 50335a0 Aug 26, 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.14.0/linux-arm64/develop-50335a0d2bbcdb99babed7f8fb038132dede11b9/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 50335a0 Aug 26, 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 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/13.14.0/win32-x64/develop-50335a0d2bbcdb99babed7f8fb038132dede11b9/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 50335a0 Aug 26, 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.14.0/darwin-arm64/develop-50335a0d2bbcdb99babed7f8fb038132dede11b9/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 50335a0 Aug 26, 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.14.0/darwin-x64/develop-50335a0d2bbcdb99babed7f8fb038132dede11b9/cypress.tgz

Please sign in to comment.