Commit de09e356 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

refactored top panel spec

parent 48a1e310
......@@ -7,8 +7,9 @@ describe "Top Panel", :js => true do
before do
visit projects_path
fill_in "search", :with => "Ke"
sleep(2)
find(:xpath, "//ul[contains(@class,'ui-autocomplete')]/li/a[.=\"Keys\"]").click
within ".ui-autocomplete" do
find(:xpath, "//a[.=\"Keys\"]").click
end
end
it "should be on projects page" do
......@@ -23,8 +24,9 @@ describe "Top Panel", :js => true do
visit project_path(@project)
fill_in "search", :with => "Commi"
sleep(2)
find(:xpath, "//ul[contains(@class,'ui-autocomplete')]/li/a[.=\"#{@project.code} / Commits\"]").click
within ".ui-autocomplete" do
find(:xpath, "//a[.=\"#{@project.code} / Commits\"]").click
end
end
it "should be on projects page" do
......
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