Commit fc9ecdbb authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add QA views / selectors coupling to group/project pages

parent b91b6418
......@@ -2,6 +2,15 @@ module QA
module Page
module Dashboard
class Groups < Page::Base
view 'app/views/shared/groups/_search_form.html.haml' do
element :groups_filter, 'search_field_tag :filter'
element :groups_filter_placeholder, 'Filter by name...'
end
view 'app/views/dashboard/_groups_head.html.haml' do
element :new_group_button, 'link_to _("New group")'
end
def filter_by_name(name)
fill_in 'Filter by name...', with: name
end
......
......@@ -2,6 +2,8 @@ module QA
module Page
module Dashboard
class Projects < Page::Base
view 'app/views/dashboard/projects/index.html.haml'
def go_to_project(name)
find_link(text: name).click
end
......
......@@ -2,6 +2,17 @@ module QA
module Page
module Group
class New < Page::Base
view 'app/views/shared/_group_form.html.haml' do
element :group_path_field, 'text_field :path'
element :group_name_field, 'text_field :name'
element :group_description_field, 'text_area :description'
end
view 'app/views/groups/new.html.haml' do
element :create_group_button, "submit 'Create group'"
element :visibility_radios, 'visibility_level:'
end
def set_path(path)
fill_in 'group_path', with: path
fill_in 'group_name', with: path
......
......@@ -35,7 +35,7 @@ module QA
def self.evaluate(&block)
Page::View::DSL.new.tap do |evaluator|
evaluator.instance_exec(&block)
evaluator.instance_exec(&block) if block_given?
end
end
......
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