Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,9 @@ await vrt.track({
height: 400;
}
]

// Allow additional details
// Optional
comment: 'Ignoring region because of animation'
});
```
2 changes: 2 additions & 0 deletions lib/helpers/dto.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const multipartDtoToFormData = (dto: TestRunMultipartDto): FormData => {
data.append("ignoreAreas", JSON.stringify(dto.ignoreAreas));
dto.diffTollerancePercent &&
data.append("diffTollerancePercent", dto.diffTollerancePercent);
dto.comment && data.append("comment", dto.comment);

return data;
};
Expand All @@ -40,6 +41,7 @@ export const bufferDtoToFormData = (dto: TestRunBufferDto): FormData => {
data.append("ignoreAreas", JSON.stringify(dto.ignoreAreas));
dto.diffTollerancePercent &&
data.append("diffTollerancePercent", dto.diffTollerancePercent);
dto.comment && data.append("comment", dto.comment);

return data;
};
2 changes: 2 additions & 0 deletions lib/types/request/testRun.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ export interface TestRunDto {
merge?: boolean;

ignoreAreas?: IgnoreArea[];

comment?: string;
}
1 change: 1 addition & 0 deletions lib/types/testRun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ interface TestRun {
customTags?: string;
diffTollerancePercent?: number;
ignoreAreas?: IgnoreArea[];
comment?: string;
}

export interface TestRunBase64 extends TestRun {
Expand Down
2 changes: 2 additions & 0 deletions lib/visualRegressionTracker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ const testRunMultipart: TestRunMultipart = {
width: 400,
},
],
comment: "comment",
};

const testRunBuffer: TestRunBuffer = {
Expand All @@ -160,6 +161,7 @@ const testRunBuffer: TestRunBuffer = {
width: 400,
},
],
comment: "comment",
};

const testRunResponse: TestRunResponse = {
Expand Down