require'spec_helper'feature'list of badges'doincludeSelect2Helperbackgrounddouser=create(:user)project=create(:project)project.team<<[user,:master]login_as(user)visitedit_namespace_project_path(project.namespace,project)endscenario'user displays list of badges'doclick_link'Badges'expect(page).tohave_content'build status'expect(page).tohave_content'Markdown'expect(page).tohave_content'HTML'expect(page).tohave_css('.highlight',count: 2)expect(page).tohave_xpath("//img[@alt='build status']")page.within('.highlight',match: :first)doexpect(page).tohave_content'badges/master/build.svg'endendscenario'user changes current ref on badges list page',js: truedoclick_link'Badges'select2('improve/awesome',from: '#ref')expect(page).tohave_content'badges/improve/awesome/build.svg'endend