提交 2b269a28 编写于 作者: M Michel Kaporin

Added check for build task not to progress until it's been resolved.

上级 db099d56
......@@ -17,7 +17,19 @@ export class Tasks {
public async build(): Promise<any> {
await this.spectron.command('workbench.action.tasks.build');
return this.spectron.wait(); // wait for build to finish
await this.spectron.wait(); // wait for build to finish
// Validate that it has finished
let inProgress = true, trial = 0;
while (inProgress && trial < 3) {
// Determine build status based on the statusbar indicator, don't continue until task has been terminated
const hidden = !!await this.spectron.client.getAttribute('.task-statusbar-item-progress', 'aria-hidden');
if (hidden) {
return Promise.resolve();
}
await this.spectron.wait();
trial++;
}
}
public openProblemsView(): Promise<any> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册