Roll 2After deploy
#9 Routing
Held in productionThe following routes should be implemented: `#/` (all - default), `#/active` and `#/completed` (`#!/` is also allowed).
Held. 18 steps, all as written.
- Open /index.html
- Type “Alpha task” into the “What needs to be done?” textbox
- Press Enter
- Type “Beta task” into the “What needs to be done?” textbox
- Press Enter
- Complete the first todo
- .todo-list shows “Alpha task”
- Open the Active route
- Address contains “#/active”
- .todo-list shows “Beta task”
- .todo-list doesn't show “Alpha task”
- Open the Completed route
- Address contains “#/completed”
- .todo-list shows “Alpha task”
- .todo-list doesn't show “Beta task”
- Open the All route
- .todo-list shows “Alpha task”
- .todo-list shows “Beta task”
When the route changes, the todo list should be filtered on a model level and the `selected` class on the filter links should be toggled.
Held. 16 steps, all as written.
- Open /index.html
- Type “Delta task” into the “What needs to be done?” textbox
- Press Enter
- Type “Echo task” into the “What needs to be done?” textbox
- Press Enter
- Complete the first todo
- .filters a.selected shows “All”
- Click the “Active” link
- .filters a.selected shows “Active”
- .filters a.selected doesn't show “All”
- .todo-list doesn't show “Delta task”
- Click the “Completed” link
- .filters a.selected shows “Completed”
- .filters a.selected doesn't show “Active”
- .todo-list shows “Delta task”
- .todo-list doesn't show “Echo task”
When an item is updated while in a filtered state, it should be updated accordingly. E.g. if the filter is `Active` and the item is checked, it should be hidden.
Held. 12 steps, all as written.
- Open /index.html
- Type “Gamma task” into the “What needs to be done?” textbox
- Press Enter
- Switch to the Active filter
- .todo-list shows “Gamma task”
- Check the item while the Active filter is on
- .todo-list li is not shown
- .todo-list doesn't show “Gamma task”
- Switch to the Completed filter
- .todo-list shows “Gamma task”
- Uncheck the item while the Completed filter is on
- .todo-list li is not shown
Make sure the active filter is persisted on reload.
Held. 12 steps, all as written.
- Open /index.html
- Type “Zeta task” into the “What needs to be done?” textbox
- Press Enter
- Type “Eta task” into the “What needs to be done?” textbox
- Press Enter
- Complete the first todo
- Pick the Active filter
- Address contains “#/active”
- Reload on the Active route (no reload step exists, so the page is opened again with a throwaway query)
- .filters a.selected shows “Active”
- .todo-list shows “Eta task”
- .todo-list doesn't show “Zeta task”