Skip to content

Commit 3cd6526

Browse files
committed
Created new test cases for pages-admin-form-builder-fields-tab component
1 parent fe43e6b commit 3cd6526

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { mountedFormComponent, screen } from "test-utils";
2+
3+
import FieldsList from "../fields-list";
4+
5+
import FieldsTab from "./component";
6+
7+
describe("<FieldsTab />", () => {
8+
beforeEach(() => {
9+
const props = {
10+
index: 1,
11+
tab: 1,
12+
formContextFields: {},
13+
fieldDialogMode: "new"
14+
};
15+
16+
mountedFormComponent(<FieldsTab {...props} />);
17+
});
18+
19+
it("should render <FieldsTab />", () => {
20+
expect(screen.getByText("fields.add_field")).toBeInTheDocument();
21+
});
22+
23+
xit("should render <FieldsList />", () => {
24+
expect(screen.getByText(FieldsList)).toBeInTheDocument();
25+
});
26+
});

app/javascript/components/pages/admin/form-builder/components/fields-tab/component.unit.test.js

-22
This file was deleted.

0 commit comments

Comments
 (0)