diff options
-rw-r--r-- | app/models/project.rb | 6 | ||||
-rw-r--r-- | qa/qa.rb | 1 | ||||
-rw-r--r-- | qa/qa/page/main/menu.rb | 7 | ||||
-rw-r--r-- | qa/qa/page/main/projects.rb | 16 | ||||
-rw-r--r-- | qa/qa/scenario/gitlab/project/create.rb | 3 | ||||
-rw-r--r-- | qa/qa/specs/config.rb | 14 |
6 files changed, 13 insertions, 34 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index d0e02e4e585..d5760164663 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -801,10 +801,12 @@ class Project < ActiveRecord::Base update_column(:has_external_wiki, services.external_wikis.any?) end - def find_or_initialize_services + def find_or_initialize_services(exceptions: []) services_templates = Service.where(template: true) - Service.available_services_names.map do |service_name| + available_services_names = Service.available_services_names - exceptions + + available_services_names.map do |service_name| service = find_service(services, service_name) if service @@ -49,7 +49,6 @@ module QA autoload :Entry, 'qa/page/main/entry' autoload :Menu, 'qa/page/main/menu' autoload :Groups, 'qa/page/main/groups' - autoload :Projects, 'qa/page/main/projects' end module Project diff --git a/qa/qa/page/main/menu.rb b/qa/qa/page/main/menu.rb index 7ce4e9009f5..f7c2086d0dd 100644 --- a/qa/qa/page/main/menu.rb +++ b/qa/qa/page/main/menu.rb @@ -14,6 +14,13 @@ module QA within_user_menu { click_link 'Admin area' } end + def go_to_new_project + within_user_menu do + find('.header-new-dropdown-toggle').click + click_link('New project') + end + end + def sign_out within_user_menu do find('.header-user-dropdown-toggle').click 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..99d0fc42a94 100644 --- a/qa/qa/scenario/gitlab/project/create.rb +++ b/qa/qa/scenario/gitlab/project/create.rb @@ -14,8 +14,7 @@ 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::Main::Menu.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 81a6f755bba..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 @@ -56,7 +44,7 @@ module QA capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( 'chromeOptions' => { 'binary' => '/usr/bin/google-chrome-stable', - 'args' => %w[headless no-sandbox disable-gpu] + 'args' => %w[headless no-sandbox disable-gpu window-size=1280,1024] } ) |