Use 'has_css?' because 'first' does not return boolean
This commit is contained in:
parent
ae68c7ea14
commit
6a3a812ce0
|
@ -11,7 +11,7 @@ module QA
|
|||
within_element(element_name) do
|
||||
# Because it is possible to click the button before the JS toggle code is bound
|
||||
wait(reload: false) do
|
||||
click_button 'Expand' unless first('button', text: 'Collapse')
|
||||
click_button 'Expand' unless has_css?('button', text: 'Collapse')
|
||||
|
||||
has_content?('Collapse')
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue