fix project tree tests failing on windows (#14759)

* fix project tree tests failing on windows

* add back test

* Addressing comments

* change to doc comment

* remove unnecessary change

* undo other change
This commit is contained in:
Kim Santiago
2021-03-18 17:14:00 -07:00
committed by GitHub
parent c65c856d2f
commit 8068de5938
7 changed files with 47 additions and 49 deletions

View File

@@ -25,7 +25,7 @@ export class ProjectRootTreeItem extends BaseProjectTreeItem {
fileSystemUri: vscode.Uri;
constructor(project: Project) {
super(vscode.Uri.file(project.projectFilePath), undefined);
super(vscode.Uri.parse(path.basename(project.projectFilePath, sqlprojExtension)), undefined);
this.project = project;
this.fileSystemUri = vscode.Uri.file(project.projectFilePath);
@@ -45,10 +45,10 @@ export class ProjectRootTreeItem extends BaseProjectTreeItem {
}
public get treeItem(): vscode.TreeItem {
const projectItem = new vscode.TreeItem(this.uri, vscode.TreeItemCollapsibleState.Expanded);
const projectItem = new vscode.TreeItem(this.fileSystemUri, vscode.TreeItemCollapsibleState.Expanded);
projectItem.contextValue = DatabaseProjectItemType.project;
projectItem.iconPath = IconPathHelper.databaseProject;
projectItem.label = path.basename(this.uri.fsPath, sqlprojExtension);
projectItem.label = path.basename(this.projectUri.fsPath, sqlprojExtension);
return projectItem;
}