Skip to content

Commit ec55f05

Browse files
Merge branch 'new-chrome-flags-prefs' of https://github.com/cypress-io/cypress into new-chrome-flags-prefs
2 parents 06f18dd + 5d105ec commit ec55f05

File tree

6 files changed

+39
-17
lines changed

6 files changed

+39
-17
lines changed

cli/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ _Released 10/20/2025 (PENDING)_
1212
- Fixed an issue where command snapshots were not correctly displayed in Studio. Addressed in [#32808](https://github.com/cypress-io/cypress/pull/32808).
1313
- Chrome's autofill popup is now disabled when filling address and credit card forms during test execution. We also added some other Chrome flags and preferences that are common when automating browsers. Fixes [#25608](https://github.com/cypress-io/cypress/issues/25608). Addressed in [#32811](https://github.com/cypress-io/cypress/pull/32811).
1414
- Fixed an issue where grouped command text jumps up and down when expanding and collapsing in the command log. Addressed in [#32757](https://github.com/cypress-io/cypress/pull/32757).
15+
- Fixed an issue where command snapshots were not correctly displayed in Studio. Addressed in [#32808](https://github.com/cypress-io/cypress/pull/32808).
16+
- Fixed an issue with grouped console prop items having a hard to read blue color in the console log and duplicate `:` characters being displayed. Addressed in [#32776](https://github.com/cypress-io/cypress/pull/32776).
1517

1618
**Misc:**
1719

packages/app/cypress/e2e/runner/logger.cy.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,29 @@ describe('logger', () => {
2020
expect(spyLog).to.have.been.calledWith(`%c [2]:`, 'font-weight: bold', 3)
2121
})
2222

23+
it('cy.log() logs groups correctly', () => {
24+
logger.logFormatted({ groups: [{ name: 'test', items: { 'key1': 'value1', 'longerkey2': 'value2' } }] })
25+
26+
expect(spyLog).to.have.been.calledWith(`%cKey1: `, 'color: #4a90e2', 'value1')
27+
expect(spyLog).to.have.been.calledWith(`%cLongerkey2: `, 'color: #4a90e2', 'value2')
28+
})
29+
30+
it('ensures a fresh set of logs each time logger.logFormatted() is called', () => {
31+
const props = { groups: [{ name: 'test', items: { 'key1': 'value1', 'longerkey2': 'value2' } }] }
32+
33+
logger.logFormatted(props)
34+
35+
expect(spyLog).to.have.been.calledWith(`%cKey1: `, 'color: #4a90e2', 'value1')
36+
expect(spyLog).to.have.been.calledWith(`%cLongerkey2: `, 'color: #4a90e2', 'value2')
37+
38+
spyLog.resetHistory()
39+
40+
logger.logFormatted(props)
41+
42+
expect(spyLog).to.have.been.calledWith(`%cKey1: `, 'color: #4a90e2', 'value1')
43+
expect(spyLog).to.have.been.calledWith(`%cLongerkey2: `, 'color: #4a90e2', 'value2')
44+
})
45+
2346
describe('_logValues', () => {
2447
let spyTrim = sinon.spy(_, 'trim')
2548

packages/app/src/runner/logger.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ export const logger = {
3131
logFormatted (consoleProps: any) {
3232
if (_.isEmpty(consoleProps)) return
3333

34-
this._logValues(consoleProps)
35-
this._logArgs(consoleProps)
36-
this._logGroups(consoleProps)
37-
this._logTables(consoleProps)
34+
// clone the consoleProps to avoid mutating the original object
35+
const clonedConsoleProps = _.cloneDeep(consoleProps)
36+
37+
this._logValues(clonedConsoleProps)
38+
this._logArgs(clonedConsoleProps)
39+
this._logGroups(clonedConsoleProps)
40+
this._logTables(clonedConsoleProps)
3841
},
3942

4043
_logValues (consoleProps: any) {
@@ -113,7 +116,7 @@ export const logger = {
113116
if (group.label === false) {
114117
this.log(value)
115118
} else {
116-
this.log(`%c${key}`, 'color: blue', value)
119+
this.log(`%c${key}`, 'color: #4a90e2', value)
117120
}
118121
})
119122

tooling/v8-snapshot/cache/darwin/snapshot-meta.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@
770770
"./packages/errors/cjs/index.js",
771771
"./packages/errors/cjs/stackUtils.js",
772772
"./packages/errors/node_modules/chalk/source/index.js",
773+
"./packages/extension/lib-dist/index.js",
773774
"./packages/https-proxy/cjs/server.js",
774775
"./packages/icons/index.js",
775776
"./packages/launcher/lib/browsers.ts",
@@ -3917,9 +3918,6 @@
39173918
"./packages/errors/node_modules/chalk/source/util.js",
39183919
"./packages/example/index.js",
39193920
"./packages/example/lib/example.js",
3920-
"./packages/extension/index.js",
3921-
"./packages/extension/lib/extension.js",
3922-
"./packages/extension/lib/util.js",
39233921
"./packages/frontend-shared/cypress/e2e/prod-dependencies.ts",
39243922
"./packages/frontend-shared/cypress/e2e/v8-snapshot-entry.ts",
39253923
"./packages/frontend-shared/node_modules/cross-fetch/dist/node-ponyfill.js",
@@ -4355,5 +4353,5 @@
43554353
"./tooling/v8-snapshot/cache/darwin/snapshot-entry.js"
43564354
],
43574355
"deferredHashFile": "yarn.lock",
4358-
"deferredHash": "363dc6a650dbfccea4d1feaff2ed9563f6fc7d71cf81859ec16531de3bf842be"
4356+
"deferredHash": "fb0de27230d82e28a43424845972a45fde96eb9f608a996a64740c8d8719f7ff"
43594357
}

tooling/v8-snapshot/cache/linux/snapshot-meta.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,7 @@
769769
"./packages/errors/cjs/index.js",
770770
"./packages/errors/cjs/stackUtils.js",
771771
"./packages/errors/node_modules/chalk/source/index.js",
772+
"./packages/extension/lib-dist/index.js",
772773
"./packages/https-proxy/cjs/server.js",
773774
"./packages/icons/index.js",
774775
"./packages/launcher/lib/browsers.ts",
@@ -3916,9 +3917,6 @@
39163917
"./packages/errors/node_modules/chalk/source/util.js",
39173918
"./packages/example/index.js",
39183919
"./packages/example/lib/example.js",
3919-
"./packages/extension/index.js",
3920-
"./packages/extension/lib/extension.js",
3921-
"./packages/extension/lib/util.js",
39223920
"./packages/frontend-shared/cypress/e2e/prod-dependencies.ts",
39233921
"./packages/frontend-shared/cypress/e2e/v8-snapshot-entry.ts",
39243922
"./packages/frontend-shared/node_modules/cross-fetch/dist/node-ponyfill.js",
@@ -4354,5 +4352,5 @@
43544352
"./tooling/v8-snapshot/cache/linux/snapshot-entry.js"
43554353
],
43564354
"deferredHashFile": "yarn.lock",
4357-
"deferredHash": "363dc6a650dbfccea4d1feaff2ed9563f6fc7d71cf81859ec16531de3bf842be"
4355+
"deferredHash": "fb0de27230d82e28a43424845972a45fde96eb9f608a996a64740c8d8719f7ff"
43584356
}

tooling/v8-snapshot/cache/win32/snapshot-meta.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@
776776
"./packages/errors/cjs/index.js",
777777
"./packages/errors/cjs/stackUtils.js",
778778
"./packages/errors/node_modules/chalk/source/index.js",
779+
"./packages/extension/lib-dist/index.js",
779780
"./packages/https-proxy/cjs/server.js",
780781
"./packages/icons/index.js",
781782
"./packages/launcher/lib/browsers.ts",
@@ -3916,9 +3917,6 @@
39163917
"./packages/errors/node_modules/chalk/source/util.js",
39173918
"./packages/example/index.js",
39183919
"./packages/example/lib/example.js",
3919-
"./packages/extension/index.js",
3920-
"./packages/extension/lib/extension.js",
3921-
"./packages/extension/lib/util.js",
39223920
"./packages/frontend-shared/cypress/e2e/prod-dependencies.ts",
39233921
"./packages/frontend-shared/cypress/e2e/v8-snapshot-entry.ts",
39243922
"./packages/frontend-shared/node_modules/cross-fetch/dist/node-ponyfill.js",
@@ -4354,5 +4352,5 @@
43544352
"./tooling/v8-snapshot/cache/win32/snapshot-entry.js"
43554353
],
43564354
"deferredHashFile": "yarn.lock",
4357-
"deferredHash": "1b8b73cb9c9cbcef7e1d90255e1afbd542d0f53801701d60ea0b2ab0ef65ca8a"
4355+
"deferredHash": "32c33a5643193894192769595646f56d108c276672ed5b5dcc91eb669b64ac41"
43584356
}

0 commit comments

Comments
 (0)