Skip to content

Commit f5f7897

Browse files
authored
chore(e2e): Extend ChromedriverOptions instead of type-asserting any (#6589)
Extend ChromedriverOptions instead of type-asserting any
1 parent 88175c8 commit f5f7897

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

packages/compass-e2e-tests/helpers/compass.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ const packageCompassAsync = promisify(packageCompass);
6565
// should we test compass-web (true) or compass electron (false)?
6666
export const TEST_COMPASS_WEB = isTestingWeb();
6767

68+
// Extending the WebdriverIO's types to allow a verbose option to the chromedriver
69+
declare global {
70+
// eslint-disable-next-line @typescript-eslint/no-namespace
71+
namespace WebdriverIO {
72+
interface ChromedriverOptions {
73+
verbose?: boolean;
74+
}
75+
}
76+
}
77+
6878
/*
6979
A helper so we can easily find all the tests we're skipping in compass-web.
7080
Reason is there so you can fill it in and have it show up in search results
@@ -663,10 +673,7 @@ async function startCompassElectron(
663673
let browser: CompassBrowser;
664674

665675
try {
666-
// webdriverio's type is wrong for
667-
// options.capabilities['wdio:chromedriverOptions'] and it doesn't allow
668-
// verbose even though it does work
669-
browser = (await remote(options as any)) as CompassBrowser;
676+
browser = (await remote(options)) as CompassBrowser;
670677
} catch (err) {
671678
debug('Failed to start remote webdriver session', {
672679
error: (err as Error).stack,

0 commit comments

Comments
 (0)