gitlab-org--gitlab-foss/spec/requests/top_panel_spec.rb

38 lines
837 B
Ruby
Raw Normal View History

2012-01-13 16:28:58 -05:00
__END__
2011-10-08 17:36:38 -04:00
require 'spec_helper'
describe "Top Panel", :js => true do
before { login_as :user }
describe "Search autocomplete" do
before do
2011-10-08 17:36:38 -04:00
visit projects_path
fill_in "search", :with => "Ke"
2011-11-15 03:34:30 -05:00
within ".ui-autocomplete" do
2011-11-12 05:42:05 -05:00
find(:xpath, "//a[.=\"Keys\"]").click
end
2011-10-08 17:36:38 -04:00
end
it "should be on projects page" do
current_path.should == keys_path
2011-10-08 17:36:38 -04:00
end
end
describe "with project" do
before do
2011-10-08 17:36:38 -04:00
@project = Factory :project
@project.add_access(@user, :read)
visit project_path(@project)
fill_in "search", :with => "Commi"
2011-11-15 03:34:30 -05:00
within ".ui-autocomplete" do
2011-11-12 05:42:05 -05:00
find(:xpath, "//a[.=\"#{@project.code} / Commits\"]").click
end
2011-10-08 17:36:38 -04:00
end
it "should be on projects page" do
current_path.should == project_commits_path(@project)
2011-10-08 17:36:38 -04:00
end
end
end