From 6a3a812ce01568e5968beff0b9170e0cac7f8843 Mon Sep 17 00:00:00 2001 From: Sanad Liaquat Date: Fri, 28 Jun 2019 11:19:01 +0500 Subject: Use 'has_css?' because 'first' does not return boolean --- qa/qa/page/settings/common.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/qa/page/settings/common.rb b/qa/qa/page/settings/common.rb index 8cd0b6bb49c..bede3fde105 100644 --- a/qa/qa/page/settings/common.rb +++ b/qa/qa/page/settings/common.rb @@ -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 -- cgit v1.2.1