diff options
Diffstat (limited to 'qa/qa')
-rw-r--r-- | qa/qa/page/dashboard/groups.rb (renamed from qa/qa/page/main/groups.rb) | 6 | ||||
-rw-r--r-- | qa/qa/page/group/show.rb | 11 | ||||
-rw-r--r-- | qa/qa/page/main/projects.rb | 16 | ||||
-rw-r--r-- | qa/qa/scenario/gitlab/project/create.rb | 5 | ||||
-rw-r--r-- | qa/qa/specs/config.rb | 20 |
5 files changed, 23 insertions, 35 deletions
diff --git a/qa/qa/page/main/groups.rb b/qa/qa/page/dashboard/groups.rb index 169c5ebc967..3690f40dcfe 100644 --- a/qa/qa/page/main/groups.rb +++ b/qa/qa/page/dashboard/groups.rb @@ -1,9 +1,11 @@ module QA module Page - module Main + module Dashboard class Groups < Page::Base def prepare_test_namespace - return if page.has_content?(Runtime::Namespace.name) + if page.has_content?(Runtime::Namespace.name) + return click_link(Runtime::Namespace.name) + end click_on 'New group' diff --git a/qa/qa/page/group/show.rb b/qa/qa/page/group/show.rb new file mode 100644 index 00000000000..296c311d7c6 --- /dev/null +++ b/qa/qa/page/group/show.rb @@ -0,0 +1,11 @@ +module QA + module Page + module Group + class Show < Page::Base + def go_to_new_project + click_link 'New Project' + end + end + end + end +end diff --git a/qa/qa/page/main/projects.rb b/qa/qa/page/main/projects.rb deleted file mode 100644 index 28d3a424022..00000000000 --- a/qa/qa/page/main/projects.rb +++ /dev/null @@ -1,16 +0,0 @@ -module QA - module Page - module Main - class Projects < Page::Base - def go_to_new_project - ## - # There are 'New Project' and 'New project' buttons on the projects - # page, so we can't use `click_on`. - # - button = find('a', text: /^new project$/i) - button.click - end - end - end - end -end diff --git a/qa/qa/scenario/gitlab/project/create.rb b/qa/qa/scenario/gitlab/project/create.rb index 38522714e64..b860701c304 100644 --- a/qa/qa/scenario/gitlab/project/create.rb +++ b/qa/qa/scenario/gitlab/project/create.rb @@ -13,9 +13,8 @@ module QA def perform Page::Main::Menu.act { go_to_groups } - Page::Main::Groups.act { prepare_test_namespace } - Page::Main::Menu.act { go_to_projects } - Page::Main::Projects.act { go_to_new_project } + Page::Dashboard::Groups.act { prepare_test_namespace } + Page::Group::Show.act { go_to_new_project } Page::Project::New.perform do |page| page.choose_test_namespace diff --git a/qa/qa/specs/config.rb b/qa/qa/specs/config.rb index 78a93828d36..4dfdd6cd93c 100644 --- a/qa/qa/specs/config.rb +++ b/qa/qa/specs/config.rb @@ -25,27 +25,15 @@ module QA def configure_rspec! RSpec.configure do |config| config.expect_with :rspec do |expectations| - # This option will default to `true` in RSpec 4. It makes the `description` - # and `failure_message` of custom matchers include text for helper methods - # defined using `chain`. expectations.include_chain_clauses_in_custom_matcher_descriptions = true end config.mock_with :rspec do |mocks| - # Prevents you from mocking or stubbing a method that does not exist on - # a real object. This is generally recommended, and will default to - # `true` in RSpec 4. mocks.verify_partial_doubles = true end - # Run specs in random order to surface order dependencies. config.order = :random Kernel.srand config.seed - - # config.before(:all) do - # page.current_window.resize_to(1200, 1800) - # end - config.formatter = :documentation config.color = true end @@ -55,8 +43,8 @@ module QA Capybara.register_driver :chrome do |app| capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( 'chromeOptions' => { - 'binary' => '/opt/google/chrome-beta/google-chrome-beta', - 'args' => %w[headless no-sandbox disable-gpu] + 'binary' => '/usr/bin/google-chrome-stable', + 'args' => %w[headless no-sandbox disable-gpu window-size=1280,1024] } ) @@ -64,6 +52,10 @@ module QA .new(app, browser: :chrome, desired_capabilities: capabilities) end + Capybara::Screenshot.register_driver(:chrome) do |driver, path| + driver.browser.save_screenshot(path) + end + Capybara.configure do |config| config.app_host = @address config.default_driver = :chrome |