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
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ import {
*/
export class DbTreeViewItem extends vscode.TreeItem {
constructor(
// iconPath and tooltip must have those names because
// they are part of the vscode.TreeItem interface

public readonly dbItem: DbItem | undefined,
public readonly icon: vscode.ThemeIcon | undefined,
public readonly iconPath: vscode.ThemeIcon | undefined,
public readonly label: string,
public readonly tooltip: string | undefined,
public readonly collapsibleState: vscode.TreeItemCollapsibleState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ describe('db panel', async () => {
): void {
expect(item.label).to.equal(`Top ${n} repositories`);
expect(item.tooltip).to.equal(`Top ${n} repositories of a language`);
expect(item.icon).to.deep.equal(new vscode.ThemeIcon('github'));
expect(item.iconPath).to.deep.equal(new vscode.ThemeIcon('github'));
expect(item.collapsibleState).to.equal(vscode.TreeItemCollapsibleState.None);
}

Expand All @@ -241,7 +241,7 @@ describe('db panel', async () => {
): void {
expect(item.label).to.equal(listName);
expect(item.tooltip).to.be.undefined;
expect(item.icon).to.be.undefined;
expect(item.iconPath).to.be.undefined;
expect(item.collapsibleState).to.equal(vscode.TreeItemCollapsibleState.Collapsed);
expect(item.children).to.be.ok;
expect(item.children.length).to.equal(repos.length);
Expand All @@ -257,7 +257,7 @@ describe('db panel', async () => {
): void {
expect(item.label).to.equal(ownerName);
expect(item.tooltip).to.be.undefined;
expect(item.icon).to.deep.equal(new vscode.ThemeIcon('organization'));
expect(item.iconPath).to.deep.equal(new vscode.ThemeIcon('organization'));
expect(item.collapsibleState).to.equal(vscode.TreeItemCollapsibleState.None);
expect(item.children).to.be.ok;
expect(item.children.length).to.equal(0);
Expand All @@ -269,7 +269,7 @@ describe('db panel', async () => {
): void {
expect(item.label).to.equal(repoName);
expect(item.tooltip).to.be.undefined;
expect(item.icon).to.deep.equal(new vscode.ThemeIcon('database'));
expect(item.iconPath).to.deep.equal(new vscode.ThemeIcon('database'));
expect(item.collapsibleState).to.equal(vscode.TreeItemCollapsibleState.None);
}
});