Commit 7cf4dfe2 authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'minor-improvements-on-create-e2e-tests' into 'master'

Minor improvements on e2e tests from the DevOps Create stage

See merge request gitlab-org/gitlab!25902
parents 09233b18 0c8dba90
......@@ -6,7 +6,7 @@ module QA
it 'user rebases source branch of merge request' do
Flow::Login.sign_in
project = Resource::Project.fabricate! do |project|
project = Resource::Project.fabricate_via_api! do |project|
project.name = "only-fast-forward"
end
project.visit!
......
......@@ -6,7 +6,7 @@ module QA
it 'user squashes commits while merging' do
Flow::Login.sign_in
project = Resource::Project.fabricate! do |project|
project = Resource::Project.fabricate_via_api! do |project|
project.name = "squash-before-merge"
end
......
......@@ -18,7 +18,7 @@ module QA
before do
Flow::Login.sign_in
project = Resource::Project.fabricate! do |proj|
project = Resource::Project.fabricate_via_api! do |proj|
proj.name = 'project-qa-test'
proj.description = 'project for qa test'
end
......
......@@ -8,7 +8,7 @@ module QA
Flow::Login.sign_in
# Create a project to push to
project = Resource::Project.fabricate! do |project|
project = Resource::Project.fabricate_via_api! do |project|
project.name = 'git-protocol-project'
end
......
......@@ -34,7 +34,7 @@ module QA
it 'user pushes to the repository' do
# Create a project to push to
project = Resource::Project.fabricate! do |project|
project = Resource::Project.fabricate_via_api! do |project|
project.name = 'git-protocol-project'
end
......
......@@ -7,7 +7,7 @@ module QA
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
target_project = Resource::Project.fabricate! do |project|
target_project = Resource::Project.fabricate_via_api! do |project|
project.name = 'push-mirror-target-project'
end
target_project_uri = target_project.repository_http_location.uri
......
......@@ -6,12 +6,11 @@ module QA
it 'user pushes code to the repository' do
Flow::Login.sign_in
project_push = Resource::Repository::ProjectPush.fabricate! do |push|
Resource::Repository::ProjectPush.fabricate! do |push|
push.file_name = 'README.md'
push.file_content = '# This is a test project'
push.commit_message = 'Add README.md'
end
project_push.project.visit!
end.project.visit!
expect(page).to have_content('README.md')
expect(page).to have_content('This is a test project')
......
......@@ -6,7 +6,7 @@ module QA
let(:branch_name) { 'protected-branch' }
let(:commit_message) { 'Protected push commit message' }
let(:project) do
Resource::Project.fabricate! do |resource|
Resource::Project.fabricate_via_api! do |resource|
resource.name = 'protected-branch-project'
resource.initialize_with_readme = true
end
......
......@@ -15,14 +15,12 @@ module QA
resource.title = key_title
end
project_push = Resource::Repository::ProjectPush.fabricate! do |push|
Resource::Repository::ProjectPush.fabricate! do |push|
push.ssh_key = key
push.file_name = 'README.md'
push.file_content = '# Test Use SSH Key'
push.commit_message = 'Add README.md'
end
project_push.project.visit!
end.project.visit!
expect(page).to have_content('README.md')
expect(page).to have_content('Test Use SSH Key')
......
......@@ -6,7 +6,7 @@ module QA
it 'user creates, edits, clones, and pushes to the wiki' do
Flow::Login.sign_in
wiki = Resource::Wiki.fabricate! do |resource|
wiki = Resource::Wiki.fabricate_via_browser_ui! do |resource|
resource.title = 'Home'
resource.content = '# My First Wiki Content'
resource.message = 'Update home'
......
......@@ -23,7 +23,7 @@ module QA
@user = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1)
@user2 = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_2, Runtime::Env.gitlab_qa_password_2)
@project = Resource::Project.fabricate! do |project|
@project = Resource::Project.fabricate_via_api! do |project|
project.name = "codeowners"
end
@project.visit!
......
......@@ -35,7 +35,7 @@ module QA
context 'when only one user is allowed to merge and push to a protected branch' do
let(:project) do
Resource::Project.fabricate! do |resource|
Resource::Project.fabricate_via_api! do |resource|
resource.name = 'user-with-access-to-protected-branch'
resource.initialize_with_readme = true
end
......@@ -69,7 +69,7 @@ module QA
end
end
let(:project) do
Resource::Project.fabricate! do |resource|
Resource::Project.fabricate_via_api! do |resource|
resource.name = 'group-with-access-to-protected-branch'
resource.initialize_with_readme = true
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment