Skip to content
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

testing: initial test coverage UI #198812

Merged
merged 2 commits into from
Nov 22, 2023
Merged

Conversation

connor4312
Copy link
Member

This continues on the coverage API I started a few years ago. It adds initial integration where a "Show Test Coverage" tree item is shown in the Test Results view, which then opens a dedicated Test Coverage view. The Test Coverage view is a fairly basic tree view following the draft design, with further improvements to come.

The 'bars' widget is also built in a reusable way such that it can be integrated into the explorer, as this was a popular ask both inside and outside the team.

For #123713.

image image

This continues on the coverage API I started a few years ago. It adds
initial integration where a "Show Test Coverage" tree item is shown in
the Test Results view, which then opens a dedicated Test Coverage view.
The Test Coverage view is a fairly basic tree view following the draft
design, with further improvements to come.

The 'bars' widget is also built in a reusable way such that it can be
integrated into the explorer, as this was a popular ask both inside and
outside the team.

For #123713.
@connor4312 connor4312 force-pushed the connor4312/testing-coverage-view branch from 1094b15 to e09bee7 Compare November 21, 2023 22:44
TestingDisplayedCoveragePercent.Minimum,
],
enumDescriptions: [
localize('testing.displayedCoveragePercent.totalCoverage', 'A calculate of the combined statement, function, and branch coverage.'),
Copy link
Contributor

Choose a reason for hiding this comment

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

"A combination of" instead of "A calculate of"?

/** @inheritdoc */
public renderCompressedElements(node: ITreeNode<ICompressedTreeNode<CoverageTreeElement>, FuzzyScore>, _index: number, templateData: TemplateData): void {
const chain = node.element.elements;
const lastElement = chain[chain.length - 1];
Copy link
Contributor

Choose a reason for hiding this comment

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

Is an empty array check needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, the tree won't render compressed elements where the elements are empty

rzhao271
rzhao271 previously approved these changes Nov 22, 2023
@connor4312 connor4312 merged commit e0ef3fc into main Nov 22, 2023
6 checks passed
@connor4312 connor4312 deleted the connor4312/testing-coverage-view branch November 22, 2023 15:08
@github-actions github-actions bot locked and limited conversation to collaborators Jan 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants