Repository navigation
Commit e2e44bb
authored
test(mosaic): keep the sign-up a failed WhatsApp send leaves behind
The fake FAPI dropped the sign-up when the create request could not send
the WhatsApp code. clerk_go 8bb8f66dde inserts the sign-up and attaches it
to the client before it prepares the code (api/fapi/v1/sign_up/service.go:394-407),
prepares it in a later transaction (:529, channel check in
pkg/usersettings/clerk/strategies/phone_code.go:352-361), and returns the
error with the client (http.go:73-77, wrapper.go:49). clerk-js applies
meta.client from an error response (Client.ts getClientResourceFromPayload).
The fake now keeps the unverified sign-up with the phone number and sends
the client in the error. The test that expected no sign-up now checks that
the user stays on the WhatsApp screen with the error and a retry sends the
code. A new test goes back to the form and signs up over SMS with the
stray sign-up present.1 parent 224a7f3 commit e2e44bb
2 files changed
Lines changed: 31 additions & 7 deletions
File tree
- packages/mosaic/src
- __tests__/feature/fake-fapi
- features/sign-up/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
424 | | - | |
425 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
426 | 432 | | |
427 | 433 | | |
428 | 434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1145 | 1145 | | |
1146 | 1146 | | |
1147 | 1147 | | |
1148 | | - | |
| 1148 | + | |
1149 | 1149 | | |
1150 | 1150 | | |
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
1154 | 1154 | | |
1155 | 1155 | | |
1156 | | - | |
| 1156 | + | |
| 1157 | + | |
1157 | 1158 | | |
1158 | 1159 | | |
1159 | 1160 | | |
1160 | 1161 | | |
1161 | 1162 | | |
1162 | | - | |
1163 | 1163 | | |
1164 | | - | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
1165 | 1183 | | |
1166 | 1184 | | |
1167 | 1185 | | |
| |||
0 commit comments