Skip to content

Commit 7b79c0a

Browse files
committed
db coll testS
1 parent c406f40 commit 7b79c0a

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

packages/databases-collections/src/components/rename-collection-modal/rename-collection-modal.spec.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,20 @@ describe('RenameCollectionModal [Component]', function () {
3535

3636
context('when the modal is visible', function () {
3737
beforeEach(async function () {
38+
const favoriteQueries = {
39+
getStorage: () => ({
40+
loadAll: sandbox.stub().resolves([]),
41+
}),
42+
};
43+
const pipelineStorage = {
44+
getStorage: () => ({
45+
loadAll: sandbox.stub().resolves([]),
46+
}),
47+
};
3848
const Plugin = RenameCollectionPlugin.withMockServices({
3949
instancesManager: instancesManager as any,
50+
queryStorage: favoriteQueries as any,
51+
pipelineStorage: pipelineStorage as any,
4052
});
4153
const {
4254
globalAppRegistry,
@@ -220,7 +232,9 @@ describe('RenameCollectionModal [Component]', function () {
220232
}),
221233
};
222234
const pipelineStorage = {
223-
loadAll: sandbox.stub().resolves([{ namespace: 'foo.bar' }]),
235+
getStorage: () => ({
236+
loadAll: sandbox.stub().resolves([{ namespace: 'foo.bar' }]),
237+
}),
224238
};
225239
const Plugin = RenameCollectionPlugin.withMockServices({
226240
instancesManager: instancesManager as any,

packages/databases-collections/src/stores/rename-collection.spec.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ describe('RenameCollectionPlugin', function () {
3232
}),
3333
};
3434
const pipelineStorage = {
35-
loadAll: sandbox.stub().resolves([]),
35+
getStorage: () => ({
36+
loadAll: sandbox.stub().resolves([]),
37+
}),
3638
};
3739
beforeEach(function () {
3840
const Plugin = RenameCollectionPlugin.withMockServices({

0 commit comments

Comments
 (0)