Skip to content

Commit

Permalink
Fix smoke tests (#29096)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmarti committed Aug 9, 2018
1 parent 861e040 commit 3186ac3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
9 changes: 9 additions & 0 deletions test/smoke/src/areas/quickinput/quickinput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,13 @@ export class QuickInput {
private async waitForQuickInputClosed(): Promise<void> {
await this.code.waitForElement(QuickInput.QUICK_INPUT, r => !!r && r.attributes.style.indexOf('display: none;') !== -1);
}

async selectQuickInputElement(index: number): Promise<void> {
await this.waitForQuickInputOpened();
for (let from = 0; from < index; from++) {
await this.code.dispatchKeybinding('down');
}
await this.code.dispatchKeybinding('enter');
await this.waitForQuickInputClosed();
}
}
12 changes: 6 additions & 6 deletions test/smoke/src/areas/statusbar/statusbar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export function setup() {
await app.workbench.quickopen.waitForQuickOpenOpened();
await app.workbench.quickopen.closeQuickOpen();
await app.workbench.statusbar.clickOn(StatusBarElement.ENCODING_STATUS);
await app.workbench.quickopen.waitForQuickOpenOpened();
await app.workbench.quickopen.closeQuickOpen();
await app.workbench.quickinput.waitForQuickInputOpened();
await app.workbench.quickinput.closeQuickInput();
await app.workbench.statusbar.clickOn(StatusBarElement.EOL_STATUS);
await app.workbench.quickopen.waitForQuickOpenOpened();
await app.workbench.quickopen.closeQuickOpen();
await app.workbench.quickinput.waitForQuickInputOpened();
await app.workbench.quickinput.closeQuickInput();
await app.workbench.statusbar.clickOn(StatusBarElement.LANGUAGE_STATUS);
await app.workbench.quickopen.waitForQuickOpenOpened();
await app.workbench.quickopen.closeQuickOpen();
Expand Down Expand Up @@ -84,8 +84,8 @@ export function setup() {
await app.workbench.quickopen.openFile('app.js');
await app.workbench.statusbar.clickOn(StatusBarElement.EOL_STATUS);

await app.workbench.quickopen.waitForQuickOpenOpened();
await app.workbench.quickopen.selectQuickOpenElement(1);
await app.workbench.quickinput.waitForQuickInputOpened();
await app.workbench.quickinput.selectQuickInputElement(1);

await app.workbench.statusbar.waitForEOL('CRLF');
});
Expand Down

0 comments on commit 3186ac3

Please sign in to comment.