diff options
author | Martin Wortschack <mwortschack@gitlab.com> | 2018-10-30 16:23:47 +0000 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-10-30 16:23:47 +0000 |
commit | 66e8ecffa0990651e7bac46ac65120f5a98b1749 (patch) | |
tree | 527d4fc5bc0c341ddab80cd9f27ddaca0b822d11 /spec/features/admin | |
parent | e9814aae809fb057f9126d9574c313fa18836ec0 (diff) | |
download | gitlab-ce-66e8ecffa0990651e7bac46ac65120f5a98b1749.tar.gz |
Resolve "Create new group: Rename form fields and update UI"
Diffstat (limited to 'spec/features/admin')
-rw-r--r-- | spec/features/admin/admin_groups_spec.rb | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/spec/features/admin/admin_groups_spec.rb b/spec/features/admin/admin_groups_spec.rb index 96dfde2e08c..735ca60f7da 100644 --- a/spec/features/admin/admin_groups_spec.rb +++ b/spec/features/admin/admin_groups_spec.rb @@ -53,13 +53,33 @@ describe 'Admin Groups' do expect_selected_visibility(internal) end - it 'when entered in group path, it auto filled the group name', :js do + it 'when entered in group name, it auto filled the group path', :js do visit admin_groups_path click_link "New group" - group_path = 'gitlab' + group_name = 'gitlab' + fill_in 'group_name', with: group_name + path_field = find('input#group_path') + expect(path_field.value).to eq group_name + end + + it 'auto populates the group path with the group name', :js do + visit admin_groups_path + click_link "New group" + group_name = 'my gitlab project' + fill_in 'group_name', with: group_name + path_field = find('input#group_path') + expect(path_field.value).to eq 'my-gitlab-project' + end + + it 'when entering in group path, group name does not change anymore', :js do + visit admin_groups_path + click_link "New group" + group_path = 'my-gitlab-project' + group_name = 'My modified gitlab project' fill_in 'group_path', with: group_path - name_field = find('input#group_name') - expect(name_field.value).to eq group_path + fill_in 'group_name', with: group_name + path_field = find('input#group_path') + expect(path_field.value).to eq 'my-gitlab-project' end end |