Commit 305260df authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'qa/e2e-test-custom-email' into 'master'

Update views for testability and update page objects

See merge request gitlab-org/gitlab-ce!32451
parents 71008250 20b45b8c
...@@ -25,4 +25,4 @@ ...@@ -25,4 +25,4 @@
= render_if_exists 'admin/application_settings/email_additional_text_setting', form: f = 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' }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- page_title _("Preferences") - page_title _("Preferences")
- @content_class = "limit-container-width" unless fluid_layout - @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 .settings-header
%h4 %h4
= _('Email') = _('Email')
......
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
%span %span
= _('Geo') = _('Geo')
= nav_link(path: 'application_settings#preferences') do = 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 %span
= _('Preferences') = _('Preferences')
......
...@@ -11,12 +11,21 @@ module QA ...@@ -11,12 +11,21 @@ module QA
element :admin_settings_repository_item element :admin_settings_repository_item
element :admin_settings_general_item element :admin_settings_general_item
element :admin_settings_metrics_and_profiling_item element :admin_settings_metrics_and_profiling_item
element :admin_settings_preferences_link
end end
view 'app/views/layouts/nav/sidebar/_admin.html.haml' do view 'app/views/layouts/nav/sidebar/_admin.html.haml' do
element :integration_settings_link element :integration_settings_link
end 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 def go_to_repository_settings
hover_settings do hover_settings do
within_submenu do within_submenu do
......
...@@ -11,7 +11,7 @@ module QA ...@@ -11,7 +11,7 @@ module QA
within_element(element_name) do within_element(element_name) do
# Because it is possible to click the button before the JS toggle code is bound # Because it is possible to click the button before the JS toggle code is bound
wait(reload: false) do 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') has_content?('Collapse')
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment