Commit 9aea45fe authored by Simon Knox's avatar Simon Knox

Merge branch...

Merge branch '230750-tabs-haml-migrate-app-views-dashboard-_activity_head-html-haml-to-gltabs' into 'master'

Migrate activity tabs form bootstrap to GlTabs

See merge request gitlab-org/gitlab!71303
parents cd1ea9b5 0daceac8
......@@ -2,13 +2,7 @@
%h1.page-title= _('Activity')
.top-area
%ul.nav-links.nav.nav-tabs
%li{ class: active_when(params[:filter].nil?) }>
= link_to activity_dashboard_path, class: 'shortcuts-activity', data: {placement: 'right'} do
= _('Your projects')
%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')
= gl_tabs_nav({ class: 'gl-border-b-0', data: { testid: 'dashboard-activity-tabs' } }) do
= gl_tab_link_to _("Your projects"), activity_dashboard_path, { item_active: params[:filter].nil? }
= gl_tab_link_to _("Starred projects"), activity_dashboard_path(filter: 'starred')
= gl_tab_link_to _("Followed users"), activity_dashboard_path(filter: 'followed')
......@@ -13,19 +13,19 @@ RSpec.describe 'Dashboard > Activity' do
it 'shows Your Projects' do
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
it 'shows Starred Projects' do
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
it 'shows Followed Projects' do
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
......
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