Skip to content

Commit c659ab3

Browse files
authored
Merge pull request #17 from gemini-testing/TESTPLANE-218.fork_packages
Restore work with devtools, jsonwp and return support node@18
2 parents a273d38 + b515d8e commit c659ab3

File tree

511 files changed

+12828
-1756
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

511 files changed

+12828
-1756
lines changed

.github/workflows/cr.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ jobs:
1414
- name: Checkout code
1515
uses: actions/checkout@v4
1616

17-
- name: Enable Corepack
18-
run: corepack enable
17+
- name: Enable Latest Corepack
18+
run: |
19+
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
20+
npm install -g corepack@latest
21+
echo "After : corepack version => $(corepack --version)"
22+
corepack enable
1923
2024
- name: Setup Node.js
2125
uses: actions/setup-node@v4

CHANGELOG.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ See [CHANGELOG - v8](https://github.com/webdriverio/webdriverio/blob/v8/CHANGELO
136136
* `wdio-cli`, `wdio-jasmine-framework`, `wdio-types`
137137
* [#14001](https://github.com/webdriverio/webdriverio/pull/14001) fix(@wdio/cli): adjust default value for specFileRetriesDeferred ([@christian-bromann](https://github.com/christian-bromann))
138138
* `wdio-utils`
139-
* [#14000](https://github.com/webdriverio/webdriverio/pull/14000) fix(@wdio/utils): detect Appium if 'appium:options' is used ([@christian-bromann](https://github.com/christian-bromann))
139+
* [#14000](https://github.com/webdriverio/webdriverio/pull/14000) fix(@testplane/utils): detect Appium if 'appium:options' is used ([@christian-bromann](https://github.com/christian-bromann))
140140

141141
#### :nail_care: Polish
142142
* `wdio-types`, `wdio-utils`, `webdriverio`
@@ -184,7 +184,7 @@ See [CHANGELOG - v8](https://github.com/webdriverio/webdriverio/blob/v8/CHANGELO
184184

185185
#### :nail_care: Polish
186186
* `wdio-utils`
187-
* [#13983](https://github.com/webdriverio/webdriverio/pull/13983) fix(@wdio/utils): Unset geckodriver when stable is set as browserVersion ([@nextlevelbeard](https://github.com/nextlevelbeard))
187+
* [#13983](https://github.com/webdriverio/webdriverio/pull/13983) fix(@testplane/utils): Unset geckodriver when stable is set as browserVersion ([@nextlevelbeard](https://github.com/nextlevelbeard))
188188

189189
#### Committers: 4
190190
- Christian Bromann ([@christian-bromann](https://github.com/christian-bromann))
@@ -203,7 +203,7 @@ See [CHANGELOG - v8](https://github.com/webdriverio/webdriverio/blob/v8/CHANGELO
203203
* `wdio-utils`, `webdriverio`
204204
* [#13960](https://github.com/webdriverio/webdriverio/pull/13960) fix(webdriverio): support opening file urls ([@christian-bromann](https://github.com/christian-bromann))
205205
* `wdio-utils`
206-
* [#13949](https://github.com/webdriverio/webdriverio/pull/13949) fix(@wdio/utils): properly detect Appium browser sessions ([@christian-bromann](https://github.com/christian-bromann))
206+
* [#13949](https://github.com/webdriverio/webdriverio/pull/13949) fix(@testplane/utils): properly detect Appium browser sessions ([@christian-bromann](https://github.com/christian-bromann))
207207
* `wdio-runner`
208208
* [#13958](https://github.com/webdriverio/webdriverio/pull/13958) fix(@wdio/runner): Continue emitting event on the runner even when a reporter throws an error ([@dprevost-LMI](https://github.com/dprevost-LMI))
209209
* `webdriverio`
@@ -647,11 +647,11 @@ See [CHANGELOG - v8](https://github.com/webdriverio/webdriverio/blob/v8/CHANGELO
647647
* [#13568](https://github.com/webdriverio/webdriverio/pull/13568) fix(@wdio/cli): package manager detection improvements ([@alcpereira](https://github.com/alcpereira))
648648
* [#13557](https://github.com/webdriverio/webdriverio/pull/13557) fix(#11999): regression with Jasmine types ([@Badisi](https://github.com/Badisi))
649649
* `wdio-types`
650-
* [#13567](https://github.com/webdriverio/webdriverio/pull/13567) fix(@wdio/types): make 'moz:debuggerAddress' a string or boolean ([@christian-bromann](https://github.com/christian-bromann))
650+
* [#13567](https://github.com/webdriverio/webdriverio/pull/13567) fix(@testplane/types): make 'moz:debuggerAddress' a string or boolean ([@christian-bromann](https://github.com/christian-bromann))
651651

652652
#### :nail_care: Polish
653653
* `wdio-utils`, `webdriver`
654-
* [#13648](https://github.com/webdriverio/webdriverio/pull/13648) fix(@wdio/utils): disable Bidi for Appium sessions ([@christian-bromann](https://github.com/christian-bromann))
654+
* [#13648](https://github.com/webdriverio/webdriverio/pull/13648) fix(@testplane/utils): disable Bidi for Appium sessions ([@christian-bromann](https://github.com/christian-bromann))
655655
* `wdio-appium-service`, `wdio-sauce-service`, `wdio-testingbot-service`, `wdio-utils`, `webdriver`, `webdriverio`
656656
* [#13622](https://github.com/webdriverio/webdriverio/pull/13622) fix(webdriverio): don't send `desiredCapabilities` anymore when initializing a session ([@christian-bromann](https://github.com/christian-bromann))
657657
* `wdio-spec-reporter`, `wdio-types`, `webdriverio`
@@ -832,8 +832,8 @@ See [CHANGELOG - v8](https://github.com/webdriverio/webdriverio/blob/v8/CHANGELO
832832
* `wdio-allure-reporter`, `wdio-appium-service`, `wdio-browser-runner`, `wdio-browserstack-service`, `wdio-cli`, `wdio-concise-reporter`, `wdio-config`, `wdio-cucumber-framework`, `wdio-devtools-service`, `wdio-firefox-profile-service`, `wdio-jasmine-framework`, `wdio-json-reporter`, `wdio-junit-reporter`, `wdio-local-runner`, `wdio-mocha-framework`, `wdio-reporter`, `wdio-runner`, `wdio-sauce-service`, `wdio-shared-store-service`, `wdio-spec-reporter`, `wdio-testingbot-service`, `wdio-types`, `wdio-utils`, `wdio-webdriver-mock-service`, `webdriver`, `webdriverio`
833833
* [#12987](https://github.com/webdriverio/webdriverio/pull/12987) breaking(*): better type definitions for capabilities ([@christian-bromann](https://github.com/christian-bromann))
834834
* [#11942](https://github.com/webdriverio/webdriverio/pull/11942) breaking(*): V9 migrate from got to fetch ([@tamil777selvan](https://github.com/tamil777selvan))
835-
* `@wdio/protocols`
836-
* [#12006](https://github.com/webdriverio/webdriverio/pull/12006) breaking(@wdio/protocols): V9 Remove JSONWireProtocol ([@tamil777selvan](https://github.com/tamil777selvan))
835+
* `@testplane/protocols`
836+
* [#12006](https://github.com/webdriverio/webdriverio/pull/12006) breaking(@testplane/protocols): V9 Remove JSONWireProtocol ([@tamil777selvan](https://github.com/tamil777selvan))
837837
* `webdriverio`
838838
* [#12490](https://github.com/webdriverio/webdriverio/pull/12490) allow getHTML to pierce through Shadow DOM ([@christian-bromann](https://github.com/christian-bromann))
839839

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ WebdriverIO provides its own type definitions for projects that use TypeScript.
187187

188188
All type definitions are generated by the TypeScript compiler. There are some essential packages for that:
189189

190-
- the `@wdio/types` package provides all general types that are used across the code based, e.g. Capabilities, Options etc. If you need a type definitions across multiple packages it is a good idea to define them in here
190+
- the `@testplane/types` package provides all general types that are used across the code based, e.g. Capabilities, Options etc. If you need a type definitions across multiple packages it is a good idea to define them in here
191191
- the `@wdio/protocol` package defines all protocol commands, their function parameters and return types
192192
- all other types should be defined in the package where they are used, here we tend to have general types defined in a `types.ts` file
193193

@@ -339,7 +339,7 @@ This repository contains everything to set up, build and deploy the WebdriverIO
339339
- the guidelines pages from markdown files of the [docs directory](https://github.com/webdriverio/webdriverio/tree/main/website/docs)
340340
- service and reporter docs from the readme files of those packages within this repository
341341
- service and reporter docs from 3rd party plugins (defined in [these JSON files](https://github.com/webdriverio/webdriverio/tree/main/scripts/docs-generation/3rd-party)) that are downloaded from GitHub and parsed
342-
- the protocol APIs from the [`@wdio/protocols`](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-protocols/src/protocols) package
342+
- the protocol APIs from the [`@testplane/protocols`](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-protocols/src/protocols) package
343343
- the WebdriverIO API that is parsed out of the JSDoc comments of individual commands (e.g., [`execute`](https://github.com/webdriverio/webdriverio/blob/main/packages/webdriverio/src/commands/browser/execute.ts#L3-L37) command)
344344

345345
Changes to the docs need to be done in one of these places. Please note that changes to e.g. the config file have to be updated in multiple places given that config files are wide spread (as examples or test files) within this repository. A good way to go about this is to look for all occurrences of a certain string of the config and update changes in all findings.

PROJECT_CHARTER.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ With that, the project offers not only the ability of automating user agents usi
1414

1515
- automation of modern web browsers
1616
- automation of mobile devices (web as well as native applications)
17-
- automation of desktop applications (e.g. Electron or MacOS applications)
1817
- testing applications from end-to-end at scale (including parallelisation and reporting)
1918
- integration into 3rd party services and vendors (e.g. [Sauce Labs](https://saucelabs.com/) or [BrowserStack](https://browserstack.com/))
20-
- support of functional as well as non functional testing aspects (e.g. component testing, visual regression or frontend performance testing)
19+
- support of functional as well as non functional testing aspects (e.g. visual regression or frontend performance testing)
20+
- automated debugging in the browser (e.g. using the [Chrome DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/))
2121
- scraping of websites
2222
- providing technical content and best practices in form of [boilerplates](https://webdriver.io/) and [blog posts](https://webdriver.io/blog/)
2323
- providing technical help in form of a [community channel](https://discord.webdriver.io)

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
***
5050

51-
WebdriverIO is a test automation framework, for e2e as well as unit and component testing in the browser, that allows you to run tests based on the [WebDriver](https://w3c.github.io/webdriver/webdriver-spec.html) and [WebDriver BiDi](https://github.com/w3c/webdriver-bidi) as well as [Appium](http://appium.io/) automation technology. It provides support for your favorite BDD/TDD test framework and will run your tests locally or in the cloud using Sauce Labs, BrowserStack, TestingBot or LambdaTest.
51+
WebdriverIO is a test automation framework, for e2e as well as unit and component testing in the browser, that allows you to run tests based on the [WebDriver](https://w3c.github.io/webdriver/webdriver-spec.html), [WebDriver BiDi](https://github.com/w3c/webdriver-bidi) as well as [Chrome DevTools](https://chromedevtools.github.io/devtools-protocol/) protocol and [Appium](http://appium.io/) automation technology. It provides support for your favorite BDD/TDD test framework and will run your tests locally or in the cloud using Sauce Labs, BrowserStack, TestingBot or LambdaTest.
5252

5353
## :woman_technologist: :man_technologist: Contributing
5454
Do you like WebdriverIO and want to help make it better? Awesome! Have a look into our [Contributor Documentation](CONTRIBUTING.md) to get started and find out what contributions can be and how to make them.
@@ -88,18 +88,19 @@ __Did you build a WebdriverIO service or reporter?__ That's awesome! Please add
8888
### Core
8989

9090
- [webdriver](https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver) - A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol
91+
- [devtools](https://github.com/webdriverio/webdriverio/tree/main/packages/devtools) - A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer
9192
- [webdriverio](https://github.com/webdriverio/webdriverio/blob/main/packages/webdriverio) - Next-gen browser and mobile automation test framework for Node.js
9293
- [@wdio/cli](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-cli) - A WebdriverIO testrunner command line interface
9394

9495
### Helper
9596

9697
- [@wdio/config](https://github.com/webdriverio/webdriverio/blob/main/packages/wdio-config) - A helper utility to parse and validate WebdriverIO options
9798
- [@wdio/logger](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-logger) - A helper utility for logging WebdriverIO packages
98-
- [@wdio/protocols](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-protocols) - Utility package providing information about automation protocols
99+
- [@testplane/protocols](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-protocols) - Utility package providing information about automation protocols
99100
- [@wdio/repl](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-repl) - A WDIO helper utility to provide a repl interface for WebdriverIO
100101
- [@wdio/reporter](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-reporter) - A WebdriverIO utility to help report all events
101102
- [@wdio/runner](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-runner) - A WebdriverIO service that runs tests in arbitrary environments
102-
- [@wdio/utils](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-utils) - A WDIO helper utility to provide several utility functions used across the project
103+
- [@testplane/utils](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-utils) - A WDIO helper utility to provide several utility functions used across the project
103104
- [@wdio/globals](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-globals) - A WDIO helper utility for importing global variables directly
104105

105106
### Reporter

__mocks__/@wdio/utils.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import { vi } from 'vitest'
23
import {
34
sleep as sleepOrig,
@@ -11,7 +12,8 @@ import {
1112
isW3C as isW3cOrig,
1213
isBidi as isBidiOrig,
1314
sessionEnvironmentDetector as sessionEnvDetector,
14-
capabilitiesEnvironmentDetector as capabilitiesEnvDetector
15+
capabilitiesEnvironmentDetector as capabilitiesEnvDetector,
16+
devtoolsEnvironmentDetector as devtoolsEnvDetector
1517
} from '../../packages/wdio-utils/src/envDetector.js'
1618
import { UNICODE_CHARACTERS as UNICODE_CHARACTERS_ORIG, HOOK_DEFINITION as HOOK_DEFINITION_ORIG } from '../../packages/wdio-utils/src/constants.js'
1719

@@ -107,6 +109,7 @@ export const sessionEnvironmentDetector = vi.fn().mockImplementation(
107109
// @ts-ignore
108110
(...args) => sessionEnvDetector(...args))
109111
export const capabilitiesEnvironmentDetector = capabilitiesEnvDetector
112+
export const devtoolsEnvironmentDetector = devtoolsEnvDetector
110113
export const transformCommandLogResult = vi.fn().mockImplementation((data) => data)
111114
export const sleep = vi.fn().mockImplementation(sleepOrig)
112115
export const UNICODE_CHARACTERS = UNICODE_CHARACTERS_ORIG

e2e/browser-runner/mock.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect, browser, $ } from '@wdio/globals'
2-
import type { RespondWithOptions } from 'webdriverio'
2+
import type { RespondWithOptions } from '@testplane/webdriverio'
33
import { html, render } from 'lit'
44

55
const CORS_PARAMS: RespondWithOptions = {

e2e/launch/aws.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { test, expect } from 'vitest'
2-
import { remote } from 'webdriverio'
2+
import { remote } from '@testplane/webdriverio'
33
import AWS from '@aws-sdk/client-device-farm'
44

55
let browser: WebdriverIO.Browser | undefined

e2e/launch/reloadSession.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { test, expect } from 'vitest'
66
* $ npm install webdriverio
77
*
88
*/
9-
import { remote } from 'webdriverio'
9+
import { remote } from '@testplane/webdriverio'
1010

1111
test('can reconnect to WebDriver Bidi session', async () => {
1212
const browser = await remote({

e2e/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"@wdio/sauce-service": "workspace:*",
6262
"@wdio/shared-store-service": "workspace:*",
6363
"@wdio/spec-reporter": "workspace:*",
64-
"@wdio/types": "workspace:*",
64+
"@testplane/types": "workspace:*",
6565
"babel-plugin-transform-hook-names": "^1.0.2",
6666
"cross-env": "^7.0.3",
6767
"expect": "^29.7.0",
@@ -72,8 +72,8 @@
7272
"string-width": "^7.1.0",
7373
"tailwindcss": "^3.4.1",
7474
"vite": "^5.1.3",
75-
"webdriver": "workspace:*",
76-
"webdriverio": "workspace:*"
75+
"@testplane/webdriver": "workspace:*",
76+
"@testplane/webdriverio": "workspace:*"
7777
},
7878
"dependencies": {
7979
"@stencil-community/router": "^1.0.2",

e2e/standalone/attach.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { test, expect } from 'vitest'
77
* $ npm install webdriverio
88
*
99
*/
10-
import { remote, attach } from 'webdriverio'
10+
import { remote, attach } from '@testplane/webdriverio'
1111

1212
test('allow to attach to an existing session', async () => {
1313
/**

e2e/wdio/headless/bidi.e2e.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import { browser, expect } from '@wdio/globals'
2-
import type { local } from 'webdriver'
3+
import type { local } from '@testplane/webdriver'
34

45
describe('bidi e2e test', () => {
56
describe('execute', () => {
@@ -63,7 +64,7 @@ describe('bidi e2e test', () => {
6364
await browser.sessionSubscribe({ events: ['log.entryAdded'] })
6465
browser.on('log.entryAdded', (logEntry) => logEvents.push(logEntry))
6566
await browser.execute(() => console.log('Hello Bidi'))
66-
// eslint-disable-next-line wdio/no-pause
67+
6768
await browser.waitUntil(
6869
async () => logEvents.find((logEvent) => logEvent.text === 'Hello Bidi'),
6970
{

e2e/wdio/headless/multiremoteTest.e2e.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { multiremotebrowser as browser } from '@wdio/globals'
2-
import { Key } from 'webdriverio'
2+
import { Key } from '@testplane/webdriverio'
33

44
let browserA: WebdriverIO.Browser
55
let browserB: WebdriverIO.Browser
@@ -20,6 +20,7 @@ describe('multi remote test', () => {
2020
/**
2121
* Unfortunately we don't know which result is from which browser
2222
*/
23+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2324
const results = (await browser.checkPWA() as any).map((result: { passed: boolean }) => result.passed)
2425
expect(typeof results[0]).toBe('boolean')
2526
expect(typeof results[1]).toBe('boolean')

examples/appium/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"private": true,
66
"type": "module",
77
"dependencies": {
8-
"webdriverio": "workspace:*"
8+
"@testplane/webdriverio": "workspace:*"
99
}
1010
}

examples/bidi/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"private": true,
66
"type": "module",
77
"dependencies": {
8-
"webdriverio": "workspace:*"
8+
"@testplane/webdriverio": "workspace:*"
99
}
1010
}

examples/cloudservices/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"test:kobiton": "node kobiton.js"
1212
},
1313
"dependencies": {
14-
"webdriverio": "workspace:*"
14+
"@testplane/webdriverio": "workspace:*"
1515
}
1616
}

examples/standalone/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"private": true,
66
"type": "module",
77
"dependencies": {
8-
"webdriverio": "workspace:*"
8+
"@testplane/webdriverio": "workspace:*"
99
}
1010
}

examples/wdio/cucumber/step-definitions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
import { Given, When, Then } from '@wdio/cucumber-framework'
13-
import { Key } from 'webdriverio'
13+
import { Key } from '@testplane/webdriverio'
1414

1515
Given(/^I go on the website "([^"]*)"$/, async (url) => {
1616
await browser.url(url)

examples/wdio/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"@wdio/repl": "workspace:*",
2828
"@wdio/shared-store-service": "workspace:*",
2929
"@wdio/spec-reporter": "workspace:*",
30-
"@wdio/types": "workspace:*",
31-
"webdriver": "workspace:*",
32-
"webdriverio": "workspace:*"
30+
"@testplane/types": "workspace:*",
31+
"@testplane/webdriver": "workspace:*",
32+
"@testplane/webdriverio": "workspace:*"
3333
}
3434
}

examples/wdio/vite-vue-example/wdio.conf.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const config: WebdriverIO.Config = {
9191
// - @wdio/mocha-framework, @wdio/jasmine-framework
9292
// - @wdio/local-runner
9393
// - @wdio/sumologic-reporter
94-
// - @wdio/cli, @wdio/config, @wdio/utils
94+
// - @wdio/cli, @wdio/config, @testplane/utils
9595
// Level of logging verbosity: trace | debug | info | warn | error | silent
9696
// logLevels: {
9797
// webdriver: 'info',

infra/compiler/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const packages = (
5959
* plugins for the ESM build
6060
*/
6161
const esmPlugins: Record<string, Plugin[]> = {
62-
'@wdio/protocols': [generateTypes()],
62+
'@testplane/protocols': [generateTypes()],
6363
'@wdio/cli': [copyEJSTemplates()],
6464
'webdriverio': [externalScripts()]
6565
}

0 commit comments

Comments
 (0)