From 5fd55b287f6623eddde55dfc99e3f872364ca31e Mon Sep 17 00:00:00 2001 From: "G. Torres" Date: Fri, 18 Oct 2024 16:54:36 -0400 Subject: [PATCH] Adds specs to test Select All checkbox --- spec/features/stories_manage_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spec/features/stories_manage_spec.rb b/spec/features/stories_manage_spec.rb index 5048201f..590d8866 100644 --- a/spec/features/stories_manage_spec.rb +++ b/spec/features/stories_manage_spec.rb @@ -68,6 +68,21 @@ expect(page).to have_content "Story updated!" end + it "allows me to select all stories" do + visit project_path(id: project.id) + check("Select All") + + expect(page).to have_checked_field(name: "stories[]") + end + + it "allows me to unselect all stories" do + visit project_path(id: project.id) + check("Select All") + uncheck("Select All") + + expect(page).to have_unchecked_field(name: "stories[]") + end + it "allows me to delete a story" do visit project_path(id: project.id)