Sha256: c14cc1e85f828e8dbe048dc020d9e7b24f723dafa48695ef88dcc3c3ff097196
Contents?: true
Size: 675 Bytes
Versions: 31
Compression:
Stored size: 675 Bytes
Contents
# frozen_string_literal: true shared_examples "a paginated resource" do let(:collection_size) { 30 } before do visit_component 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 sleep 2 expect(page).to have_css(resource_selector, count: collection_size) expect(page).to have_no_css(".pagination") end end
Version data entries
31 entries across 31 versions & 1 rubygems