Add more smoke tests and abstract more code (#10799)

* add more smoke tests and abstract more code

* fix missing imports
This commit is contained in:
Anthony Dresser
2020-06-10 12:12:35 -07:00
committed by GitHub
parent 187667f4f1
commit d849ed9357
6 changed files with 43 additions and 29 deletions

View File

@@ -17,7 +17,23 @@ export function setup() {
await app.workbench.connectionDialog.setTarget('File', 'chinook.db');
await app.workbench.connectionDialog.connect();
await app.workbench.queryEditor.commandBar.clickButton(1);
await app.code.waitForElement('.query-editor-view .monaco-table');
await app.workbench.queryEditor.waitForResults();
await app.workbench.quickaccess.runCommand('workbench.action.closeActiveEditor');
});
it('can new file, connect and execute', async function () {
const app = this.app as Application;
await app.workbench.queryEditors.newUntitledQuery();
const untitled = 'SQLQuery_1';
await app.workbench.editor.waitForTypeInEditor(untitled, 'select * from employees');
await app.workbench.queryEditor.commandBar.clickButton(3);
await app.workbench.connectionDialog.waitForConnectionDialog();
await app.workbench.connectionDialog.setProvider('Sqlite');
await app.workbench.connectionDialog.setTarget('File', 'chinook.db');
await app.workbench.connectionDialog.connect();
await app.workbench.queryEditor.commandBar.clickButton(1);
await app.workbench.queryEditor.waitForResults();
await app.workbench.quickaccess.runCommand('workbench.action.closeActiveEditor');
});
});
}