summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2018-01-18 10:34:44 +0100
committerBrett Walker <bwalker@gitlab.com>2018-01-22 17:25:11 +0100
commitd82901338cf390f9c9776010cc75b16457230c8c (patch)
tree00daf771a84ca8d610f86e6642e7e19e0793ec73
parenta98720034664c60ba6e5e41491fabf06fb622a2c (diff)
downloadgitlab-ce-d82901338cf390f9c9776010cc75b16457230c8c.tar.gz
add element check for Settings and reword scenario description
-rw-r--r--qa/qa/page/menu/main.rb1
-rw-r--r--qa/qa/specs/features/api/users_spec.rb8
2 files changed, 6 insertions, 3 deletions
diff --git a/qa/qa/page/menu/main.rb b/qa/qa/page/menu/main.rb
index f8184dcb9e1..df93a5fa2d2 100644
--- a/qa/qa/page/menu/main.rb
+++ b/qa/qa/page/menu/main.rb
@@ -7,6 +7,7 @@ module QA
element :user_avatar
element :user_menu, '.dropdown-menu-nav'
element :user_sign_out_link, 'link_to "Sign out"'
+ element :settings_link, 'link_to "Settings"'
end
view 'app/views/layouts/nav/_dashboard.html.haml' do
diff --git a/qa/qa/specs/features/api/users_spec.rb b/qa/qa/specs/features/api/users_spec.rb
index 813aaf90cf2..a7f9d559558 100644
--- a/qa/qa/specs/features/api/users_spec.rb
+++ b/qa/qa/specs/features/api/users_spec.rb
@@ -3,10 +3,12 @@ module QA
include Support::ApiHelpers
before(:context) do
+ Runtime::Browser.visit(:gitlab, Page::Main::Login)
+ Page::Main::Login.act { sign_in_using_credentials }
@access_token = Factory::Resource::PersonalAccessToken.fabricate!.access_token
end
- context "when authenticated" do
+ context 'when authenticated' do
let(:session) { Runtime::Session.new(:gitlab, api('/users', personal_access_token: @access_token)) }
scenario 'get list of users' do
@@ -14,7 +16,7 @@ module QA
expect_status(200)
end
- scenario 'returns an empty response when an invalid `username` parameter is passed' do
+ scenario 'submit request with an invalid user name' do
get session.address, { params: { username: 'invalid' } }
expect_status(200)
expect(json_body).to be_an Array
@@ -22,7 +24,7 @@ module QA
end
end
- scenario "returns authorization error when token is invalid" do
+ scenario 'submit request with an invalid token' do
session = Runtime::Session.new(:gitlab, api('/users', personal_access_token: 'invalid'))
get session.address