Skip to content

Commit f7c760f

Browse files
committed
checks and lint
1 parent f421be4 commit f7c760f

File tree

6 files changed

+28
-1
lines changed

6 files changed

+28
-1
lines changed

package-lock.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-sidebar/src/components/use-filtered-connections.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ const sidebarConnections: SidebarConnection[] = [
5151
type: 'collection',
5252
sourceName: '',
5353
pipeline: [],
54+
isNonExistant: false,
5455
},
5556
],
5657
collectionsLength: 1,
5758
collectionsStatus: 'ready',
59+
isNonExistant: false,
5860
},
5961
{
6062
_id: 'db_ready_1_2',
@@ -66,10 +68,12 @@ const sidebarConnections: SidebarConnection[] = [
6668
type: 'collection',
6769
sourceName: '',
6870
pipeline: [],
71+
isNonExistant: false,
6972
},
7073
],
7174
collectionsLength: 1,
7275
collectionsStatus: 'ready',
76+
isNonExistant: false,
7377
},
7478
],
7579
databasesStatus: 'ready',
@@ -96,17 +100,20 @@ const sidebarConnections: SidebarConnection[] = [
96100
type: 'collection',
97101
sourceName: '',
98102
pipeline: [],
103+
isNonExistant: false,
99104
},
100105
{
101106
_id: 'coll_ready_2_2',
102107
name: 'coll_ready_2_2',
103108
type: 'collection',
104109
sourceName: '',
105110
pipeline: [],
111+
isNonExistant: false,
106112
},
107113
],
108114
collectionsLength: 1,
109115
collectionsStatus: 'ready',
116+
isNonExistant: false,
110117
},
111118
],
112119
databasesStatus: 'ready',

packages/compass-sidebar/src/modules/databases.spec.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,20 @@ import { createInstance } from '../../test/helpers';
77
const CONNECTION_ID = 'webscale';
88

99
function createDatabases(dbs: any[] = []) {
10-
return createInstance(dbs).databases.map((db) => {
10+
const data = createInstance(dbs).databases.map((db) => {
1111
return {
1212
...db.toJSON(),
1313
collections: db.collections.toJSON(),
1414
};
1515
});
16+
return data.map(({ is_non_existant, collections, ...rest }) => ({
17+
...rest,
18+
isNonExistant: is_non_existant,
19+
collections: collections.map(({ is_non_existant, ...coll }) => ({
20+
...coll,
21+
isNonExistant: is_non_existant,
22+
})),
23+
}));
1624
}
1725

1826
describe('sidebar databases', function () {

packages/compass-sidebar/test/helpers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ export function createInstance(
1616
databases: dbs.map((db) => {
1717
return {
1818
_id: db._id,
19+
is_non_existant: false,
1920
collections: (db.collections || []).map((coll) => {
2021
return {
2122
_id: `${db._id}.${coll}`,
23+
is_non_existant: false,
2224
};
2325
}),
2426
};

packages/compass-workspaces/src/stores/workspaces.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ describe('_bulkTabsClose', function () {
516516
],
517517
activeTabId: 'active',
518518
collectionInfo: {},
519+
databaseInfo: {},
519520
},
520521
isToBeClosed: (tab: WorkspaceTab) => tab.type === 'Databases',
521522
});
@@ -540,6 +541,7 @@ describe('_bulkTabsClose', function () {
540541
],
541542
activeTabId: 'active',
542543
collectionInfo: {},
544+
databaseInfo: {},
543545
},
544546
isToBeClosed: (tab: WorkspaceTab) => tab.type === 'My Queries',
545547
});
@@ -573,6 +575,7 @@ describe('_bulkTabsClose', function () {
573575
],
574576
activeTabId: 'active',
575577
collectionInfo: {},
578+
databaseInfo: {},
576579
},
577580
isToBeClosed: (tab: WorkspaceTab) => tab.type === 'Databases',
578581
});
@@ -599,6 +602,7 @@ describe('_bulkTabsClose', function () {
599602
],
600603
activeTabId: 'active',
601604
collectionInfo: {},
605+
databaseInfo: {},
602606
},
603607
isToBeClosed: () => true,
604608
});

packages/databases-collections-list/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
"@mongodb-js/compass-workspaces": "^0.30.5",
5555
"@mongodb-js/connection-info": "^0.10.5",
5656
"compass-preferences-model": "^2.32.5",
57+
"mongodb-collection-model": "^5.24.5",
58+
"mongodb-database-model": "^2.24.5",
5759
"mongodb-ns": "^2.4.2",
5860
"react": "^17.0.2"
5961
},

0 commit comments

Comments
 (0)