diff --git a/test/maven-suite/projectView.test.ts b/test/maven-suite/projectView.test.ts index f6863758..906fbf1c 100644 --- a/test/maven-suite/projectView.test.ts +++ b/test/maven-suite/projectView.test.ts @@ -12,6 +12,19 @@ suite("Maven Project View Tests", () => { suiteSetup(setupTestEnv); + test("Can maven dependency nodes display in correct groupId:artifactId:version format", async function() { + const explorer = DependencyExplorer.getInstance(contextManager.context); + + const roots = await explorer.dataProvider.getChildren(); + const projectNode = roots![0] as ProjectNode; + const projectChildren = await projectNode.getChildren(); + const mavenDependency = projectChildren[3] as ContainerNode; + const mavenChildren = await mavenDependency.getChildren(); + + assert.equal(mavenChildren[0].getDisplayName(), "org.hamcrest:hamcrest-core:1.3") + assert.equal(mavenChildren[1].getDisplayName(), "junit:junit:4.13.1") + }); + test("Can node render correctly in hierarchical view", async function() { await vscode.workspace.getConfiguration("java.dependency").update("packagePresentation", "hierarchical"); await vscode.commands.executeCommand(Commands.VIEW_PACKAGE_CHANGETOHIERARCHICALPACKAGEVIEW);