gitlab-org--gitlab-foss/spec/features/users/snippets_spec.rb
Luke Bennett 56461e0c16
Reordered dropdown options
Rearranged datetime created line

Added `avatar_class` option to `link_to_member` so it can be hidden

Made snippet title font heavier

Added file title  bar

Hidden unneeded info from xs screens

Added visibility icon

Reveal file-actions on xs screens

Added comments icon to snippets list items

Refactored no-comments declaration into framework stylesheet

Final touch ups

Fixed snippets_spec
2016-09-07 15:12:03 +01:00

32 lines
791 B
Ruby

require 'spec_helper'
describe 'Snippets tab on a user profile', feature: true, js: true do
include WaitForAjax
let(:user) { create(:user) }
context 'when the user has snippets' do
before do
create_list(:snippet, 25, :public, author: user)
visit user_path(user)
page.within('.user-profile-nav') { click_link 'Snippets' }
wait_for_ajax
end
it 'is limited to 20 items per page' do
expect(page.all('.snippets-list-holder .snippet-row').count).to eq(20)
end
context 'clicking on the link to the second page' do
before do
click_link('2')
wait_for_ajax
end
it 'shows the remaining snippets' do
expect(page.all('.snippets-list-holder .snippet-row').count).to eq(5)
end
end
end
end