Commit df1d9423 authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'add-missing-let-in-e2e-scenario' into 'master'

e2e: Add missing let that led to a project being created when loading the file

See merge request gitlab-org/gitlab!48899
parents fa2a4e0c d24ad831
...@@ -7,16 +7,18 @@ module QA ...@@ -7,16 +7,18 @@ module QA
# #
# git config --global receive.advertisepushoptions true # git config --global receive.advertisepushoptions true
branch = "push-options-test-#{SecureRandom.hex(8)}" let(:branch) { "push-options-test-#{SecureRandom.hex(8)}" }
title = "MR push options test #{SecureRandom.hex(8)}" let(:title) { "MR push options test #{SecureRandom.hex(8)}" }
commit_message = 'Add README.md' let(:commit_message) { 'Add README.md' }
project = Resource::Project.fabricate_via_api! do |project| let(:project) do
project.name = 'merge-request-push-options' Resource::Project.fabricate_via_api! do |project|
project.initialize_with_readme = true project.name = 'merge-request-push-options'
project.initialize_with_readme = true
end
end end
it 'sets labels', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1032' do def create_new_mr_via_push
Resource::Repository::ProjectPush.fabricate! do |push| Resource::Repository::ProjectPush.fabricate! do |push|
push.project = project push.project = project
push.commit_message = commit_message push.commit_message = commit_message
...@@ -27,6 +29,10 @@ module QA ...@@ -27,6 +29,10 @@ module QA
label: %w[one two three] label: %w[one two three]
} }
end end
end
it 'sets labels', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1032' do
create_new_mr_via_push
merge_request = project.merge_request_with_title(title) merge_request = project.merge_request_with_title(title)
...@@ -35,7 +41,11 @@ module QA ...@@ -35,7 +41,11 @@ module QA
end end
context 'when labels are set already' do context 'when labels are set already' do
it 'removes them', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1033' do before do
create_new_mr_via_push
end
it 'removes them on subsequent push', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1033' do
Resource::Repository::ProjectPush.fabricate! do |push| Resource::Repository::ProjectPush.fabricate! do |push|
push.project = project push.project = project
push.file_content = "Unlabel test #{SecureRandom.hex(8)}" push.file_content = "Unlabel test #{SecureRandom.hex(8)}"
......
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