File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
bin/testObservability/cypress Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,19 @@ Cypress.on('command:start', (command) => {
57
57
options : { log : false }
58
58
} ) ;
59
59
/* Send platform details */
60
+ let testTitle = '' ;
61
+ try {
62
+ const runner = Cypress . mocha . getRunner ( ) ;
63
+ const ctx = runner . suite . ctx ;
64
+ testTitle = ctx . currentTest . title || ctx . _runnable . title ;
65
+ } catch ( error ) {
66
+ // Silently handle if any property is undefined
67
+ }
68
+
60
69
eventsQueue . push ( {
61
70
task : 'test_observability_platform_details' ,
62
71
data : {
63
- testTitle : Cypress ?. mocha ?. getRunner ( ) ?. suite ?. ctx ?. currentTest ?. title || Cypress ?. mocha ?. getRunner ( ) ?. suite ?. ctx ?. _runnable ?. title ,
72
+ testTitle,
64
73
browser : Cypress . browser ,
65
74
platform : Cypress . platform ,
66
75
cypressVersion : Cypress . version
You can’t perform that action at this time.
0 commit comments