Commit 0daceac8 authored by Miguel Rincon's avatar Miguel Rincon

Migrate activity tabs form bootstrap to GlTabs

This change updates the classes used to render filter tabs for project
activity.

Tabs are now compliant with Pajamas and don't use Bootstrap classes.
parent c1089d13
...@@ -2,13 +2,7 @@ ...@@ -2,13 +2,7 @@
%h1.page-title= _('Activity') %h1.page-title= _('Activity')
.top-area .top-area
%ul.nav-links.nav.nav-tabs = gl_tabs_nav({ class: 'gl-border-b-0', data: { testid: 'dashboard-activity-tabs' } }) do
%li{ class: active_when(params[:filter].nil?) }> = gl_tab_link_to _("Your projects"), activity_dashboard_path, { item_active: params[:filter].nil? }
= link_to activity_dashboard_path, class: 'shortcuts-activity', data: {placement: 'right'} do = gl_tab_link_to _("Starred projects"), activity_dashboard_path(filter: 'starred')
= _('Your projects') = gl_tab_link_to _("Followed users"), activity_dashboard_path(filter: 'followed')
%li{ class: active_when(params[:filter] == 'starred') }>
= link_to activity_dashboard_path(filter: 'starred'), data: {placement: 'right'} do
= _('Starred projects')
%li{ class: active_when(params[:filter] == 'followed') }>
= link_to activity_dashboard_path(filter: 'followed'), data: {placement: 'right'} do
= _('Followed users')
...@@ -13,19 +13,19 @@ RSpec.describe 'Dashboard > Activity' do ...@@ -13,19 +13,19 @@ RSpec.describe 'Dashboard > Activity' do
it 'shows Your Projects' do it 'shows Your Projects' do
visit activity_dashboard_path visit activity_dashboard_path
expect(find('.top-area .nav-tabs li.active')).to have_content('Your projects') expect(find('[data-testid="dashboard-activity-tabs"] a.active')).to have_content('Your projects')
end end
it 'shows Starred Projects' do it 'shows Starred Projects' do
visit activity_dashboard_path(filter: 'starred') visit activity_dashboard_path(filter: 'starred')
expect(find('.top-area .nav-tabs li.active')).to have_content('Starred projects') expect(find('[data-testid="dashboard-activity-tabs"] a.active')).to have_content('Starred projects')
end end
it 'shows Followed Projects' do it 'shows Followed Projects' do
visit activity_dashboard_path(filter: 'followed') visit activity_dashboard_path(filter: 'followed')
expect(find('.top-area .nav-tabs li.active')).to have_content('Followed users') expect(find('[data-testid="dashboard-activity-tabs"] a.active')).to have_content('Followed users')
end end
end end
......
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