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) => {
5757 options : { log : false }
5858 } ) ;
5959 /* 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+
6069 eventsQueue . push ( {
6170 task : 'test_observability_platform_details' ,
6271 data : {
63- testTitle : Cypress ?. mocha ?. getRunner ( ) ?. suite ?. ctx ?. currentTest ?. title || Cypress ?. mocha ?. getRunner ( ) ?. suite ?. ctx ?. _runnable ?. title ,
72+ testTitle,
6473 browser : Cypress . browser ,
6574 platform : Cypress . platform ,
6675 cypressVersion : Cypress . version
You can’t perform that action at this time.
0 commit comments