X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/180c2c37b635cbb7a33257d2ee9b4395553ce5e7..dc95b803fa84b3c9ef7c11a4f81dd0d86077d779:/src/components/data-table-filters/data-table-filters.test.tsx

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 b0a84b5176..dc1969f415 100644
--- a/src/components/data-table-filters/data-table-filters.test.tsx
+++ b/src/components/data-table-filters/data-table-filters.test.tsx
@@ -4,9 +4,9 @@
 
 import * as React from "react";
 import { mount, configure } from "enzyme";
-import { DataTableFilters, DataTableFilterItem } from "./data-table-filters";
+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
-        }]);
-    });
 });
