diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 044b66172929..a2de37c7a24f 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -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 @@ -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 >> @@ -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 >> @@ -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 >> @@ -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 diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 3c5bfb724f5b..a5fd9a819b00 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -24,6 +24,10 @@ _Released 8/27/2024 (PENDING)_ - 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). diff --git a/cli/lib/exec/spawn.js b/cli/lib/exec/spawn.js index e132b964e0a3..93595243cd54 100644 --- a/cli/lib/exec/spawn.js +++ b/cli/lib/exec/spawn.js @@ -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 diff --git a/cli/test/lib/exec/spawn_spec.js b/cli/test/lib/exec/spawn_spec.js index 26ad6d6713e7..6b4d7b46f0fd 100644 --- a/cli/test/lib/exec/spawn_spec.js +++ b/cli/test/lib/exec/spawn_spec.js @@ -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', @@ -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', @@ -173,6 +175,7 @@ describe('lib/exec/spawn', function () { .then(() => { expect(cp.spawn).to.be.calledWithMatch('node', [ p, + '--ozone-platform-hint=auto', '--', '--foo', '--cwd', @@ -198,6 +201,7 @@ describe('lib/exec/spawn', function () { .then(() => { expect(cp.spawn).to.be.calledWithMatch('node', [ p, + '--ozone-platform-hint=auto', '--', '--foo', '--cwd',