Skip to content

Commit 34fe1ae

Browse files
authored
misc: update playwright-webkit from 1.24.2 to 1.56.1 and base-internal image from Debian Bullseye to Debian Trixie (#32852)
* chore: update playwright-webkit from 1.24.2 to 1.56.1 * chore: fix cookies.cy.js tests in webkit by checking for strict domain match first when calling getCookie and falling back to apex domain * misc: add changelog item
1 parent b92dcdb commit 34fe1ae

File tree

12 files changed

+64
-33
lines changed

12 files changed

+64
-33
lines changed

.circleci/src/pipeline/@pipeline.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ version: 2.1
88
chrome-stable-version: &chrome-stable-version "141.0.7390.107"
99
chrome-beta-version: &chrome-beta-version "142.0.7444.34"
1010
firefox-stable-version: &firefox-stable-version "142.0"
11-
base-internal-bullseye: &base-internal-bullseye cypress/base-internal:22.19.0-bullseye
12-
base-internal-yarn-berry: &base-internal-yarn-berry cypress/base-internal:22.19.0-yarn-berry
11+
base-internal-trixie: &base-internal-trixie cypress/base-internal:22.19.0-trixie
12+
base-internal-yarn-berry: &base-internal-yarn-berry cypress/base-internal:22.19.0-yarn-berry-trixie
1313
# Lowest Node.js version we support of the minimum major version supported
1414
# See https://docs.cypress.io/app/get-started/install-cypress#Nodejs
1515
base-internal-minimum-node: &base-internal-minimum-node cypress/base-internal:20.15.0
@@ -46,15 +46,15 @@ executors:
4646
# the Docker image with Cypress dependencies and Chrome browser
4747
cy-doc:
4848
docker:
49-
- image: *base-internal-bullseye
49+
- image: *base-internal-trixie
5050
# by default, we use "medium" to balance performance + CI costs. bump or reduce on a per-job basis if needed.
5151
resource_class: medium
5252
environment:
5353
PLATFORM: linux
5454

5555
kitchensink-executor:
5656
docker:
57-
- image: *base-internal-bullseye
57+
- image: *base-internal-trixie
5858
# by default, we use "medium" to balance performance + CI costs. bump or reduce on a per-job basis if needed.
5959
resource_class: medium
6060
environment:
@@ -63,7 +63,7 @@ executors:
6363
# Docker image with non-root "node" user
6464
non-root-docker-user:
6565
docker:
66-
- image: *base-internal-bullseye
66+
- image: *base-internal-trixie
6767
user: node
6868
environment:
6969
PLATFORM: linux
@@ -587,7 +587,7 @@ commands:
587587
version: << parameters.google-chrome-for-testing-version >>
588588
install_chromedriver: false
589589

590-
# This code builds better-sqlite3 on Debian 11 (Bullseye). This is necessary because Debian 10 has the oldest glibc version (2.31) that we support.
590+
# This code builds better-sqlite3 on Debian 11 (Bullseye). This is necessary because Debian 11 has the oldest glibc version (2.31) that we support.
591591
#
592592
# Since this is running Docker remote (because the job running the command may not be using an executor with the appropriate glibc version), we need to
593593
# copy the project into the container, and copy the built plugin out of the container because the host running docker does not have access to the
@@ -1937,7 +1937,7 @@ jobs:
19371937
parallelism: 1
19381938
working_directory: ~/cypress
19391939
docker:
1940-
- image: *base-internal-bullseye
1940+
- image: *base-internal-trixie
19411941
environment:
19421942
# needed to inform the bootstrap-docker-container.sh script to link the binary in the system-test project directory
19431943
REPO_DIR: /root/cypress

cli/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ _Released 11/4/2025 (PENDING)_
2121
- Add top padding for command log labels. Addressed in [#32774](https://github.com/cypress-io/cypress/pull/32774).
2222
- The hitbox for expanding a grouped command has been widened. Addresses [#32778](https://github.com/cypress-io/cypress/issues/32778). Addressed in [#32783](https://github.com/cypress-io/cypress/pull/32783).
2323
- Have cursor on hover of the AUT URL to show as pointer. Addresses [#32777](https://github.com/cypress-io/cypress/issues/32777). Addressed in [#32782](https://github.com/cypress-io/cypress/pull/32782).
24+
- WebKit now prefers a cookie's fully qualified `domain` when requesting a cookie value via [`cy.getCookie()`](https://docs.cypress.io/api/commands/getcookie). If none are found, the cookie's apex domain will be used as a fallback. Addresses [#29954](https://github.com/cypress-io/cypress/issues/29954), [#29973](https://github.com/cypress-io/cypress/issues/29973) and [#30392](https://github.com/cypress-io/cypress/issues/30392). Addressed in [#32852](https://github.com/cypress-io/cypress/pull/32852).
2425

2526
**Dependency Updates:**
2627

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ services:
3131
- .:/opt/cypress
3232
ci:
3333
# This should mirror the image used in workflows.yml
34-
image: cypress/base-internal:22.19.0-bullseye
34+
image: cypress/base-internal:22.19.0-trixie
3535
ports:
3636
- 5566:5566
3737
- 5567:5567

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
"npm-packlist": "9.0.0",
190190
"p-defer": "^3.0.0",
191191
"patch-package": "8.0.0",
192-
"playwright-webkit": "1.24.2",
192+
"playwright-webkit": "1.56.1",
193193
"pluralize": "8.0.0",
194194
"print-arch": "1.0.0",
195195
"proxyquire": "2.1.3",

packages/driver/cypress/e2e/commands/cookies.cy.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,13 @@ describe('src/cy/commands/cookies - no stub', () => {
123123

124124
cy.getCookies({ domain: 'www.foobar.com' }).then((cookies) => {
125125
expect(cookies).to.have.length(2)
126-
expect(cookies[0].name).to.equal('key1')
127-
expect(cookies[0].domain).to.match(/\.?www\.foobar\.com/)
128-
expect(cookies[1].name).to.equal('key2')
129-
expect(cookies[1].domain).to.match(/\.?foobar\.com/)
126+
127+
const sortedCookies = Cypress._.sortBy(cookies, 'name')
128+
129+
expect(sortedCookies[0].name).to.equal('key1')
130+
expect(sortedCookies[0].domain).to.match(/\.?www\.foobar\.com/)
131+
expect(sortedCookies[1].name).to.equal('key2')
132+
expect(sortedCookies[1].domain).to.match(/\.?foobar\.com/)
130133
})
131134

132135
cy.getCookies({ domain: 'barbaz.com' }).then((cookies) => {
@@ -1380,8 +1383,12 @@ describe('src/cy/commands/cookies', () => {
13801383
// other browsers do not return sameSite at all
13811384
const sameSite = (
13821385
Cypress.isBrowser('webkit')
1383-
) ? 'no_restriction' :
1384-
Cypress.isBrowser('firefox') ? 'unspecified' : null
1386+
// There is an odd inconsistency when setting an undefined cookie context in WebKit in WebKit 26.
1387+
// On linux based machines, the sameSite will be set to `lax`, but on MacOS the sameSite is set to `None` (no_restriction).
1388+
// There is no difference in the webkit-automation logic within cypress so the inconsistency must lie in the OS
1389+
// implement of WebKit
1390+
) ? Cypress.platform === 'darwin' ? 'no_restriction' : 'lax'
1391+
: Cypress.isBrowser('firefox') ? 'unspecified' : null
13851392

13861393
if (sameSite) {
13871394
cy.getCookie('five').should('include', { sameSite })

packages/electron/.cursor/rules/electron-upgrade.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ When Electron is upgraded, the bundled Node.js version often changes. Sync this
6767
```bash
6868
# File: /docker-compose.yml
6969
# Update the base-internal image reference:
70-
# "cypress/base-internal:22.18.0-bullseye" -> "cypress/base-internal:NEW_NODE_VERSION-bullseye"
70+
# "cypress/base-internal:22.18.0-trixie" -> "cypress/base-internal:NEW_NODE_VERSION-trixie"
7171
```
7272

7373
### CircleCI Workflows
7474
```bash
7575
# File: /.circleci/src/@workflows.yml
7676
# Update base-internal image references:
77-
# "base-internal-bullseye: &base-internal-bullseye cypress/base-internal:22.18.0-bullseye" -> "base-internal-bullseye: &base-internal-bullseye cypress/base-internal:NEW_NODE_VERSION-bullseye"
77+
# "base-internal-trixie: &base-internal-trixie cypress/base-internal:22.18.0-trixie" -> "base-internal-trixie: &base-internal-trixie cypress/base-internal:NEW_NODE_VERSION-trixie"
7878
# "base-internal-yarn-berry: &base-internal-yarn-berry cypress/base-internal:22.18.0-yarn-berry" -> "base-internal-yarn-berry: &base-internal-yarn-berry cypress/base-internal:NEW_NODE_VERSION-yarn-berry"
7979
# "base-internal-minimum-node: &base-internal-minimum-node cypress/base-internal:22.18.0" -> "base-internal-minimum-node: &base-internal-minimum-node cypress/base-internal:NEW_NODE_VERSION"
8080
```

packages/server/lib/automation/util.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ export type CyCookie = Pick<chrome.cookies.Cookie, 'name' | 'value' | 'expiratio
1212
// @ts-ignore
1313
export type CyCookieFilter = chrome.cookies.GetAllDetails
1414

15-
export const cookieMatches = (cookie: CyCookie | playwright.Cookie, filter?: CyCookieFilter) => {
16-
if (filter?.domain && !domainMatch(filter?.domain, cookie.domain)) {
15+
export const cookieMatches = (cookie: CyCookie | playwright.Cookie, filter?: CyCookieFilter, options?: { strictDomain: boolean }) => {
16+
if (filter?.domain) {
17+
if (options?.strictDomain ? filter?.domain !== cookie.domain : !domainMatch(filter?.domain, cookie.domain))
1718
return false
1819
}
1920

packages/server/lib/browsers/webkit-automation.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,19 @@ export class WebKitAutomation {
270270

271271
if (!cookies.length) return null
272272

273-
const cookie = cookies.find((cookie) => {
274-
return cookieMatches(cookie, filter)
273+
// first attempt to match cookie on strict domain
274+
let cookie = cookies.find((cookie) => {
275+
return cookieMatches(cookie, filter, { strictDomain: true })
275276
})
276277

277-
if (!cookie) return null
278+
if (!cookie) {
279+
cookie = cookies.find((cookie) => {
280+
// if unable to match closest via strict domain, then return a cookie that matches the apex domain
281+
return cookieMatches(cookie, filter)
282+
})
283+
284+
if (!cookie) return null
285+
}
278286

279287
return normalizeGetCookieProps(cookie)
280288
}

packages/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
"mocked-env": "1.2.4",
199199
"mockery": "2.1.0",
200200
"nock": "13.2.9",
201-
"playwright-webkit": "1.24.2",
201+
"playwright-webkit": "1.56.1",
202202
"proxyquire": "2.1.3",
203203
"repl.history": "0.1.4",
204204
"request-promise": "4.2.6",

packages/server/test/unit/automation/util_spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,19 @@ context('lib/automation/util', () => {
4545

4646
expect(cookieMatches(cookie, filter)).to.be.false
4747
})
48+
49+
it('strict matches exact domain with strictDomain=true', () => {
50+
const cookie = { domain: 'www.example.com' } as CyCookie
51+
const filter = { domain: 'www.example.com' }
52+
53+
expect(cookieMatches(cookie, filter, { strictDomain: true })).to.be.true
54+
})
55+
56+
it('fails apex domain match with strictDomain=true', () => {
57+
const cookie = { domain: 'example.com' } as CyCookie
58+
const filter = { domain: 'www.example.com' }
59+
60+
expect(cookieMatches(cookie, filter, { strictDomain: true })).to.be.false
61+
})
4862
})
4963
})

0 commit comments

Comments
 (0)