summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/settings/deploy_keys.rb
blob: a8d6f09777c9fca12a7a50cd09415e20994576a4 (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
29
30
31
32
33
34
module QA
  module Page
    module Project
      module Settings
        class DeployKeys < Page::Base
          ##
          # TODO, define all selectors required by this page object
          #
          # See gitlab-org/gitlab-qa#154
          #
          view 'app/views/projects/deploy_keys/edit.html.haml'

          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