[ARVADOS-WORKBENCH2] updated: 1.1.4-296-g913eba4
Git user
git at public.curoverse.com
Fri Jul 13 11:35:09 EDT 2018
Summary of changes:
src/common/api/common-resource-service.test.ts | 2 +-
src/components/context-menu/context-menu.test.tsx | 19 ++++++++++---------
src/services/groups-service/groups-service.test.ts | 2 +-
3 files changed, 12 insertions(+), 11 deletions(-)
via 913eba4873631814daafa27d2474bb51e2378221 (commit)
from 87dad7df1d3e32afccf7357df1b1d39af5a98154 (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 913eba4873631814daafa27d2474bb51e2378221
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Fri Jul 13 17:34:53 2018 +0200
Update tests
Feature #13805
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/common/api/common-resource-service.test.ts b/src/common/api/common-resource-service.test.ts
index b8b1f44..7093b59 100644
--- a/src/common/api/common-resource-service.test.ts
+++ b/src/common/api/common-resource-service.test.ts
@@ -4,7 +4,7 @@
import CommonResourceService from "./common-resource-service";
import axios from "axios";
-import MockAdapter from "axios-mock-adapter/types";
+import MockAdapter from "axios-mock-adapter";
describe("CommonResourceService", () => {
const axiosInstance = axios.create();
diff --git a/src/components/context-menu/context-menu.test.tsx b/src/components/context-menu/context-menu.test.tsx
index e4e2397..86011a3 100644
--- a/src/components/context-menu/context-menu.test.tsx
+++ b/src/components/context-menu/context-menu.test.tsx
@@ -7,29 +7,30 @@ import { mount, configure, shallow } from "enzyme";
import * as Adapter from "enzyme-adapter-react-16";
import ContextMenu from "./context-menu";
import { ListItem } from "@material-ui/core";
+import { IconTypes } from "../icon/icon";
configure({ adapter: new Adapter() });
describe("<ContextMenu />", () => {
- const actions = [[{
- icon: "",
+ const items = [[{
+ icon: IconTypes.ANNOUNCEMENT,
name: "Action 1.1"
}, {
- icon: "",
+ icon: IconTypes.ANNOUNCEMENT,
name: "Action 1.2"
},], [{
- icon: "",
+ icon: IconTypes.ANNOUNCEMENT,
name: "Action 2.1"
}]];
- it("calls onActionClick with clicked action", () => {
- const onActionClick = jest.fn();
+ it("calls onItemClick with clicked action", () => {
+ const onItemClick = jest.fn();
const contextMenu = mount(<ContextMenu
anchorEl={document.createElement("div")}
onClose={jest.fn()}
- onActionClick={onActionClick}
- actions={actions} />);
+ onItemClick={onItemClick}
+ items={items} />);
contextMenu.find(ListItem).at(2).simulate("click");
- expect(onActionClick).toHaveBeenCalledWith(actions[1][0]);
+ expect(onItemClick).toHaveBeenCalledWith(items[1][0]);
});
});
\ No newline at end of file
diff --git a/src/services/groups-service/groups-service.test.ts b/src/services/groups-service/groups-service.test.ts
index 92d2277..2562a59 100644
--- a/src/services/groups-service/groups-service.test.ts
+++ b/src/services/groups-service/groups-service.test.ts
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0
import axios from "axios";
-import MockAdapter from "axios-mock-adapter/types";
+import MockAdapter from "axios-mock-adapter";
import GroupsService from "./groups-service";
describe("GroupsService", () => {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list