summaryrefslogtreecommitdiff
path: root/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_ci_variable_spec.rb
blob: 0837b720df1534313ac84fdef4aad21a60d1f53d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

module QA
  context 'Verify' do
    describe 'CI variable support' do
      it 'user adds a CI variable' do
        Runtime::Browser.visit(:gitlab, Page::Main::Login)
        Page::Main::Login.act { sign_in_using_credentials }

        Resource::CiVariable.fabricate! do |resource|
          resource.key = 'VARIABLE_KEY'
          resource.value = 'some CI variable'
        end

        Page::Project::Settings::CICD.perform do |settings|
          settings.expand_ci_variables do |page|
            expect(page).to have_field(with: 'VARIABLE_KEY')
            expect(page).not_to have_field(with: 'some CI variable')

            page.reveal_variables

            expect(page).to have_field(with: 'some CI variable')
          end
        end
      end
    end
  end
end