Show completed task feature (#5)

This PR contains the work done to add support for showing or hiding completed todo tasks to the *Task list* view.

Reviewed-on: rock-n-code/todos-app#5
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #5.
This commit is contained in:
2026-02-11 13:00:46 +00:00
committed by javier
parent 2a3323b8e6
commit cbf33302dd
9 changed files with 457 additions and 63 deletions
@@ -9,6 +9,25 @@ struct TodoGroupTests {
// MARK: Computed tests
@Test(
"canShowCompleted returns correct values",
arguments: zip(
TodoGroup.allCases,
[true, true, true, false]
)
)
func canShowCompleted(
for group: TodoGroup,
expects expectation: Bool
) {
// GIVEN
// WHEN
let canShowCompleted = group.canShowCompleted
// THEN
#expect(canShowCompleted == expectation)
}
@Test(
"group color match expected values",
arguments: zip(