Sha256: 7a423926efcdb2ea2fa3c913fd4ab162ad2f1118d8603583b9a9c0c4def99cda
Contents?: true
Size: 633 Bytes
Versions: 2
Compression:
Stored size: 633 Bytes
Contents
module Features module Pagination def paginates(factory:, increment:, selector:, attributes:{}) factory_string = factory.to_s factory = factory_string.underscore.to_sym factory_plural = factory_string.pluralize.underscore.to_sym number_of_results_for_two_pages = increment + 1 results = FactoryBot. create_list(factory, number_of_results_for_two_pages, attributes) yield expect(page).to have_selector(selector, count: increment) click_on('Next') expect(page).to have_selector(selector, count: 1) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hyper-kitten-meow-0.1.2 | spec/support/features/pagination.rb |
hyper-kitten-meow-0.1.1 | spec/support/features/pagination.rb |