Fix QA test scenario for creating a new project
This commit is contained in:
parent
6b76c19b40
commit
1eeb70843f
4 changed files with 8 additions and 19 deletions
1
qa/qa.rb
1
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue