Update PollCreateDialog-test to snapshot the html and not react tree (#7712)
This commit is contained in:
parent
226ccfc45c
commit
78e78292cb
2 changed files with 4 additions and 2356 deletions
|
@ -42,7 +42,7 @@ describe("PollCreateDialog", () => {
|
||||||
const dialog = mount(
|
const dialog = mount(
|
||||||
<PollCreateDialog room={createRoom()} onFinished={jest.fn()} />,
|
<PollCreateDialog room={createRoom()} onFinished={jest.fn()} />,
|
||||||
);
|
);
|
||||||
expect(dialog).toMatchSnapshot();
|
expect(dialog.html()).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("renders a question and some options", () => {
|
it("renders a question and some options", () => {
|
||||||
|
@ -61,7 +61,7 @@ describe("PollCreateDialog", () => {
|
||||||
changeValue(dialog, "Option 2", "The question is meaningless");
|
changeValue(dialog, "Option 2", "The question is meaningless");
|
||||||
dialog.find("div.mx_PollCreateDialog_addOption").simulate("click");
|
dialog.find("div.mx_PollCreateDialog_addOption").simulate("click");
|
||||||
changeValue(dialog, "Option 3", "Mu");
|
changeValue(dialog, "Option 3", "Mu");
|
||||||
expect(dialog).toMatchSnapshot();
|
expect(dialog.html()).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("doesn't allow submitting until there are options", () => {
|
it("doesn't allow submitting until there are options", () => {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue