diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-11-12 14:42:05 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-11-12 14:42:05 +0400 |
commit | de09e356934cb90546de7ebf1c4e721a31518235 (patch) | |
tree | 6ce6e0510565951239a5d88f049f03f532610965 /spec | |
parent | 48a1e31010f331db1ec0d7947bfb10b1b3c700ec (diff) |
refactored top panel spec
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/top_panel_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/requests/top_panel_spec.rb b/spec/requests/top_panel_spec.rb index d1cea6d86d2..a5b5a2c9b35 100644 --- a/spec/requests/top_panel_spec.rb +++ b/spec/requests/top_panel_spec.rb @@ -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 |