Skip to content

test: add e2e tests for todo CRUD, filtering, and persistence#27

Open
kashish2508 wants to merge 1 commit into
feature/todo-persistence-filterfrom
scout/add-tests-1779142200401
Open

test: add e2e tests for todo CRUD, filtering, and persistence#27
kashish2508 wants to merge 1 commit into
feature/todo-persistence-filterfrom
scout/add-tests-1779142200401

Conversation

@kashish2508

Copy link
Copy Markdown
Member

Adds Playwright end-to-end tests for the todo CRUD, filtering, and localStorage persistence features introduced in feature/todo-persistence-filter.

1. Todo CRUD — tests/todo-crud.spec.ts

  • Gap identified: The new todo section (add, toggle, delete) had zero test coverage.
  • User behavior: A user adds a new task via the input form, toggles it complete/incomplete via checkbox, deletes it, and sees the items-left counter update correctly at each step.

2. Todo Filtering & Clear Completed — tests/todo-filter.spec.ts

  • Gap identified: The All/Active/Completed filter buttons, "Clear completed" action, and empty state messages had no tests.
  • User behavior: A user switches between filter views to see only active or completed todos, clears all completed todos in bulk (verifying the button disables when none remain), and sees contextual empty-state messages when a filter yields no results.

3. Todo Persistence — tests/todo-persistence.spec.ts

  • Gap identified: localStorage-based persistence of todos across page reloads was untested.
  • User behavior: A user adds and toggles todos, reloads the page, and confirms all changes survived the reload. After deleting a todo and reloading again, the deletion is confirmed persistent.

Test files

  • tests/todo-crud.spec.ts (new)
  • tests/todo-filter.spec.ts (new)
  • tests/todo-persistence.spec.ts (new)
  • tests/specs/test-plan.md (new)

Generated by App Testing Agent Scout

Add Playwright tests covering the new todo features introduced in the
feature/todo-persistence-filter branch:

- Todo CRUD: add, toggle, and delete todos with count validation
- Todo filtering: All/Active/Completed filters with aria-pressed state
- Clear completed: bulk removal with disabled-state guard
- Empty state messages: context-sensitive messages per filter
- Persistence: localStorage round-trip across page reloads

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants