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