~/talk

Testable Angular Forms

Talkat ng-conf 2022 · 2022-08-31..09-02· [angular, testing, accessibility]
slides:none on file

Repository is an Angular 14 Reactive Forms workshop that actually builds a contact form, focuses tests on the email control, and shows concrete assertions: use patchValue and detectChanges to exercise the FormGroup, inspect validity with fixture.componentInstance.form.get('email'), and target DOM nodes with form control name selectors or fixture.debugElement.querySelector. Tests parameterize valid/invalid cases, check touched state to reveal error messages, and run Lighthouse or Accessibility Insights to verify labels, tab order, and ARIA fixes.

AI-written summary · about

  1. 0:00Angular forms testing intro
  2. 2:59Why unit test Angular forms
  3. 10:13Test environment setup
  4. 14:24First unit test: email required
  5. 25:50Invalid email validation
  6. 32:06Parameterized email tests
  7. 45:47DOM field presence
  8. 51:54Error messages for invalid inputs
  9. 1:04:28Accessibility in form testing
  10. 1:15:51Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.