-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for configuring DHE servers + associated tests. Nothing is consuming this yet, but trying to keep PRs smaller. supports #79
- Loading branch information
Showing
13 changed files
with
230 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import * as vscode from 'vscode'; | ||
|
||
declare global { | ||
namespace WebdriverIO { | ||
interface Browser { | ||
/** Extend default types for better type safety of callback args. */ | ||
executeWorkbench: < | ||
TArgs extends unknown[], | ||
TResult extends unknown, | ||
TCallback extends ( | ||
vs: typeof vscode, | ||
...args: TArgs | ||
) => Promise<TResult>, | ||
>( | ||
callback: TCallback, | ||
...args: TArgs | ||
) => Promise<TResult>; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import { expect } from '@wdio/globals'; | ||
import { getConfig, resetConfig, setConfigSectionSettings } from '../testUtils'; | ||
|
||
afterEach(async () => { | ||
await resetConfig(); | ||
}); | ||
|
||
describe('Extension config testing', () => { | ||
it('should default to the correct settings', async () => { | ||
const config = await getConfig(); | ||
|
||
expect(config).toStrictEqual({ | ||
'core-servers': ['http://localhost:10000/'], | ||
'enterprise-servers': [], | ||
}); | ||
}); | ||
|
||
( | ||
[ | ||
['Empty configs', [], []], | ||
[ | ||
'Populated configs', | ||
['core-a', 'core-b'], | ||
['enterprise-a', 'enterprise-b'], | ||
], | ||
] as const | ||
).forEach(([label, coreServers, enterpriseServers]) => { | ||
it(`should return custom settings: ${label}`, async () => { | ||
await setConfigSectionSettings('core-servers', coreServers); | ||
await setConfigSectionSettings('enterprise-servers', enterpriseServers); | ||
|
||
const config = await getConfig(); | ||
|
||
expect(config).toStrictEqual({ | ||
'core-servers': coreServers, | ||
'enterprise-servers': enterpriseServers, | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.