-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix: display full cart promotion rule form when adding a new rule #13464
Bugfix: display full cart promotion rule form when adding a new rule #13464
Conversation
32e59d0
to
e5762bb
Compare
d19a14c
to
fd14449
Compare
Fixes Sylius#13463. Adds tests for all four forms: - cart promotion rules and actions - catalog promotion scopes and actions
fd14449
to
865a680
Compare
I really want to thank @vvasiloi for guiding me over the process of writing these behat scenarios, so – thank you! |
Thank you, Rimas! 🥇 |
@@ -131,3 +131,11 @@ Feature: Creating a catalog promotion | |||
Then there should be 1 new catalog promotion on the list | |||
And it should have "winter_sale" code and "Winter sale" name | |||
And it should have priority equal to 10 | |||
|
|||
@ui @javascript |
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.
we could add @no-api
tag
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.
I don't thinks so. API scenarios should have the @api
tag and you either run Behat with --tags="@api"
to include API scenarios or with --tags="~@api"
to exclude them.
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.
@no-api
is an already existing tag though. Perhaps it would make sense to remove it everywhere, if ~@api
is to be used instead.
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.
Then I'm curious why it exists...
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.
By the looks of it, Lukasz is the one who introduced the tag and it was added to about 80 scenarios, but I don't see it actually being used. Perhaps it's obsolete. Let's see what Lukasz has to say in his defense.
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.
The @no-api
tag was created to mark scenarios that we don't want to cover in API. The main reason was to be aware of how many features and scenarios still need to be covered
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.
Thanks for the clarification. It make a bit more sense now.
At this point, isn't it already easier to explicitly mark the scenarios that we want to cover in the API and assume that the rest are "@no-api"?
I'm just concerned that this is going to be confusing for users and contributors and probably even become redundant once all current features are covered in the new API.
@lchrusciel so should I add the tag in a new PR? 😀 |
Fixes #13463
Additionally to the bugfix, I made the jquery selectors more explicit by using direct ancestors. In fact, that's how I discovered this bug, because we were patching app.js to make these selectors more explicit, which allowed us embed additional collection forms inside action/rule collections forms.