Skip to content
Draft
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
838 changes: 710 additions & 128 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"tsc:root-types": "node types-checks-filter-out-node_modules.js",
"test": "run-s test:*",
"test:tsc": "tsc --project tsconfig.json --noEmit --rootDir .",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Root lint validation is removed

Deleting test:lint removes ESLint from the wildcard npm test pipeline used by checks:all, allowing root validation to pass despite new lint violations.

"test:lint": "eslint .",
"test:unit": "vitest --run",
"test:types": "npm run ts && npm run tsc:root-types",
"ts": "run-s ts:* ts:*:*",
Expand All @@ -78,6 +77,8 @@
},
"dependencies": {
"@vitest/snapshot": "^4.1.10",
"@wdio/mocha-framework": "file:.yalc/@wdio/mocha-framework",
"@wdio/utils": "file:.yalc/@wdio/utils",
Comment on lines +80 to +81

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Local dependencies break clean installs

When CI, release automation, or consumers install this package, npm resolves the new file:.yalc/... dependencies against directories that are not tracked, causing dependency resolution and installation to fail.

"deep-eql": "^5.0.2",
"expect": "^30.4.1",
"jest-matcher-utils": "^30.4.1"
Expand All @@ -92,7 +93,7 @@
"@vitest/coverage-v8": "^4.1.10",
"@vitest/eslint-plugin": "^1.6.26",
"@wdio/eslint": "^0.1.3",
"@wdio/types": "^9.30.1",
"@wdio/types": "file:.yalc/@wdio/types",
"eslint": "^9.39.5",
"husky": "^9.1.7",
"npm-run-all2": "^9.0.3",
Expand All @@ -101,7 +102,7 @@
"strip-ansi": "^7.2.0",
"typescript": "^5.9.3",
"vitest": "^4.1.10",
"webdriverio": "^9.30.1"
"webdriverio": "file:.yalc/webdriverio"
},
"peerDependencies": {
"@wdio/globals": "^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/multi-remote-mocha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"checks:all": "npm run typecheck && npm run lint && npm test"
},
"devDependencies": {
"@wdio/mocha-framework": "^9.30.1",
"@wdio/mocha-framework": "file:.yalc/@wdio/mocha-framework",
"eslint-plugin-mocha": "^11.3.0",
"expect-webdriverio": "file:../.."
},
Expand Down
43 changes: 43 additions & 0 deletions playgrounds/multi-remote-mocha/test/specs/wdio-matchers.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { multiRemoteBrowser } from '@wdio/globals'

describe('WebdriverIO Custom Matchers', () => {
beforeEach(async () => {
await multiRemoteBrowser.url('https://webdriver.io')
})

describe('Browser matchers', () => {
it('should verify browser title', async () => {
await expect(multiRemoteBrowser).toHaveTitle('WebdriverIO · Next-gen browser and mobile automation test framework for Node.js | WebdriverIO')
})

it('should verify browser title contains text', async () => {
await expect(multiRemoteBrowser).toHaveTitle(expect.stringContaining('WebdriverIO'))
})

it('should verify browser title contains text for each browser by array', async () => {
await expect(multiRemoteBrowser).toHaveTitle([expect.stringContaining('WebdriverIO'), expect.stringContaining('WebdriverIO')])
})

it('should verify browser title contains text for each browser by map', async () => {
await expect(multiRemoteBrowser).toHaveTitle({
chrome: expect.stringContaining('WebdriverIO'),
firefox: expect.stringContaining('WebdriverIO')
})
})

it.only('should verify browser title contains text for one browser', async () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Exclusive test skips new scenarios

The committed it.only restricts this playground suite to one case, so the scalar, asymmetric, array, and full-map multiremote title scenarios are not exercised.

Suggested change
it.only('should verify browser title contains text for one browser', async () => {
it('should verify browser title contains text for one browser', async () => {

await expect(multiRemoteBrowser).toHaveTitle({
firefox: expect.stringContaining('WebdriverIO')
})
})


// it('should verify browser URL', async () => {
// await expect(multiRemoteBrowser).toHaveUrl('https://webdriver.io/')
// })

// it('should verify URL contains path', async () => {
// await expect(multiRemoteBrowser).toHaveUrl(expect.stringContaining('webdriver.io'))
// })
})
})
21 changes: 11 additions & 10 deletions playgrounds/multi-remote-mocha/wdio.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ export const config: WebdriverIO.MultiremoteConfig = {
// ==================
//
specs: [
'./test/specs/**/*.test.ts',
//'./test/specs/**/*.test.ts',
//'./test/specs/**/basic-matchers.test.ts',
//'./test/specs/**/network-matchers.test.ts'
'./test/specs/**/wdio-matchers.test.ts'
],

maxInstances: 10,
Expand Down Expand Up @@ -46,15 +47,15 @@ export const config: WebdriverIO.MultiremoteConfig = {
}
}
},
chromium: {
capabilities: {
browserName: 'chromium',
browserVersion: 'latest',
'goog:chromeOptions': {
args: ['headless','disable-gpu']
}
}
},
// chromium: {
// capabilities: {
// browserName: 'chromium',
// browserVersion: 'latest',
// 'goog:chromeOptions': {
// args: ['headless','disable-gpu']
// }
// }
// },
}],

//
Expand Down
10 changes: 10 additions & 0 deletions playgrounds/multi-remote-mocha/yalc.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"version": "v1",
"packages": {
"@wdio/mocha-framework": {
"signature": "f5e7cba226f4b49b46c10b249e62cdce",
"file": true,
"replaced": "^9.30.1"
}
}
}
Loading
Loading