summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2019-09-02 11:32:09 +0000
committerRémy Coutable <remy@rymai.me>2019-09-02 11:32:09 +0000
commit305260df0606c2bacbc2aae54a1dc412ec14fe39 (patch)
treef3cf46bf6799fbece1883f621e738944f90ee9a9
parent71008250b2fe63291f22b212bd196fb29ef0c177 (diff)
parent20b45b8ce1557282e00283d74604cbfc2121ee8d (diff)
downloadgitlab-ce-305260df0606c2bacbc2aae54a1dc412ec14fe39.tar.gz
Merge branch 'qa/e2e-test-custom-email' into 'master'66360-zoom-for-incident-management-integration
Update views for testability and update page objects See merge request gitlab-org/gitlab-ce!32451
-rw-r--r--app/views/admin/application_settings/_email.html.haml2
-rw-r--r--app/views/admin/application_settings/preferences.html.haml2
-rw-r--r--app/views/layouts/nav/sidebar/_admin.html.haml2
-rw-r--r--qa/qa/page/admin/menu.rb9
-rw-r--r--qa/qa/page/settings/common.rb2
5 files changed, 13 insertions, 4 deletions
diff --git a/app/views/admin/application_settings/_email.html.haml b/app/views/admin/application_settings/_email.html.haml
index bd60ff0b99c..3dd72909805 100644
--- a/app/views/admin/application_settings/_email.html.haml
+++ b/app/views/admin/application_settings/_email.html.haml
@@ -25,4 +25,4 @@
= render_if_exists 'admin/application_settings/email_additional_text_setting', form: f
- = f.submit _('Save changes'), class: "btn btn-success"
+ = f.submit _('Save changes'), class: "btn btn-success", data: { qa_selector: 'save_changes_button' }
diff --git a/app/views/admin/application_settings/preferences.html.haml b/app/views/admin/application_settings/preferences.html.haml
index c468d69d7b8..0ad76e56d0b 100644
--- a/app/views/admin/application_settings/preferences.html.haml
+++ b/app/views/admin/application_settings/preferences.html.haml
@@ -2,7 +2,7 @@
- page_title _("Preferences")
- @content_class = "limit-container-width" unless fluid_layout
-%section.settings.as-email.no-animate#js-email-settings{ class: ('expanded' if expanded_by_default?) }
+%section.settings.as-email.no-animate#js-email-settings{ class: ('expanded' if expanded_by_default?), data: { qa_selector: 'email_section' } }
.settings-header
%h4
= _('Email')
diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml
index 9e92ced9f89..f76268bc29b 100644
--- a/app/views/layouts/nav/sidebar/_admin.html.haml
+++ b/app/views/layouts/nav/sidebar/_admin.html.haml
@@ -270,7 +270,7 @@
%span
= _('Geo')
= nav_link(path: 'application_settings#preferences') do
- = link_to preferences_admin_application_settings_path, title: _('Preferences') do
+ = link_to preferences_admin_application_settings_path, title: _('Preferences'), data: { qa_selector: 'admin_settings_preferences_link' } do
%span
= _('Preferences')
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
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