summary.rb 908 字节
Newer Older
1 2 3 4 5 6
class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps
  include SharedAuthentication
  include SharedProject
  include SharedBuilds
  include RepoHelpers

7
  step 'I see button to CI Lint' do
8
    page.within('.nav-controls') do
9
      ci_lint_tool_link = page.find_link('CI Lint')
10 11 12
      expect(ci_lint_tool_link[:href]).to eq ci_lint_path
    end
  end
13 14 15 16 17 18 19 20 21 22 23 24 25 26

  step 'I click erase build button' do
    click_link 'Erase'
  end

  step 'recent build has been erased' do
    expect(@build.artifacts_file.exists?).to be_falsy
    expect(@build.artifacts_metadata.exists?).to be_falsy
    expect(File.zero?(@build.path_to_trace)).to be true
  end

  step 'recent build summary does not have artifacts widget' do
    expect(page).to have_no_css('.artifacts')
  end
27 28 29 30

  step 'recent build summary contains information saying that build has been erased' do
    expect(page).to have_css('.erased')
  end
31
end