2017-08-17 22:00:37 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
feature 'Global search' do
|
2017-08-17 22:00:37 +05:30
|
|
|
let(:user) { create(:user) }
|
2017-09-10 17:25:29 +05:30
|
|
|
let(:project) { create(:project, namespace: user.namespace) }
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
before do
|
|
|
|
project.team << [user, :master]
|
2017-09-10 17:25:29 +05:30
|
|
|
sign_in(user)
|
2017-08-17 22:00:37 +05:30
|
|
|
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 .page', count: 2)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|