BigW Consortium Gitlab

Commit 5b5557c6 by Semyon Pupkov

Move feature group members search test to RSpec

parent 0ef19f1c
Feature: Group Members
Background:
Given I sign in as "John Doe"
And "John Doe" is owner of group "Owned"
And "John Doe" is guest of group "Guest"
Scenario: Search member by name
Given "Mary Jane" is guest of group "Guest"
And I visit group "Guest" members page
When I search for 'Mary' member
Then I should see user "Mary Jane" in team list
Then I should not see user "John Doe" in team list
......@@ -9,14 +9,6 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps
expect(group_members_list).to have_content("John Doe")
end
step 'I should not see user "John Doe" in team list' do
expect(group_members_list).not_to have_content("John Doe")
end
step 'I should see user "Mary Jane" in team list' do
expect(group_members_list).to have_content("Mary Jane")
end
step 'I should not see user "Mary Jane" in team list' do
expect(group_members_list).not_to have_content("Mary Jane")
end
......@@ -41,13 +33,6 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps
# poltergeist always confirms popups.
end
step 'I search for \'Mary\' member' do
page.within '.member-search-form' do
fill_in 'search', with: 'Mary'
find('.member-search-btn').click
end
end
step 'I change the "Mary Jane" role to "Developer"' do
member = mary_jane_member
......
require 'spec_helper'
describe 'Search group member' do
let(:user) { create :user }
let(:member) { create :user }
let!(:guest_group) do
create(:group) do |group|
group.add_guest(user)
group.add_guest(member)
end
end
before do
sign_in(user)
visit group_group_members_path(guest_group)
end
it 'renders member users' do
page.within '.member-search-form' do
fill_in 'search', with: member.name
find('.member-search-btn').click
end
group_members_list = find(".panel .content-list")
expect(group_members_list).to have_content(member.name)
expect(group_members_list).not_to have_content(user.name)
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