refactored top panel spec

This commit is contained in:
Dmitriy Zaporozhets 2011-11-12 12:42:05 +02:00
parent 48a1e31010
commit de09e35693

View file

@ -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