File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
bin/accessibility-automation/cypress Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -339,10 +339,14 @@ afterEach(() => {
339
339
try {
340
340
throw new Error ( 'Deliberate exception thrown for testing purposes' ) ;
341
341
} 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
+ } ) ;
346
350
browserStackLog ( `Exception caught in afterEach: ${ error . message } ` ) ;
347
351
if ( error && error . stack ) {
348
352
browserStackLog ( error . stack ) ;
You can’t perform that action at this time.
0 commit comments