Skip to content

Commit 583b72e

Browse files
Copilotrenemadsen
andcommitted
Fix afterTest hook to use explicit screenshotPath instead of undefined this.screenshotPath
Co-authored-by: renemadsen <[email protected]>
1 parent 27e340e commit 583b72e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,3 +338,6 @@ eFormAPI/eFormAPI.Web/Plugins/Customers/net5.0/*
338338

339339
eFormAPI/eFormAPI\.Web/Plugins/Customers/netcoreapp2\.2/
340340
eFormAPI/eFormAPI\.Web/Plugins/Customers/netcoreapp3\.1/
341+
342+
# E2E Test screenshots
343+
errorShots/

eform-client/wdio-headless-plugin-step2.conf.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ export const config: Options.Testrunner = {
258258
`chrome-${timestamp}`.replace(/[/]/g, '__')
259259
).replace(/%../, '.');
260260

261-
const filePath = path.resolve(this.screenshotPath, `${filename}.png`);
261+
const screenshotPath = './errorShots/';
262+
const filePath = path.resolve(screenshotPath, `${filename}.png`);
262263

263264
console.log('Saving screenshot to:', filePath);
264265
browser.saveScreenshot(filePath);

eform-client/wdio-plugin-step2.conf.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ export const config: Options.Testrunner = {
258258
`chrome-${timestamp}`.replace(/[/]/g, '__')
259259
).replace(/%../, '.');
260260

261-
const filePath = path.resolve(this.screenshotPath, `${filename}.png`);
261+
const screenshotPath = './errorShots/';
262+
const filePath = path.resolve(screenshotPath, `${filename}.png`);
262263

263264
console.log('Saving screenshot to:', filePath);
264265
browser.saveScreenshot(filePath);

0 commit comments

Comments
 (0)