CEC-464 can filters forms (#118)

* can filters forms and lists

* unit tests

* updating warnings and tests

* merge develop

* fixed snapshots

* update jest mocks

* updating tests
This commit is contained in:
Drew Taylor
2022-03-03 11:33:07 -08:00
committed by GitHub
parent 3b9252097a
commit b7223b8bc6
37 changed files with 6673 additions and 944 deletions

View File

@@ -0,0 +1,19 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`TabPanel Render 1`] = `
<div>
<div
aria-labelledby="tab-0"
id="tabpanel-0"
role="tabpanel"
>
<div
class="MuiBox-root MuiBox-root-1"
>
<div>
Test
</div>
</div>
</div>
</div>
`;

View File

@@ -0,0 +1,24 @@
import React from "react";
import { Box } from "@material-ui/core";
function TabPanel(props) {
const { children, value, index, ...other } = props;
return (
<div
role="tabpanel"
hidden={value !== index}
id={`tabpanel-${index}`}
aria-labelledby={`tab-${index}`}
{...other}
>
{value === index && (
<Box sx={{ p: 3 }}>
{children}
</Box>
)}
</div >
);
}
export default TabPanel;

View File

@@ -0,0 +1,21 @@
import { render, waitFor } from "@testing-library/react";
import TabPanel from "./index"
const renderTabPanel = async () => {
const { container } = render(
<TabPanel value={0} index={0}>
<div>Test</div>
</TabPanel>
);
await waitFor(() => { });
return container;
};
describe("TabPanel", () => {
it("Render", async () => {
const container = await renderTabPanel();
expect(container).toMatchSnapshot();
});
});