summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2018-01-16 12:57:10 +0100
committerBrett Walker <bwalker@gitlab.com>2018-01-22 17:25:11 +0100
commitffa2230e9a298705e06f822fdaa1b9e2cc0bb2a8 (patch)
tree121a638f32c1c356363e39c9467373b2c45d33ba
parent5ed55d47b6a5740b05a7545dd37c2bfc9ed78033 (diff)
downloadgitlab-ce-ffa2230e9a298705e06f822fdaa1b9e2cc0bb2a8.tar.gz
implemented new view/selectors
-rw-r--r--qa/qa/page/README.md12
-rw-r--r--qa/qa/page/menu/profile.rb6
-rw-r--r--qa/qa/page/profile/personal_access_tokens.rb10
3 files changed, 27 insertions, 1 deletions
diff --git a/qa/qa/page/README.md b/qa/qa/page/README.md
index f72fbfeafca..83710606d7c 100644
--- a/qa/qa/page/README.md
+++ b/qa/qa/page/README.md
@@ -77,7 +77,7 @@ module Page
view 'app/views/devise/sessions/_new_base.html.haml' do
element :login_field, 'text_field :login'
- element :passowrd_field, 'password_field :password'
+ element :password_field, 'password_field :password'
element :sign_in_button, 'submit "Sign in"'
end
@@ -103,6 +103,16 @@ view 'app/views/my/view.html.haml' do
end
```
+## Running the test locally
+
+During development, you can run the `qa:selectors` test by running
+
+```shell
+bin/qa Test::Sanity::Selectors
+```
+
+from within the `qa` directory.
+
## Where to ask for help?
If you need more information, ask for help on `#qa` channel on Slack (GitLab
diff --git a/qa/qa/page/menu/profile.rb b/qa/qa/page/menu/profile.rb
index ce72d473ac7..95e88d863e4 100644
--- a/qa/qa/page/menu/profile.rb
+++ b/qa/qa/page/menu/profile.rb
@@ -2,6 +2,12 @@ module QA
module Page
module Menu
class Profile < 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'
+ end
+
def click_access_tokens
within_sidebar do
click_link('Access Tokens')
diff --git a/qa/qa/page/profile/personal_access_tokens.rb b/qa/qa/page/profile/personal_access_tokens.rb
index ac43b356d70..0b55e0895b4 100644
--- a/qa/qa/page/profile/personal_access_tokens.rb
+++ b/qa/qa/page/profile/personal_access_tokens.rb
@@ -2,6 +2,16 @@ module QA
module Page
module Profile
class PersonalAccessTokens < Page::Base
+ view 'app/views/shared/_personal_access_tokens_form.html.haml' do
+ element :personal_access_token_name_field, 'text_field :name'
+ element :create_token_button, 'submit "Create #{type} token"'
+ element :scopes_api_radios, "label :scopes"
+ end
+
+ view 'app/views/profiles/personal_access_tokens/index.html.haml' do
+ element :create_token_field, "text_field_tag 'created-personal-access-token'"
+ end
+
def fill_token_name(name)
fill_in 'personal_access_token_name', with: name
end