Commit 1eeb7084 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix QA test scenario for creating a new project

parent 6b76c19b
......@@ -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
......
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
......
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