Commit c820b470 authored by Dan Davison's avatar Dan Davison

Merge branch 'qa-e2e-secure-report-runtime' into 'master'

Reuse test setup for Secure E2E report tests

See merge request gitlab-org/gitlab!22921
parents 39a356f4 3f3e933c
...@@ -11,17 +11,14 @@ module QA ...@@ -11,17 +11,14 @@ module QA
let(:dast_scan_example_vuln) { 'Cookie Without SameSite Attribute' } let(:dast_scan_example_vuln) { 'Cookie Without SameSite Attribute' }
describe 'Security Reports' do describe 'Security Reports' do
after do after(:all) do
Service::DockerRun::GitlabRunner.new(@executor).remove! Service::DockerRun::GitlabRunner.new(@executor).remove!
Runtime::Feature.enable('job_log_json') if @job_log_json_flag_enabled
end end
before do before(:all) do
@executor = "qa-runner-#{Time.now.to_i}" @executor = "qa-runner-#{Time.now.to_i}"
Runtime::Browser.visit(:gitlab, Page::Main::Login) Flow::Login.sign_in
Page::Main::Login.perform(&:sign_in_using_credentials)
@project = Resource::Project.fabricate_via_api! do |p| @project = Resource::Project.fabricate_via_api! do |p|
p.name = Runtime::Env.auto_devops_project_name || 'project-with-secure' p.name = Runtime::Env.auto_devops_project_name || 'project-with-secure'
...@@ -47,6 +44,11 @@ module QA ...@@ -47,6 +44,11 @@ module QA
Page::Project::Pipeline::Index.perform(&:wait_for_latest_pipeline_success) Page::Project::Pipeline::Index.perform(&:wait_for_latest_pipeline_success)
end end
before do
Flow::Login.sign_in_unless_signed_in
@project.visit!
end
it 'displays security reports in the pipeline' do it 'displays security reports in the pipeline' do
Page::Project::Menu.perform(&:click_ci_cd_pipelines) Page::Project::Menu.perform(&:click_ci_cd_pipelines)
Page::Project::Pipeline::Index.perform(&:click_on_latest_pipeline) Page::Project::Pipeline::Index.perform(&:click_on_latest_pipeline)
......
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