diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-04-04 15:05:38 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-04-06 19:56:34 +0200 |
commit | 7640b050c06e18200a09bc100d08ed48aa6c549b (patch) | |
tree | 60c5d1ba7f4778a03a7d97ed47a39339f9c0c4a9 /spec | |
parent | a3a93ba4b08176b8d63ed5f6ca95dfa78e7dda0b (diff) | |
download | gitlab-ce-7640b050c06e18200a09bc100d08ed48aa6c549b.tar.gz |
Add feature specs for list of badges page
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/projects/badges/list_spec.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/features/projects/badges/list_spec.rb b/spec/features/projects/badges/list_spec.rb new file mode 100644 index 00000000000..13c9b95b316 --- /dev/null +++ b/spec/features/projects/badges/list_spec.rb @@ -0,0 +1,34 @@ +require 'spec_helper' + +feature 'list of badges' do + include Select2Helper + + background do + user = create(:user) + project = create(:project) + project.team << [user, :master] + login_as(user) + visit edit_namespace_project_path(project.namespace, project) + end + + scenario 'user displays list of badges' do + click_link 'Badges' + + 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 + + scenario 'user changes current ref on badges list page', js: true do + click_link 'Badges' + select2('improve/awesome', from: '#ref') + + expect(page).to have_content 'badges/improve/awesome/build.svg' + end +end |