Skip to content

Commit cbf1d22

Browse files
fix: use WdioIcsOptions for wdio-ics:options type augmentation (#732) (#1122)
The global type augmentation for `wdio-ics:options` on `WebdriverIO.Capabilities` was using an incomplete inline type with only `logName`. This replaces it with the `WdioIcsOptions` interface which includes all supported properties (`logName` and `name`), fixing TypeScript errors for users in both standalone and multiremote configurations. Fixes #732 Co-authored-by: Cursor <[email protected]>
1 parent b076e37 commit cbf1d22

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@wdio/visual-service": patch
3+
---
4+
5+
Fix incomplete `wdio-ics:options` type augmentation on `WebdriverIO.Capabilities`. The global type declaration now uses the `WdioIcsOptions` interface directly, ensuring all supported properties (`logName`, `name`) are available to TypeScript users in both standalone and multiremote configurations. Fixes #732.
6+
7+
# Committers: 1
8+
9+
- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))

packages/visual-service/src/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type {
55
Output,
66
Result,
77
VisualServiceOptions,
8+
WdioIcsOptions,
89
WdioCheckFullPageMethodOptions,
910
WdioSaveFullPageMethodOptions,
1011
WdioSaveElementMethodOptions,
@@ -94,9 +95,7 @@ declare global {
9495
interface MultiRemoteBrowser extends BaseBrowser {}
9596
interface Element {}
9697
interface Capabilities {
97-
'wdio-ics:options'?:{
98-
logName?: string;
99-
}
98+
'wdio-ics:options'?: WdioIcsOptions;
10099
}
101100
}
102101

tests/types/wdio.d.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ declare namespace WebdriverIO {
44
chromeBrowserTwo: WebdriverIO.Browser;
55
}
66
interface Capabilities {
7-
// Strange thing is that it's not allowed in the default Capabilities interface
87
specs?: string[];
9-
'wdio-ics:options'?: {
10-
command?: string[];
11-
logName?: string;
12-
};
138
}
149
}

0 commit comments

Comments
 (0)