Commit 4405495a authored by Will Meek's avatar Will Meek

Fix vulnerability_management_spec test

This commit will fix and unquarantine
vulnerability_management_spec
There are 2 issues with the spec fixed
Firstly, the commit and MR
logic has been updated.
Secondly, add a fill_options
so that capybara does not lose
focus of the model textarea
parent 49cfd3aa
......@@ -144,7 +144,7 @@ module QA
expand_vulnerability_report
click_vulnerability(name)
click_element :dismiss_with_comment_button
find_element(:dismiss_comment_field).fill_in with: reason
find_element(:dismiss_comment_field).fill_in with: reason, fill_options: { automatic_label_click: true }
click_element :add_and_dismiss_button
wait_until(reload: false) do
......
......@@ -3,7 +3,7 @@
require 'pathname'
module QA
RSpec.describe 'Secure', :docker, :runner, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/219519', type: :investigating } do
RSpec.describe 'Secure', :docker, :runner do
describe 'Security Reports in a Merge Request' do
let(:sast_vuln_count) { 5 }
let(:dependency_scan_vuln_count) { 4 }
......@@ -23,6 +23,8 @@ module QA
@project = Resource::Project.fabricate_via_api! do |p|
p.name = Runtime::Env.auto_devops_project_name || 'project-with-secure'
p.description = 'Project with Secure'
p.auto_devops_enabled = false
p.initialize_with_readme = true
end
@runner = Resource::Runner.fabricate! do |runner|
......@@ -31,16 +33,14 @@ module QA
runner.tags = %w[qa test]
end
commit_message = 'Add premade security reports'
@commit = Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = @project
commit.commit_message = commit_message
commit.branch = 'secure-mr'
commit.add_directory(
Pathname.new(__dir__).join('../../../../../ee/fixtures/secure_premade_reports')
)
@source = Resource::Repository::ProjectPush.fabricate! do |push|
push.project = @project
push.directory = Pathname
.new(__dir__)
.join('../../../../../ee/fixtures/secure_premade_reports')
push.commit_message = 'Create Secure compatible application to serve premade reports'
push.branch_name = 'secure-mr'
end
@project.wait_for_push(commit_message)
@merge_request = Resource::MergeRequest.fabricate_via_api! do |mr|
mr.project = @project
......
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