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 2
2
3
3
/* Used to detect Gherkin steps */
4
4
Cypress . 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
+ }
10
10
} ) ;
11
11
12
12
Cypress . on ( 'command:start' , ( command ) => {
Original file line number Diff line number Diff line change @@ -309,11 +309,14 @@ class MyReporter {
309
309
'failure_type' : ! failureReason ? null : failureReason . match ( / A s s e r t i o n E r r o r / ) ? 'AssertionError' : 'UnhandledError' ,
310
310
'retry_of' : test . retryOf ,
311
311
'meta' : {
312
- steps : JSON . parse ( JSON . stringify ( this . currentTestCucumberSteps ) )
312
+ steps : [ ]
313
313
}
314
314
} ;
315
315
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
+ }
317
320
318
321
const { os, os_version } = await getOSDetailsFromSystem ( process . env . observability_product ) ;
319
322
if ( process . env . observability_integration ) {
You can’t perform that action at this time.
0 commit comments