diff options
Diffstat (limited to 'spec/features/groups/members/master_adds_member_with_expiration_date_spec.rb')
-rw-r--r-- | spec/features/groups/members/master_adds_member_with_expiration_date_spec.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/spec/features/groups/members/master_adds_member_with_expiration_date_spec.rb b/spec/features/groups/members/master_adds_member_with_expiration_date_spec.rb index d31a7977f66..ddf3c6d8f9b 100644 --- a/spec/features/groups/members/master_adds_member_with_expiration_date_spec.rb +++ b/spec/features/groups/members/master_adds_member_with_expiration_date_spec.rb @@ -3,8 +3,8 @@ require 'spec_helper' RSpec.describe 'Groups > Members > Owner adds member with expiration date', :js do - include Select2Helper include Spec::Support::Helpers::Features::MembersHelpers + include Spec::Support::Helpers::Features::InviteMembersModalHelper let_it_be(:user1) { create(:user, name: 'John Doe') } let_it_be(:group) { create(:group) } @@ -12,7 +12,6 @@ RSpec.describe 'Groups > Members > Owner adds member with expiration date', :js let(:new_member) { create(:user, name: 'Mary Jane') } before do - stub_feature_flags(invite_members_group_modal: false) group.add_owner(user1) sign_in(user1) end @@ -20,14 +19,7 @@ RSpec.describe 'Groups > Members > Owner adds member with expiration date', :js it 'expiration date is displayed in the members list' do visit group_group_members_path(group) - page.within invite_users_form do - select2(new_member.id, from: '#user_ids', multiple: true) - - fill_in 'expires_at', with: 5.days.from_now.to_date - find_field('expires_at').native.send_keys :enter - - click_on 'Invite' - end + invite_member(new_member.name, role: 'Guest', expires_at: 5.days.from_now.to_date) page.within second_row do expect(page).to have_content(/in \d days/) |