debian-mirror-gitlab/features/steps/project/builds/summary.rb

44 lines
1.2 KiB
Ruby
Raw Normal View History

class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps
include SharedAuthentication
include SharedProject
include SharedBuilds
include RepoHelpers
2016-06-02 11:05:42 +05:30
step 'I see coverage' do
page.within('td.coverage') do
expect(page).to have_content "99.9%"
end
end
2016-04-02 18:10:28 +05:30
step 'I see button to CI Lint' do
page.within('.nav-controls') do
2017-08-17 22:00:37 +05:30
ci_lint_tool_link = page.find_link('CI lint')
2017-09-10 17:25:29 +05:30
expect(ci_lint_tool_link[:href]).to end_with(ci_lint_path)
2016-04-02 18:10:28 +05:30
end
end
2016-04-02 18:10:28 +05:30
step 'I click erase build button' do
click_link 'Erase'
end
step 'recent build has been erased' do
2017-08-17 22:00:37 +05:30
expect(@build).not_to have_trace
2016-04-02 18:10:28 +05:30
expect(@build.artifacts_file.exists?).to be_falsy
expect(@build.artifacts_metadata.exists?).to be_falsy
end
step 'recent build summary does not have artifacts widget' do
expect(page).to have_no_css('.artifacts')
end
step 'recent build summary contains information saying that build has been erased' do
page.within('.erased') do
2017-08-17 22:00:37 +05:30
expect(page).to have_content 'Job has been erased'
2016-04-02 18:10:28 +05:30
end
end
step 'the build count cache is updated' do
expect(@build.project.running_or_pending_build_count).to eq @build.project.builds.running_or_pending.count(:all)
end
end