summaryrefslogtreecommitdiff
path: root/qa/qa/specs/features
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-08-21 07:33:14 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-08-21 07:33:14 +0000
commitd5cd1c4aff0fc0022d8a57bb10e3bfa522202929 (patch)
tree129db0c3032e5ea39affdea85e118663366fd237 /qa/qa/specs/features
parent92cf7e8f2493ff68000a23e5b918de533828ff64 (diff)
parent98ba19b5f2c08a1c0a60be5f4137feeaa0b81f88 (diff)
downloadgitlab-ce-d5cd1c4aff0fc0022d8a57bb10e3bfa522202929.tar.gz
Merge branch 'qa-staging-2' into 'master'
[QA] Improve the fork scenario to take a username and password instead of always… Closes gitlab-org/quality/staging#2 See merge request gitlab-org/gitlab-ce!21090
Diffstat (limited to 'qa/qa/specs/features')
-rw-r--r--qa/qa/specs/features/api/basics_spec.rb2
-rw-r--r--qa/qa/specs/features/api/users_spec.rb4
-rw-r--r--qa/qa/specs/features/project/fork_project_spec.rb10
3 files changed, 7 insertions, 9 deletions
diff --git a/qa/qa/specs/features/api/basics_spec.rb b/qa/qa/specs/features/api/basics_spec.rb
index 7defb2ea93e..bc0b5ebfe10 100644
--- a/qa/qa/specs/features/api/basics_spec.rb
+++ b/qa/qa/specs/features/api/basics_spec.rb
@@ -7,7 +7,7 @@ module QA
end
let(:project_name) { "api-basics-#{SecureRandom.hex(8)}" }
- let(:sanitized_project_path) { CGI.escape("#{Runtime::User.name}/#{project_name}") }
+ let(:sanitized_project_path) { CGI.escape("#{Runtime::User.username}/#{project_name}") }
it 'user creates a project with a file and deletes them afterwards' do
create_project_request = Runtime::API::Request.new(@api_client, '/projects')
diff --git a/qa/qa/specs/features/api/users_spec.rb b/qa/qa/specs/features/api/users_spec.rb
index 2a9360734bb..3d25cca1e59 100644
--- a/qa/qa/specs/features/api/users_spec.rb
+++ b/qa/qa/specs/features/api/users_spec.rb
@@ -14,11 +14,11 @@ module QA
end
it 'submit request with a valid user name' do
- get request.url, { params: { username: Runtime::User.name } }
+ get request.url, { params: { username: Runtime::User.username } }
expect_status(200)
expect(json_body).to contain_exactly(
- a_hash_including(username: Runtime::User.name)
+ a_hash_including(username: Runtime::User.username)
)
end
diff --git a/qa/qa/specs/features/project/fork_project_spec.rb b/qa/qa/specs/features/project/fork_project_spec.rb
index d3534d736e4..280978bb950 100644
--- a/qa/qa/specs/features/project/fork_project_spec.rb
+++ b/qa/qa/specs/features/project/fork_project_spec.rb
@@ -8,14 +8,12 @@ module QA
merge_request.fork_branch = 'feature-branch'
end
- Page::Menu::Main.act { sign_out }
- Page::Main::Login.act do
- switch_to_sign_in_tab
- sign_in_using_credentials
- end
+ Page::Menu::Main.perform { |main| main.sign_out }
+ Page::Main::Login.perform { |login| login.sign_in_using_credentials }
merge_request.visit!
- Page::MergeRequest::Show.act { merge! }
+
+ Page::MergeRequest::Show.perform { |show| show.merge! }
expect(page).to have_content('The changes were merged')
end