diff options
Diffstat (limited to 'qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb')
-rw-r--r-- | qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb index cc4d0e1f6b5..ccd4d34a916 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb @@ -3,7 +3,7 @@ module QA RSpec.describe 'Verify' do describe 'Add or Remove CI variable via UI', :smoke do - let!(:project) do + let(:project) do Resource::Project.fabricate_via_api! do |project| project.name = 'project-with-ci-variables' project.description = 'project with CI variables' @@ -12,31 +12,27 @@ module QA before do Flow::Login.sign_in + project.visit! add_ci_variable - open_ci_cd_settings end it 'user adds a CI variable', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/395' do - Page::Project::Settings::CICD.perform do |settings| - settings.expand_ci_variables do |page| - expect(page).to have_text('VARIABLE_KEY') - expect(page).not_to have_text('some_CI_variable') + Page::Project::Settings::CiVariables.perform do |ci_variable| + expect(ci_variable).to have_text('VARIABLE_KEY') + expect(ci_variable).to have_no_text('some_CI_variable') - page.click_reveal_ci_variable_value_button + ci_variable.click_reveal_ci_variable_value_button - expect(page).to have_text('some_CI_variable') - end + expect(ci_variable).to have_text('some_CI_variable') end end it 'user removes a CI variable', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/394' do - Page::Project::Settings::CICD.perform do |settings| - settings.expand_ci_variables do |page| - page.click_edit_ci_variable - page.click_ci_variable_delete_button + Page::Project::Settings::CiVariables.perform do |ci_variable| + ci_variable.click_edit_ci_variable + ci_variable.click_ci_variable_delete_button - expect(page).not_to have_text('VARIABLE_KEY') - end + expect(ci_variable).to have_text('There are no variables yet', wait: 60) end end @@ -50,11 +46,6 @@ module QA ci_variable.masked = false end end - - def open_ci_cd_settings - project.visit! - Page::Project::Menu.perform(&:go_to_ci_cd_settings) - end end end end |