Commit e90bf94e authored by Gabriel Mazetto's avatar Gabriel Mazetto

Fix replication QA specs, extract filter_by_name

parent c2c46013
......@@ -5,12 +5,16 @@ module QA
view 'app/views/dashboard/projects/index.html.haml'
def go_to_project(name)
filter_by_name(name)
find_link(text: name).click
end
def filter_by_name(name)
page.within('form#project-filter-form') do
fill_in :name, with: name
page.find_field('name').native.send_key(:enter)
end
find_link(text: name).click
end
end
end
......
......@@ -7,7 +7,7 @@ module QA
page.within(selector) do
find_button('Expand').click
yield
yield if block_given?
end
end
end
......
......@@ -38,7 +38,7 @@ module QA
expect(page).to have_content 'You are on a secondary (read-only) Geo node'
Page::Main::Menu.perform do |menu|
Page::Menu::Main.perform do |menu|
menu.go_to_projects
expect(page).to have_content(geo_project_name)
......@@ -57,7 +57,7 @@ module QA
# rename the project
visit(Runtime::Browser.url_for(:geo_primary, QA::Page::Main::Home))
Page::Main::Menu.act { go_to_projects }
Page::Menu::Main.act { go_to_projects }
Page::Dashboard::Projects.perform do |dashboard|
dashboard.go_to_project(geo_project_name)
......@@ -80,7 +80,7 @@ module QA
expect(page).to have_content 'You are on a secondary (read-only) Geo node'
Page::Main::Menu.perform do |menu|
Page::Menu::Main.perform do |menu|
menu.go_to_projects
expect(page).to have_content(geo_project_newname)
......
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