gitlab-org--gitlab-foss/spec/support/matchers/navigation_matcher.rb
2017-09-16 21:09:58 +11:00

6 lines
261 B
Ruby

RSpec::Matchers.define :have_active_navigation do |expected|
match do |page|
expect(page).to have_selector('.sidebar-top-level-items > li.active', count: 1)
expect(page.find('.sidebar-top-level-items > li.active')).to have_content(expected)
end
end