Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Add spec
Przemek Kosakowski8abd2f240273
diff --git a/frontend/spec/features/products_spec.rb b/frontend/spec/features/products_spec.rbindex 5aa799b944..266c7ce482 100644--- a/frontend/spec/features/products_spec.rb+++ b/frontend/spec/features/products_spec.rb@@ -185,6 +185,24 @@ describe 'Visiting Products', type: :feature, inaccessible: true doendend+ context 'a product with more than one image', js: true do+ let!(:product) { create(:base_product, description: 'Testing sample', name: 'Sample', price: '19.99') }++ before do+ image = File.open(File.expand_path('../fixtures/thinking-cat.jpg', __dir__))+ 5.times { create_image(product, image) }+ end++ it 'display multiple images' do+ visit spree.product_path(product)++ expect(product.images.size).to eq 5+ within('#productThumbnailsCarousel') do+ expect(page).to have_selector("img[data-src$='thinking-cat.jpg']").exactly(5)+ end+ end+ end+context 'an out of stock product without variants' dolet(:product) { Spree::Product.find_by(name: 'Ruby on Rails Tote') }@@ -482,7 +500,7 @@ describe 'Visiting Products', type: :feature, inaccessible: true doendendend-+context 'a product with properties set will' dolet(:property) { create(:property) }let(:prop1) { create(:property, name: 'Amazon Data Catalog', presentation: 'amazon_dataset_catagory') }