summaryrefslogtreecommitdiff
path: root/spec/features/dashboard
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-02-13 18:37:26 -0600
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-02-15 13:31:18 -0600
commit2fc559142e00cc15a47c49c190666284221cc9b0 (patch)
tree167458b35dbd82b296d961c260251f23cc8267da /spec/features/dashboard
parent23035d90b708216e75fb993a1e48a0426ddacb89 (diff)
downloadgitlab-ce-2fc559142e00cc15a47c49c190666284221cc9b0.tar.gz
Fix active_tab and issuables_counter specs
Diffstat (limited to 'spec/features/dashboard')
-rw-r--r--spec/features/dashboard/active_tab_spec.rb7
-rw-r--r--spec/features/dashboard/issuables_counter_spec.rb3
2 files changed, 6 insertions, 4 deletions
diff --git a/spec/features/dashboard/active_tab_spec.rb b/spec/features/dashboard/active_tab_spec.rb
index 7d59fcac517..ae750be4d4a 100644
--- a/spec/features/dashboard/active_tab_spec.rb
+++ b/spec/features/dashboard/active_tab_spec.rb
@@ -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
diff --git a/spec/features/dashboard/issuables_counter_spec.rb b/spec/features/dashboard/issuables_counter_spec.rb
index 41dcfe439c2..603076d7d37 100644
--- a/spec/features/dashboard/issuables_counter_spec.rb
+++ b/spec/features/dashboard/issuables_counter_spec.rb
@@ -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)