mirror of
https://github.com/Microsoft/vscode
synced 2024-10-05 19:02:54 +00:00
Add smoke test for #124146
This commit is contained in:
parent
4fd4e10e99
commit
89c8f91988
|
@ -43,6 +43,11 @@ export class Search extends Viewlet {
|
|||
await this.waitForInputFocus(INPUT);
|
||||
}
|
||||
|
||||
async getSearchTooltip(): Promise<any> {
|
||||
const icon = await this.code.waitForElement(`.activitybar .action-label.codicon.codicon-search-view-icon`);
|
||||
return icon.attributes['title'];
|
||||
}
|
||||
|
||||
async searchFor(text: string): Promise<void> {
|
||||
await this.waitForInputFocus(INPUT);
|
||||
await this.code.waitForSetValue(INPUT, text);
|
||||
|
|
|
@ -15,6 +15,15 @@ export function setup() {
|
|||
cp.execSync('git reset --hard HEAD --quiet', { cwd: app.workspacePathOrFolder });
|
||||
});
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/124146
|
||||
it('has a tooltp with a keybinding', async function () {
|
||||
const app = this.app as Application;
|
||||
const tooltip: string = await app.workbench.search.getSearchTooltip();
|
||||
if (!/Search \([^F]+F\)/.test(tooltip)) {
|
||||
throw Error(`Expected search tooltip to contain keybinding but got ${tooltip}`);
|
||||
}
|
||||
});
|
||||
|
||||
it('searches for body & checks for correct result number', async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.search.openSearchViewlet();
|
||||
|
|
Loading…
Reference in a new issue