summaryrefslogtreecommitdiff
path: root/qa/qa/page/profile
diff options
context:
space:
mode:
authorsliaquat <sliaquat@gitlab.com>2018-10-04 19:46:57 +0500
committersliaquat <sliaquat@gitlab.com>2018-10-09 16:24:29 +0500
commitb7a5b204ba4f8afc4fc627660c035d253dcd4d79 (patch)
tree73fff937b5f434a748d078d389d0e97ed03cc3ab /qa/qa/page/profile
parent867b4f066f362edde126cf8c0132430c3946f2cc (diff)
downloadgitlab-ce-b7a5b204ba4f8afc4fc627660c035d253dcd4d79.tar.gz
Add missed files Use correct method Implement review feedback Add missing frozen_string_literal Squash 5 commits
Diffstat (limited to 'qa/qa/page/profile')
-rw-r--r--qa/qa/page/profile/menu.rb36
1 files changed, 36 insertions, 0 deletions
diff --git a/qa/qa/page/profile/menu.rb b/qa/qa/page/profile/menu.rb
new file mode 100644
index 00000000000..f8a7d64e016
--- /dev/null
+++ b/qa/qa/page/profile/menu.rb
@@ -0,0 +1,36 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Profile
+ class Menu < Page::Base
+ view 'app/views/layouts/nav/sidebar/_profile.html.haml' do
+ element :access_token_link, 'link_to profile_personal_access_tokens_path'
+ element :access_token_title, 'Access Tokens'
+ element :top_level_items, '.sidebar-top-level-items'
+ element :ssh_keys, 'SSH Keys'
+ end
+
+ def click_access_tokens
+ within_sidebar do
+ click_link('Access Tokens')
+ end
+ end
+
+ def click_ssh_keys
+ within_sidebar do
+ click_link('SSH Keys')
+ end
+ end
+
+ private
+
+ def within_sidebar
+ page.within('.sidebar-top-level-items') do
+ yield
+ end
+ end
+ end
+ end
+ end
+end