Commit 4b0cbf63 authored by Matija Čupić's avatar Matija Čupić

Set up traces in jobs feature spec

parent d0349362
...@@ -113,7 +113,7 @@ feature 'Jobs' do ...@@ -113,7 +113,7 @@ feature 'Jobs' do
describe "GET /:project/jobs/:id" do describe "GET /:project/jobs/:id" do
context "Job from project" do context "Job from project" do
let(:job) { create(:ci_build, :success, pipeline: pipeline) } let(:job) { create(:ci_build, :success, :trace_live, pipeline: pipeline) }
before do before do
visit project_job_path(project, job) visit project_job_path(project, job)
...@@ -136,7 +136,7 @@ feature 'Jobs' do ...@@ -136,7 +136,7 @@ feature 'Jobs' do
end end
context 'when job is not running', :js do context 'when job is not running', :js do
let(:job) { create(:ci_build, :success, pipeline: pipeline) } let(:job) { create(:ci_build, :success, :trace_artifact, pipeline: pipeline) }
before do before do
visit project_job_path(project, job) visit project_job_path(project, job)
...@@ -153,7 +153,7 @@ feature 'Jobs' do ...@@ -153,7 +153,7 @@ feature 'Jobs' do
end end
context 'if job failed' do context 'if job failed' do
let(:job) { create(:ci_build, :failed, pipeline: pipeline) } let(:job) { create(:ci_build, :failed, :trace_artifact, pipeline: pipeline) }
before do before do
visit project_job_path(project, job) visit project_job_path(project, job)
...@@ -339,7 +339,7 @@ feature 'Jobs' do ...@@ -339,7 +339,7 @@ feature 'Jobs' do
context 'job is successfull and has deployment' do context 'job is successfull and has deployment' do
let(:deployment) { create(:deployment) } let(:deployment) { create(:deployment) }
let(:job) { create(:ci_build, :success, environment: environment.name, deployments: [deployment], pipeline: pipeline) } let(:job) { create(:ci_build, :success, :trace_artifact, environment: environment.name, deployments: [deployment], pipeline: pipeline) }
it 'shows a link for the job' do it 'shows a link for the job' do
visit project_job_path(project, job) visit project_job_path(project, job)
...@@ -349,7 +349,7 @@ feature 'Jobs' do ...@@ -349,7 +349,7 @@ feature 'Jobs' do
end end
context 'job is complete and not successful' do context 'job is complete and not successful' do
let(:job) { create(:ci_build, :failed, environment: environment.name, pipeline: pipeline) } let(:job) { create(:ci_build, :failed, :trace_artifact, environment: environment.name, pipeline: pipeline) }
it 'shows a link for the job' do it 'shows a link for the job' do
visit project_job_path(project, job) visit project_job_path(project, job)
...@@ -360,7 +360,7 @@ feature 'Jobs' do ...@@ -360,7 +360,7 @@ feature 'Jobs' do
context 'job creates a new deployment' do context 'job creates a new deployment' do
let!(:deployment) { create(:deployment, environment: environment, sha: project.commit.id) } let!(:deployment) { create(:deployment, environment: environment, sha: project.commit.id) }
let(:job) { create(:ci_build, :success, environment: environment.name, pipeline: pipeline) } let(:job) { create(:ci_build, :success, :trace_artifact, environment: environment.name, pipeline: pipeline) }
it 'shows a link to latest deployment' do it 'shows a link to latest deployment' do
visit project_job_path(project, job) visit project_job_path(project, job)
......
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