mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 17:22:48 -05:00
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:
@@ -10,11 +10,12 @@ import * as path from 'path';
|
||||
* Base class for an item that appears in the ADS project tree
|
||||
*/
|
||||
export abstract class BaseProjectTreeItem {
|
||||
uri: vscode.Uri;
|
||||
/** Project-relative URI that's compatible with the project tree */
|
||||
projectUri: vscode.Uri;
|
||||
parent?: BaseProjectTreeItem;
|
||||
|
||||
constructor(uri: vscode.Uri, parent?: BaseProjectTreeItem) {
|
||||
this.uri = uri;
|
||||
this.projectUri = uri;
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
@@ -23,7 +24,7 @@ export abstract class BaseProjectTreeItem {
|
||||
abstract get treeItem(): vscode.TreeItem;
|
||||
|
||||
public get friendlyName(): string {
|
||||
return path.parse(this.uri.path).base;
|
||||
return path.parse(this.projectUri.path).base;
|
||||
}
|
||||
|
||||
public get root() {
|
||||
@@ -44,7 +45,7 @@ export class MessageTreeItem extends BaseProjectTreeItem {
|
||||
private message: string;
|
||||
|
||||
constructor(message: string, parent?: BaseProjectTreeItem) {
|
||||
super(vscode.Uri.file(path.join(parent?.uri.path ?? 'Message', message)), parent);
|
||||
super(vscode.Uri.file(path.join(parent?.projectUri.path ?? 'Message', message)), parent);
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user