diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-06-12 15:46:51 -0500 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-06-19 13:31:32 -0500 |
commit | 3da6d7697155682739a7ec3b0e89c53a8bb222e3 (patch) | |
tree | 5da986728866d202b21f493c51bfcfafb7621613 /spec/features/projects | |
parent | dbfafd442ee863e6614d0f6765285fcd06f3d843 (diff) | |
download | gitlab-ce-3da6d7697155682739a7ec3b0e89c53a8bb222e3.tar.gz |
Re-enable autocomplete for milestones, tags, releases, and wiki
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/33598
Diffstat (limited to 'spec/features/projects')
-rw-r--r-- | spec/features/projects/milestones/new_spec.rb | 18 | ||||
-rw-r--r-- | spec/features/projects/wiki/user_creates_wiki_page_spec.rb | 16 | ||||
-rw-r--r-- | spec/features/projects/wiki/user_updates_wiki_page_spec.rb | 14 |
3 files changed, 45 insertions, 3 deletions
diff --git a/spec/features/projects/milestones/new_spec.rb b/spec/features/projects/milestones/new_spec.rb new file mode 100644 index 00000000000..7403822c7fb --- /dev/null +++ b/spec/features/projects/milestones/new_spec.rb @@ -0,0 +1,18 @@ +require 'spec_helper' + +feature 'Creating a new project milestone', :feature, :js do + let(:user) { create(:user) } + let(:project) { create(:empty_project, name: 'test', namespace: user.namespace) } + + before do + login_as(user) + visit new_namespace_project_milestone_path(project.namespace, project) + end + + it 'description has autocomplete' do + find('#milestone_description').native.send_keys('') + fill_in 'milestone_description', with: '@' + + expect(page).to have_selector('.atwho-view') + end +end diff --git a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb index 8912d575878..16e64bd6207 100644 --- a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb +++ b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb @@ -133,6 +133,22 @@ feature 'Projects > Wiki > User creates wiki page', js: true, feature: true do expect(page).to have_content('My awesome wiki!') end end + + scenario 'content has autocomplete', :js do + click_link 'New page' + + page.within '#modal-new-wiki' do + fill_in :new_wiki_path, with: 'test-autocomplete' + click_button 'Create page' + end + + page.within '.wiki-form' do + find('#wiki_content').native.send_keys('') + fill_in :wiki_content, with: '@' + end + + expect(page).to have_selector('.atwho-view') + end end end diff --git a/spec/features/projects/wiki/user_updates_wiki_page_spec.rb b/spec/features/projects/wiki/user_updates_wiki_page_spec.rb index 86cf520ea80..4d027a3ed1a 100644 --- a/spec/features/projects/wiki/user_updates_wiki_page_spec.rb +++ b/spec/features/projects/wiki/user_updates_wiki_page_spec.rb @@ -5,11 +5,10 @@ feature 'Projects > Wiki > User updates wiki page', feature: true do background do project.team << [user, :master] + WikiPages::CreateService.new(project, user, title: 'home', content: 'Home page').execute login_as(user) - visit namespace_project_path(project.namespace, project) - WikiPages::CreateService.new(project, user, title: 'home', content: 'Home page').execute - click_link 'Wiki' + visit namespace_project_wikis_path(project.namespace, project) end context 'in the user namespace' do @@ -42,6 +41,15 @@ feature 'Projects > Wiki > User updates wiki page', feature: true do expect(page).to have_content('Content can\'t be blank') expect(find('textarea#wiki_content').value).to eq '' end + + scenario 'content has autocomplete', :js do + click_link 'Edit' + + find('#wiki_content').native.send_keys('') + fill_in :wiki_content, with: '@' + + expect(page).to have_selector('.atwho-view') + end end end |