Commit de09e356934cb90546de7ebf1c4e721a31518235
1 parent
48a1e310
Exists in
master
and in
4 other branches
refactored top panel spec
Showing
1 changed file
with
6 additions
and
4 deletions
Show diff stats
spec/requests/top_panel_spec.rb
... | ... | @@ -7,8 +7,9 @@ describe "Top Panel", :js => true do |
7 | 7 | before do |
8 | 8 | visit projects_path |
9 | 9 | fill_in "search", :with => "Ke" |
10 | - sleep(2) | |
11 | - find(:xpath, "//ul[contains(@class,'ui-autocomplete')]/li/a[.=\"Keys\"]").click | |
10 | + within ".ui-autocomplete" do | |
11 | + find(:xpath, "//a[.=\"Keys\"]").click | |
12 | + end | |
12 | 13 | end |
13 | 14 | |
14 | 15 | it "should be on projects page" do |
... | ... | @@ -23,8 +24,9 @@ describe "Top Panel", :js => true do |
23 | 24 | visit project_path(@project) |
24 | 25 | |
25 | 26 | fill_in "search", :with => "Commi" |
26 | - sleep(2) | |
27 | - find(:xpath, "//ul[contains(@class,'ui-autocomplete')]/li/a[.=\"#{@project.code} / Commits\"]").click | |
27 | + within ".ui-autocomplete" do | |
28 | + find(:xpath, "//a[.=\"#{@project.code} / Commits\"]").click | |
29 | + end | |
28 | 30 | end |
29 | 31 | |
30 | 32 | it "should be on projects page" do | ... | ... |