File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 22
33/* Used to detect Gherkin steps */
44Cypress . on ( 'log:added' , ( log ) => {
5- cy . now ( 'task' , 'test_observability_step' , {
6- log
7- } , { log : false } ) . then ( ( res ) => {
8- } ) . catch ( ( err ) => {
9- } ) ;
5+ return ( ) => {
6+ return cy . now ( 'task' , 'test_observability_step' , {
7+ log
8+ } , { log : false } )
9+ }
1010} ) ;
1111
1212Cypress . on ( 'command:start' , ( command ) => {
Original file line number Diff line number Diff line change @@ -309,11 +309,14 @@ class MyReporter {
309309 'failure_type' : ! failureReason ? null : failureReason . match ( / A s s e r t i o n E r r o r / ) ? 'AssertionError' : 'UnhandledError' ,
310310 'retry_of' : test . retryOf ,
311311 'meta' : {
312- steps : JSON . parse ( JSON . stringify ( this . currentTestCucumberSteps ) )
312+ steps : [ ]
313313 }
314314 } ;
315315
316- this . currentTestCucumberSteps = [ ] ;
316+ if ( eventType . match ( / T e s t R u n F i n i s h e d / ) || eventType . match ( / T e s t R u n S k i p p e d / ) ) {
317+ testData [ 'meta' ] . steps = JSON . parse ( JSON . stringify ( this . currentTestCucumberSteps ) ) ;
318+ this . currentTestCucumberSteps = [ ] ;
319+ }
317320
318321 const { os, os_version } = await getOSDetailsFromSystem ( process . env . observability_product ) ;
319322 if ( process . env . observability_integration ) {
You can’t perform that action at this time.
0 commit comments