summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/new.rb
blob: a87313b2cb9c445c6acf78db36d2596f9ca060eb (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
module QA
  module Page
    module Project
      class New < Page::Base
        ##
        # TODO, define all selectors required by this page object
        #
        # See gitlab-org/gitlab-qa#154
        #
        view 'app/views/projects/new.html.haml'

        def choose_test_namespace
          find('#s2id_project_namespace_id').click
          find('.select2-result-label', text: Runtime::Namespace.name).click
        end

        def choose_name(name)
          fill_in 'project_path', with: name
        end

        def add_description(description)
          fill_in 'project_description', with: description
        end

        def create_new_project
          click_on 'Create project'
        end
      end
    end
  end
end