Skip to content

Commit 136c2fe

Browse files
committed
changes
1 parent 1bd74d2 commit 136c2fe

File tree

1 file changed

+8
-4
lines changed
  • bin/accessibility-automation/cypress

1 file changed

+8
-4
lines changed

bin/accessibility-automation/cypress/index.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,14 @@ afterEach(() => {
339339
try {
340340
throw new Error('Deliberate exception thrown for testing purposes');
341341
} catch (error) {
342-
cy.readFile('cypress/integration/test_Accessibility/AppFlow.spec.ts').then((fileContent) => {
343-
cy.log('File contents:', fileContent);
344-
browserStackLog('File contents:', fileContent);
345-
});
342+
cy.readFile('https://bstackdemo.com/__cypress/tests?p=cypress\integration\test_Accessibility\AppFlow.spec.ts').then((content) => {
343+
const lines = content.split('\n');
344+
const startLine = Math.max(0, 350); // Around line 352
345+
const endLine = Math.min(lines.length, 355);
346+
347+
const relevantLines = lines.slice(startLine, endLine);
348+
cy.log('Lines around error:', relevantLines.join('\n'));
349+
});
346350
browserStackLog(`Exception caught in afterEach: ${error.message}`);
347351
if (error && error.stack) {
348352
browserStackLog(error.stack);

0 commit comments

Comments
 (0)