Commit 835a9aaa authored by Grzegorz Bizon's avatar Grzegorz Bizon

Use QA Runtime Browser in EE specific QA scenarios

parent 33e99a21
...@@ -15,10 +15,6 @@ module QA ...@@ -15,10 +15,6 @@ module QA
QA::Specs::Config.act { configure_capybara! } QA::Specs::Config.act { configure_capybara! }
unless args[:geo_skip_setup?] unless args[:geo_skip_setup?]
# TODO, Factory::License -> gitlab-org/gitlab-qa#86
#
QA::Runtime::Scenario.define(:gitlab_address, args[:geo_primary_address])
Geo::Primary.act do Geo::Primary.act do
add_license add_license
enable_hashed_storage enable_hashed_storage
...@@ -49,26 +45,32 @@ module QA ...@@ -49,26 +45,32 @@ module QA
# #
puts 'Adding GitLab EE license ...' puts 'Adding GitLab EE license ...'
QA::Runtime::Browser.visit(:geo_primary, QA::Page::Main::Login) do
Scenario::License::Add.perform(ENV['EE_LICENSE']) Scenario::License::Add.perform(ENV['EE_LICENSE'])
end end
end
def enable_hashed_storage def enable_hashed_storage
# TODO, Factory::HashedStorage - gitlab-org/gitlab-qa#86 # TODO, Factory::HashedStorage - gitlab-org/gitlab-qa#86
# #
puts 'Enabling hashed repository storage setting ...' puts 'Enabling hashed repository storage setting ...'
QA::Runtime::Browser.visit(:geo_primary, QA::Page::Main::Login) do
QA::Scenario::Gitlab::Admin::HashedStorage.perform(:enabled) QA::Scenario::Gitlab::Admin::HashedStorage.perform(:enabled)
end end
end
def add_secondary_node def add_secondary_node
# TODO, Factory::Geo::Node - gitlab-org/gitlab-qa#86 # TODO, Factory::Geo::Node - gitlab-org/gitlab-qa#86
# #
puts 'Adding new Geo secondary node ...' puts 'Adding new Geo secondary node ...'
QA::Runtime::Browser.visit(:geo_primary, QA::Page::Main::Login) do
Scenario::Geo::Node.perform do |node| Scenario::Geo::Node.perform do |node|
node.address = QA::Runtime::Scenario.geo_secondary_address node.address = QA::Runtime::Scenario.geo_secondary_address
end end
end end
end
def set_replication_password def set_replication_password
puts 'Setting replication password on primary node ...' puts 'Setting replication password on primary node ...'
......
...@@ -7,18 +7,12 @@ module QA ...@@ -7,18 +7,12 @@ module QA
require 'qa/ee' require 'qa/ee'
end end
##
# TODO generic solution for screenshot in factories
#
# gitlab-org/gitlab-qa#86
#
def perform_before_hooks def perform_before_hooks
return unless ENV['EE_LICENSE'] return unless ENV['EE_LICENSE']
QA::Runtime::Browser.visit(:gitlab, QA::Page::Main::Login) do
EE::Scenario::License::Add.perform(ENV['EE_LICENSE']) EE::Scenario::License::Add.perform(ENV['EE_LICENSE'])
rescue end
Capybara::Screenshot.screenshot_and_save_page
raise
end end
end end
end end
......
module QA module QA
feature 'GitLab Geo replication', :geo do feature 'GitLab Geo replication', :geo do
scenario 'users pushes code to the primary node' do scenario 'users pushes code to the primary node' do
Page::Main::Entry.act { visit(Runtime::Scenario.geo_primary_address) } Runtime::Browser.visit(:geo_primary, QA::Page::Main::Login) do
Page::Main::Login.act { sign_in_using_credentials } Page::Main::Login.act { sign_in_using_credentials }
Scenario::Gitlab::Project::Create.perform do |scenario| Scenario::Gitlab::Project::Create.perform do |scenario|
...@@ -29,8 +29,8 @@ module QA ...@@ -29,8 +29,8 @@ module QA
end end
end end
Page::Main::Entry.act { visit(Runtime::Scenario.geo_secondary_address) }
Runtime::Browser.visit(:geo_secondary, QA::Page::Main::Login) do
Page::Main::OAuth.act do Page::Main::OAuth.act do
authorize! if needs_authorization? authorize! if needs_authorization?
end end
...@@ -55,4 +55,6 @@ module QA ...@@ -55,4 +55,6 @@ module QA
end end
end end
end end
end
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment