Commit 1eca7b27 authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'sl-qa-staging-63-spam-issue-fix-ee' into 'master'

Fix spam in issue creation by making project private

Closes gitlab-org/quality/staging#63

See merge request gitlab-org/gitlab-ee!14773
parents ea318518 31b3d0ac
......@@ -60,7 +60,7 @@ module QA
end
def set_visibility(visibility)
choose visibility
choose visibility.capitalize
end
def click_github_link
......
......@@ -8,6 +8,7 @@ module QA
include Events::Project
attr_writer :initialize_with_readme
attr_writer :visibility
attribute :id
attribute :name
......@@ -44,6 +45,7 @@ module QA
@standalone = false
@description = 'My awesome project'
@initialize_with_readme = false
@visibility = 'public'
end
def name=(raw_name)
......@@ -60,7 +62,7 @@ module QA
page.choose_test_namespace
page.choose_name(@name)
page.add_description(@description)
page.set_visibility('Public')
page.set_visibility(@visibility)
page.enable_initialize_with_readme if @initialize_with_readme
page.create_new_project
end
......@@ -88,7 +90,7 @@ module QA
post_body = {
name: name,
description: description,
visibility: 'public',
visibility: @visibility,
initialize_with_readme: @initialize_with_readme
}
......
......@@ -96,7 +96,14 @@ module QA
end
def create_issue_resource
project = Resource::Project.fabricate_via_api! do |project|
project.name = 'project-for-issues'
project.description = 'project for adding issues'
project.visibility = 'private'
end
Resource::Issue.fabricate_via_api! do |issue|
issue.project = project
issue.title = 'Issue created via API'
end
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