Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0147399

Browse files
Zdravko BranzovZdravko Branzov
Zdravko Branzov
authored and
Zdravko Branzov
committed
fix: saving every image when LogImageType.everyImage is provided
1 parent 9485d32 commit 0147399

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎lib/image-helper.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,12 @@ export class ImageHelper {
270270
const eventStartTime = Date.now().valueOf();
271271
let counter = 1;
272272
options.timeOutSeconds *= 1000;
273+
let pathActualImageCounter = resolvePath(this._args.reportsPath, imageName.replace(".", "_actual."));
274+
const shouldLogEveryImage = checkImageLogType(this._args.testReporter, LogImageType.everyImage);
273275
while ((Date.now().valueOf() - eventStartTime) <= options.timeOutSeconds && !result) {
274-
const pathActualImageCounter = resolvePath(this._args.reportsPath, imageName.replace(".", "_actual_" + counter + "."));
276+
if (shouldLogEveryImage) {
277+
pathActualImageCounter = resolvePath(this._args.reportsPath, imageName.replace(".", "_actual_" + counter + "."));
278+
}
275279
pathActualImage = await this._driver.saveScreenshot(pathActualImageCounter);
276280
if (!options.keepOriginalImageSize) {
277281
await this.clipRectangleImage(options.cropRectangle, pathActualImage);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /