diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-03 13:03:57 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-03 13:03:57 +0100 |
commit | 7788118c3d059ef93bcc49c1b6b6ec7d72faf8b5 (patch) | |
tree | 6642a358083285d90234f8d4ba27d61bfd9448bd /spec/features/snippets/create_snippet_spec.rb | |
parent | 637ed8a21e9f9457d1b194f9c591a0813c20cc3e (diff) | |
parent | cac04fbd777ff992bbd92e9ae3cded01d45b07d0 (diff) | |
download | gitlab-ce-7788118c3d059ef93bcc49c1b6b6ec7d72faf8b5.tar.gz |
Merge remote-tracking branch 'origin/master' into add-sentry-js-again-with-vue
Diffstat (limited to 'spec/features/snippets/create_snippet_spec.rb')
-rw-r--r-- | spec/features/snippets/create_snippet_spec.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/features/snippets/create_snippet_spec.rb b/spec/features/snippets/create_snippet_spec.rb index 5470276bf06..9409c323288 100644 --- a/spec/features/snippets/create_snippet_spec.rb +++ b/spec/features/snippets/create_snippet_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -feature 'Create Snippet', feature: true do +feature 'Create Snippet', :js, feature: true do before do login_as :user visit new_snippet_path @@ -9,10 +9,11 @@ feature 'Create Snippet', feature: true do scenario 'Authenticated user creates a snippet' do fill_in 'personal_snippet_title', with: 'My Snippet Title' page.within('.file-editor') do - find(:xpath, "//input[@id='personal_snippet_content']").set 'Hello World!' + find('.ace_editor').native.send_keys 'Hello World!' end click_button 'Create snippet' + wait_for_ajax expect(page).to have_content('My Snippet Title') expect(page).to have_content('Hello World!') @@ -22,10 +23,11 @@ feature 'Create Snippet', feature: true do fill_in 'personal_snippet_title', with: 'My Snippet Title' page.within('.file-editor') do find(:xpath, "//input[@id='personal_snippet_file_name']").set 'snippet+file+name' - find(:xpath, "//input[@id='personal_snippet_content']").set 'Hello World!' + find('.ace_editor').native.send_keys 'Hello World!' end click_button 'Create snippet' + wait_for_ajax expect(page).to have_content('My Snippet Title') expect(page).to have_content('snippet+file+name') |