提交 264b773b 编写于 作者: M Michel Kaporin

Fixed waiting issue, added test retry number to screenshot path.

上级 919d3fec
......@@ -12,11 +12,11 @@ export class Screenshot {
private index: number = 0;
private testPath: string;
constructor(private spectron: SpectronApplication, testName: string) {
constructor(private spectron: SpectronApplication, testName: string, testRetry: number) {
const testTime = this.sanitizeFolderName(__testTime);
testName = this.sanitizeFolderName(testName);
this.testPath = `test_data/screenshots/${testTime}/${testName}`;
this.testPath = `test_data/screenshots/${testTime}/${testName}/${testRetry}`;
this.createFolder(this.testPath);
}
......
......@@ -54,9 +54,9 @@ export class SpectronApplication {
args: args,
chromeDriverArgs: chromeDriverArgs
});
this.screenshot = new Screenshot(this, testName);
this.client = new SpectronClient(this.spectron, this.screenshot);
this.testRetry += 1; // avoid multiplication by 0 for wait times
this.screenshot = new Screenshot(this, testName, testRetry);
this.client = new SpectronClient(this.spectron, this.screenshot);
this.retrieveKeybindings();
}
......@@ -129,7 +129,7 @@ export class SpectronApplication {
break;
}
this.wait();
await this.wait();
trial++;
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册