Skip to content

Commit

Permalink
Fix step definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
blacksmith-welder committed Feb 24, 2025
1 parent 52460e3 commit 29b882f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion staff_features/shared/step_definitions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
elements = dropdown_menu.all(:xpath, ".//*[contains(text(), '#{string}')]")

elements.each do |element|
if (element.tag_name == 'button' || element.tag_name == 'a') && element.text == string
if (element.tag_name == 'button' || element.tag_name == 'a' || element.tag_name == 'span') && element.text == string
element.click
break
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,3 +295,13 @@
expect(page).to have_text 'Record Not Found'
expect(page).to have_text "The record you've tried to access may no longer exist or you may not have permission to view it."
end

Then 'the two Top Containers are deleted' do
visit "#{STAFF_URL}/top_containers/#{@top_container_first_id}/edit"
expect(page).to have_text 'Record Not Found'
expect(page).to have_text "The record you've tried to access may no longer exist or you may not have permission to view it."

visit "#{STAFF_URL}/top_containers/#{@top_container_second_id}/edit"
expect(page).to have_text 'Record Not Found'
expect(page).to have_text "The record you've tried to access may no longer exist or you may not have permission to view it."
end
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ Feature: Top Containers Bulk Operations
And the user clicks on 'Delete Top Containers' in the dropdown menu
And the user clicks on 'Delete 2 records' in the modal
Then the 'Top Containers' deleted message is displayed
And the Top Containers A&B are deleted
And the two Top Containers are deleted

0 comments on commit 29b882f

Please sign in to comment.