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
Fixed flaky specs (#11215)
Damian Legawiece4d130675b06
diff --git a/api/spec/serializers/spree/api/v2/platform/taxonomy_serializer_spec.rb b/api/spec/serializers/spree/api/v2/platform/taxonomy_serializer_spec.rbindex 107f2177bb..5198bbb1e0 100644--- a/api/spec/serializers/spree/api/v2/platform/taxonomy_serializer_spec.rb+++ b/api/spec/serializers/spree/api/v2/platform/taxonomy_serializer_spec.rb@@ -4,12 +4,18 @@ describe Spree::Api::V2::Platform::TaxonomySerializer, retry: 3 dosubject { described_class.new(taxonomy) }let(:taxonomy) { create(:taxonomy) }- let!(:root) { taxonomy.root }- let!(:taxon) { create(:taxon, taxonomy: taxonomy) }+ let(:taxon) { create(:taxon, taxonomy: taxonomy) }it { expect(subject.serializable_hash).to be_kind_of(Hash) }it do+ taxons_json = taxonomy.taxons.map do |taxon|+ {+ id: taxon.id.to_s,+ type: :taxon+ }+ end+expect(subject.serializable_hash).to eq({data: {@@ -24,21 +30,12 @@ describe Spree::Api::V2::Platform::TaxonomySerializer, retry: 3 dorelationships: {root: {data: {- id: root.id.to_s,+ id: taxonomy.root.id.to_s,type: :taxon}},taxons: {- data: [- {- id: root.id.to_s,- type: :taxon- },- {- id: taxon.id.to_s,- type: :taxon- }- ]+ data: taxons_json}}}diff --git a/backend/spec/features/admin/promotions/promotion_spec.rb b/backend/spec/features/admin/promotions/promotion_spec.rbindex 65d73dafa7..d63379099b 100644--- a/backend/spec/features/admin/promotions/promotion_spec.rb+++ b/backend/spec/features/admin/promotions/promotion_spec.rb@@ -31,8 +31,9 @@ describe 'Create New Promotion', type: :feature, js: true doclick_button 'Create'- expect(page).to have_field(id: 'promotion_starts_at', type: :hidden, with: '2012-01-24 16:45')- expect(page).to have_field(id: 'promotion_expires_at', type: :hidden, with: '2012-01-25 22:10')+ promotion = store.promotions.last+ expect(promotion.starts_at).to eq(DateTime.new(2012, 1, 24, 16, 45))+ expect(promotion.expires_at).to eq(DateTime.new(2012, 1, 25, 22, 10))endit 'allows assigning multiple stores' do