diff --git a/CHANGELOG.md b/CHANGELOG.md index f4489b1a..fa78fcd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +## [4.0.20] + +### Added + +- experimental advanced tag support + ## [4.0.19] - 2022-01-08 ### Added diff --git a/src/AbstractTest.ts b/src/AbstractTest.ts index 6a6c4838..db6b8f03 100644 --- a/src/AbstractTest.ts +++ b/src/AbstractTest.ts @@ -134,7 +134,11 @@ export abstract class AbstractTest { } private _calcTags(): vscode.TestTag[] { - const tags = [this._frameworkTag, ...this._tags.map(x => new vscode.TestTag(x))]; + const tags = [ + this._frameworkTag, + new vscode.TestTag(`level.` + this.subLevel), + ...this._tags.map(x => new vscode.TestTag(`tag."${x}"`)), + ]; this.skipped && tags.push(SharedTestTags.skipped); if (!this._staticError) { this.runnable && tags.push(SharedTestTags.runnable); @@ -174,6 +178,7 @@ export abstract class AbstractTest { label, resolvedFile, line, + this._tags, this._frameworkTag, this.subLevel + 1, enableRunAndDebug, @@ -219,6 +224,7 @@ export class SubTest extends AbstractTest { label: string | undefined, file: string | undefined, line: string | undefined, + tags: string[], frameworkTag: vscode.TestTag, level: number, private readonly enableRunAndDebug: boolean, @@ -233,7 +239,7 @@ export class SubTest extends AbstractTest { false, undefined, undefined, - [], + tags, frameworkTag, enableRunAndDebug, enableRunAndDebug,