summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/settings/deploy_keys.rb
blob: 4028b8cccc5c5d12dd2d422361b0fb68f2058b3d (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
module QA
  module Page
    module Project
      module Settings
        class DeployKeys < Page::Base
          def fill_key_title(title)
            fill_in 'deploy_key_title', with: title
          end

          def fill_key_value(key)
            fill_in 'deploy_key_key', with: key
          end

          def add_key
            click_on 'Add key'
          end

          def has_key_title?(title)
            page.within('.deploy-keys') do
              page.find('.title', text: title)
            end
          end
        end
      end
    end
  end
end