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

        def sign_in_using_oauth
          click_link class: 'btn btn-custom-login gitlab'

          if page.has_content?(_('Authorize GitLab Mattermost to use your account?'))
            click_button 'Authorize'
          end
        end

        def self.path
          '/login'
        end
      end
    end
  end
end