test: cover disabled ML, FSP and mail and outbox restarts
This commit is contained in:
1 parent
9909120286
commit
e367553d7c
6 files changed
+337
-4
No files matched your search
@@ -29,6 +29,21 @@ describe("verification code form after registration", () => {
|
||||
expect(html).not.toContain("correct horse battery staple");
|
||||
});
|
||||
|
||||
it("waits for the message instead of claiming it was sent", () => {
|
||||
// The registration answer is neutral and mail is delivered later, or not
|
||||
// at all while the mail channel is unavailable, so the form cannot know
|
||||
// that a code went out.
|
||||
const html = render({
|
||||
initialEmail: "candidate@example.com",
|
||||
password: "correct horse battery staple",
|
||||
messageJustSent: true,
|
||||
});
|
||||
|
||||
expect(html).not.toMatch(/отправлен|доставлен/i);
|
||||
expect(html).toContain("может прийти не сразу");
|
||||
expect(html).toContain("candidate@example.com");
|
||||
});
|
||||
|
||||
it("presents the code input for one-time codes and numeric keyboards", () => {
|
||||
const html = render({ initialEmail: "candidate@example.com", password: "x" });
|
||||
|
||||
|
||||
@@ -197,9 +197,12 @@ export function VerificationCodeForm({
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
// The server answers registration neutrally and delivers mail later,
|
||||
// so the form never claims that the code was sent.
|
||||
<p className={styles.hint}>
|
||||
Код отправлен на адрес <strong className={styles.address}>{email}</strong>. Введите его,
|
||||
чтобы подтвердить почту.
|
||||
Если адрес можно зарегистрировать, код придет на{" "}
|
||||
<strong className={styles.address}>{email}</strong>. Письмо может прийти не сразу.
|
||||
Введите код из него, чтобы подтвердить почту.
|
||||
</p>
|
||||
)}
|
||||
|
||||
|
||||
Reference in new issue
Block a user