diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-02-25 19:02:57 +0100 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-02-25 19:02:57 +0100 |
commit | 820d227b9e233b8bb8c78b49ef4a26f757e86953 (patch) | |
tree | 02c7c237731bd42bbf44c4631bc8085983dbc288 /features | |
parent | 8d3e5cf0db1aa811f2f9263092b8d7740acec5a6 (diff) | |
parent | f36fde94d0f72bc86abf4a424710f9e5c72cfc30 (diff) | |
download | gitlab-ce-820d227b9e233b8bb8c78b49ef4a26f757e86953.tar.gz |
Merge remote-tracking branch 'origin/Baertierchen/gitlab-ce-showTestCoverage'
Diffstat (limited to 'features')
-rw-r--r-- | features/project/builds/summary.feature | 2 | ||||
-rw-r--r-- | features/steps/project/builds/summary.rb | 6 | ||||
-rw-r--r-- | features/steps/shared/builds.rb | 6 |
3 files changed, 13 insertions, 1 deletions
diff --git a/features/project/builds/summary.feature b/features/project/builds/summary.feature index 4f3fd194d00..3c029a973df 100644 --- a/features/project/builds/summary.feature +++ b/features/project/builds/summary.feature @@ -3,6 +3,7 @@ Feature: Project Builds Summary Given I sign in as a user And I own a project And project has CI enabled + And project has coverage enabled And project has a recent build Scenario: I browse build details page @@ -12,6 +13,7 @@ Feature: Project Builds Summary Scenario: I browse project builds page When I visit project builds page + Then I see coverage Then I see button to CI Lint Scenario: I erase a build diff --git a/features/steps/project/builds/summary.rb b/features/steps/project/builds/summary.rb index 4688a0e2096..e9e2359146e 100644 --- a/features/steps/project/builds/summary.rb +++ b/features/steps/project/builds/summary.rb @@ -4,6 +4,12 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps include SharedBuilds include RepoHelpers + step 'I see coverage' do + page.within('td.coverage') do + expect(page).to have_content "99.9%" + end + end + step 'I see button to CI Lint' do page.within('.nav-controls') do ci_lint_tool_link = page.find_link('CI Lint') diff --git a/features/steps/shared/builds.rb b/features/steps/shared/builds.rb index 0bd5d93b997..f33ed7834fe 100644 --- a/features/steps/shared/builds.rb +++ b/features/steps/shared/builds.rb @@ -5,9 +5,13 @@ module SharedBuilds @project.enable_ci end + step 'project has coverage enabled' do + @project.update_attribute(:build_coverage_regex, /Coverage (\d+)%/) + end + step 'project has a recent build' do @ci_commit = create(:ci_commit, project: @project, sha: @project.commit.sha) - @build = create(:ci_build, commit: @ci_commit) + @build = create(:ci_build_with_coverage, commit: @ci_commit) end step 'recent build is successful' do |