diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-11-19 16:51:15 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-11-19 16:51:15 +0000 |
commit | d5f08596305a7643d884e57ffc0375c6a5a7dbcb (patch) | |
tree | 171de8b71a038a76a91b73fd5fc8d1b38faa7bb8 /spec/support | |
parent | b7c3efaa3569dabb842d2adb2c97910d3cc639a0 (diff) | |
parent | 02326fa4b128c6272cc5c802cf5145f0fa6f6cc2 (diff) | |
download | gitlab-ce-d5f08596305a7643d884e57ffc0375c6a5a7dbcb.tar.gz |
Merge branch 'if-ee-726-smartcard_auth-ce_port' into 'master'
Backport of ee/8120: Smartcard authentication
See merge request gitlab-org/gitlab-ce!23012
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/helpers/user_login_helper.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/support/helpers/user_login_helper.rb b/spec/support/helpers/user_login_helper.rb new file mode 100644 index 00000000000..36c002f53af --- /dev/null +++ b/spec/support/helpers/user_login_helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +module UserLoginHelper + def ensure_tab_pane_correctness(visit_path = true) + if visit_path + visit new_user_session_path + end + + ensure_tab_pane_counts + ensure_one_active_tab + ensure_one_active_pane + end + + def ensure_tab_pane_counts + tabs_count = page.all('[role="tab"]').size + expect(page).to have_selector('[role="tabpanel"]', count: tabs_count) + end + + def ensure_one_active_tab + expect(page).to have_selector('ul.new-session-tabs > li > a.active', count: 1) + end + + def ensure_one_active_pane + expect(page).to have_selector('.tab-pane.active', count: 1) + end +end |