Skip to content

Commit a04acb1

Browse files
authored
Merge pull request #341 from Nick-1234531/DOT-5815
changes to add pageUrl in capture flow
2 parents 9c58c2e + 4a072b3 commit a04acb1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/lib/httpClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ export default class httpClient {
398398

399399
uploadScreenshot(
400400
{ id: buildId, name: buildName, baseline }: Build,
401-
ssPath: string, ssName: string, browserName: string, viewport: string, log: Logger
401+
ssPath: string, ssName: string, browserName: string, viewport: string, url: string = '', log: Logger
402402
) {
403403
browserName = browserName === constants.SAFARI ? constants.WEBKIT : browserName;
404404
const file = fs.readFileSync(ssPath);
@@ -410,6 +410,7 @@ export default class httpClient {
410410
form.append('buildName', buildName);
411411
form.append('screenshotName', ssName);
412412
form.append('baseline', baseline.toString());
413+
form.append('pageUrl',url)
413414

414415
return this.axiosInstance.request({
415416
url: `/screenshot`,

src/lib/screenshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async function captureScreenshotsForConfig(
5757

5858
await page?.screenshot({ path: ssPath, fullPage });
5959

60-
await ctx.client.uploadScreenshot(ctx.build, ssPath, name, browserName, viewportString, ctx.log);
60+
await ctx.client.uploadScreenshot(ctx.build, ssPath, name, browserName, viewportString, url, ctx.log);
6161
}
6262
} catch (error) {
6363
throw new Error(`captureScreenshotsForConfig failed for browser ${browserName}; error: ${error}`);

0 commit comments

Comments
 (0)