Welcome to mirror list, hosted at ThFree Co, Russian Federation.

oauth.rb « main « page « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2b1a9ab2b6a85e9d981dc7b5100a9f810b7adae2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module QA
  module Page
    module Main
      class OAuth < Page::Base
        view 'app/views/doorkeeper/authorizations/new.html.haml' do
          element :authorization_button
        end

        def needs_authorization?
          page.current_url.include?('/oauth')
        end

        def authorize!
          click_element :authorization_button
        end
      end
    end
  end
end