Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merge develop to release/14.0.0 #30423

Merged
merged 10 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/cache-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Bump this version to force CI to re-create the cache from scratch.

09-30-24-windows-patch-server-2022
ryanthemanuel marked this conversation as resolved.
Show resolved Hide resolved
10-18-2024
16 changes: 8 additions & 8 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ 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'
- 'ryanm/fix/find-process'
- 'misc/use_webdriver'
- 'publish-binary'

# usually we don't build Mac app - it takes a long time
Expand All @@ -42,7 +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: [ 'ryanm/fix/find-process', << pipeline.git.branch >> ]
- equal: [ 'misc/use_webdriver', << 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: [ 'ryanm/fix/find-process', << pipeline.git.branch >> ]
- equal: [ 'misc/use_webdriver', << 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: [ 'ryanm/fix/find-process', << pipeline.git.branch >> ]
- equal: [ 'misc/use_webdriver', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -85,7 +85,7 @@ executors:
# the Docker image with Cypress dependencies and Chrome browser
cy-doc:
docker:
- image: cypress/browsers-internal:node18.17.1-chrome128-ff130
- image: cypress/browsers-internal:node18.17.1-chrome128-ff131
# by default, we use "medium" to balance performance + CI costs. bump or reduce on a per-job basis if needed.
resource_class: medium
environment:
Expand All @@ -94,7 +94,7 @@ executors:

kitchensink-executor:
docker:
- image: cypress/browsers-internal:node20.15.0-chrome126-ff127
- image: cypress/browsers-internal:node20.15.0-chrome126-ff131
# by default, we use "medium" to balance performance + CI costs. bump or reduce on a per-job basis if needed.
resource_class: medium
environment:
Expand All @@ -104,7 +104,7 @@ executors:
# Docker image with non-root "node" user
non-root-docker-user:
docker:
- image: cypress/browsers-internal:node18.17.1-chrome128-ff130
- image: cypress/browsers-internal:node18.17.1-chrome128-ff131
user: node
environment:
PLATFORM: linux
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" != "ryanm/fix/find-process" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "misc/use_webdriver" ]]; 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: 2 additions & 2 deletions browser-versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"chrome:beta": "130.0.6723.31",
"chrome:stable": "129.0.6668.100",
"chrome:beta": "130.0.6723.44",
"chrome:stable": "130.0.6723.58",
"chrome:minimum": "64.0.3282.0"
}
1 change: 1 addition & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ _Released 10/1/2024 (PENDING)_
**Misc:**

- Cypress now consumes [geckodriver](https://firefox-source-docs.mozilla.org/testing/geckodriver/index.html) to help automate the Firefox browser instead of [marionette-client](https://github.com/cypress-io/marionette-client). Addresses [#30217](https://github.com/cypress-io/cypress/issues/30217).
- Cypress now consumes [webdriver](https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver) to help automate the Firefox browser and [firefox-profile](https://github.com/saadtazi/firefox-profile-js) to create a firefox profile and convert it to Base64 to save user screen preferences via `xulstore.json`. Addresses [#30300](https://github.com/cypress-io/cypress/issues/30300) and [#30301](https://github.com/cypress-io/cypress/issues/30301).
- Pass spec information to protocol's `beforeSpec` to improve troubleshooting when reporting on errors. Addressed in [#30316](https://github.com/cypress-io/cypress/pull/30316).

**Dependency Updates:**
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@
"scripts"
],
"nohoist": [
"**/@wdio/*",
"**/webpack-preprocessor/babel-loader",
"**/webpack-preprocessor/**/merge-source-map",
"**/webpack-preprocessor/**/patch-package",
Expand All @@ -262,6 +263,7 @@
"**/@types/cheerio": "0.22.21",
"**/@types/enzyme": "3.10.5",
"**/@types/react": "16.9.50",
"**/@wdio/logger": "9.0.0",
"**/jquery": "3.4.1",
"**/pretty-format": "26.4.0",
"**/sharp": "0.29.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/data-context/src/DataContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export class DataContext {
@cached
get cloud () {
return new CloudDataSource({
fetch: (...args) => this.util.fetch(...args),
fetch: (...args: [RequestInfo | URL, (RequestInit | undefined)?]) => this.util.fetch(...args),
getUser: () => this.coreData.user,
logout: () => this.actions.auth.logout().catch(this.logTraceError),
invalidateClientUrqlCache: () => this.graphql.invalidateClientUrqlCache(this),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { SocketShape } from '@packages/socket/lib/types'
import type { ClientOptions } from '@urql/core'

export const urqlFetchSocketAdapter = (io: SocketShape): ClientOptions['fetch'] => {
return (url, fetchOptions = {}) => {
return (url, fetchOptions: RequestInit = {}) => {
return new Promise<Response>((resolve, reject) => {
// Handle aborted requests
if (fetchOptions.signal) {
Expand Down
26 changes: 14 additions & 12 deletions packages/server/lib/browsers/firefox-util.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import Debug from 'debug'
import { CdpAutomation } from './cdp_automation'
import { BrowserCriClient } from './browser-cri-client'
import type { Client as WebDriverClient } from 'webdriver'
import type { Automation } from '../automation'
import type { CypressError } from '@packages/errors'
import type { WebDriverClassic } from './webdriver-classic'

const debug = Debug('cypress:server:browsers:firefox-util')

let webDriverClassic: WebDriverClassic
let webdriverClient: WebDriverClient

async function connectToNewTabClassic () {
// Firefox keeps a blank tab open in versions of Firefox 123 and lower when the last tab is closed.
// For versions 124 and above, a new tab is not created, so @packages/extension creates one for us.
// Since the tab is always available on our behalf,
// we can connect to it here and navigate it to about:blank to set it up for CDP connection
const handles = await webDriverClassic.getWindowHandles()
const handles = await webdriverClient.getWindowHandles()

await webDriverClassic.switchToWindow(handles[0])
await webdriverClient.switchToWindow(handles[0])

await webDriverClassic.navigate('about:blank')
await webdriverClient.navigateTo('about:blank')
}

async function connectToNewSpec (options, automation: Automation, browserCriClient: BrowserCriClient) {
Expand Down Expand Up @@ -51,26 +51,28 @@ async function setupCDP (remotePort: number, automation: Automation, onError?: (
}

async function navigateToUrlClassic (url: string) {
await webDriverClassic.navigate(url)
await webdriverClient.navigateTo(url)
}

export default {
async setup ({
automation,
onError,
url,
webDriverClassic: wdcInstance,
remotePort,
onError,
webdriverClient: wdInstance,
}: {
automation: Automation
onError?: (err: Error) => void
url: string
webDriverClassic: WebDriverClassic
remotePort: number
onError?: (err: Error) => void
webdriverClient: WebDriverClient
}): Promise<BrowserCriClient> {
// set the WebDriver classic instance instantiated from geckodriver
webDriverClassic = wdcInstance
const browserCriClient = await setupCDP(remotePort, automation, onError)
webdriverClient = wdInstance
const [browserCriClient] = await Promise.all([
setupCDP(remotePort, automation, onError),
])

await navigateToUrlClassic(url)

Expand Down
Loading