Commit 175e35a8 authored by Denys Mishunov's avatar Denys Mishunov

Merge branch '213392-pagination-blue-background' into 'master'

Apply active class on link element in HAML pagination

Closes #213392

See merge request gitlab-org/gitlab!31396
parents 36f08ae8 a38dfc98
......@@ -11,4 +11,4 @@
('js-first-button' if page.first?),
('js-last-button' if page.last?),
('d-none d-md-block' if !page.current?) ] }
= link_to page, url, { remote: remote, rel: page.next? ? 'next' : page.prev? ? 'prev' : nil, class: 'page-link' }
= link_to page, url, { remote: remote, rel: page.next? ? 'next' : page.prev? ? 'prev' : nil, class: ['page-link', active_when(page.current?)] }
---
title: Apply active class on active link element in HAML pagination
merge_request: 31396
author:
type: other
......@@ -186,4 +186,25 @@ describe 'Group issues page' do
end
end
end
context 'issues pagination' do
let(:user_in_group) { create(:group_member, :maintainer, user: create(:user), group: group ).user }
let!(:issues) do
(1..25).to_a.map { |index| create(:issue, project: project, title: "Issue #{index}") }
end
before do
sign_in(user_in_group)
visit issues_group_path(group)
end
it 'shows the pagination' do
expect(page).to have_selector('.gl-pagination')
end
it 'first pagination item is active' do
expect(page).to have_css(".js-first-button a.page-link.active")
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