Use 'has_css?' because 'first' does not return boolean

This commit is contained in:
Sanad Liaquat 2019-06-28 11:19:01 +05:00
parent ae68c7ea14
commit 6a3a812ce0
1 changed files with 1 additions and 1 deletions

View File

@ -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