We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f105e9e commit f93465fCopy full SHA for f93465f
1 file changed
bin/testObservability/cypress/index.js
@@ -57,10 +57,19 @@ Cypress.on('command:start', (command) => {
57
options: { log: false }
58
});
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
+
69
eventsQueue.push({
70
task: 'test_observability_platform_details',
71
data: {
- testTitle: Cypress?.mocha?.getRunner()?.suite?.ctx?.currentTest?.title || Cypress?.mocha?.getRunner()?.suite?.ctx?._runnable?.title,
72
+ testTitle,
73
browser: Cypress.browser,
74
platform: Cypress.platform,
75
cypressVersion: Cypress.version
0 commit comments