Remove selection test

This commit is contained in:
Laurent Nguyen 2024-05-07 08:08:40 +02:00
parent 4050153297
commit 57afc3886b

View File

@ -1,7 +1,7 @@
import { TableRowId } from "@fluentui/react-components";
import { ReactWrapper, mount } from "enzyme";
import React from "react";
import { DocumentsTableComponent, IDocumentsTableComponentProps } from "./DocumentsTableComponent.tsxx";
import { DocumentsTableComponent, IDocumentsTableComponentProps } from "./DocumentsTableComponent";
const PARTITION_KEY_HEADER = "partitionKey";
const ID_HEADER = "id";
@ -73,30 +73,4 @@ describe("DocumentsTableComponent", () => {
).toBeTruthy();
});
});
// describe("selection", () => {
// afterEach(() => {
// wrapper.unmount();
// });
// it("should clear selection when clicking on row", () => {
// const onSelectedRowsChange = jest.fn().mockName("onSelectedRowsChange");
// const onItemClicked = jest.fn().mockName("onItemClicked");
// const props: IDocumentsTableComponentProps = {
// ...createMockProps(),
// selectedRows: new Set<TableRowId>([1, 2]),
// onSelectedRowsChange,
// onItemClicked,
// };
// wrapper = mount(<DocumentsTableComponent {...props} />);
// const cell = wrapper.find(".fui-TableBody .fui-TableCell").findWhere((node) => node.text() === "2");
// // const cell = wrapper.find(".fui-TableBody .fui-TableCell").findWhere(node => node.text() === "2" && node.type() === "function");
// // const cell = wrapper.find("[title~=\"2\"]");
// cell.at(4).simulate("click");
// expect(onItemClicked).toHaveBeenCalledWith(2);
// expect(onSelectedRowsChange).toHaveBeenCalledWith(new Set<TableRowId>([2]));
// });
// });
});