Add smoke test for #124146

This commit is contained in:
Jackson Kearl 2021-05-20 22:20:48 -07:00
parent 4fd4e10e99
commit 89c8f91988
No known key found for this signature in database
GPG key ID: DA09A59C409FC400
2 changed files with 14 additions and 0 deletions

View file

@ -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);

View file

@ -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();