-
Notifications
You must be signed in to change notification settings - Fork 299
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
Handle error if the saved product ID is no longer available #10131
Comments
Note to AC ReviewerI also added the IB while working on the ACs. If they look good to you, please move this directly to EB. Thank you! |
Thanks @nfmohit, good catch! These AC/IB are looking good, one question though - do you know what the state of the product ID dropdown will be in this scenario, will it show the old value or an empty one, or possibly revert to the default |
Thank you for the review, @techanvil!
This would basically act the same as the publication dropdown or the Analytics property dropdown in the situation where no publications or GA properties are available. In this case, it would just show the existing value of the |
Thanks @nfmohit, that SGTM! IB ✅ |
QA Update ⚠
Currently, an error does not appear if the user does not have access to the RRM module which is expected. However, I have a question: I logged in as Admin B and ran the code snippet mentioned in QAB to generate an error. As expected per the AC, the error did not appear because Admin B does not have access to the RRM setup, which was configured by Admin A. But, despite using the code snippet as Admin B, I was able to change the Product ID. Is this expected behavior? Steps:
PASS CASES |
Hi @mohitwp, thanks for checking in on this one. Being able to change the module settings via the snippet for the second admin is as expected, at least as things stand, because we don't currently have any ownership-based restrictions on updating module settings. At the settings endpoint level any admin can update the settings for a module regardless of whether they are the owner. However, in practise the user will be prevented from changing the publication by the UI, which disables the RRM setting dropdown when they don't have access to the module. |
QA Update ✅Thank you @techanvil !
|
Feature Description
The Reader Revenue Manager settings edit screen should be updated to handle an error if the saved product ID is no longer available in the publication.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
rrmModuleV2
feature flag is enabled:{PRODUCT_ID}
was not found. Please select a new product ID."Implementation Brief
assets/js/modules/reader-revenue-manager/components/settings/SettingsEdit.js
:StoreErrorNotices
component with the module slug and store name of Reader Revenue Manager.rrmModuleV2
feature flag is enabled, the user has module access, the publication is available, and the saved product ID (within theproductID
module setting) no longer exists within theproductIDs
module setting.ErrorText
with a message according to the ACs.Test Coverage
QA Brief
The error message should not appear. Reload the page to test with the persisted settings, again the error message should not appear.
Use the snippet above but with a non-existent product ID to simulate the case where the selected product ID has been removed from settings.
Changelog entry
The text was updated successfully, but these errors were encountered: