summaryrefslogtreecommitdiff
path: root/spec/features/dashboard/group_spec.rb
diff options
context:
space:
mode:
authorDouglas Lovell <doug@wbreeze.com>2017-03-12 12:22:00 -0300
committerAlfredo Sumaran <alfredo@gitlab.com>2017-04-09 08:43:49 -0500
commitd0beb755f9ee8a744be087b22d51e8fe9ea98586 (patch)
tree6dd0a4644560490e0ecbc7adcf1f08724cebd043 /spec/features/dashboard/group_spec.rb
parent3d1cade13f61115b63bf6dbda5a1f194ba54b24b (diff)
downloadgitlab-ce-d0beb755f9ee8a744be087b22d51e8fe9ea98586.tar.gz
Add a name field to the group edit formadd-field-for-group-name
Enables user specification of group name vs. name inferred from group path. Cause new group form to copy name from path Adds some new page-specific javascript that copies entry from the group path field to the group name field when the group name field is initially empty. Remove duplicate group name entry field on group edit form This corrects the duplicated name entry field and tests that the JavaScript does not update the group name field if the user edits the group path. (Editing the group path is not recommended in any case, but it is possible.) Address eslint errors in group.js Enable group name copy with dispatch and explore group creation The dispatch and explore group creation forms require the group.js asset, and their tests now require testing against poltergeist Update workflow new group instruction Update the gitlab basics group creation document Add a change log entry Remove unused variable for eslint
Diffstat (limited to 'spec/features/dashboard/group_spec.rb')
-rw-r--r--spec/features/dashboard/group_spec.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/features/dashboard/group_spec.rb b/spec/features/dashboard/group_spec.rb
index 19f5d1b0f30..1d4b86ed4b4 100644
--- a/spec/features/dashboard/group_spec.rb
+++ b/spec/features/dashboard/group_spec.rb
@@ -5,16 +5,18 @@ RSpec.describe 'Dashboard Group', feature: true do
login_as(:user)
end
- it 'creates new grpup' do
+ it 'creates new group', js: true do
visit dashboard_groups_path
click_link 'New group'
+ new_path = 'Samurai'
+ new_description = 'Tokugawa Shogunate'
- fill_in 'group_path', with: 'Samurai'
- fill_in 'group_description', with: 'Tokugawa Shogunate'
+ fill_in 'group_path', with: new_path
+ fill_in 'group_description', with: new_description
click_button 'Create group'
- expect(current_path).to eq group_path(Group.find_by(name: 'Samurai'))
- expect(page).to have_content('Samurai')
- expect(page).to have_content('Tokugawa Shogunate')
+ expect(current_path).to eq group_path(Group.find_by(name: new_path))
+ expect(page).to have_content(new_path)
+ expect(page).to have_content(new_description)
end
end