diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 13:37:47 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 13:37:47 +0000 |
commit | aee0a117a889461ce8ced6fcf73207fe017f1d99 (patch) | |
tree | 891d9ef189227a8445d83f35c1b0fc99573f4380 /spec/views/projects/jobs/show.html.haml_spec.rb | |
parent | 8d46af3258650d305f53b819eabf7ab18d22f59e (diff) | |
download | gitlab-ce-aee0a117a889461ce8ced6fcf73207fe017f1d99.tar.gz |
Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42
Diffstat (limited to 'spec/views/projects/jobs/show.html.haml_spec.rb')
-rw-r--r-- | spec/views/projects/jobs/show.html.haml_spec.rb | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/spec/views/projects/jobs/show.html.haml_spec.rb b/spec/views/projects/jobs/show.html.haml_spec.rb index 83a00135629..8242d20a9e7 100644 --- a/spec/views/projects/jobs/show.html.haml_spec.rb +++ b/spec/views/projects/jobs/show.html.haml_spec.rb @@ -13,26 +13,47 @@ RSpec.describe 'projects/jobs/show' do end before do - assign(:build, build.present) assign(:project, project) assign(:builds, builds) allow(view).to receive(:can?).and_return(true) end - context 'when job is running' do - let(:build) { create(:ci_build, :trace_live, :running, pipeline: pipeline) } - + context 'when showing a CI build' do before do + assign(:build, build.present) render end - it 'does not show retry button' do - expect(rendered).not_to have_link('Retry') + it 'shows job vue app' do + expect(rendered).to have_css('#js-job-page') + expect(rendered).not_to have_css('#js-bridge-page') + end + + context 'when job is running' do + let(:build) { create(:ci_build, :trace_live, :running, pipeline: pipeline) } + + it 'does not show retry button' do + expect(rendered).not_to have_link('Retry') + end + + it 'does not show New issue button' do + expect(rendered).not_to have_link('New issue') + end + end + end + + context 'when showing a bridge job' do + let(:bridge) { create(:ci_bridge, status: :pending) } + + before do + assign(:build, bridge) + render end - it 'does not show New issue button' do - expect(rendered).not_to have_link('New issue') + it 'shows bridge vue app' do + expect(rendered).to have_css('#js-bridge-page') + expect(rendered).not_to have_css('#js-job-page') end end end |