[ARVADOS-WORKBENCH2] updated: 1.2.0-731-gbcb2d18
Git user
git at public.curoverse.com
Wed Oct 24 05:02:37 EDT 2018
Summary of changes:
.../data-table-filters/data-table-filters.test.tsx | 43 +---------------------
1 file changed, 1 insertion(+), 42 deletions(-)
via bcb2d185e38c65458a3464f5c36ee459e96f6cc5 (commit)
from c69426f525bd9517e9142bcf39ca551de84c24ab (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 bcb2d185e38c65458a3464f5c36ee459e96f6cc5
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date: Wed Oct 24 11:02:22 2018 +0200
refs #fix test
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
diff --git a/src/components/data-table-filters/data-table-filters.test.tsx b/src/components/data-table-filters/data-table-filters.test.tsx
index 9a3fa4d..dc1969f 100644
--- a/src/components/data-table-filters/data-table-filters.test.tsx
+++ b/src/components/data-table-filters/data-table-filters.test.tsx
@@ -6,7 +6,7 @@ import * as React from "react";
import { mount, configure } from "enzyme";
import { DataTableFilters } from "./data-table-filters";
import * as Adapter from 'enzyme-adapter-react-16';
-import { Checkbox, ButtonBase, ListItem, Button, ListItemText } from "@material-ui/core";
+import { Checkbox, ButtonBase } from "@material-ui/core";
configure({ adapter: new Adapter() });
@@ -24,45 +24,4 @@ describe("<DataTableFilter />", () => {
expect(dataTableFilter.find(Checkbox).at(0).prop("checked")).toBeTruthy();
expect(dataTableFilter.find(Checkbox).at(1).prop("checked")).toBeFalsy();
});
-
- it("updates filters after filters prop change", () => {
- const filters = [{
- name: "Filter 1",
- selected: true
- }];
- const updatedFilters = [, {
- name: "Filter 2",
- selected: true
- }];
- const dataTableFilter = mount(<DataTableFilters name="" filters={filters} />);
- dataTableFilter.find(ButtonBase).simulate("click");
- expect(dataTableFilter.find(Checkbox).prop("checked")).toBeTruthy();
- dataTableFilter.find(ListItem).simulate("click");
- expect(dataTableFilter.find(Checkbox).prop("checked")).toBeFalsy();
- dataTableFilter.setProps({filters: updatedFilters});
- expect(dataTableFilter.find(Checkbox).prop("checked")).toBeTruthy();
- expect(dataTableFilter.find(ListItemText).text()).toBe("Filter 2");
- });
-
- it("calls onChange with modified list of filters", () => {
- const filters = [{
- name: "Filter 1",
- selected: true
- }, {
- name: "Filter 2",
- selected: false
- }];
- const onChange = jest.fn();
- const dataTableFilter = mount(<DataTableFilters name="" filters={filters} onChange={onChange} />);
- dataTableFilter.find(ButtonBase).simulate("click");
- dataTableFilter.find(ListItem).at(1).simulate("click");
- dataTableFilter.find(Button).at(0).simulate("click");
- expect(onChange).toHaveBeenCalledWith([{
- name: "Filter 1",
- selected: true
- }, {
- name: "Filter 2",
- selected: true
- }]);
- });
});
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list