mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
Fixed waiting issue, added test retry number to screenshot path.
This commit is contained in:
parent
919d3feca4
commit
264b773bf2
|
@ -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++;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue