Skip to content
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

Merged

Conversation

rimas-kudelis
Copy link
Contributor

@rimas-kudelis rimas-kudelis commented Jan 11, 2022

Fixes #13463

Q A
Branch? 1.11
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes #13463
License MIT

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.

@rimas-kudelis rimas-kudelis requested a review from a team as a code owner January 11, 2022 07:45
@probot-autolabeler probot-autolabeler bot added the Admin AdminBundle related issues and PRs. label Jan 11, 2022
@rimas-kudelis rimas-kudelis force-pushed the bugfix/open-full-add-promotion-rule-form branch 2 times, most recently from 32e59d0 to e5762bb Compare January 11, 2022 08:23
@rimas-kudelis rimas-kudelis force-pushed the bugfix/open-full-add-promotion-rule-form branch 3 times, most recently from d19a14c to fd14449 Compare January 20, 2022 12:30
@vvasiloi vvasiloi added the Bug Confirmed bugs or bugfixes. label Jan 20, 2022
Fixes Sylius#13463.
Adds tests for all four forms:
- cart promotion rules and actions
- catalog promotion scopes and actions
@rimas-kudelis rimas-kudelis force-pushed the bugfix/open-full-add-promotion-rule-form branch from fd14449 to 865a680 Compare January 20, 2022 15:16
@rimas-kudelis
Copy link
Contributor Author

I really want to thank @vvasiloi for guiding me over the process of writing these behat scenarios, so – thank you!

@lchrusciel lchrusciel merged commit 923ea63 into Sylius:1.11 Jan 21, 2022
@lchrusciel
Copy link
Member

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
Copy link
Member

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

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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...

Copy link
Contributor

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.

Copy link
Member

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

Copy link
Contributor

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.

@rimas-kudelis
Copy link
Contributor Author

@lchrusciel so should I add the tag in a new PR? 😀

@rimas-kudelis rimas-kudelis deleted the bugfix/open-full-add-promotion-rule-form branch January 26, 2022 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin AdminBundle related issues and PRs. Bug Confirmed bugs or bugfixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants