From 6a40718b9e9290e9393726e6dc7affcb0451fd0d Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 13 Jan 2016 20:41:43 +0100 Subject: Fix tests Signed-off-by: Dmitriy Zaporozhets --- features/steps/shared/active_tab.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'features/steps/shared') diff --git a/features/steps/shared/active_tab.rb b/features/steps/shared/active_tab.rb index eb2ccd9d01e..0bee91d758d 100644 --- a/features/steps/shared/active_tab.rb +++ b/features/steps/shared/active_tab.rb @@ -6,7 +6,7 @@ module SharedActiveTab end def ensure_active_sub_tab(content) - expect(find('div.content ul.center-top-menu li.active')).to have_content(content) + expect(find('div.content ul.nav-links li.active')).to have_content(content) end def ensure_active_sub_nav(content) @@ -18,7 +18,7 @@ module SharedActiveTab end step 'no other sub tabs should be active' do - expect(page).to have_selector('div.content ul.center-top-menu li.active', count: 1) + expect(page).to have_selector('div.content ul.nav-links li.active', count: 1) end step 'no other sub navs should be active' do -- cgit v1.2.1 From e5d2a81b86d59c50ff5c488da017a9b56d0442f0 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 5 Jan 2016 12:46:42 +0000 Subject: Add basic spinach tests for project builds --- features/steps/shared/builds.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 features/steps/shared/builds.rb (limited to 'features/steps/shared') diff --git a/features/steps/shared/builds.rb b/features/steps/shared/builds.rb new file mode 100644 index 00000000000..6f9cd174729 --- /dev/null +++ b/features/steps/shared/builds.rb @@ -0,0 +1,16 @@ +module SharedBuilds + include Spinach::DSL + + step 'CI is enabled' do + @project.enable_ci + end + + step 'I have recent build for my project' do + ci_commit = create :ci_commit, project: @project, sha: sample_commit.id + @build = create :ci_build, commit: ci_commit + end + + step 'I visit recent build summary page' do + visit namespace_project_build_path(@project.namespace, @project, @build) + end +end -- cgit v1.2.1 From 09c82c6fdc494de0d64cb58b4b61a86104ff1131 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Thu, 7 Jan 2016 10:33:07 +0100 Subject: Add spinach feature specs for build artifacts browser --- features/steps/shared/builds.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'features/steps/shared') diff --git a/features/steps/shared/builds.rb b/features/steps/shared/builds.rb index 6f9cd174729..a83d74e5946 100644 --- a/features/steps/shared/builds.rb +++ b/features/steps/shared/builds.rb @@ -13,4 +13,16 @@ module SharedBuilds step 'I visit recent build summary page' do visit namespace_project_build_path(@project.namespace, @project, @build) end + + step 'recent build has artifacts available' do + artifacts = Rails.root + 'spec/fixtures/ci_build_artifacts.zip' + archive = fixture_file_upload(artifacts, 'application/zip') + @build.update_attributes(artifacts_file: archive) + end + + step 'recent build has artifacts metadata available' do + metadata = Rails.root + 'spec/fixtures/ci_build_artifacts_metadata.gz' + gzip = fixture_file_upload(metadata, 'application/x-gzip') + @build.update_attributes(artifacts_metadata: gzip) + end end -- cgit v1.2.1