-
Notifications
You must be signed in to change notification settings - Fork 291
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
Implement the Settings Section unhappy setup path #8179
Comments
Reducing the estimate as this ticket makes use of much of the work in #8134, and it mostly applying this proven approach to a new component. |
Hi @benbowler, thanks for drafting the IB. A couple of points:
|
Thanks @benbowler. The IB LGTM, I've bumped the estimate up to reflect the additional work needed here w/re the OAuth error redirect, and the tests which could get a bit fiddly in places. IB ✅ |
QA Update ✅
OAuth Error Variant
Recording.1427.mp4Recording.1430.mp4Insufficient Permissions Error Variant
Recording.1431.mp4Recording.1433.mp4Generic Error Variant
Recording.1432.mp4Recording.1434.mp4 |
Feature Description
Implement the Settings Section unhappy setup path, including errors returned from the OAuth flow.
See Settings section > setup CTA and
OAuth errors in the design doc.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Note that the AC are mostly identical to #8134 and the implementation reuses much of this tickets approach as well as the AudienceErrorModal component.
assets/js/modules/analytics-4/components/audience-segmentation/settings/SettingsCardVisitorGroups/SetupCTA.js
:showErrorModal
.useEnableAudienceGroup
hook to match theAudienceSegmentationSetupCTAWidget
component, by destructuring the new propsapiErrors
andfailedAudiences
, and adding the new onError callback, settingshowErrorModal
to true:site-kit-wp/assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationSetupCTAWidget.js
Lines 106 to 117 in 41f0bba
AudienceErrorModal
in this component, like so:site-kit-wp/assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationSetupCTAWidget.js
Lines 296 to 308 in 41f0bba
site-kit-wp/assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationSetupCTAWidget.js
Lines 147 to 154 in 41f0bba
site-kit-wp/assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationSetupCTAWidget.js
Lines 156 to 160 in 41f0bba
Test Coverage
QA Brief
Prerequisites
audienceSegmentation
feature flag.Testing the Audience Error Modal Variants
There are three Audience Error Modal variants to test:
OAuth Error Variant
To simulate the OAuth error variant:
Prepare the Environment:
wp_googlesitekit_additional_auth_scopes
entry from thewp_usermeta
table if it exists. This entry contains thehttps://www.googleapis.com/auth/analytics.edit
scope.Trigger the OAuth Error:
Note: this update introduces changes which could effect other OAuth error flows, so it's worth spending QA time reviewing other OAuth error flows to confirm there are no regressions caused by this work.
Insufficient Permissions Error Variant
To simulate the Insufficient Permissions error variant:
Install and Configure Tweak Extension:
sync-audiences
request:.*/wp-json/google-site-kit/v1/modules/analytics-4/data/sync-audiences*
(.*)
POST
403
Trigger the Insufficient Permissions Error:
Generic Error Variant
To simulate the Generic Error variant, there are two scenarios:
Other API Errors:
Simulate Sync Available Audiences API Error:
sync-audiences
request:.*/wp-json/google-site-kit/v1/modules/analytics-4/data/sync-audiences*
(.*)
POST
500
Trigger the Generic Error:
Changelog entry
The text was updated successfully, but these errors were encountered: