diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /spec/features/projects/navbar_spec.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/features/projects/navbar_spec.rb')
-rw-r--r-- | spec/features/projects/navbar_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/features/projects/navbar_spec.rb b/spec/features/projects/navbar_spec.rb index 4ff3827b240..25791b393bc 100644 --- a/spec/features/projects/navbar_spec.rb +++ b/spec/features/projects/navbar_spec.rb @@ -67,4 +67,23 @@ RSpec.describe 'Project navbar' do it_behaves_like 'verified navigation bar' end + + context 'when invite team members is not available' do + it 'does not display the js-invite-members-trigger' do + visit project_path(project) + + expect(page).not_to have_selector('.js-invite-members-trigger') + end + end + + context 'when invite team members is available' do + it 'includes the div for js-invite-members-trigger' do + stub_feature_flags(invite_members_group_modal: true) + allow_any_instance_of(InviteMembersHelper).to receive(:invite_members_allowed?).and_return(true) + + visit project_path(project) + + expect(page).to have_selector('.js-invite-members-trigger') + end + end end |