Skip to content

Commit dfa60aa

Browse files
committed
more changes
1 parent 2aa6f71 commit dfa60aa

File tree

1 file changed

+9
-1
lines changed
  • bin/accessibility-automation/cypress

1 file changed

+9
-1
lines changed

bin/accessibility-automation/cypress/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ commandToOverwrite.forEach((command) => {
322322
});
323323
});
324324

325-
const logFilePath = path.join(__dirname, 'accessibility-log.txt');
325+
326326
afterEach(() => {
327327

328328
// const logMessage = `afterEach executed for test`
@@ -346,6 +346,14 @@ afterEach(() => {
346346

347347
const attributes = Cypress.mocha.getRunner().suite.ctx.currentTest;
348348
cy.window().then(async (win) => {
349+
350+
try {
351+
throw new Error('Deliberate exception thrown for testing purposes2');
352+
} catch (error) {
353+
if (error && error.stack) {
354+
browserStackLog(error.stack);
355+
}
356+
}
349357
let shouldScanTestForAccessibility = shouldScanForAccessibility(attributes);
350358
if (!shouldScanTestForAccessibility) return cy.wrap({});
351359

0 commit comments

Comments
 (0)