diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-06-21 14:45:50 -0500 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-06-21 15:14:37 -0500 |
commit | 929502174d99c5d2b1ccd633b0a8db91ace0e73c (patch) | |
tree | 28a25d7c888f2b8fa9535680b336d0c9c474960c | |
parent | 9f0b85bf2683ef0825018c7b754c23369a513956 (diff) | |
download | gitlab-ce-929502174d99c5d2b1ccd633b0a8db91ace0e73c.tar.gz |
Add feature spec for dashboard state filter tabs33833-issue-and-mr-state-tabs-don-t-work-on-dashboard
-rw-r--r-- | app/views/shared/issuable/_nav.html.haml | 2 | ||||
-rw-r--r-- | spec/features/dashboard/issues_spec.rb | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/app/views/shared/issuable/_nav.html.haml b/app/views/shared/issuable/_nav.html.haml index 10b8dc52c1c..3f03cc7a275 100644 --- a/app/views/shared/issuable/_nav.html.haml +++ b/app/views/shared/issuable/_nav.html.haml @@ -17,7 +17,7 @@ #{issuables_state_counter_text(type, :closed)} - else %li{ class: active_when(params[:state] == 'closed') }> - = link_to page_filter_path(state: 'closed', label: true), id: 'state-all', title: 'Filter by issues that are currently closed.', data: { state: 'closed' } do + = link_to page_filter_path(state: 'closed', label: true), id: 'state-closed', title: 'Filter by issues that are currently closed.', data: { state: 'closed' } do #{issuables_state_counter_text(type, :closed)} %li{ class: active_when(params[:state] == 'all') }> diff --git a/spec/features/dashboard/issues_spec.rb b/spec/features/dashboard/issues_spec.rb index 6f21cfd322d..a57962abbda 100644 --- a/spec/features/dashboard/issues_spec.rb +++ b/spec/features/dashboard/issues_spec.rb @@ -59,6 +59,11 @@ RSpec.describe 'Dashboard Issues', feature: true do expect(page).to have_content(other_issue.title) end + it 'state filter tabs work' do + find('#state-closed').click + expect(page).to have_current_path(issues_dashboard_url(assignee_id: current_user.id, scope: 'all', state: 'closed'), url: true) + end + it_behaves_like "it has an RSS button with current_user's RSS token" it_behaves_like "an autodiscoverable RSS feed with current_user's RSS token" end |