Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/controller/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export function createTestItem(metaInfo: IJavaTestItem, parent?: TestItem): Test
}

if (metaInfo.testLevel === TestLevel.Invocation) {
item.sortText = metaInfo.id;
item.sortText = metaInfo.sortText ?? metaInfo.id;
}

if (parent) {
Expand Down
4 changes: 3 additions & 1 deletion src/runners/junitRunner/JUnitRunnerResultAnalyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ export class JUnitRunnerResultAnalyzer extends RunnerResultAnalyzer {
projectName: parentData.projectName,
testKind: parentData.testKind,
testLevel: TestLevel.Invocation,
uniqueId
uniqueId,
// We will just create a string padded with the character "a" to provide easy sorting.
sortText: ''.padStart(parent.children.size + 1, 'a')
});
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export interface IJavaTestItem {
projectName: string;
testKind: TestKind;
testLevel: TestLevel;
/**
* Provides a hint to the UI on how to sort tests.
*/
sortText?: string;
/**
* Identifies a single invocation of a parameterized test.
* Invocations for which a re-run is possible store their own uniqueId which is provided as part of the result.
Expand Down