summaryrefslogtreecommitdiff
path: root/qa/qa/page/registration/welcome.rb
blob: 77cdbe8fd9ea8fbe1456edb27f4058a6a43c7f50 (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
35
36
37
38
39
# frozen_string_literal: true

module QA
  module Page
    module Registration
      class Welcome < Page::Base
        view 'app/views/registrations/welcome/show.html.haml' do
          element :get_started_button
          element :role_dropdown
        end

        def has_get_started_button?
          has_element?(:get_started_button)
        end

        def select_role(role)
          select_element(:role_dropdown, role)
        end

        def choose_setup_for_company_if_available
          # Only implemented in EE
        end

        def choose_create_a_new_project_if_available
          # Only implemented in EE
        end

        def click_get_started_button
          Support::Retrier.retry_until do
            click_element :get_started_button
            has_no_element?(:get_started_button)
          end
        end
      end
    end
  end
end

QA::Page::Registration::Welcome.prepend_mod_with('Page::Registration::Welcome', namespace: QA)