summaryrefslogtreecommitdiff
path: root/qa/qa/specs/features/browser_ui/4_verify
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/specs/features/browser_ui/4_verify')
-rw-r--r--qa/qa/specs/features/browser_ui/4_verify/ci_variable/prefill_variables_spec.rb72
-rw-r--r--qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb21
2 files changed, 79 insertions, 14 deletions
diff --git a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/prefill_variables_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/prefill_variables_spec.rb
new file mode 100644
index 00000000000..8352ad6aa33
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/prefill_variables_spec.rb
@@ -0,0 +1,72 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Verify' do
+ describe 'Pipeline with prefill variables' do
+ let(:prefill_variable_description1) { Faker::Lorem.sentence }
+ let(:prefill_variable_value1) { Faker::Lorem.word }
+ let(:prefill_variable_description2) { Faker::Lorem.sentence }
+ let(:project) do
+ Resource::Project.fabricate_via_api! do |project|
+ project.name = 'project-with-prefill-variables'
+ end
+ end
+
+ let!(:commit) do
+ Resource::Repository::Commit.fabricate_via_api! do |commit|
+ commit.project = project
+ commit.commit_message = 'Add .gitlab-ci.yml'
+ commit.add_files(
+ [
+ {
+ file_path: '.gitlab-ci.yml',
+ content: <<~YAML
+ variables:
+ TEST1:
+ value: #{prefill_variable_value1}
+ description: #{prefill_variable_description1}
+ TEST2:
+ description: #{prefill_variable_description2}
+ TEST3:
+ value: test 3 value
+ TEST4: test 4 value
+
+ test:
+ script: echo "$FOO"
+ YAML
+ }
+ ]
+ )
+ end
+ end
+
+ before do
+ Flow::Login.sign_in
+ project.visit!
+
+ # Navigate to Run Pipeline page
+ Page::Project::Menu.perform(&:click_ci_cd_pipelines)
+ Page::Project::Pipeline::Index.perform(&:click_run_pipeline_button)
+ end
+
+ it(
+ 'shows only variables with description as prefill variables on the run pipeline page',
+ testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/371204'
+ ) do
+ Page::Project::Pipeline::New.perform do |new|
+ aggregate_failures do
+ expect(new).to have_field('Input variable key', with: 'TEST1')
+ expect(new).to have_field('Input variable value', with: prefill_variable_value1)
+ expect(new).to have_content(prefill_variable_description1)
+
+ expect(new).to have_field('Input variable key', with: 'TEST2')
+ expect(new).to have_content(prefill_variable_description2)
+
+ expect(new).not_to have_field('Input variable key', with: 'TEST3')
+ expect(new).not_to have_field('Input variable key', with: 'TEST4')
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb
index 412498476f0..f9113573295 100644
--- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb
+++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb
@@ -1,12 +1,7 @@
# frozen_string_literal: true
module QA
- # TODO: remove feature flag upon rollout completion
- # FF rollout issue: https://gitlab.com/gitlab-org/gitlab/-/issues/363186
- RSpec.describe 'Verify', :runner, feature_flag: {
- name: 'ci_docker_image_pull_policy',
- scope: :global
- } do
+ RSpec.describe 'Verify', :runner do
describe 'Pipeline with image:pull_policy' do
let(:runner_name) { "qa-runner-#{Faker::Alphanumeric.alphanumeric(number: 8)}" }
let(:job_name) { "test-job-#{pull_policies.join('-')}" }
@@ -27,10 +22,6 @@ module QA
end
before do
- Runtime::Feature.enable(:ci_docker_image_pull_policy)
- # Give the feature some time to switch
- sleep(30)
-
update_runner_policy(allowed_policies)
add_ci_file
Flow::Login.sign_in
@@ -39,12 +30,13 @@ module QA
end
after do
- Runtime::Feature.disable(:ci_docker_image_pull_policy)
-
runner.remove_via_api!
end
- context 'when policy is allowed' do
+ context(
+ 'when policy is allowed',
+ quarantine: { type: :flaky, issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/369397' }
+ ) do
let(:allowed_policies) { %w[if-not-present always never] }
where do
@@ -102,7 +94,8 @@ module QA
it(
'fails job with policy not allowed message',
- testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/368853'
+ testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/368853',
+ quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/371420', type: :stale }
) do
visit_job