diff options
Diffstat (limited to 'features/steps/shared')
-rw-r--r-- | features/steps/shared/active_tab.rb | 4 | ||||
-rw-r--r-- | features/steps/shared/builds.rb | 28 |
2 files changed, 30 insertions, 2 deletions
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 diff --git a/features/steps/shared/builds.rb b/features/steps/shared/builds.rb new file mode 100644 index 00000000000..a83d74e5946 --- /dev/null +++ b/features/steps/shared/builds.rb @@ -0,0 +1,28 @@ +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 + + 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 |