[arvados-workbench2] updated: 2.7.0-10-g780b5385
git repository hosting
git at public.arvados.org
Thu Oct 12 20:08:28 UTC 2023
Summary of changes:
src/store/tree-picker/tree-picker-actions.test.ts | 7 +++++++
1 file changed, 7 insertions(+)
via 780b538596d1d66bab3e14b7399c04cc92a4dbe0 (commit)
from 11e786a3643a6813b13a1322d18cba74a1a0233a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 780b538596d1d66bab3e14b7399c04cc92a4dbe0
Author: Stephen Smith <stephen at curii.com>
Date: Thu Oct 12 16:07:57 2023 -0400
20225: Mock group contents service to squelch errors in unit tests
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>
diff --git a/src/store/tree-picker/tree-picker-actions.test.ts b/src/store/tree-picker/tree-picker-actions.test.ts
index b1c42409..9622282c 100644
--- a/src/store/tree-picker/tree-picker-actions.test.ts
+++ b/src/store/tree-picker/tree-picker-actions.test.ts
@@ -14,6 +14,8 @@ import { SHARED_PROJECT_ID, initProjectsTreePicker } from "./tree-picker-actions
import { CollectionResource } from "models/collection";
import { GroupResource } from "models/group";
import { CollectionDirectory, CollectionFile, CollectionFileType } from "models/collection-file";
+import { GroupContentsResource } from "services/groups-service/groups-service";
+import { ListResults } from "services/common-service/common-service";
describe('tree-picker-actions', () => {
const axiosInst = Axios.create({ headers: {} });
@@ -123,6 +125,11 @@ describe('tree-picker-actions', () => {
return fakeResources[uuid]?.files || [];
});
+ services.groupsService.contents = jest.fn(async (uuid, args) => {
+ const items = Object.keys(fakeResources).map(uuid => ({...fakeResources[uuid], uuid})).filter(item => item.ownerUuid === uuid);
+ return {items: items as GroupContentsResource[], itemsAvailable: items.length} as ListResults<GroupContentsResource>;
+ });
+
const pickerId = "pickerId";
// When collection preselected
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list