Sha256: f950fd3eb7d508de29c5580a7d1f4530e8c5a3ea4f60f09e7644b1e48cd293df
Contents?: true
Size: 766 Bytes
Versions: 5
Compression:
Stored size: 766 Bytes
Contents
# frozen_string_literal: true shared_examples "a paginated collection" do |options| before do # Current path strips out the request parameters, use current_url when needed # Be aware that current_url can lead to flaky, use with caution if options&.dig(:url) visit current_url else visit current_path end end describe "Number of results per page" do it "lists 25 resources per page by default" do expect(page).to have_css(".table-list tbody tr", count: 25) end it "changes the number of results per page" do within "[data-pagination]" do page.find("details", text: "25").click click_on "50" end expect(page).to have_css(".table-list tbody tr", count: 50) end end end
Version data entries
5 entries across 5 versions & 1 rubygems