Commit 2fc55914 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Fix active_tab and issuables_counter specs

parent 23035d90
require 'spec_helper'
RSpec.describe 'Dashboard Active Tab', feature: true do
RSpec.describe 'Dashboard Active Tab', js: true, feature: true do
before do
login_as :user
end
shared_examples 'page has active tab' do |title|
it "#{title} tab" do
expect(page).to have_selector('.nav-sidebar li.active', count: 1)
expect(find('.nav-sidebar li.active')).to have_content(title)
find('.global-dropdown-toggle').trigger('click')
expect(page).to have_selector('.global-dropdown-menu li.active', count: 1)
expect(find('.global-dropdown-menu li.active')).to have_content(title)
end
end
......
......@@ -36,7 +36,8 @@ describe 'Navigation bar counter', feature: true, js: true, caching: true do
def expect_counters(issuable_type, count)
dashboard_count = find('li.active span.badge')
nav_count = find(".dashboard-shortcuts-#{issuable_type} span.count")
find('.global-dropdown-toggle').click
nav_count = find(".dashboard-shortcuts-#{issuable_type} span.badge")
expect(nav_count).to have_content(count)
expect(dashboard_count).to have_content(count)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment