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

entry.rb « main « page « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ac939732b1dd24f8dc758de86f11d3209ececb6b (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
module QA
  module Page
    module Main
      class Entry < Page::Base
        def visit_login_page
          visit("#{Runtime::Scenario.gitlab_address}/users/sign_in")
          wait_for_instance_to_be_ready
        end

        private

        def wait_for_instance_to_be_ready
          # This resolves cold boot / background tasks problems
          #
          start = Time.now

          while Time.now - start < 240
            break if page.has_css?('.application', wait: 10)
            refresh
          end
        end
      end
    end
  end
end