diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-08-12 14:30:17 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-08-15 14:39:46 +0200 |
commit | b646adef131eb41521ca0a56884d5b3862c4f5ef (patch) | |
tree | 5b28af8ab6d2026812223f7cabef1937cfc97f14 /spec | |
parent | b6ca47f6d4ac80150759deeecf4d0e8dedcc9b88 (diff) | |
download | gitlab-ce-b646adef131eb41521ca0a56884d5b3862c4f5ef.tar.gz |
Expose coverage report badge in pipeline settings
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/projects/badges/list_spec.rb | 46 |
1 files changed, 32 insertions, 14 deletions
diff --git a/spec/features/projects/badges/list_spec.rb b/spec/features/projects/badges/list_spec.rb index 75166bca119..67a4a5d1ab1 100644 --- a/spec/features/projects/badges/list_spec.rb +++ b/spec/features/projects/badges/list_spec.rb @@ -9,25 +9,43 @@ feature 'list of badges' do visit namespace_project_pipelines_settings_path(project.namespace, project) end - scenario 'user displays list of badges' do - expect(page).to have_content 'build status' - expect(page).to have_content 'Markdown' - expect(page).to have_content 'HTML' - expect(page).to have_css('.highlight', count: 2) - expect(page).to have_xpath("//img[@alt='build status']") - - page.within('.highlight', match: :first) do - expect(page).to have_content 'badges/master/build.svg' + scenario 'user wants to see build status badge' do + page.within('.build-status') do + expect(page).to have_content 'build status' + expect(page).to have_content 'Markdown' + expect(page).to have_content 'HTML' + expect(page).to have_css('.highlight', count: 2) + expect(page).to have_xpath("//img[@alt='build status']") + + page.within('.highlight', match: :first) do + expect(page).to have_content 'badges/master/build.svg' + end end end - scenario 'user changes current ref on badges list page', js: true do - first('.js-project-refs-dropdown').click + scenario 'user wants to see coverage report badge' do + page.within('.coverage-report') do + expect(page).to have_content 'coverage report' + expect(page).to have_content 'Markdown' + expect(page).to have_content 'HTML' + expect(page).to have_css('.highlight', count: 2) + expect(page).to have_xpath("//img[@alt='coverage report']") - page.within '.project-refs-form' do - click_link 'improve/awesome' + page.within('.highlight', match: :first) do + expect(page).to have_content 'badges/master/coverage.svg' + end end + end + + scenario 'user changes current ref of build status badge', js: true do + page.within('.build-status') do + first('.js-project-refs-dropdown').click - expect(page).to have_content 'badges/improve/awesome/build.svg' + page.within '.project-refs-form' do + click_link 'improve/awesome' + end + + expect(page).to have_content 'badges/improve/awesome/build.svg' + end end end |