Fix active_tab and issuables_counter specs
This commit is contained in:
parent
23035d90b7
commit
2fc559142e
|
@ -1,14 +1,15 @@
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue