diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-02-09 18:24:39 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-02-09 18:24:39 +0800 |
commit | 4061d29108ac0358304d46ab39723ad805f29223 (patch) | |
tree | 2e5cdd8dcbdeddb506e58032171d7ae2bc735178 /qa | |
parent | 5f62a935c3522517bffb6f4e0f48271dd81a9f39 (diff) | |
parent | 7534f7a892d6e8c50475720e387b8689c94582da (diff) | |
download | gitlab-ce-4061d29108ac0358304d46ab39723ad805f29223.tar.gz |
Merge remote-tracking branch 'upstream/master' into qa-allow-setting-sandbox-group
* upstream/master: (27 commits)
Set initial password for instance in LDAP QA test
Backport EE changes to some hashed storage documentation to CE
Remove allow_n_plus_1 from Git::Repository#branches_filter
Bumps Gitlab Shell version to 6.0.3
Make resetting column information overridable in EE
Added 'clear' button to ci lint editor
Issues and merge requests in subgroups docs
Update docs labels CE
Refactored merge_requests/show path in dispatcher.js
wording
don't check against a hardcoded user name
10.5 Update the dependencies license list
10.5 Update the .gitignore, .gitlab-ci.yml, and Dockerfile templates
Create update guide for 10.5
Update 10.5 source install guide
Add docs for MR link in commit page
Add groups to OpenID Connect claims
Replaced $.get with axois.get
Memoize MergeRequest#rebase_in_progress? to prevent N+1 queries in Gitaly
[docs] Info rescheduling background migrations
...
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/main/login.rb | 25 | ||||
-rw-r--r-- | qa/qa/specs/features/api/users_spec.rb | 4 |
2 files changed, 18 insertions, 11 deletions
diff --git a/qa/qa/page/main/login.rb b/qa/qa/page/main/login.rb index 0d1ffd9694a..fd49b27cb1a 100644 --- a/qa/qa/page/main/login.rb +++ b/qa/qa/page/main/login.rb @@ -31,22 +31,29 @@ module QA end end + def set_initial_password_if_present + if page.has_content?('Change your password') + fill_in :user_password, with: Runtime::User.password + fill_in :user_password_confirmation, with: Runtime::User.password + click_button 'Change your password' + end + end + def sign_in_using_ldap_credentials - click_link 'LDAP' + using_wait_time 0 do + set_initial_password_if_present - fill_in :username, with: Runtime::User.name - fill_in :password, with: Runtime::User.password + click_link 'LDAP' - click_button 'Sign in' + fill_in :username, with: Runtime::User.name + fill_in :password, with: Runtime::User.password + click_button 'Sign in' + end end def sign_in_using_credentials using_wait_time 0 do - if page.has_content?('Change your password') - fill_in :user_password, with: Runtime::User.password - fill_in :user_password_confirmation, with: Runtime::User.password - click_button 'Change your password' - end + set_initial_password_if_present click_link 'Standard' if page.has_content?('LDAP') diff --git a/qa/qa/specs/features/api/users_spec.rb b/qa/qa/specs/features/api/users_spec.rb index 9d039590a0e..d4ff4ebbc9a 100644 --- a/qa/qa/specs/features/api/users_spec.rb +++ b/qa/qa/specs/features/api/users_spec.rb @@ -14,7 +14,7 @@ module QA end scenario 'submit request with a valid user name' do - get request.url, { params: { username: 'root' } } + get request.url, { params: { username: Runtime::User.name } } expect_status(200) expect(json_body).to be_an Array @@ -23,7 +23,7 @@ module QA end scenario 'submit request with an invalid user name' do - get request.url, { params: { username: 'invalid' } } + get request.url, { params: { username: SecureRandom.hex(10) } } expect_status(200) expect(json_body).to be_an Array |