diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-19 21:09:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-19 21:09:09 +0300 |
commit | 6463521e08b00e62d3c877aefd8517f5387d54ab (patch) | |
tree | 1e9c49e6a7cd0e926d32f81c92604cd03ee57fac /spec/features/groups_spec.rb | |
parent | 6a3c4476fa8f1c686eadbed05262bce95504ffa7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/groups_spec.rb')
-rw-r--r-- | spec/features/groups_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/features/groups_spec.rb b/spec/features/groups_spec.rb index 22785adae4a..33d2ac50628 100644 --- a/spec/features/groups_spec.rb +++ b/spec/features/groups_spec.rb @@ -230,6 +230,29 @@ RSpec.describe 'Group' do end end end + + describe 'real-time group url validation', :js do + let_it_be(:subgroup) { create(:group, path: 'sub', parent: group) } + + before do + group.add_owner(user) + visit new_group_path(parent_id: group.id) + end + + it 'shows a message if group url is available' do + fill_in 'Group URL', with: group.path + wait_for_requests + + expect(page).to have_content('Group path is available') + end + + it 'shows an error if group url is taken' do + fill_in 'Group URL', with: subgroup.path + wait_for_requests + + expect(page).to have_content('Group path is already taken') + end + end end it 'checks permissions to avoid exposing groups by parent_id' do |