summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-10 11:42:21 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-10 11:42:21 +0200
commit1eeb70843f1bcdc9e396dbf1d265879dbea31653 (patch)
tree26e7f49cffa794dd0105c8d5ef1d9cf4c988c64f
parent6b76c19b4098084420f27def39078e8328f3979c (diff)
downloadgitlab-ce-1eeb70843f1bcdc9e396dbf1d265879dbea31653.tar.gz
Fix QA test scenario for creating a new project
-rw-r--r--qa/qa.rb1
-rw-r--r--qa/qa/page/main/menu.rb7
-rw-r--r--qa/qa/page/main/projects.rb16
-rw-r--r--qa/qa/scenario/gitlab/project/create.rb3
4 files changed, 8 insertions, 19 deletions
diff --git a/qa/qa.rb b/qa/qa.rb
index 58cf615cc9f..bdfb8237995 100644
--- a/qa/qa.rb
+++ b/qa/qa.rb
@@ -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