From 5d5ba9fc7cf8f7bcfa0d91bd13390d3f3fc26a17 Mon Sep 17 00:00:00 2001 From: Walmyr Lima Date: Fri, 30 Aug 2019 12:29:06 +0200 Subject: Update page object with new element and method --- qa/qa/page/admin/menu.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'qa') diff --git a/qa/qa/page/admin/menu.rb b/qa/qa/page/admin/menu.rb index 7c214da8486..5a18ebd7af8 100644 --- a/qa/qa/page/admin/menu.rb +++ b/qa/qa/page/admin/menu.rb @@ -11,12 +11,21 @@ module QA element :admin_settings_repository_item element :admin_settings_general_item element :admin_settings_metrics_and_profiling_item + element :admin_settings_preferences_link end view 'app/views/layouts/nav/sidebar/_admin.html.haml' do element :integration_settings_link end + def go_to_preferences_settings + hover_settings do + within_submenu do + click_element :admin_settings_preferences_link + end + end + end + def go_to_repository_settings hover_settings do within_submenu do -- cgit v1.2.1 From 20b45b8ce1557282e00283d74604cbfc2121ee8d Mon Sep 17 00:00:00 2001 From: Walmyr Lima Date: Fri, 30 Aug 2019 12:30:20 +0200 Subject: Improve tests speed Before this change, by default the expand button would only be clicked after 10 seconds, but now it will only wait for 1 sec. --- qa/qa/page/settings/common.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qa') diff --git a/qa/qa/page/settings/common.rb b/qa/qa/page/settings/common.rb index bede3fde105..2d7b41c76e1 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 has_css?('button', text: 'Collapse') + click_button 'Expand' unless has_css?('button', text: 'Collapse', wait: 1) has_content?('Collapse') end -- cgit v1.2.1