Move addon related data to GraphQL
What does this MR do and why?
Moves add on related data listed below (currently in presentation layer) to GraphQL. isAddon
is the only field that's used from the app component with this code change, the remaining fields will be used from the app component in subsequent MRs.
hasExpiration
isAddon
label
productUnit
quantityPerPack
Tests have been added for the addon app component for both CI minutes and Storage in a previous MR to make sure the refactor doesn't break the app.
Screenshots or screen recordings
isAddon
is being used as a query param for purchase confirmation API, I've verified the new values are being passes in the same manner as before:
Addon | Before | After |
---|---|---|
CI Minutes | ||
Storage |
The UI is unchanged and is exactly the same as before.
How to set up and validate locally
To verify the flow for isAddon
change:
- Go to Usage Quotas for a group that you own
- Go to Storage tab and click on
Purchase more storage
- Finish the flow (with
Preserve log
in dev tools enabled) - On Confirming a purchase, check
subscriptions
API payload
Test suite that's affected by this change is ee/spec/frontend/subscriptions/buy_addons_shared/app_spec.js
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #346620 (closed)