Skip to content

Commit 6cce54f

Browse files
Fix tests (#89)
* Fix dropdown menu step definition * Fix ambiguous match
1 parent 207ae21 commit 6cce54f

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

staff_features/digital_objects/step_definitions/digital_object_component_reorder.rb

-4
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@
8282
wait_for_ajax
8383
end
8484

85-
Then 'the button has text {string}' do |text|
86-
expect(page).to have_text text
87-
end
88-
8985
Then 'the second Digital Object Component is pasted as a child of the Digital Object Component' do
9086
expect(page).to have_css "#digital_object_component_#{@digital_object_component_first_id}.indent-level-1"
9187
expect(page).to have_css "#digital_object_component_#{@digital_object_component_second_id}.indent-level-2"

staff_features/shared/step_definitions.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@
7979
end
8080

8181
When 'the user clicks on {string} in the dropdown menu' do |string|
82-
dropdown_menus = all('.dropdown-menu')
82+
dropdown_menu = find('.dropdown-menu', match: :first)
8383

84-
within dropdown_menus.first do
84+
within dropdown_menu do
8585
elements = dropdown_menu.all(:xpath, ".//*[contains(text(), '#{string}')]")
8686

8787
elements.each do |element|

0 commit comments

Comments
 (0)