From dc6ec2adf82c2b2fe1ab6ef076432fd741d3afbb Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 20 Apr 2016 10:11:22 +0100 Subject: CI build page UI update Added sidebar Removed elements not present in design --- spec/features/builds_spec.rb | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) (limited to 'spec') diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb index df221ab1f3b..cb94432dbd0 100644 --- a/spec/features/builds_spec.rb +++ b/spec/features/builds_spec.rb @@ -93,9 +93,7 @@ describe "Builds" do end it 'has button to download artifacts' do - page.within('.artifacts') do - expect(page).to have_content 'Download' - end + expect(page).to have_content 'Download' end end @@ -107,9 +105,7 @@ describe "Builds" do end it do - page.within('.build-controls') do - expect(page).to have_link 'Raw' - end + expect(page).to have_link 'Raw' end end end @@ -165,15 +161,10 @@ describe "Builds" do end describe "GET /:project/builds/:id/download" do - context "Build from project" do - before do - @build.update_attributes(artifacts_file: artifacts_file) - visit namespace_project_build_path(@project.namespace, @project, @build) - page.within('.artifacts') { click_link 'Download' } - end - - it { expect(page.status_code).to eq(200) } - it { expect(page.response_headers['Content-Type']).to eq(artifacts_file.content_type) } + before do + @build.update_attributes(artifacts_file: artifacts_file) + visit namespace_project_build_path(@project.namespace, @project, @build) + click_link 'Download' end context "Build from other project" do @@ -246,10 +237,8 @@ describe "Builds" do it { expect(page.status_code).to eq(200) } end - context "Build from other project" do - before do - visit status_namespace_project_build_path(@project.namespace, @project, @build2) - end + it 'sends the right headers' do + click_link 'Raw' it { expect(page.status_code).to eq(404) } end -- cgit v1.2.1