Sha256: 704955e16f9ff9be32a8236a1d93e69b579f51b6df0b92106db8ae65d91d30b7
Contents?: true
Size: 661 Bytes
Versions: 38
Compression:
Stored size: 661 Bytes
Contents
# frozen_string_literal: true shared_examples "a paginated resource" do let(:collection_size) { 30 } before do visit_feature end it "lists 20 resources per page by default" do expect(page).to have_css(resource_selector, count: 20) expect(page).to have_css(".pagination .page", count: 2) end it "results per page can be changed from the selector" do expect(page).to have_css(".results-per-page") within ".results-per-page" do page.find("a", text: "20").click click_link "50" end expect(page).to have_css(resource_selector, count: collection_size) expect(page).to have_no_css(".pagination") end end
Version data entries
38 entries across 38 versions & 2 rubygems