T42c Misc · Codes and checks passes review
Tests now hold focus in the field after an answer and a passed captcha with no Tab stop.
This commit is contained in:
1 parent
a184b4ef9a
commit
a213248910
2 files changed
+21
-2
No files matched your search
@@ -142,7 +142,7 @@ Per-component lines live in `tasks/`. Tags there:
|
||||
- [x] T41c Maps · World — `tasks/ch31-43.md`
|
||||
- [x] T42a Misc · Time — `tasks/ch31-43.md`
|
||||
- [x] T42b Misc · Numbers — `tasks/ch31-43.md`
|
||||
- [ ] T42c Misc · Codes and checks — `tasks/ch31-43.md`
|
||||
- [x] T42c Misc · Codes and checks — `tasks/ch31-43.md`
|
||||
- [ ] T42d Misc · Asking and learning — `tasks/ch31-43.md`
|
||||
- [ ] T42e Misc · Terms and notices — `tasks/ch31-43.md`
|
||||
- [ ] T42f Misc · Web — `tasks/ch31-43.md`
|
||||
@@ -452,3 +452,5 @@ Per-component lines live in `tasks/`. Tags there:
|
||||
| T42a | 2 | PASS | |
|
||||
| T42b | 1 | FAIL | a result went on as its twelve-digit text, so 1 ÷ 3 = × 3 = read 0.999999999999; a long reading hid digits at 280px; Equals on a dangling operator said the formula ended early; Control, the = key and a point after a result untested |
|
||||
| T42b | 2 | PASS | |
|
||||
| T42c | 1 | FAIL | a verdict or a new ask disabled Verify while it held focus, so focus fell to the root; Enter handed a second answer over during the check; a passed field kept its ring and caret |
|
||||
| T42c | 2 | PASS | three claims untested; tests for focus after an answer and a resting pass added in the pass commit |
|
||||
+18
-1
@@ -163,7 +163,24 @@ fn verify_hands_focus_to_the_field(cx: &mut TestAppContext) {
|
||||
press("tab", cx);
|
||||
press("enter", cx);
|
||||
assert_eq!(said(), ["W7XK"]);
|
||||
assert!(!at_root(cx), "focus went to the field, not the root");
|
||||
cx.simulate_input("again");
|
||||
press("enter", cx);
|
||||
assert_eq!(said(), ["W7XK", "again"], "the typing reached the field");
|
||||
}
|
||||
|
||||
/// A passed captcha rests: Tab finds no stop in it and typing reaches nothing.
|
||||
#[gpui::test]
|
||||
fn a_passed_captcha_rests(cx: &mut TestAppContext) {
|
||||
STATE.set(CaptchaState::Passed);
|
||||
let (_, cx) = stage(captcha, cx);
|
||||
press("tab", cx);
|
||||
cx.simulate_input("again");
|
||||
press("enter", cx);
|
||||
assert!(said().is_empty());
|
||||
assert!(
|
||||
!shown("captcha-verified-focused", cx),
|
||||
"Tab found no stop in the resting captcha"
|
||||
);
|
||||
}
|
||||
|
||||
/// Verify spins while the owner checks, and its mark keeps its focus once passed.
|
||||
|
||||
Reference in new issue
Block a user