Skip to content

Commit

Permalink
chore: Fix afterEach to collect failing tests
Browse files Browse the repository at this point in the history
Signed-off-by: Yordan Iliev <[email protected]>
  • Loading branch information
yiliev0 committed Jan 15, 2025
1 parent b6538d9 commit 09d0390
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion automation/tests/settingsTests.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test.describe('Settings tests', () => {
});

test.afterEach(async ({}, testInfo) => {
if (testInfo.status === 'passed') {
if (testInfo.status !== 'passed') {
const screenshotPath = `./test-results/screenshots/${testInfo.title.replace(/\s+/g, '_')}.png`;
await window.screenshot({ path: screenshotPath });

Check failure on line 55 in automation/tests/settingsTests.test.js

View workflow job for this annotation

GitHub Actions / Automation | Settings

[Transaction tool] › tests/settingsTests.test.js:96:3 › Settings tests › Verify user can delete key

1) [Transaction tool] › tests/settingsTests.test.js:96:3 › Settings tests › Verify user can delete key Error: page.screenshot: Target crashed Call log: - taking page screenshot 53 | if (testInfo.status !== 'passed') { 54 | const screenshotPath = `./test-results/screenshots/${testInfo.title.replace(/\s+/g, '_')}.png`; > 55 | await window.screenshot({ path: screenshotPath }); | ^ 56 | console.log(`Screenshot saved: ${screenshotPath}`); 57 | } 58 | }); at /home/runner/_work/hedera-transaction-tool/hedera-transaction-tool/automation/tests/settingsTests.test.js:55:20
console.log(`Screenshot saved: ${screenshotPath}`);
Expand Down

0 comments on commit 09d0390

Please sign in to comment.