mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
hide pagination for single page catalogue
+ update specs then
This commit is contained in:
@@ -11,7 +11,8 @@
|
||||
.sixteen.columns
|
||||
= render partial: 'sort', locals: { pagy: pagy, search_term: search_term, producer_id: producer_id, category_id: category_id }
|
||||
= render partial: 'table', locals: { products: products }
|
||||
= render partial: 'admin/shared/v3/pagy', locals: { pagy: pagy, reflex: "click->Products#fetch" }
|
||||
- if pagy.pages > 1
|
||||
= render partial: 'admin/shared/v3/pagy', locals: { pagy: pagy, reflex: "click->Products#fetch" }
|
||||
- else
|
||||
#no-products
|
||||
= render partial: "no_products", locals: { search_term: search_term, producer_id: producer_id, category_id: category_id }
|
||||
|
||||
@@ -73,7 +73,6 @@ describe 'As an admin, I can see the new product page' do
|
||||
search_for "searchable product"
|
||||
|
||||
expect(page).to have_field "search_term", with: "searchable product"
|
||||
expect_page_to_be 1
|
||||
expect_products_count_to_be 1
|
||||
end
|
||||
|
||||
@@ -85,14 +84,12 @@ describe 'As an admin, I can see the new product page' do
|
||||
expect_per_page_to_be 15
|
||||
expect_products_count_to_be 15
|
||||
search_for "searchable product"
|
||||
expect_page_to_be 1
|
||||
expect_products_count_to_be 1
|
||||
end
|
||||
|
||||
it "can clear filters" do
|
||||
search_for "searchable product"
|
||||
expect(page).to have_field "search_term", with: "searchable product"
|
||||
expect_page_to_be 1
|
||||
expect_products_count_to_be 1
|
||||
expect(page).to have_selector "table.products tbody tr td", text: product_by_name.name
|
||||
|
||||
@@ -118,7 +115,6 @@ describe 'As an admin, I can see the new product page' do
|
||||
search_by_producer "Producer 1"
|
||||
|
||||
expect(page).to have_select "producer_id", selected: "Producer 1"
|
||||
expect_page_to_be 1
|
||||
expect_products_count_to_be 1
|
||||
end
|
||||
end
|
||||
@@ -133,7 +129,6 @@ describe 'As an admin, I can see the new product page' do
|
||||
search_by_category "Category 1"
|
||||
|
||||
expect(page).to have_select "category_id", selected: "Category 1"
|
||||
expect_page_to_be 1
|
||||
expect_products_count_to_be 1
|
||||
expect(page).to have_selector "table.products tbody tr td", text: product_by_category.name
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user