-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix admin promotions controller #5943
Fix admin promotions controller #5943
Conversation
The `authorization_subject` method from `solidus_admin` assumes that all models are in the `Spree` namespace.
0e66bf5
to
77126cc
Compare
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 👍🏻
The spec helper name is a bit misleading, though
This controller still did not know how what to authorize against, and wanted to visit a URL that doesn't exist when clicking on a promotion. This also changes at least the name of each promotion to be a link element that can easily be targeted with Capybara and works with all major browsers.
77126cc
to
2eccd6d
Compare
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 fixing this
promotions/lib/components/admin/solidus_promotions/promotions/index/component.rb
Show resolved
Hide resolved
promotions/lib/components/admin/solidus_promotions/promotions/index/component.rb
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5943 +/- ##
=======================================
Coverage 89.54% 89.54%
=======================================
Files 782 782
Lines 17991 17997 +6
=======================================
+ Hits 16110 16116 +6
Misses 1881 1881 ☔ View full report in Codecov by Sentry. |
Backport after #6016 |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
Summary
Fix admin promotions index controller: visit the correct URL on row click, and authorize against the right model.