Skip to content

armgit / spree

Public Imported from GitHub
0

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.

Fix one spec in Promotion Option Value

Damian Legawiecb64b7ed19970
diff --git a/backend/app/views/spree/admin/promotions/rules/_option_value.html.erb b/backend/app/views/spree/admin/promotions/rules/_option_value.html.erb
index b07d02b88d..9b2eedcf60 100644
--- a/backend/app/views/spree/admin/promotions/rules/_option_value.html.erb
+++ b/backend/app/views/spree/admin/promotions/rules/_option_value.html.erb
@@ -24,11 +24,11 @@
</a>
</div>
<div class="card-body row p-3">
- <div class="col-12 col-md-6">
+ <div class="col-12 col-md-6 product-select">
<!-- TODO -->
<%= select_tag "product", nil, class: 'js-promo-rule-option-value-product-select d-block w-100' %>
</div>
- <div class="col-12 col-md-6">
+ <div class="col-12 col-md-6 option-value-select">
<%#= select_tag "#{param_prefix}[preferred_eligible_values][{{ productSelect.value }}]", nil, class: 'js-promo-rule-option-value-option-values-select d-block w-100' %>
<%= select "#{param_prefix}","[preferred_eligible_values][]", {}, { include_hidden: true }, class: 'js-promo-rule-option-value-option-values-select d-block w-100' %>
</div>
diff --git a/backend/spec/features/admin/promotions/option_value_rule_spec.rb b/backend/spec/features/admin/promotions/option_value_rule_spec.rb
index c0b72e2bf8..c2d8f6b9d0 100644
--- a/backend/spec/features/admin/promotions/option_value_rule_spec.rb
+++ b/backend/spec/features/admin/promotions/option_value_rule_spec.rb
@@ -25,8 +25,8 @@ describe 'Promotion with option value rule', type: :feature do
end
within('.promo-rule-option-value') do
- select2 product.name, css: '.js-promo-rule-option-value-product-select', search: true
- select2 option_value.name, css: '.js-promo-rule-option-value-option-values-select', search: true
+ select2 product.name, css: '.product-select', search: true
+ select2 option_value.name, css: '.option-value-select', search: true
end
wait_for { !page.has_button?('Update') }