-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: All Apex classes/triggers in the ApexCodeCoverageAggregate table are displayed when the "Show Only Aggregated Code Coverage" setting is checked #370
Conversation
…ageAggregate if it is empty
…ryAll instead of fetchResults()
src/tests/utils.ts
Outdated
allRecords.push(...result.records); | ||
} | ||
|
||
return { | ||
done: true, | ||
totalSize: allRecords.length, | ||
records: allRecords | ||
} as QueryResult<T>; | ||
} as QueryResult<R>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daphne-sfdc I removed the assertion w/o complaint from elsint or others.
See if the same holds for you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you're right - I removed the assertion and the tests still all pass. The functionality also continues to work as expected. Thanks for catching that!
… are displayed when the "Show Only Aggregated Code Coverage" setting is checked (forcedotcom#370) * fix: set apexClassIdSet to all Apex classes/triggers in ApexCodeCoverageAggregate if it is empty * refactor: query ApexCodeCoverageAggregate table only once and use queryAll instead of fetchResults() * test: update codeCoverage.test.ts to reflect new behavior * fix: use ApexCodeCoverageAggregateRecord in queryAll + add comments * refactor: use R instead of T in generics for queryAll() * test: remove assertion in test file
What does this PR do?
Populates the "Apex Code Coverage by Class" table in the Apex test results with all Apex classes/triggers listed in the ApexCodeCoverageAggregate Tooling API table when the "Show Only Aggregated Code Coverage" setting is checked.
What issues does this PR fix or reference?
forcedotcom/salesforcedx-vscode#5599, @W-15783639@
Functionality Before
When the "Show Only Aggregated Code Coverage" setting is checked, the "Apex Code Coverage by Class" table in the Apex test results is empty.
Functionality After
When the "Show Only Aggregated Code Coverage" setting is checked, the "Apex Code Coverage by Class" table in the Apex test results is populated with all available Apex classes/triggers listed in the ApexCodeCoverageAggregate Tooling API table.