Commit f2625a5d authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'qa-separate-create-issue-template-e2e-spec' into 'master'

Update create issue e2e specs

See merge request gitlab-org/gitlab!52841
parents 77d8be2b 9aedd25b
# frozen_string_literal: true
module QA
RSpec.describe 'Plan' do
RSpec.describe 'Plan', :smoke do
describe 'Issue creation' do
let(:closed_issue) { Resource::Issue.fabricate_via_api! }
......@@ -9,7 +9,7 @@ module QA
Flow::Login.sign_in
end
it 'creates an issue', :smoke, :reliable, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1167' do
it 'creates an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1167' do
issue = Resource::Issue.fabricate_via_browser_ui!
Page::Project::Menu.perform(&:click_issues)
......@@ -19,7 +19,7 @@ module QA
end
end
it 'closes an issue', :smoke, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1085' do
it 'closes an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1085' do
closed_issue.visit!
Page::Project::Issue::Show.perform do |issue_page|
......@@ -38,7 +38,7 @@ module QA
end
end
context 'when using attachments in comments', :smoke, :object_storage do
context 'when using attachments in comments', :object_storage do
let(:gif_file_name) { 'banana_sample.gif' }
let(:file_to_attach) do
File.absolute_path(File.join('qa', 'fixtures', 'designs', gif_file_name))
......@@ -56,42 +56,6 @@ module QA
end
end
end
context 'when using custom issue templates' do
let(:template_name) { 'custom_issue_template'}
let(:template_content) { 'This is a custom issue template test' }
let(:template_project) do
Resource::Project.fabricate_via_api! do |project|
project.name = "custom-issue-template-project-#{SecureRandom.hex(8)}"
project.initialize_with_readme = true
end
end
before do
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = template_project
commit.commit_message = 'Add custom issue template'
commit.add_files([
{
file_path: ".gitlab/issue_templates/#{template_name}.md",
content: template_content
}
])
end
end
it 'creates an issue via custom template', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1229' do
Resource::Issue.fabricate_via_browser_ui! do |issue|
issue.project = template_project
issue.template = template_name
end
Page::Project::Issue::Show.perform do |issue_page|
expect(issue_page).to have_content(template_content)
end
end
end
end
end
end
# frozen_string_literal: true
module QA
RSpec.describe 'Plan' do
describe 'Custom issue templates' do
let(:template_name) { 'custom_issue_template'}
let(:template_content) { 'This is a custom issue template test' }
let(:template_project) do
Resource::Project.fabricate_via_api! do |project|
project.name = "custom-issue-template-project"
project.initialize_with_readme = true
end
end
before do
Flow::Login.sign_in
Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = template_project
commit.commit_message = 'Add custom issue template'
commit.add_files([
{
file_path: ".gitlab/issue_templates/#{template_name}.md",
content: template_content
}
])
end
end
it 'creates an issue via custom template', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1229' do
Resource::Issue.fabricate_via_browser_ui! do |issue|
issue.project = template_project
issue.template = template_name
end
Page::Project::Issue::Show.perform do |issue_page|
expect(issue_page).to have_content(template_content)
end
end
end
end
end
......@@ -5,7 +5,7 @@ module QA
describe 'Default issue templates' do
let(:default_template_project) do
Resource::Project.fabricate_via_api! do |project|
project.name = "default-issue-template-project-#{SecureRandom.hex(8)}"
project.name = "default-issue-template-project"
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