This repository was archived by the owner on Feb 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Fix specs #104
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We were using Spree helpers before; those don't exist anymore. Also we missed importing the PromotionsHelper, and implicitly relied on the one provided by Solidus.
In some spots we were still relying on Solidus partials, even though we have them in the app.
Previously, the activation UI for promotions was based on complicated Javascript. This change allows us all the same options, and the user will be warned by validation errors if they try to create a promotion with both a code and the apply automatically option set. For existing promotions, `apply_automatically` will be disabled if either a path is set or a promo code is set.
@@ -1,5 +1,5 @@ | |||
<% admin_breadcrumb(link_to plural_resource_name(Spree::Promotion), spree.admin_promotions_path) %> | |||
<% admin_breadcrumb(link_to @promotion.name, spree.admin_promotion_path(@promotion.id)) %> | |||
<% admin_breadcrumb(link_to plural_resource_name(Spree::Promotion), solidus_friendly_promotions.admin_promotions_path) %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this change too?
<% admin_breadcrumb(link_to plural_resource_name(Spree::Promotion), spree.admin_promotions_path) %> | ||
<% admin_breadcrumb(link_to @promotion.name, spree.admin_promotion_path(@promotion.id)) %> | ||
<% admin_breadcrumb(link_to plural_resource_name(Spree::Promotion), solidus_friendly_promotions.admin_promotions_path) %> | ||
<% admin_breadcrumb(link_to @promotion.name, solidus_friendly_promotions.admin_promotion_path(@promotion.id)) %> | ||
<% admin_breadcrumb(plural_resource_name(Spree::PromotionCodeBatch)) %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
<% end %> | ||
</div> | ||
|
||
<% if f.object.new_record? %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add || present? here?
This got by undetected because the spec was using the wrong model name.
If this promotion is activated by a path, it makes sense to be able to change it.
davecandlescience
approved these changes
Apr 16, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work
mamhoff
added a commit
that referenced
this pull request
Jul 1, 2024
mamhoff
added a commit
that referenced
this pull request
Oct 25, 2024
mamhoff
added a commit
that referenced
this pull request
Oct 25, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The removal of the legacy promotion system from the main Solidus repo exposed some hidden dependencies. This PR removes those hidden dependencies.