gitlab-org--gitlab-foss/spec/features/global_search_spec.rb

29 lines
692 B
Ruby
Raw Normal View History

2016-11-07 18:36:58 +00:00
require 'spec_helper'
2018-07-05 06:32:05 +00:00
describe 'Global search' do
2016-11-07 18:36:58 +00:00
let(:user) { create(:user) }
let(:project) { create(:project, namespace: user.namespace) }
2016-11-07 18:36:58 +00:00
before do
project.add_master(user)
sign_in(user)
2016-11-07 18:36:58 +00:00
end
describe 'I search through the issues and I see pagination' do
before do
allow_any_instance_of(Gitlab::SearchResults).to receive(:per_page).and_return(1)
create_list(:issue, 2, project: project, title: 'initial')
end
it "has a pagination" do
visit dashboard_projects_path
fill_in "search", with: "initial"
click_button "Go"
select_filter("Issues")
expect(page).to have_selector('.gl-pagination .next')
2016-11-07 18:36:58 +00:00
end
end
end