From fd02bfe470d0a89fb3f7b99a4f0de61053eb9aa4 Mon Sep 17 00:00:00 2001 From: Pavel Strunkin Date: Sat, 13 Jun 2020 15:34:55 +0200 Subject: [PATCH] diffTollerancePercent default is taken if undefined --- src/test-runs/test-runs.service.spec.ts | 4 ++-- src/test-runs/test-runs.service.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test-runs/test-runs.service.spec.ts b/src/test-runs/test-runs.service.spec.ts index 20791b10..5fb67b5a 100644 --- a/src/test-runs/test-runs.service.spec.ts +++ b/src/test-runs/test-runs.service.spec.ts @@ -165,7 +165,7 @@ describe('TestRunsService', () => { browser: 'browser', viewport: 'viewport', device: 'device', - diffTollerancePercent: 1, + diffTollerancePercent: undefined, }; const testRunWithResult = { id: 'id', @@ -228,7 +228,7 @@ describe('TestRunsService', () => { expect(service.getDiff).toHaveBeenCalledWith( baseline, image, - createTestRequestDto.diffTollerancePercent, + testRun.diffTollerancePercent, testVariation.ignoreAreas ); expect(getImageMock).toHaveBeenNthCalledWith(1, testVariation.baselineName); diff --git a/src/test-runs/test-runs.service.ts b/src/test-runs/test-runs.service.ts index 0fa8f263..448e7456 100644 --- a/src/test-runs/test-runs.service.ts +++ b/src/test-runs/test-runs.service.ts @@ -136,7 +136,7 @@ export class TestRunsService { const diffResult = this.getDiff( baseline, image, - createTestRequestDto.diffTollerancePercent, + testRun.diffTollerancePercent, testVariation.ignoreAreas );