From 5683e3c7e559a61c0e56b4f0724de2e2027f30a2 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 3 Feb 2022 11:36:38 +0000
Subject: [PATCH 1/2] Update PollCreateDialog-test to snapshot the html and not
react tree
---
.../views/elements/PollCreateDialog-test.tsx | 4 +-
.../PollCreateDialog-test.tsx.snap | 2356 +----------------
2 files changed, 4 insertions(+), 2356 deletions(-)
diff --git a/test/components/views/elements/PollCreateDialog-test.tsx b/test/components/views/elements/PollCreateDialog-test.tsx
index 38233a7e310..bec362638c2 100644
--- a/test/components/views/elements/PollCreateDialog-test.tsx
+++ b/test/components/views/elements/PollCreateDialog-test.tsx
@@ -42,7 +42,7 @@ describe("PollCreateDialog", () => {
const dialog = mount(
,
);
- expect(dialog).toMatchSnapshot();
+ expect(dialog.html()).toMatchSnapshot();
});
it("renders a question and some options", () => {
@@ -61,7 +61,7 @@ describe("PollCreateDialog", () => {
changeValue(dialog, "Option 2", "The question is meaningless");
dialog.find("div.mx_PollCreateDialog_addOption").simulate("click");
changeValue(dialog, "Option 3", "Mu");
- expect(dialog).toMatchSnapshot();
+ expect(dialog.html()).toMatchSnapshot();
});
it("doesn't allow submitting until there are options", () => {
diff --git a/test/components/views/elements/__snapshots__/PollCreateDialog-test.tsx.snap b/test/components/views/elements/__snapshots__/PollCreateDialog-test.tsx.snap
index 141a0ae258d..bd8b9b81758 100644
--- a/test/components/views/elements/__snapshots__/PollCreateDialog-test.tsx.snap
+++ b/test/components/views/elements/__snapshots__/PollCreateDialog-test.tsx.snap
@@ -1,2357 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`PollCreateDialog renders a blank poll 1`] = `
-
-
-
-
-
-
-
-
-
-
- }
- onActivation={[Function]}
- onDeactivation={[Function]}
- persistentFocus={false}
- returnFocus={[Function]}
- shards={Array []}
- sideCar={
- Object {
- "assignMedium": [Function],
- "assignSyncMedium": [Function],
- "options": Object {
- "async": true,
- "ssr": false,
- },
- "read": [Function],
- "useMedium": [Function],
- }
- }
- >
-
-
-
-
- }
- onActivation={[Function]}
- onDeactivation={[Function]}
- persistentFocus={false}
- returnFocus={[Function]}
- shards={Array []}
- sideCar={
- Object {
- "assignMedium": [Function],
- "assignSyncMedium": [Function],
- "options": Object {
- "async": true,
- "ssr": false,
- },
- "read": [Function],
- "useMedium": [Function],
- }
- }
- />
-
-
-
-
- Create poll
-
-
-
-
-
-
-
-
-
- Cancel
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
+exports[`PollCreateDialog renders a blank poll 1`] = `"
"`;
-exports[`PollCreateDialog renders a question and some options 1`] = `
-
-
-
-
-
-
-
-
-
-
- }
- onActivation={[Function]}
- onDeactivation={[Function]}
- persistentFocus={false}
- returnFocus={[Function]}
- shards={Array []}
- sideCar={
- Object {
- "assignMedium": [Function],
- "assignSyncMedium": [Function],
- "options": Object {
- "async": true,
- "ssr": false,
- },
- "read": [Function],
- "useMedium": [Function],
- }
- }
- >
-
-
-
-
- }
- onActivation={[Function]}
- onDeactivation={[Function]}
- persistentFocus={false}
- returnFocus={[Function]}
- shards={Array []}
- sideCar={
- Object {
- "assignMedium": [Function],
- "assignSyncMedium": [Function],
- "options": Object {
- "async": true,
- "ssr": false,
- },
- "read": [Function],
- "useMedium": [Function],
- }
- }
- />
-
-
-
-
- Create poll
-
-
-
-
-
-
-
-
-
- Cancel
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
+exports[`PollCreateDialog renders a question and some options 1`] = `""`;
From 0fa619c901ca96e197cfbaffe84e42546801d7fd Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 3 Feb 2022 11:46:15 +0000
Subject: [PATCH 2/2] Update snapshots
---
.../views/elements/__snapshots__/PollCreateDialog-test.tsx.snap | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/components/views/elements/__snapshots__/PollCreateDialog-test.tsx.snap b/test/components/views/elements/__snapshots__/PollCreateDialog-test.tsx.snap
index bd8b9b81758..8edc3558834 100644
--- a/test/components/views/elements/__snapshots__/PollCreateDialog-test.tsx.snap
+++ b/test/components/views/elements/__snapshots__/PollCreateDialog-test.tsx.snap
@@ -2,4 +2,4 @@
exports[`PollCreateDialog renders a blank poll 1`] = `""`;
-exports[`PollCreateDialog renders a question and some options 1`] = `""`;
+exports[`PollCreateDialog renders a question and some options 1`] = `""`;