~/talk

Testing NgRX

Talkat EnterpriseNG 2020 · 2020-11-19..11-20· [angular, testing]
slides:none on file

Uses Cypress to tap the NgRx store in the browser (exposed only when window.cypress is true) so tests can assert last action type and its props and dispatch actions via window.store.invoke dispatch rather than only inspecting the DOM. Example app is a favorite TV show demo (github.comcreate this dot ngrx testing) where page load triggers a shows api get all shows success with four shows and clicking favorite dispatches favorite show clicked then an effect produces favorite show success with the expected show id.

AI-written summary · about

  1. 0:00Start
  2. 0:32Why End-to-End Testing for Ngrx
  3. 2:44Testing Approach
  4. 4:46Asserting on Ngrx Actions
  5. 14:59The Cypress Test Runner in Action
  6. 16:39Validating the Favorite Show Clicked Action and Effect
  7. 17:37Validate via the Ngrx Store
  8. 18:36Resources
~/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.