Skip to content

fix(apex-testing): test suite membership for duplicate class names W-21655085#7016

Merged
CristiCanizales merged 2 commits into
developfrom
cristi/duped-classname-suite
Mar 19, 2026
Merged

fix(apex-testing): test suite membership for duplicate class names W-21655085#7016
CristiCanizales merged 2 commits into
developfrom
cristi/duped-classname-suite

Conversation

@CristiCanizales

Copy link
Copy Markdown
Contributor

What issues does this PR fix or reference?

@W-21655085@

Summary

  • Apex test suite (create / add): Quick pick keeps label = short class name, description = namespace; passes fullClassName (getFullClassName) into TestService.buildSuite so local + namespaced same-name classes both land in the suite.
  • Library: Relies on @salesforce/apex-node getApexClassIds / buildSuite fix (namespace-aware lookup). Ship after @salesforce/apex-node@8.4.13 is on npm (or link local apex-node); then refresh lockfile so ^8.4.10 resolves to 8.4.13+.
  • Flow tests: Excluded from suite class list (isFlowTest), aligned with run-class picker.
  • Coverage colorizer: Typed JSON parse for test results + safe catchError (lint/TS).

Testing

  • packages/salesforcedx-vscode-apex-testing: compile, lint, jest, Playwright apex test suite spec as applicable.

Dependency

  • Blocked on / coordinated with: @salesforce/apex-node@8.4.13 publish (salesforcedx-apex PR).

@CristiCanizales CristiCanizales requested a review from a team as a code owner March 18, 2026 22:00
@CristiCanizales CristiCanizales self-assigned this Mar 18, 2026

@daphne-sfdc daphne-sfdc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In salesforcedx-apex (cristi/duped-classname-suite branch)

  1. yarn install
  2. yarn build
  3. yarn link

In salesforcedx-vscode (cristi/duped-classname-suite branch)

  1. npm install
  2. yarn link @salesforce/apex-node
  3. npm run compile
  4. Launch Extensions

Test Cases

  1. Create a test suite Suite1 with 2 entries: GlobalTestClass0000 and svcideebot.GlobalTestClass0000 ✅
  2. Create a test suite Suite2 with GlobalTestClass0000 -> add svcideebot.GlobalTestClass0000 to Suite2 ✅
  3. Create a test suite Suite3 with svcideebot.GlobalTestClass0000 -> add GlobalTestClass0000 to Suite3 ✅
  4. Run Suite1 ✅
  5. Add a different unrelated test to Suite2 ✅
  6. Run Suite2 ✅
  7. Try to add GlobalTestClass0000 again to Suite3 ✅
  8. Try to add svcideebot.GlobalTestClass0000 again to Suite3 ✅

@CristiCanizales CristiCanizales merged commit 5e44d3d into develop Mar 19, 2026
61 of 69 checks passed
@CristiCanizales CristiCanizales deleted the cristi/duped-classname-suite branch March 19, 2026 18:05
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