Commit f440bfd2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve groups list specs

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 0a10d859
.js-groups-list-holder .js-groups-list-holder
%ul.content-list %ul.content-list
- @group_members.each do |group_member| - @group_members.each do |group_member|
- group = group_member.group = render 'shared/groups/group', group: group_member.group, group_member: group_member
= render 'shared/groups/group', group: group, group_member: group_member
= paginate @group_members, theme: 'gitlab' = paginate @group_members, theme: 'gitlab'
require 'spec_helper' require 'spec_helper'
RSpec.describe 'Dashboard Groups page', js: true, feature: true do describe 'Dashboard Groups page', js: true, feature: true do
include WaitForAjax include WaitForAjax
let!(:user) { create :user } let!(:user) { create :user }
...@@ -40,8 +40,8 @@ RSpec.describe 'Dashboard Groups page', js: true, feature: true do ...@@ -40,8 +40,8 @@ RSpec.describe 'Dashboard Groups page', js: true, feature: true do
wait_for_ajax wait_for_ajax
expect(page).to have_content(group.full_name) expect(page).to have_content(group.full_name)
expect(page).to have_content(public_group.full_name) expect(page).to have_content(nested_group.full_name)
expect(page).not_to have_content(private_group.full_name) expect(page).not_to have_content(another_group.full_name)
expect(page.all('.js-groups-list-holder .content-list li').length).to eq 2 expect(page.all('.js-groups-list-holder .content-list li').length).to eq 2
end end
end end
require 'spec_helper' require 'spec_helper'
RSpec.describe 'Explore Groups page', js: true, feature: true do describe 'Explore Groups page', js: true, feature: true do
include WaitForAjax include WaitForAjax
let!(:user) { create :user } let!(:user) { create :user }
......
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