Skip to content

Commit

Permalink
Filter section status: Add cucumber feature
Browse files Browse the repository at this point in the history
  • Loading branch information
csutter committed Oct 4, 2024
1 parent 515a5f2 commit 39ced7d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions features/all_content_finder.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Feature: All content finder ("site search")
And I enter "13/12/1989" for "Updated before"
And I apply the filters
Then I can see filtered results
And the filter panel shows status text for each section
Scenario: Changing the sort order of a search
When I search all content for "dark gray all alone"
Expand Down
10 changes: 10 additions & 0 deletions features/step_definitions/site_search_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@
expect(page).to have_link("Loving him was red")
end

Then("the filter panel shows status text for each section") do
click_on "Filter and sort"

within(".app-c-filter-panel") do
expect(page).to have_selector("summary", text: "Filter by Topic 2 selected", normalize_ws: true)
expect(page).to have_selector("summary", text: "Filter by Type 2 selected", normalize_ws: true)
expect(page).to have_selector("summary", text: "Filter by Updated 2 selected", normalize_ws: true)
end
end

Then("the filter panel is open by default") do
expect(page).to have_selector("button[aria-expanded='true']", text: "Filter and sort")
end
Expand Down

0 comments on commit 39ced7d

Please sign in to comment.