Browse Source

Revert "[+Jordi] #87 - Go button should also submit in Verify page"

This reverts commit 4d62868
Elisa Cutrin 1 year ago
parent
commit
a365a6e21f

+ 2 - 4
apps/credential-issuer/src/client/components/Verify.jsx

@@ -72,10 +72,8 @@ const Verify = () => (<Container>
72 72
   <HeaderComponent />
73 73
   <Title>Climate change petition</Title>
74 74
   <SubTitle>To confirm your residency enter your NIF or NIE.</SubTitle>
75
-  <form onSubmit={sendCredential}>
76
-    <TextInput type="text" />
77
-    <Button type="submit">Next</Button>
78
-  </form>
75
+  <TextInput type="text" />
76
+  <Button onClick={sendCredential}>Next</Button>
79 77
 </Container>);
80 78
 
81 79
 Verify.propTypes = {

+ 53 - 109
apps/credential-issuer/test/__snapshots__/Verify.test.js.snap

@@ -12,18 +12,14 @@ ShallowWrapper {
12 12
     <styled.div>
13 13
       To confirm your residency enter your NIF or NIE.
14 14
     </styled.div>
15
-    <form
16
-      onSubmit={[Function]}
15
+    <styled.input
16
+      type="text"
17
+    />
18
+    <styled.button
19
+      onClick={[Function]}
17 20
     >
18
-      <styled.input
19
-        type="text"
20
-      />
21
-      <styled.button
22
-        type="submit"
23
-      >
24
-        Next
25
-      </styled.button>
26
-    </form>
21
+      Next
22
+    </styled.button>
27 23
   </styled.div>,
28 24
   Symbol(enzyme.__renderer__): Object {
29 25
     "batchedUpdates": [Function],
@@ -45,18 +41,14 @@ ShallowWrapper {
45 41
         <styled.div>
46 42
           To confirm your residency enter your NIF or NIE.
47 43
         </styled.div>,
48
-        <form
49
-          onSubmit={[Function]}
44
+        <styled.input
45
+          type="text"
46
+        />,
47
+        <styled.button
48
+          onClick={[Function]}
50 49
         >
51
-          <styled.input
52
-            type="text"
53
-          />
54
-          <styled.button
55
-            type="submit"
56
-          >
57
-            Next
58
-          </styled.button>
59
-        </form>,
50
+          Next
51
+        </styled.button>,
60 52
       ],
61 53
       "className": "sc-htpNat iriqgp",
62 54
     },
@@ -96,47 +88,25 @@ ShallowWrapper {
96 88
       Object {
97 89
         "instance": null,
98 90
         "key": undefined,
99
-        "nodeType": "host",
91
+        "nodeType": "class",
100 92
         "props": Object {
101
-          "children": Array [
102
-            <styled.input
103
-              type="text"
104
-            />,
105
-            <styled.button
106
-              type="submit"
107
-            >
108
-              Next
109
-            </styled.button>,
110
-          ],
111
-          "onSubmit": [Function],
93
+          "type": "text",
112 94
         },
113 95
         "ref": null,
114
-        "rendered": Array [
115
-          Object {
116
-            "instance": null,
117
-            "key": undefined,
118
-            "nodeType": "class",
119
-            "props": Object {
120
-              "type": "text",
121
-            },
122
-            "ref": null,
123
-            "rendered": null,
124
-            "type": [Function],
125
-          },
126
-          Object {
127
-            "instance": null,
128
-            "key": undefined,
129
-            "nodeType": "class",
130
-            "props": Object {
131
-              "children": "Next",
132
-              "type": "submit",
133
-            },
134
-            "ref": null,
135
-            "rendered": "Next",
136
-            "type": [Function],
137
-          },
138
-        ],
139
-        "type": "form",
96
+        "rendered": null,
97
+        "type": [Function],
98
+      },
99
+      Object {
100
+        "instance": null,
101
+        "key": undefined,
102
+        "nodeType": "class",
103
+        "props": Object {
104
+          "children": "Next",
105
+          "onClick": [Function],
106
+        },
107
+        "ref": null,
108
+        "rendered": "Next",
109
+        "type": [Function],
140 110
       },
141 111
     ],
142 112
     "type": "div",
@@ -155,18 +125,14 @@ ShallowWrapper {
155 125
           <styled.div>
156 126
             To confirm your residency enter your NIF or NIE.
157 127
           </styled.div>,
158
-          <form
159
-            onSubmit={[Function]}
128
+          <styled.input
129
+            type="text"
130
+          />,
131
+          <styled.button
132
+            onClick={[Function]}
160 133
           >
161
-            <styled.input
162
-              type="text"
163
-            />
164
-            <styled.button
165
-              type="submit"
166
-            >
167
-              Next
168
-            </styled.button>
169
-          </form>,
134
+            Next
135
+          </styled.button>,
170 136
         ],
171 137
         "className": "sc-htpNat iriqgp",
172 138
       },
@@ -206,47 +172,25 @@ ShallowWrapper {
206 172
         Object {
207 173
           "instance": null,
208 174
           "key": undefined,
209
-          "nodeType": "host",
175
+          "nodeType": "class",
176
+          "props": Object {
177
+            "type": "text",
178
+          },
179
+          "ref": null,
180
+          "rendered": null,
181
+          "type": [Function],
182
+        },
183
+        Object {
184
+          "instance": null,
185
+          "key": undefined,
186
+          "nodeType": "class",
210 187
           "props": Object {
211
-            "children": Array [
212
-              <styled.input
213
-                type="text"
214
-              />,
215
-              <styled.button
216
-                type="submit"
217
-              >
218
-                Next
219
-              </styled.button>,
220
-            ],
221
-            "onSubmit": [Function],
188
+            "children": "Next",
189
+            "onClick": [Function],
222 190
           },
223 191
           "ref": null,
224
-          "rendered": Array [
225
-            Object {
226
-              "instance": null,
227
-              "key": undefined,
228
-              "nodeType": "class",
229
-              "props": Object {
230
-                "type": "text",
231
-              },
232
-              "ref": null,
233
-              "rendered": null,
234
-              "type": [Function],
235
-            },
236
-            Object {
237
-              "instance": null,
238
-              "key": undefined,
239
-              "nodeType": "class",
240
-              "props": Object {
241
-                "children": "Next",
242
-                "type": "submit",
243
-              },
244
-              "ref": null,
245
-              "rendered": "Next",
246
-              "type": [Function],
247
-            },
248
-          ],
249
-          "type": "form",
192
+          "rendered": "Next",
193
+          "type": [Function],
250 194
         },
251 195
       ],
252 196
       "type": "div",