summaryrefslogtreecommitdiff
path: root/qa/qa/flow/user.rb
blob: acc77cb9830fc63aeea791a2bc9af238cc98c526 (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
# frozen_string_literal: true

module QA
  module Flow
    module User
      module_function

      def page
        Capybara.current_session
      end

      def confirm_user(username)
        Flow::Login.while_signed_in_as_admin do
          Page::Main::Menu.perform(&:go_to_admin_area)
          Page::Admin::Menu.perform(&:go_to_users_overview)
          Page::Admin::Overview::Users::Index.perform do |index|
            index.search_user(username)
            index.click_user(username)
          end

          Page::Admin::Overview::Users::Show.perform(&:confirm_user)
        end
      end
    end
  end
end