diff options
Diffstat (limited to 'spec/features/populate_new_pipeline_vars_with_params_spec.rb')
-rw-r--r-- | spec/features/populate_new_pipeline_vars_with_params_spec.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/spec/features/populate_new_pipeline_vars_with_params_spec.rb b/spec/features/populate_new_pipeline_vars_with_params_spec.rb index 37fea5331a3..937f99558ad 100644 --- a/spec/features/populate_new_pipeline_vars_with_params_spec.rb +++ b/spec/features/populate_new_pipeline_vars_with_params_spec.rb @@ -8,7 +8,6 @@ RSpec.describe "Populate new pipeline CI variables with url params", :js do let(:page_path) { new_project_pipeline_path(project) } before do - stub_feature_flags(new_pipeline_form: false) sign_in(user) project.add_maintainer(user) @@ -16,18 +15,18 @@ RSpec.describe "Populate new pipeline CI variables with url params", :js do end it "var[key1]=value1 populates env_var variable correctly" do - page.within('.ci-variable-list .js-row:nth-child(1)') do - expect(find('.js-ci-variable-input-variable-type').value).to eq('env_var') - expect(find('.js-ci-variable-input-key').value).to eq('key1') - expect(find('.js-ci-variable-input-value').text).to eq('value1') + page.within(all("[data-testid='ci-variable-row']")[0]) do + expect(find("[data-testid='pipeline-form-ci-variable-type']").value).to eq('env_var') + expect(find("[data-testid='pipeline-form-ci-variable-key']").value).to eq('key1') + expect(find("[data-testid='pipeline-form-ci-variable-value']").value).to eq('value1') end end it "file_var[key2]=value2 populates file variable correctly" do - page.within('.ci-variable-list .js-row:nth-child(2)') do - expect(find('.js-ci-variable-input-variable-type').value).to eq('file') - expect(find('.js-ci-variable-input-key').value).to eq('key2') - expect(find('.js-ci-variable-input-value').text).to eq('value2') + page.within(all("[data-testid='ci-variable-row']")[1]) do + expect(find("[data-testid='pipeline-form-ci-variable-type']").value).to eq('file') + expect(find("[data-testid='pipeline-form-ci-variable-key']").value).to eq('key2') + expect(find("[data-testid='pipeline-form-ci-variable-value']").value).to eq('value2') end end end |