Skip to content

Commit 3b96c54

Browse files
authored
chore(e2e): save a screenshot if there's an error when closing the welcome modal (#7552)
* save a screenshot if there's an error when closing the welcome modal * include name in the filename
1 parent 650d570 commit 3b96c54

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/compass-e2e-tests/helpers/compass.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,14 @@ export async function init(
11731173
}
11741174

11751175
if (compass.needsCloseWelcomeModal) {
1176-
await browser.closeWelcomeModal();
1176+
try {
1177+
await browser.closeWelcomeModal();
1178+
} catch (err) {
1179+
await browser.screenshot(
1180+
screenshotPathName(`${name ?? 'init'}-close-welcome-modal`)
1181+
);
1182+
throw err;
1183+
}
11771184
}
11781185

11791186
return compass;

0 commit comments

Comments
 (0)