Skip to content

Commit 73d4742

Browse files
Roman1137Roman
andauthored
added comment (#11)
Co-authored-by: Roman <[email protected]>
1 parent d991bab commit 73d4742

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

VisualRegressionTracker/Api.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@
256256
"buildId": {
257257
"type": "string"
258258
},
259+
"comment": {
260+
"type": "string"
261+
},
259262
"projectId": {
260263
"type": "string"
261264
},

VisualRegressionTracker/VisualRegressionTracker.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ public async Task<TestRunResult> Track(
184184
string device = null,
185185
string customTags = null,
186186
double? diffTollerancePercent = null,
187+
string comment = null,
187188
IEnumerable<IgnoreAreaDto> ignoreAreas = null)
188189
{
189190
var dto = new CreateTestRequestDto
@@ -198,6 +199,7 @@ public async Task<TestRunResult> Track(
198199
Viewport = viewport,
199200
Device = device,
200201
CustomTags = customTags,
202+
Comment = comment,
201203
DiffTollerancePercent = diffTollerancePercent ?? 0,
202204
IgnoreAreas = ignoreAreas == null ? null : new List<IgnoreAreaDto>(ignoreAreas)
203205
};
@@ -232,6 +234,7 @@ public Task<TestRunResult> Track(
232234
string device = null,
233235
string customTags = null,
234236
double? diffTollerancePercent = null,
237+
string comment = null,
235238
IEnumerable<IgnoreAreaDto> ignoreAreas = null)
236239
{
237240
using var base64Stream = new CryptoStream(image, new ToBase64Transform(), CryptoStreamMode.Read);
@@ -242,7 +245,7 @@ public Task<TestRunResult> Track(
242245
name,
243246
imageBase64,
244247
cancellationToken,
245-
os, browser, viewport, device, customTags, diffTollerancePercent, ignoreAreas
248+
os, browser, viewport, device, customTags, diffTollerancePercent, comment, ignoreAreas
246249
);
247250
}
248251

@@ -256,6 +259,7 @@ public Task<TestRunResult> Track(
256259
string device = null,
257260
string customTags = null,
258261
double? diffTollerancePercent = null,
262+
string comment = null,
259263
IEnumerable<IgnoreAreaDto> ignoreAreas = null)
260264
{
261265
using var memoryStream = new MemoryStream(image);
@@ -264,7 +268,7 @@ public Task<TestRunResult> Track(
264268
name,
265269
memoryStream,
266270
cancellationToken,
267-
os, browser, viewport, device, customTags, diffTollerancePercent, ignoreAreas
271+
os, browser, viewport, device, customTags, diffTollerancePercent, comment, ignoreAreas
268272
);
269273
}
270274
}

tests/VisualRegressionTracker.Tests/VisualRegressionTrackerTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ public async Task Track()
251251
Device = "device",
252252
CustomTags = "customTags",
253253
DiffTollerancePercent = 15,
254+
Comment = "testcomment",
254255
IgnoreAreas = new []
255256
{
256257
new IgnoreAreaDto{X=1, Y=2, Width=3, Height=4}
@@ -270,6 +271,7 @@ public async Task Track()
270271
device: "device",
271272
customTags: "customTags",
272273
diffTollerancePercent: 15,
274+
comment: "testcomment",
273275
ignoreAreas: new[]
274276
{
275277
new IgnoreAreaDto{X=1, Y=2, Width=3, Height=4}

0 commit comments

Comments
 (0)