summaryrefslogtreecommitdiff
path: root/spec/features/projects
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects')
-rw-r--r--spec/features/projects/artifacts/file_spec.rb2
-rw-r--r--spec/features/projects/blobs/blob_show_spec.rb12
-rw-r--r--spec/features/projects/clusters/applications_spec.rb2
-rw-r--r--spec/features/projects/clusters/gcp_spec.rb14
-rw-r--r--spec/features/projects/clusters/user_spec.rb6
-rw-r--r--spec/features/projects/commit/cherry_pick_spec.rb6
-rw-r--r--spec/features/projects/commit/user_reverts_commit_spec.rb4
-rw-r--r--spec/features/projects/commits/user_browses_commits_spec.rb2
-rw-r--r--spec/features/projects/compare_spec.rb2
-rw-r--r--spec/features/projects/diffs/diff_show_spec.rb6
-rw-r--r--spec/features/projects/environments/environment_spec.rb6
-rw-r--r--spec/features/projects/features_visibility_spec.rb2
-rw-r--r--spec/features/projects/files/editing_a_file_spec.rb2
-rw-r--r--spec/features/projects/files/user_browses_files_spec.rb8
-rw-r--r--spec/features/projects/files/user_creates_files_spec.rb4
-rw-r--r--spec/features/projects/jobs_spec.rb12
-rw-r--r--spec/features/projects/members/user_requests_access_spec.rb4
-rw-r--r--spec/features/projects/milestones/milestone_spec.rb2
-rw-r--r--spec/features/projects/network_graph_spec.rb2
-rw-r--r--spec/features/projects/pipelines/pipelines_spec.rb8
-rw-r--r--spec/features/projects/services/user_activates_asana_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_assembla_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_atlassian_bamboo_ci_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_emails_on_push_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_flowdock_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_hipchat_spec.rb4
-rw-r--r--spec/features/projects/services/user_activates_irker_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_issue_tracker_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_jetbrains_teamcity_ci_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_jira_spec.rb8
-rw-r--r--spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb8
-rw-r--r--spec/features/projects/services/user_activates_packagist_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_pivotaltracker_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_prometheus_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_pushover_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_slack_notifications_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_slack_slash_command_spec.rb4
-rw-r--r--spec/features/projects/settings/forked_project_settings_spec.rb2
-rw-r--r--spec/features/projects/settings/project_badges_spec.rb2
-rw-r--r--spec/features/projects/settings/user_renames_a_project_spec.rb6
-rw-r--r--spec/features/projects/settings/visibility_settings_spec.rb6
-rw-r--r--spec/features/projects/snippets/create_snippet_spec.rb6
-rw-r--r--spec/features/projects/snippets/user_comments_on_snippet_spec.rb4
-rw-r--r--spec/features/projects/wiki/user_creates_wiki_page_spec.rb20
-rw-r--r--spec/features/projects/wiki/user_updates_wiki_page_spec.rb10
-rw-r--r--spec/features/projects/wiki/user_views_wiki_page_spec.rb2
46 files changed, 107 insertions, 107 deletions
diff --git a/spec/features/projects/artifacts/file_spec.rb b/spec/features/projects/artifacts/file_spec.rb
index 993d0040434..8970116eea7 100644
--- a/spec/features/projects/artifacts/file_spec.rb
+++ b/spec/features/projects/artifacts/file_spec.rb
@@ -23,7 +23,7 @@ describe 'Artifact file', :js do
it 'displays an error' do
aggregate_failures do
# shows an error message
- expect(page).to have_content('The source could not be displayed because it is stored as a job artifact. You can download it instead.')
+ expect(page).to have_content(_('The source could not be displayed because it is stored as a job artifact. You can download it instead.'))
# does not show a viewer switcher
expect(page).not_to have_selector('.js-blob-viewer-switcher')
diff --git a/spec/features/projects/blobs/blob_show_spec.rb b/spec/features/projects/blobs/blob_show_spec.rb
index e2f9e7e9cc5..dd68d01e88b 100644
--- a/spec/features/projects/blobs/blob_show_spec.rb
+++ b/spec/features/projects/blobs/blob_show_spec.rb
@@ -220,7 +220,7 @@ describe 'File blob', :js do
expect(page).to have_selector('.blob-viewer[data-type="rich"]')
# shows an error message
- expect(page).to have_content('The rendered file could not be displayed because it is stored in LFS. You can download it instead.')
+ expect(page).to have_content(_('The rendered file could not be displayed because it is stored in LFS. You can download it instead.'))
# shows a viewer switcher
expect(page).to have_selector('.js-blob-viewer-switcher')
@@ -247,7 +247,7 @@ describe 'File blob', :js do
expect(page).to have_selector('.blob-viewer[data-type="rich"]', visible: false)
# shows an error message
- expect(page).to have_content('The source could not be displayed because it is stored in LFS. You can download it instead.')
+ expect(page).to have_content(_('The source could not be displayed because it is stored in LFS. You can download it instead.'))
# does not show a copy button
expect(page).not_to have_selector('.js-copy-blob-source-btn')
@@ -482,7 +482,7 @@ describe 'File blob', :js do
it 'displays an auxiliary viewer' do
aggregate_failures do
# shows that configuration is valid
- expect(page).to have_content('This GitLab CI configuration is valid.')
+ expect(page).to have_content(_('This GitLab CI configuration is valid.'))
# shows a learn more link
expect(page).to have_link('Learn more')
@@ -514,7 +514,7 @@ describe 'File blob', :js do
it 'displays an auxiliary viewer' do
aggregate_failures do
# shows that map is valid
- expect(page).to have_content('This Route Map is valid.')
+ expect(page).to have_content(_('This Route Map is valid.'))
# shows a learn more link
expect(page).to have_link('Learn more')
@@ -530,7 +530,7 @@ describe 'File blob', :js do
it 'displays an auxiliary viewer' do
aggregate_failures do
# shows license
- expect(page).to have_content('This project is licensed under the MIT License.')
+ expect(page).to have_content(_('This project is licensed under the MIT License.'))
# shows a learn more link
expect(page).to have_link('Learn more', href: 'http://choosealicense.com/licenses/mit/')
@@ -563,7 +563,7 @@ describe 'File blob', :js do
it 'displays an auxiliary viewer' do
aggregate_failures do
# shows names of dependency manager and package
- expect(page).to have_content('This project manages its dependencies using RubyGems and defines a gem named activerecord.')
+ expect(page).to have_content(_('This project manages its dependencies using RubyGems and defines a gem named activerecord.'))
# shows a link to the gem
expect(page).to have_link('activerecord', href: 'https://rubygems.org/gems/activerecord')
diff --git a/spec/features/projects/clusters/applications_spec.rb b/spec/features/projects/clusters/applications_spec.rb
index fab9e035d53..5b14457318b 100644
--- a/spec/features/projects/clusters/applications_spec.rb
+++ b/spec/features/projects/clusters/applications_spec.rb
@@ -189,7 +189,7 @@ describe 'Clusters Applications', :js do
retries = 0
while Clusters::Cluster.last.application_helm.nil?
- raise "Timed out waiting for helm application to be created in DB" if (retries += 1) > 3
+ raise _("Timed out waiting for helm application to be created in DB") if (retries += 1) > 3
sleep(1)
end
diff --git a/spec/features/projects/clusters/gcp_spec.rb b/spec/features/projects/clusters/gcp_spec.rb
index 9322e29d744..3343ed319b8 100644
--- a/spec/features/projects/clusters/gcp_spec.rb
+++ b/spec/features/projects/clusters/gcp_spec.rb
@@ -63,7 +63,7 @@ describe 'Gcp Cluster', :js do
it 'user sees a cluster details page and creation status' do
subject
- expect(page).to have_content('Kubernetes cluster is being created on Google Kubernetes Engine...')
+ expect(page).to have_content(_('Kubernetes cluster is being created on Google Kubernetes Engine...'))
Clusters::Cluster.last.provider.make_created!
@@ -73,11 +73,11 @@ describe 'Gcp Cluster', :js do
it 'user sees a error if something wrong during creation' do
subject
- expect(page).to have_content('Kubernetes cluster is being created on Google Kubernetes Engine...')
+ expect(page).to have_content(_('Kubernetes cluster is being created on Google Kubernetes Engine...'))
- Clusters::Cluster.last.provider.make_errored!('Something wrong!')
+ Clusters::Cluster.last.provider.make_errored!(_('Something wrong!'))
- expect(page).to have_content('Something wrong!')
+ expect(page).to have_content(_('Something wrong!'))
end
it 'user sees RBAC is enabled by default' do
@@ -116,7 +116,7 @@ describe 'Gcp Cluster', :js do
end
it 'user sees the successful message' do
- expect(page).to have_content('Kubernetes cluster was successfully updated.')
+ expect(page).to have_content(_('Kubernetes cluster was successfully updated.'))
end
end
@@ -128,7 +128,7 @@ describe 'Gcp Cluster', :js do
end
it 'user sees the successful message' do
- expect(page).to have_content('Kubernetes cluster was successfully updated.')
+ expect(page).to have_content(_('Kubernetes cluster was successfully updated.'))
expect(cluster.reload.platform_kubernetes.namespace).to eq('my-namespace')
end
end
@@ -141,7 +141,7 @@ describe 'Gcp Cluster', :js do
end
it 'user sees creation form with the successful message' do
- expect(page).to have_content('Kubernetes cluster integration was successfully removed.')
+ expect(page).to have_content(_('Kubernetes cluster integration was successfully removed.'))
expect(page).to have_link('Add Kubernetes cluster')
end
end
diff --git a/spec/features/projects/clusters/user_spec.rb b/spec/features/projects/clusters/user_spec.rb
index 1f2f7592d8b..a57b99ea23a 100644
--- a/spec/features/projects/clusters/user_spec.rb
+++ b/spec/features/projects/clusters/user_spec.rb
@@ -76,7 +76,7 @@ describe 'User Cluster', :js do
end
it 'user sees the successful message' do
- expect(page).to have_content('Kubernetes cluster was successfully updated.')
+ expect(page).to have_content(_('Kubernetes cluster was successfully updated.'))
end
end
@@ -88,7 +88,7 @@ describe 'User Cluster', :js do
end
it 'user sees the successful message' do
- expect(page).to have_content('Kubernetes cluster was successfully updated.')
+ expect(page).to have_content(_('Kubernetes cluster was successfully updated.'))
expect(cluster.reload.name).to eq('my-dev-cluster')
expect(cluster.reload.platform_kubernetes.namespace).to eq('my-namespace')
end
@@ -102,7 +102,7 @@ describe 'User Cluster', :js do
end
it 'user sees creation form with the successful message' do
- expect(page).to have_content('Kubernetes cluster integration was successfully removed.')
+ expect(page).to have_content(_('Kubernetes cluster integration was successfully removed.'))
expect(page).to have_link('Add Kubernetes cluster')
end
end
diff --git a/spec/features/projects/commit/cherry_pick_spec.rb b/spec/features/projects/commit/cherry_pick_spec.rb
index a61b614dbc8..5790c3c30f0 100644
--- a/spec/features/projects/commit/cherry_pick_spec.rb
+++ b/spec/features/projects/commit/cherry_pick_spec.rb
@@ -21,7 +21,7 @@ describe 'Cherry-pick Commits' do
uncheck 'create_merge_request'
click_button 'Cherry-pick'
end
- expect(page).to have_content('The commit has been successfully cherry-picked into master.')
+ expect(page).to have_content(_('The commit has been successfully cherry-picked into master.'))
end
end
@@ -32,7 +32,7 @@ describe 'Cherry-pick Commits' do
uncheck 'create_merge_request'
click_button 'Cherry-pick'
end
- expect(page).to have_content('The commit has been successfully cherry-picked into master.')
+ expect(page).to have_content(_('The commit has been successfully cherry-picked into master.'))
end
end
@@ -86,7 +86,7 @@ describe 'Cherry-pick Commits' do
click_button 'Cherry-pick'
end
- expect(page).to have_content('The commit has been successfully cherry-picked into feature.')
+ expect(page).to have_content(_('The commit has been successfully cherry-picked into feature.'))
end
end
diff --git a/spec/features/projects/commit/user_reverts_commit_spec.rb b/spec/features/projects/commit/user_reverts_commit_spec.rb
index 42844a03ea6..0a99de1990b 100644
--- a/spec/features/projects/commit/user_reverts_commit_spec.rb
+++ b/spec/features/projects/commit/user_reverts_commit_spec.rb
@@ -27,7 +27,7 @@ describe 'User reverts a commit', :js do
end
it 'reverts a commit' do
- expect(page).to have_content('The commit has been successfully reverted.')
+ expect(page).to have_content(_('The commit has been successfully reverted.'))
end
it 'does not revert a previously reverted commit' do
@@ -56,7 +56,7 @@ describe 'User reverts a commit', :js do
click_button('Revert')
end
- expect(page).to have_content('The commit has been successfully reverted. You can now submit a merge request to get this change into the original branch.')
+ expect(page).to have_content(_('The commit has been successfully reverted. You can now submit a merge request to get this change into the original branch.'))
expect(page).to have_content("From revert-#{Commit.truncate_sha(sample_commit.id)} into master")
end
end
diff --git a/spec/features/projects/commits/user_browses_commits_spec.rb b/spec/features/projects/commits/user_browses_commits_spec.rb
index 574a8aefd63..d8f70bb5cf7 100644
--- a/spec/features/projects/commits/user_browses_commits_spec.rb
+++ b/spec/features/projects/commits/user_browses_commits_spec.rb
@@ -127,7 +127,7 @@ describe 'User browses commits' do
end
context 'when a commit links to a confidential issue' do
- let(:confidential_issue) { create(:issue, confidential: true, title: 'Secret issue!', project: project) }
+ let(:confidential_issue) { create(:issue, confidential: true, title: _('Secret issue!'), project: project) }
before do
project.repository.create_file(user, 'dummy-file', 'dummy content',
diff --git a/spec/features/projects/compare_spec.rb b/spec/features/projects/compare_spec.rb
index 5f7cf68987e..51f3d5265d6 100644
--- a/spec/features/projects/compare_spec.rb
+++ b/spec/features/projects/compare_spec.rb
@@ -98,7 +98,7 @@ describe "Compare", :js do
click_button('Compare')
page.within('.alert') do
- expect(page).to have_text("Too many changes to show. To preserve performance only 3 of 3+ files are displayed.")
+ expect(page).to have_text(_("Too many changes to show. To preserve performance only 3 of 3+ files are displayed."))
end
end
end
diff --git a/spec/features/projects/diffs/diff_show_spec.rb b/spec/features/projects/diffs/diff_show_spec.rb
index df05625d105..99b35945741 100644
--- a/spec/features/projects/diffs/diff_show_spec.rb
+++ b/spec/features/projects/diffs/diff_show_spec.rb
@@ -46,7 +46,7 @@ describe 'Diff file viewer', :js do
end
it 'shows an error message' do
- expect(page).to have_content('This source diff could not be displayed because it is stored in LFS. You can view the blob instead.')
+ expect(page).to have_content(_('This source diff could not be displayed because it is stored in LFS. You can view the blob instead.'))
end
end
@@ -161,12 +161,12 @@ describe 'Diff file viewer', :js do
end
it 'shows the diff is collapsed' do
- expect(page).to have_content('This diff is collapsed. Click to expand it.')
+ expect(page).to have_content(_('This diff is collapsed. Click to expand it.'))
end
context 'expanding the diff' do
before do
- click_button 'Click to expand it.'
+ click_button _('Click to expand it.')
wait_for_requests
end
diff --git a/spec/features/projects/environments/environment_spec.rb b/spec/features/projects/environments/environment_spec.rb
index a8a3b6910fb..3e057cf307f 100644
--- a/spec/features/projects/environments/environment_spec.rb
+++ b/spec/features/projects/environments/environment_spec.rb
@@ -26,7 +26,7 @@ describe 'Environment' do
context 'without deployments' do
it 'does not show deployments' do
- expect(page).to have_content('You don\'t have any deployments right now.')
+ expect(page).to have_content(_('You don\'t have any deployments right now.'))
end
end
@@ -65,7 +65,7 @@ describe 'Environment' do
end
it 'does not show deployments' do
- expect(page).to have_content('You don\'t have any deployments right now.')
+ expect(page).to have_content(_('You don\'t have any deployments right now.'))
end
end
@@ -78,7 +78,7 @@ describe 'Environment' do
end
it 'does not show deployments' do
- expect(page).to have_content('You don\'t have any deployments right now.')
+ expect(page).to have_content(_('You don\'t have any deployments right now.'))
end
end
diff --git a/spec/features/projects/features_visibility_spec.rb b/spec/features/projects/features_visibility_spec.rb
index ab16fdee883..a9f612cbd7c 100644
--- a/spec/features/projects/features_visibility_spec.rb
+++ b/spec/features/projects/features_visibility_spec.rb
@@ -192,7 +192,7 @@ describe 'Edit Project Settings' do
visit project_path(project)
- expect(page).to have_content "Customize your workflow!"
+ expect(page).to have_content _("Customize your workflow!")
end
it "hides project activity tabs" do
diff --git a/spec/features/projects/files/editing_a_file_spec.rb b/spec/features/projects/files/editing_a_file_spec.rb
index 4074e67e2d2..3285111b46d 100644
--- a/spec/features/projects/files/editing_a_file_spec.rb
+++ b/spec/features/projects/files/editing_a_file_spec.rb
@@ -26,6 +26,6 @@ describe 'Projects > Files > User wants to edit a file' do
click_button 'Commit changes'
- expect(page).to have_content 'Someone edited the file the same time you did.'
+ expect(page).to have_content _('Someone edited the file the same time you did.')
end
end
diff --git a/spec/features/projects/files/user_browses_files_spec.rb b/spec/features/projects/files/user_browses_files_spec.rb
index 66268355345..c12f835c567 100644
--- a/spec/features/projects/files/user_browses_files_spec.rb
+++ b/spec/features/projects/files/user_browses_files_spec.rb
@@ -113,7 +113,7 @@ describe "User browses files" do
click_link("Users")
expect(current_path).to eq(project_blob_path(project, "markdown/doc/api/users.md"))
- expect(page).to have_content("Get a list of users.")
+ expect(page).to have_content(_("Get a list of users."))
page.go_back
@@ -161,7 +161,7 @@ describe "User browses files" do
click_link("Users")
expect(current_path).to eq(project_blob_path(project, "markdown/doc/api/users.md"))
- expect(page).to have_content("List users").and have_content("Get a list of users.")
+ expect(page).to have_content("List users").and have_content(_("Get a list of users."))
end
end
end
@@ -189,7 +189,7 @@ describe "User browses files" do
visit(project_tree_path(project, "'test'"))
- expect(page).to have_css(".tree-commit-link").and have_no_content("Loading commit data...")
+ expect(page).to have_css(".tree-commit-link").and have_no_content(_("Loading commit data..."))
end
it "shows the code with a leading dot in the directory", :js do
@@ -201,7 +201,7 @@ describe "User browses files" do
visit(project_tree_path(project, "fix/.testdir"))
- expect(page).to have_css(".tree-commit-link").and have_no_content("Loading commit data...")
+ expect(page).to have_css(".tree-commit-link").and have_no_content(_("Loading commit data..."))
end
it "does not show the permalink link" do
diff --git a/spec/features/projects/files/user_creates_files_spec.rb b/spec/features/projects/files/user_creates_files_spec.rb
index a4f94b7a76d..2dd3593b520 100644
--- a/spec/features/projects/files/user_creates_files_spec.rb
+++ b/spec/features/projects/files/user_creates_files_spec.rb
@@ -71,7 +71,7 @@ describe 'Projects > Files > User creates files' do
it 'allows Chinese characters in file name' do
submit_new_file(file_name: '测试.md')
- expect(page).to have_content 'The file has been successfully created.'
+ expect(page).to have_content _('The file has been successfully created.')
end
it 'allows Chinese characters in directory name' do
@@ -164,7 +164,7 @@ describe 'Projects > Files > User creates files' do
end
it 'shows a message saying the file will be committed in a fork' do
- message = "A new branch will be created in your fork and a new merge request will be started."
+ message = _("A new branch will be created in your fork and a new merge request will be started.")
expect(page).to have_content(message)
end
diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb
index 8230396a4cc..18d788643ab 100644
--- a/spec/features/projects/jobs_spec.rb
+++ b/spec/features/projects/jobs_spec.rb
@@ -507,7 +507,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
let!(:environment) { create(:environment, name: 'staging', project: project) }
it 'shows deployment message' do
- expected_text = 'The deployment of this job to staging did not succeed.'
+ expected_text = _('The deployment of this job to staging did not succeed.')
expect(page).to have_css('.environment-information', text: expected_text)
end
@@ -616,7 +616,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
it 'shows delayed job', :js do
expect(page).to have_content('This is a delayed job to run in')
- expect(page).to have_content("This job will automatically run after its timer finishes.")
+ expect(page).to have_content(_("This job will automatically run after its timer finishes."))
expect(page).to have_link('Unschedule job')
end
@@ -708,7 +708,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
visit project_job_path(project, job)
expect(job).not_to have_trace
- expect(page).to have_content('This job does not have a trace.')
+ expect(page).to have_content(_('This job does not have a trace.'))
end
end
@@ -774,7 +774,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
it 'renders message about job being stuck because no runners are active' do
expect(page).to have_css('.js-stuck-no-active-runner')
- expect(page).to have_content("This job is stuck because you don't have any active runners that can run this job.")
+ expect(page).to have_content(_("This job is stuck because you don't have any active runners that can run this job."))
end
end
@@ -803,7 +803,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
it 'renders message about job being stuck because not runners are available' do
expect(page).to have_css('.js-stuck-no-active-runner')
- expect(page).to have_content("This job is stuck because you don't have any active runners that can run this job.")
+ expect(page).to have_content(_("This job is stuck because you don't have any active runners that can run this job."))
end
end
@@ -813,7 +813,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
it 'renders message about job being stuck because runners are offline' do
expect(page).to have_css('.js-stuck-no-runners')
- expect(page).to have_content("This job is stuck because the project doesn't have any runners online assigned to it.")
+ expect(page).to have_content(_("This job is stuck because the project doesn't have any runners online assigned to it."))
end
end
end
diff --git a/spec/features/projects/members/user_requests_access_spec.rb b/spec/features/projects/members/user_requests_access_spec.rb
index 50ba67f0ffc..27b3e102cca 100644
--- a/spec/features/projects/members/user_requests_access_spec.rb
+++ b/spec/features/projects/members/user_requests_access_spec.rb
@@ -24,7 +24,7 @@ describe 'Projects > Members > User requests access', :js do
expect(ActionMailer::Base.deliveries.last.subject).to eq "Request to join the #{project.full_name} project"
expect(project.requesters.exists?(user_id: user)).to be_truthy
- expect(page).to have_content 'Your request for access has been queued for review.'
+ expect(page).to have_content _('Your request for access has been queued for review.')
expect(page).to have_content 'Withdraw Access Request'
expect(page).not_to have_content 'Leave Project'
@@ -63,7 +63,7 @@ describe 'Projects > Members > User requests access', :js do
accept_confirm { click_link 'Withdraw Access Request' }
expect(project.requesters.exists?(user_id: user)).to be_falsey
- expect(page).to have_content 'Your access request to the project has been withdrawn.'
+ expect(page).to have_content _('Your access request to the project has been withdrawn.')
end
def open_project_settings_menu
diff --git a/spec/features/projects/milestones/milestone_spec.rb b/spec/features/projects/milestones/milestone_spec.rb
index ff31092b910..67920bf2c26 100644
--- a/spec/features/projects/milestones/milestone_spec.rb
+++ b/spec/features/projects/milestones/milestone_spec.rb
@@ -60,7 +60,7 @@ describe 'Project milestone' do
end
it 'does not show an informative message' do
- expect(page).not_to have_content('Assign some issues to this milestone.')
+ expect(page).not_to have_content(_('Assign some issues to this milestone.'))
end
end
diff --git a/spec/features/projects/network_graph_spec.rb b/spec/features/projects/network_graph_spec.rb
index 9f9a7787093..3e6166aa528 100644
--- a/spec/features/projects/network_graph_spec.rb
+++ b/spec/features/projects/network_graph_spec.rb
@@ -94,7 +94,7 @@ describe 'Project Network Graph', :js do
find('button').click
end
- expect(page).to have_selector '.flash-alert', text: "Git revision ';' does not exist."
+ expect(page).to have_selector '.flash-alert', text: _("Git revision ';' does not exist.")
end
end
diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb
index b75dee66592..574aaea1418 100644
--- a/spec/features/projects/pipelines/pipelines_spec.rb
+++ b/spec/features/projects/pipelines/pipelines_spec.rb
@@ -87,7 +87,7 @@ describe 'Pipelines', :js do
it 'updates content when tab is clicked' do
page.find('.js-pipelines-tab-pending').click
wait_for_requests
- expect(page).to have_content('There are currently no pending pipelines.')
+ expect(page).to have_content(_('There are currently no pending pipelines.'))
end
end
@@ -662,7 +662,7 @@ describe 'Pipelines', :js do
it 'increments jobs_cache_index' do
click_button 'Clear Runner Caches'
wait_for_requests
- expect(page.find('.flash-notice')).to have_content 'Project cache successfully reset.'
+ expect(page.find('.flash-notice')).to have_content _('Project cache successfully reset.')
end
end
@@ -670,7 +670,7 @@ describe 'Pipelines', :js do
it 'sets jobs_cache_index to 1' do
click_button 'Clear Runner Caches'
wait_for_requests
- expect(page.find('.flash-notice')).to have_content 'Project cache successfully reset.'
+ expect(page.find('.flash-notice')).to have_content _('Project cache successfully reset.')
end
end
end
@@ -699,7 +699,7 @@ describe 'Pipelines', :js do
let(:project) { create(:project, :public, :repository) }
context 'without pipelines' do
- it { expect(page).to have_content 'This project is not currently set up to run pipelines.' }
+ it { expect(page).to have_content _('This project is not currently set up to run pipelines.') }
end
end
diff --git a/spec/features/projects/services/user_activates_asana_spec.rb b/spec/features/projects/services/user_activates_asana_spec.rb
index c44e07dd3b4..948c930707c 100644
--- a/spec/features/projects/services/user_activates_asana_spec.rb
+++ b/spec/features/projects/services/user_activates_asana_spec.rb
@@ -19,6 +19,6 @@ describe 'User activates Asana' do
fill_in('Restrict to branch', with: 'verySecret')
click_button('Save')
- expect(page).to have_content('Asana activated.')
+ expect(page).to have_content(_('Asana activated.'))
end
end
diff --git a/spec/features/projects/services/user_activates_assembla_spec.rb b/spec/features/projects/services/user_activates_assembla_spec.rb
index 9c3884a7c74..23032e0de6d 100644
--- a/spec/features/projects/services/user_activates_assembla_spec.rb
+++ b/spec/features/projects/services/user_activates_assembla_spec.rb
@@ -18,6 +18,6 @@ describe 'User activates Assembla' do
fill_in('Token', with: 'verySecret')
click_button('Save')
- expect(page).to have_content('Assembla activated.')
+ expect(page).to have_content(_('Assembla activated.'))
end
end
diff --git a/spec/features/projects/services/user_activates_atlassian_bamboo_ci_spec.rb b/spec/features/projects/services/user_activates_atlassian_bamboo_ci_spec.rb
index 19573565265..d7b932597ab 100644
--- a/spec/features/projects/services/user_activates_atlassian_bamboo_ci_spec.rb
+++ b/spec/features/projects/services/user_activates_atlassian_bamboo_ci_spec.rb
@@ -21,7 +21,7 @@ describe 'User activates Atlassian Bamboo CI' do
fill_in('Password', with: 'verySecret')
click_button('Save')
- expect(page).to have_content('Atlassian Bamboo CI activated.')
+ expect(page).to have_content(_('Atlassian Bamboo CI activated.'))
# Password field should not be filled in.
click_link('Atlassian Bamboo CI')
diff --git a/spec/features/projects/services/user_activates_emails_on_push_spec.rb b/spec/features/projects/services/user_activates_emails_on_push_spec.rb
index cc55f7b2060..de4cb99bc52 100644
--- a/spec/features/projects/services/user_activates_emails_on_push_spec.rb
+++ b/spec/features/projects/services/user_activates_emails_on_push_spec.rb
@@ -18,6 +18,6 @@ describe 'User activates Emails on push' do
fill_in('Recipients', with: 'qa@company.name')
click_button('Save')
- expect(page).to have_content('Emails on push activated.')
+ expect(page).to have_content(_('Emails on push activated.'))
end
end
diff --git a/spec/features/projects/services/user_activates_flowdock_spec.rb b/spec/features/projects/services/user_activates_flowdock_spec.rb
index f981b7e9da9..9ad4dbfb4f3 100644
--- a/spec/features/projects/services/user_activates_flowdock_spec.rb
+++ b/spec/features/projects/services/user_activates_flowdock_spec.rb
@@ -18,6 +18,6 @@ describe 'User activates Flowdock' do
fill_in('Token', with: 'verySecret')
click_button('Save')
- expect(page).to have_content('Flowdock activated.')
+ expect(page).to have_content(_('Flowdock activated.'))
end
end
diff --git a/spec/features/projects/services/user_activates_hipchat_spec.rb b/spec/features/projects/services/user_activates_hipchat_spec.rb
index 2f5313c91f9..c9481316940 100644
--- a/spec/features/projects/services/user_activates_hipchat_spec.rb
+++ b/spec/features/projects/services/user_activates_hipchat_spec.rb
@@ -20,7 +20,7 @@ describe 'User activates HipChat' do
fill_in('Token', with: 'verySecret')
click_button('Save')
- expect(page).to have_content('HipChat activated.')
+ expect(page).to have_content(_('HipChat activated.'))
end
end
@@ -32,7 +32,7 @@ describe 'User activates HipChat' do
fill_in('Server', with: 'https://chat.example.com')
click_button('Save')
- expect(page).to have_content('HipChat activated.')
+ expect(page).to have_content(_('HipChat activated.'))
end
end
end
diff --git a/spec/features/projects/services/user_activates_irker_spec.rb b/spec/features/projects/services/user_activates_irker_spec.rb
index 4c8e321b411..0dd75deed0c 100644
--- a/spec/features/projects/services/user_activates_irker_spec.rb
+++ b/spec/features/projects/services/user_activates_irker_spec.rb
@@ -19,6 +19,6 @@ describe 'User activates Irker (IRC gateway)' do
fill_in('Recipients', with: 'irc://chat.freenode.net/#commits')
click_button('Save')
- expect(page).to have_content('Irker (IRC gateway) activated.')
+ expect(page).to have_content(_('Irker (IRC gateway) activated.'))
end
end
diff --git a/spec/features/projects/services/user_activates_issue_tracker_spec.rb b/spec/features/projects/services/user_activates_issue_tracker_spec.rb
index 7cd5b12802b..6fe1c640e58 100644
--- a/spec/features/projects/services/user_activates_issue_tracker_spec.rb
+++ b/spec/features/projects/services/user_activates_issue_tracker_spec.rb
@@ -54,7 +54,7 @@ describe 'User activates issue tracker', :js do
click_button('Test settings and save changes')
wait_for_requests
- expect(find('.flash-container-page')).to have_content 'Test failed.'
+ expect(find('.flash-container-page')).to have_content _('Test failed.')
expect(find('.flash-container-page')).to have_content 'Save anyway'
find('.flash-alert .flash-action').click
diff --git a/spec/features/projects/services/user_activates_jetbrains_teamcity_ci_spec.rb b/spec/features/projects/services/user_activates_jetbrains_teamcity_ci_spec.rb
index 28d83a8b961..1c40f6f7e0e 100644
--- a/spec/features/projects/services/user_activates_jetbrains_teamcity_ci_spec.rb
+++ b/spec/features/projects/services/user_activates_jetbrains_teamcity_ci_spec.rb
@@ -21,6 +21,6 @@ describe 'User activates JetBrains TeamCity CI' do
fill_in('Password', with: 'verySecret')
click_button('Save')
- expect(page).to have_content('JetBrains TeamCity CI activated.')
+ expect(page).to have_content(_('JetBrains TeamCity CI activated.'))
end
end
diff --git a/spec/features/projects/services/user_activates_jira_spec.rb b/spec/features/projects/services/user_activates_jira_spec.rb
index 08e1855d034..8b5a85ccf24 100644
--- a/spec/features/projects/services/user_activates_jira_spec.rb
+++ b/spec/features/projects/services/user_activates_jira_spec.rb
@@ -36,7 +36,7 @@ describe 'User activates Jira', :js do
end
it 'activates the JIRA service' do
- expect(page).to have_content('JIRA activated.')
+ expect(page).to have_content(_('JIRA activated.'))
expect(current_path).to eq(project_settings_integrations_path(project))
end
@@ -56,7 +56,7 @@ describe 'User activates Jira', :js do
click_button('Test settings and save changes')
page.within('.service-settings') do
- expect(page).to have_content('This field is required.')
+ expect(page).to have_content(_('This field is required.'))
end
end
@@ -75,7 +75,7 @@ describe 'User activates Jira', :js do
find('.flash-alert .flash-action').click
wait_for_requests
- expect(page).to have_content('JIRA activated.')
+ expect(page).to have_content(_('JIRA activated.'))
expect(current_path).to eq(project_settings_integrations_path(project))
end
end
@@ -89,7 +89,7 @@ describe 'User activates Jira', :js do
end
it 'saves but does not activate the JIRA service' do
- expect(page).to have_content('JIRA settings saved, but not activated.')
+ expect(page).to have_content(_('JIRA settings saved, but not activated.'))
expect(current_path).to eq(project_settings_integrations_path(project))
end
diff --git a/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb b/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb
index 70f3a812ee9..d1d450f2a22 100644
--- a/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb
+++ b/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb
@@ -31,7 +31,7 @@ describe 'Set up Mattermost slash commands', :js do
click_on 'Save changes'
expect(current_path).to eq(project_settings_integrations_path(project))
- expect(page).to have_content('Mattermost slash commands settings saved, but not activated.')
+ expect(page).to have_content(_('Mattermost slash commands settings saved, but not activated.'))
end
it 'redirects to the integrations page after activating' do
@@ -42,7 +42,7 @@ describe 'Set up Mattermost slash commands', :js do
click_on 'Save changes'
expect(current_path).to eq(project_settings_integrations_path(project))
- expect(page).to have_content('Mattermost slash commands activated.')
+ expect(page).to have_content(_('Mattermost slash commands activated.'))
end
it 'shows the add to mattermost button' do
@@ -64,7 +64,7 @@ describe 'Set up Mattermost slash commands', :js do
click_link 'Add to Mattermost'
expect(page).to have_content('The team where the slash commands will be used in')
- expect(page).to have_content('This is the only available team that you are a member of.')
+ expect(page).to have_content(_('This is the only available team that you are a member of.'))
end
it 'shows a disabled prefilled select if user is a member of 1 team' do
@@ -94,7 +94,7 @@ describe 'Set up Mattermost slash commands', :js do
click_link 'Add to Mattermost'
expect(page).to have_content('Select the team where the slash commands will be used in')
- expect(page).to have_content('The list shows all available teams that you are a member of.')
+ expect(page).to have_content(_('The list shows all available teams that you are a member of.'))
end
it 'shows a select with team options user is a member of multiple teams' do
diff --git a/spec/features/projects/services/user_activates_packagist_spec.rb b/spec/features/projects/services/user_activates_packagist_spec.rb
index 756e9b33c07..11032b24767 100644
--- a/spec/features/projects/services/user_activates_packagist_spec.rb
+++ b/spec/features/projects/services/user_activates_packagist_spec.rb
@@ -19,6 +19,6 @@ describe 'User activates Packagist' do
fill_in('Token', with: 'verySecret')
click_button('Save')
- expect(page).to have_content('Packagist activated.')
+ expect(page).to have_content(_('Packagist activated.'))
end
end
diff --git a/spec/features/projects/services/user_activates_pivotaltracker_spec.rb b/spec/features/projects/services/user_activates_pivotaltracker_spec.rb
index 1d6b19e0b0c..bf2c95ed60b 100644
--- a/spec/features/projects/services/user_activates_pivotaltracker_spec.rb
+++ b/spec/features/projects/services/user_activates_pivotaltracker_spec.rb
@@ -18,6 +18,6 @@ describe 'User activates PivotalTracker' do
fill_in('Token', with: 'verySecret')
click_button('Save')
- expect(page).to have_content('PivotalTracker activated.')
+ expect(page).to have_content(_('PivotalTracker activated.'))
end
end
diff --git a/spec/features/projects/services/user_activates_prometheus_spec.rb b/spec/features/projects/services/user_activates_prometheus_spec.rb
index 61361c8a2e3..b7a18613247 100644
--- a/spec/features/projects/services/user_activates_prometheus_spec.rb
+++ b/spec/features/projects/services/user_activates_prometheus_spec.rb
@@ -18,6 +18,6 @@ describe 'User activates Prometheus' do
fill_in('API URL', with: 'http://prometheus.example.com')
click_button('Save changes')
- expect(page).to have_content('Prometheus activated.')
+ expect(page).to have_content(_('Prometheus activated.'))
end
end
diff --git a/spec/features/projects/services/user_activates_pushover_spec.rb b/spec/features/projects/services/user_activates_pushover_spec.rb
index 24612ee1457..a54f7b43402 100644
--- a/spec/features/projects/services/user_activates_pushover_spec.rb
+++ b/spec/features/projects/services/user_activates_pushover_spec.rb
@@ -22,6 +22,6 @@ describe 'User activates Pushover' do
select('Bike', from: 'Sound')
click_button('Save')
- expect(page).to have_content('Pushover activated.')
+ expect(page).to have_content(_('Pushover activated.'))
end
end
diff --git a/spec/features/projects/services/user_activates_slack_notifications_spec.rb b/spec/features/projects/services/user_activates_slack_notifications_spec.rb
index 24b5d5259db..af8895ed82a 100644
--- a/spec/features/projects/services/user_activates_slack_notifications_spec.rb
+++ b/spec/features/projects/services/user_activates_slack_notifications_spec.rb
@@ -22,7 +22,7 @@ describe 'User activates Slack notifications' do
fill_in('Webhook', with: 'https://hooks.slack.com/services/SVRWFV0VVAR97N/B02R25XN3/ZBqu7xMupaEEICInN685')
click_button('Save')
- expect(page).to have_content('Slack notifications activated.')
+ expect(page).to have_content(_('Slack notifications activated.'))
end
end
diff --git a/spec/features/projects/services/user_activates_slack_slash_command_spec.rb b/spec/features/projects/services/user_activates_slack_slash_command_spec.rb
index 08cfddf7993..1ed41298c1a 100644
--- a/spec/features/projects/services/user_activates_slack_slash_command_spec.rb
+++ b/spec/features/projects/services/user_activates_slack_slash_command_spec.rb
@@ -26,7 +26,7 @@ describe 'Slack slash commands' do
click_on 'Save'
expect(current_path).to eq(project_settings_integrations_path(project))
- expect(page).to have_content('Slack slash commands settings saved, but not activated.')
+ expect(page).to have_content(_('Slack slash commands settings saved, but not activated.'))
end
it 'redirects to the integrations page after activating' do
@@ -35,7 +35,7 @@ describe 'Slack slash commands' do
click_on 'Save'
expect(current_path).to eq(project_settings_integrations_path(project))
- expect(page).to have_content('Slack slash commands activated.')
+ expect(page).to have_content(_('Slack slash commands activated.'))
end
it 'shows the correct trigger url' do
diff --git a/spec/features/projects/settings/forked_project_settings_spec.rb b/spec/features/projects/settings/forked_project_settings_spec.rb
index df33d215602..be3122999f7 100644
--- a/spec/features/projects/settings/forked_project_settings_spec.rb
+++ b/spec/features/projects/settings/forked_project_settings_spec.rb
@@ -23,7 +23,7 @@ describe 'Projects > Settings > For a forked project', :js do
fill_in('confirm_name_input', with: forked_project.name)
click_button('Confirm')
- expect(page).to have_content('The fork relationship has been removed.')
+ expect(page).to have_content(_('The fork relationship has been removed.'))
expect(forked_project.reload.forked?).to be_falsy
end
end
diff --git a/spec/features/projects/settings/project_badges_spec.rb b/spec/features/projects/settings/project_badges_spec.rb
index 42b5547d43b..39637ce8eda 100644
--- a/spec/features/projects/settings/project_badges_spec.rb
+++ b/spec/features/projects/settings/project_badges_spec.rb
@@ -105,7 +105,7 @@ describe 'Project Badges' do
click_delete_button(rows[1])
- expect(find('.modal .modal-title')).to have_content 'Delete badge?'
+ expect(find('.modal .modal-title')).to have_content _('Delete badge?')
end
it 'deletes a badge when confirming the modal' do
diff --git a/spec/features/projects/settings/user_renames_a_project_spec.rb b/spec/features/projects/settings/user_renames_a_project_spec.rb
index 64c9af4b706..746043b2bee 100644
--- a/spec/features/projects/settings/user_renames_a_project_spec.rb
+++ b/spec/features/projects/settings/user_renames_a_project_spec.rb
@@ -26,7 +26,7 @@ describe 'Projects > Settings > User renames a project' do
rename_project(project, name: 'foo&bar', path: 'foo&bar')
expect(page).to have_field 'Project name', with: 'foo&bar'
expect(page).to have_field 'Path', with: 'foo&bar'
- expect(page).to have_content "Name can contain only letters, digits, emojis, '_', '.', dash, space. It must start with letter, digit, emoji or '_'."
+ expect(page).to have_content _("Name can contain only letters, digits, emojis, '_', '.', dash, space. It must start with letter, digit, emoji or '_'.")
expect(page).to have_content "Path can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'"
end
end
@@ -37,7 +37,7 @@ describe 'Projects > Settings > User renames a project' do
click_button 'Save changes'
end
- expect(page).to have_content "Project 'hello world' was successfully updated."
+ expect(page).to have_content _("Project 'hello world' was successfully updated.")
end
context 'when changing project name' do
@@ -50,7 +50,7 @@ describe 'Projects > Settings > User renames a project' do
it 'shows error for invalid project name' do
rename_project(project, name: '🚀 foo bar ☁️')
expect(page).to have_field 'Project name', with: '🚀 foo bar ☁️'
- expect(page).not_to have_content "Name can contain only letters, digits, emojis '_', '.', dash and space. It must start with letter, digit, emoji or '_'."
+ expect(page).not_to have_content _("Name can contain only letters, digits, emojis '_', '.', dash and space. It must start with letter, digit, emoji or '_'.")
end
end
end
diff --git a/spec/features/projects/settings/visibility_settings_spec.rb b/spec/features/projects/settings/visibility_settings_spec.rb
index 1fbc108697f..a4af9b23ecc 100644
--- a/spec/features/projects/settings/visibility_settings_spec.rb
+++ b/spec/features/projects/settings/visibility_settings_spec.rb
@@ -14,7 +14,7 @@ describe 'Projects > Settings > Visibility settings', :js do
visibility_select_container = find('.project-visibility-setting')
expect(visibility_select_container.find('select').value).to eq project.visibility_level.to_s
- expect(visibility_select_container).to have_content 'The project can be accessed by anyone, regardless of authentication.'
+ expect(visibility_select_container).to have_content _('The project can be accessed by anyone, regardless of authentication.')
end
it 'project visibility description updates on change' do
@@ -23,7 +23,7 @@ describe 'Projects > Settings > Visibility settings', :js do
visibility_select.select('Private')
expect(visibility_select.value).to eq '0'
- expect(visibility_select_container).to have_content 'Access must be granted explicitly to each user.'
+ expect(visibility_select_container).to have_content _('Access must be granted explicitly to each user.')
end
context 'merge requests select' do
@@ -72,7 +72,7 @@ describe 'Projects > Settings > Visibility settings', :js do
visibility_select_container = find('.project-visibility-setting')
expect(visibility_select_container).to have_selector 'select[name="project[visibility_level]"]:disabled'
- expect(visibility_select_container).to have_content 'The project can be accessed by anyone, regardless of authentication.'
+ expect(visibility_select_container).to have_content _('The project can be accessed by anyone, regardless of authentication.')
end
end
end
diff --git a/spec/features/projects/snippets/create_snippet_spec.rb b/spec/features/projects/snippets/create_snippet_spec.rb
index 6d8a72dd6a3..1fbc04d55a5 100644
--- a/spec/features/projects/snippets/create_snippet_spec.rb
+++ b/spec/features/projects/snippets/create_snippet_spec.rb
@@ -10,7 +10,7 @@ describe 'Projects > Snippets > Create Snippet', :js do
fill_in 'project_snippet_title', with: 'My Snippet Title'
fill_in 'project_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
@@ -30,7 +30,7 @@ describe 'Projects > Snippets > Create Snippet', :js do
wait_for_requests
expect(page).to have_content('My Snippet Title')
- expect(page).to have_content('Hello World!')
+ expect(page).to have_content(_('Hello World!'))
page.within('.snippet-header .description') do
expect(page).to have_content('My Snippet Description')
expect(page).to have_selector('strong')
@@ -63,7 +63,7 @@ describe 'Projects > Snippets > Create Snippet', :js do
wait_for_requests
expect(page).to have_content('My Snippet Title')
- expect(page).to have_content('Hello World!')
+ expect(page).to have_content(_('Hello World!'))
page.within('.snippet-header .description') do
expect(page).to have_content('My Snippet Description')
expect(page).to have_selector('strong')
diff --git a/spec/features/projects/snippets/user_comments_on_snippet_spec.rb b/spec/features/projects/snippets/user_comments_on_snippet_spec.rb
index d82e350e0f7..9c770b1db4c 100644
--- a/spec/features/projects/snippets/user_comments_on_snippet_spec.rb
+++ b/spec/features/projects/snippets/user_comments_on_snippet_spec.rb
@@ -14,13 +14,13 @@ describe 'Projects > Snippets > User comments on a snippet', :js do
it 'leaves a comment on a snippet' do
page.within('.js-main-target-form') do
- fill_in('note_note', with: 'Good snippet!')
+ fill_in('note_note', with: _('Good snippet!'))
click_button('Comment')
end
wait_for_requests
- expect(page).to have_content('Good snippet!')
+ expect(page).to have_content(_('Good snippet!'))
end
it 'should have autocomplete' do
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 48a0d675f2d..83b9f894382 100644
--- a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb
+++ b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb
@@ -159,14 +159,14 @@ describe "User creates wiki page" do
it "creates a page from the home page" do
page.within(".wiki-form") do
- fill_in(:wiki_content, with: "My awesome wiki!")
+ fill_in(:wiki_content, with: _("My awesome wiki!"))
click_button("Create page")
end
expect(page).to have_content("Home")
.and have_content("Last edited by #{user.name}")
- .and have_content("My awesome wiki!")
+ .and have_content(_("My awesome wiki!"))
end
end
end
@@ -195,14 +195,14 @@ describe "User creates wiki page" do
expect(page).to have_field("wiki[message]", with: "Create foo")
page.within(".wiki-form") do
- fill_in(:wiki_content, with: "My awesome wiki!")
+ fill_in(:wiki_content, with: _("My awesome wiki!"))
click_button("Create page")
end
expect(page).to have_content("foo")
.and have_content("Last edited by #{user.name}")
- .and have_content("My awesome wiki!")
+ .and have_content(_("My awesome wiki!"))
end
it "creates a page with spaces in the name" do
@@ -218,14 +218,14 @@ describe "User creates wiki page" do
expect(page).to have_field("wiki[message]", with: "Create Spaces in the name")
page.within(".wiki-form") do
- fill_in(:wiki_content, with: "My awesome wiki!")
+ fill_in(:wiki_content, with: _("My awesome wiki!"))
click_button("Create page")
end
expect(page).to have_content("Spaces in the name")
.and have_content("Last edited by #{user.name}")
- .and have_content("My awesome wiki!")
+ .and have_content(_("My awesome wiki!"))
end
it "creates a page with hyphens in the name" do
@@ -241,14 +241,14 @@ describe "User creates wiki page" do
expect(page).to have_field("wiki[message]", with: "Create hyphens in the name")
page.within(".wiki-form") do
- fill_in(:wiki_content, with: "My awesome wiki!")
+ fill_in(:wiki_content, with: _("My awesome wiki!"))
click_button("Create page")
end
expect(page).to have_content("hyphens in the name")
.and have_content("Last edited by #{user.name}")
- .and have_content("My awesome wiki!")
+ .and have_content(_("My awesome wiki!"))
end
end
@@ -288,14 +288,14 @@ describe "User creates wiki page" do
expect(page).to have_field("wiki[message]", with: "Create foo")
page.within(".wiki-form") do
- fill_in(:wiki_content, with: "My awesome wiki!")
+ fill_in(:wiki_content, with: _("My awesome wiki!"))
click_button("Create page")
end
expect(page).to have_content("foo")
.and have_content("Last edited by #{user.name}")
- .and have_content("My awesome wiki!")
+ .and have_content(_("My awesome wiki!"))
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 f76e577b0d6..6920f6fd845 100644
--- a/spec/features/projects/wiki/user_updates_wiki_page_spec.rb
+++ b/spec/features/projects/wiki/user_updates_wiki_page_spec.rb
@@ -77,12 +77,12 @@ describe 'User updates wiki page' do
# Commit message field should have correct value.
expect(page).to have_field('wiki[message]', with: 'Update home')
- fill_in(:wiki_content, with: 'My awesome wiki!')
+ fill_in(:wiki_content, with: _('My awesome wiki!'))
click_button('Save changes')
expect(page).to have_content('Home')
expect(page).to have_content("Last edited by #{user.name}")
- expect(page).to have_content('My awesome wiki!')
+ expect(page).to have_content(_('My awesome wiki!'))
end
it 'shows a validation error message' do
@@ -108,7 +108,7 @@ describe 'User updates wiki page' do
click_button('Save changes')
- expect(page).to have_content('Someone edited the page the same time you did.')
+ expect(page).to have_content(_('Someone edited the page the same time you did.'))
end
it 'updates a page' do
@@ -136,13 +136,13 @@ describe 'User updates wiki page' do
# Commit message field should have correct value.
expect(page).to have_field('wiki[message]', with: 'Update home')
- fill_in(:wiki_content, with: 'My awesome wiki!')
+ fill_in(:wiki_content, with: _('My awesome wiki!'))
click_button('Save changes')
expect(page).to have_content('Home')
expect(page).to have_content("Last edited by #{user.name}")
- expect(page).to have_content('My awesome wiki!')
+ expect(page).to have_content(_('My awesome wiki!'))
end
it_behaves_like 'wiki file attachments'
diff --git a/spec/features/projects/wiki/user_views_wiki_page_spec.rb b/spec/features/projects/wiki/user_views_wiki_page_spec.rb
index d4691b669c1..2e49f4b23a8 100644
--- a/spec/features/projects/wiki/user_views_wiki_page_spec.rb
+++ b/spec/features/projects/wiki/user_views_wiki_page_spec.rb
@@ -148,7 +148,7 @@ describe 'User views a wiki page' do
it 'shows error' do
page.within(:css, '.flash-notice') do
- expect(page).to have_content('The content of this page is not encoded in UTF-8. Edits can only be made via the Git repository.')
+ expect(page).to have_content(_('The content of this page is not encoded in UTF-8. Edits can only be made via the Git repository.'))
end
end
end