summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/ci/status/build/manual_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/ci/status/build/manual_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/status/build/manual_spec.rb31
1 files changed, 28 insertions, 3 deletions
diff --git a/spec/lib/gitlab/ci/status/build/manual_spec.rb b/spec/lib/gitlab/ci/status/build/manual_spec.rb
index 0a4cc6b405a..8f5d1558314 100644
--- a/spec/lib/gitlab/ci/status/build/manual_spec.rb
+++ b/spec/lib/gitlab/ci/status/build/manual_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::Ci::Status::Build::Manual do
+RSpec.describe Gitlab::Ci::Status::Build::Manual, feature_category: :continuous_integration do
let_it_be(:user) { create(:user) }
let_it_be(:job) { create(:ci_build, :manual) }
@@ -18,7 +18,28 @@ RSpec.describe Gitlab::Ci::Status::Build::Manual do
job.project.add_maintainer(user)
end
- it { expect(subject.illustration[:content]).to match /This job requires manual intervention to start/ }
+ context 'when the job has not been played' do
+ it 'instructs the user about possible actions' do
+ expect(subject.illustration[:content]).to eq(
+ _(
+ 'This job does not start automatically and must be started manually. ' \
+ 'You can add CI/CD variables below for last-minute configuration changes before starting the job.'
+ )
+ )
+ end
+ end
+
+ context 'when the job is retryable' do
+ before do
+ job.update!(status: :failed)
+ end
+
+ it 'instructs the user about possible actions' do
+ expect(subject.illustration[:content]).to eq(
+ _("You can modify this job's CI/CD variables before running it again.")
+ )
+ end
+ end
end
context 'when the user can not trigger the job because of outdated deployment' do
@@ -30,7 +51,11 @@ RSpec.describe Gitlab::Ci::Status::Build::Manual do
end
context 'when the user can not trigger the job due to another reason' do
- it { expect(subject.illustration[:content]).to match /This job does not run automatically and must be started manually/ }
+ it 'informs the user' do
+ expect(subject.illustration[:content]).to eq(
+ _("This job does not run automatically and must be started manually, but you do not have access to it.")
+ )
+ end
end
end