Skip to content

Merge fix/SDK-7458-mocha-jasmine-test-tags - #221

Merged
bsautomation merged 3 commits into
sdk_v9_pre_prodfrom
fix/SDK-7458-mocha-jasmine-test-tags
Sep 23, 2026
Merged

bsautomation merged 3 commits into
sdk_v9_pre_prodfrom
fix/SDK-7458-mocha-jasmine-test-tags

Conversation

@bsautomation

Copy link
Copy Markdown

Merge into sdk_v9_pre_prod :by automationbs

kamal-kaur04 and others added 3 commits September 22, 2026 20:32
WDIO Mocha and Jasmine never populated a test-level tags field, so every
Observability test arrived with tags == []. Neither runner has a tag
construct, so @tag tokens in the suite and test titles are the source --
the convention the node SDK already uses for Jest and Playwright. The
leading @ is kept so these match the Cucumber runner's pickle tags.

Both event paths were missing it:

- Binary Flow: wdioMochaTestFramework#getTestData omitted KEY_TEST_TAGS.
  That 'test_tags' key was declared in the service's own constants and
  never written anywhere, while the binary has long consumed it
  (observability/languages/webdriverio/test-frameworks/mocha: tags =
  event.test_tags || []). Fixing only the Direct Flow would have left
  the CLI path -- the one App Automate runs -- still emitting [].
- Direct Flow: insights-handler#getRunData built TestData with no tags
  key; tags were set only in the Cucumber-specific path.

Inert for untagged suites: a title with no @ token yields [], so
existing payloads are unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Tag pattern now requires the @ to start a token. /@[\w-]+/g matched any
  embedded @, so 'user@example.com' in a title produced a bogus @example
  tag and 'pkg@1.2.3' produced @1. Both now yield [].
- Jasmine really is covered now. insights-handler#getRunData is reached
  only for mocha -- beforeTest and afterTest both early-return otherwise
  -- so jasmine events, and mocha skipped tests, go through
  reporter.ts#getRunData, which set scopes but no tags. It now sets tags
  too. Without this the Jasmine claim in the release notes was false.
- Dropped the node-agent parity claim from the doc comment. That SDK
  strips the @ for Jest/Playwright (pwUtils.js), so the two emit
  different shapes; the @ is kept here to match this service's own
  Cucumber pickle tags, and the comment now says that instead.
- Tests: added the embedded-@ cases and one case per hierarchy shape
  with scopes omitted, which exercises the getMochaTestHierarchy branch
  the previous suite never reached. Both orderings pinned to what the
  helper actually returns.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bsautomation
bsautomation requested a review from a team as a code owner September 23, 2026 13:20
@bsautomation
bsautomation requested review from AakashHotchandani and yashdsaraf and removed request for a team September 23, 2026 13:20
@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited), Workspace UI (inherited)

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 60eb9e0e-6ccb-4d4f-a976-15c0c2059714

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@bsautomation
bsautomation merged commit b59fa78 into sdk_v9_pre_prod Sep 23, 2026
20 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants