summaryrefslogtreecommitdiff
path: root/spec/features/snippets
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/snippets')
-rw-r--r--spec/features/snippets/notes_on_personal_snippets_spec.rb8
-rw-r--r--spec/features/snippets/user_creates_snippet_spec.rb10
2 files changed, 9 insertions, 9 deletions
diff --git a/spec/features/snippets/notes_on_personal_snippets_spec.rb b/spec/features/snippets/notes_on_personal_snippets_spec.rb
index eeacaf5f72a..308c605b0b1 100644
--- a/spec/features/snippets/notes_on_personal_snippets_spec.rb
+++ b/spec/features/snippets/notes_on_personal_snippets_spec.rb
@@ -67,20 +67,20 @@ describe 'Comments on personal snippets', :js do
end
it 'previews a note' do
- fill_in 'note[note]', with: 'This is **awesome**!'
+ fill_in 'note[note]', with: _('This is **awesome**!')
find('.js-md-preview-button').click
page.within('.new-note .md-preview') do
- expect(page).to have_content('This is awesome!')
+ expect(page).to have_content(_('This is awesome!'))
expect(page).to have_selector('strong')
end
end
it 'creates a note' do
- fill_in 'note[note]', with: 'This is **awesome**!'
+ fill_in 'note[note]', with: _('This is **awesome**!')
click_button 'Comment'
- expect(find('div#notes')).to have_content('This is awesome!')
+ expect(find('div#notes')).to have_content(_('This is awesome!'))
end
it 'should not have autocomplete' do
diff --git a/spec/features/snippets/user_creates_snippet_spec.rb b/spec/features/snippets/user_creates_snippet_spec.rb
index 879c46d7c4e..c2157b54e43 100644
--- a/spec/features/snippets/user_creates_snippet_spec.rb
+++ b/spec/features/snippets/user_creates_snippet_spec.rb
@@ -14,7 +14,7 @@ describe 'User creates snippet', :js do
fill_in 'personal_snippet_title', with: 'My Snippet Title'
fill_in 'personal_snippet_description', with: 'My Snippet **Description**'
page.within('.file-editor') do
- find('.ace_text-input', visible: false).send_keys 'Hello World!'
+ find('.ace_text-input', visible: false).send_keys _('Hello World!')
end
end
@@ -29,7 +29,7 @@ describe 'User creates snippet', :js do
expect(page).to have_content('My Snippet Description')
expect(page).to have_selector('strong')
end
- expect(page).to have_content('Hello World!')
+ expect(page).to have_content(_('Hello World!'))
end
it 'previews a snippet with file' do
@@ -82,7 +82,7 @@ describe 'User creates snippet', :js do
expect(page).to have_content('My Snippet Description')
expect(page).to have_selector('strong')
end
- expect(page).to have_content('Hello World!')
+ expect(page).to have_content(_('Hello World!'))
link = find('a.no-attachment-icon img[alt="banana_sample"]')['src']
expect(link).to match(%r{/uploads/-/system/personal_snippet/#{Snippet.last.id}/\h{32}/banana_sample\.gif\z})
@@ -94,7 +94,7 @@ describe 'User creates snippet', :js 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('.ace_text-input', visible: false).send_keys 'Hello World!'
+ find('.ace_text-input', visible: false).send_keys _('Hello World!')
end
click_button 'Create snippet'
@@ -102,6 +102,6 @@ describe 'User creates snippet', :js do
expect(page).to have_content('My Snippet Title')
expect(page).to have_content('snippet+file+name')
- expect(page).to have_content('Hello World!')
+ expect(page).to have_content(_('Hello World!'))
end
end