Closed
Bug 1461886
Opened 7 years ago
Closed 7 years ago
Pass appropriate properties to the FTU onboarding address page
Categories
(Firefox :: WebPayments UI, enhancement, P1)
Firefox
WebPayments UI
Tracking
()
RESOLVED
FIXED
Firefox 62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: MattN, Assigned: prathiksha)
References
Details
(Whiteboard: [webpayments])
Attachments
(1 file, 1 obsolete file)
During the FTU, the address page isn't passed[1] appropriate properties so it's missing the title and doesn't set the `selectedStateKey`.
Here is what it looks like if you click the "add" link from the summary page for the shipping address:
"page": {
"id": "address-page",
"selectedStateKey": "selectedShippingAddress",
"addressFields": null,
"guid": null,
"title": "Add Shipping Address" // from the DTD entity
},
Also, we should consider the `requestShipping` state as we probably shouldn't show "Add Shipping Address" as the title if shipping isn't requested by the merchant. Perhaps we should appear as a billing address entry page to avoid the additional add/edit confusion on the payment method page (until we move the billing address inline in the basic-card form).
As part of your onboarding wizard tests, please check the visible titles and that the selectedStateKey is used.
[1] https://hg.mozilla.org/mozilla-central/annotate/380cf87c1ee3/browser/components/payments/res/paymentRequest.js#l129
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8977095 -
Flags: review?(MattN+bmo)
Reporter | ||
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8977095 [details]
Bug 1461886 - Pass appropriate properties to the FTU onboarding address page.
https://reviewboard.mozilla.org/r/245172/#review251182
Looks good, only some small changes:
::: browser/components/payments/res/paymentRequest.js:128
(Diff revision 1)
>
> if (Object.keys(detail.savedAddresses).length == 0) {
> state.page = {
Nit: add a comment before this `if` that this seection is for the onboarding wizard e.g. "// onboarding wizard flow"
::: browser/components/payments/test/browser/browser_payments_onboarding_wizard.js:51
(Diff revision 1)
> + info("Check if the page title is visible on the address page");
> + let isAddressPageTitleVisible = spawnPaymentDialogTask(frame,
> + PTU.DialogContentTasks.isElementVisible,
> + "address-form h1");
> + ok(isAddressPageTitleVisible, "Address page title is visible");
I think PTU.DialogContentTasks.getElementTextContent is actually more important and you should add that.
::: browser/components/payments/test/browser/browser_payments_onboarding_wizard.js:83
(Diff revision 1)
> let isBasicCardPageSaveButtonVisible =
> await spawnPaymentDialogTask(frame, PTU.DialogContentTasks.isElementVisible,
> "basic-card-form .save-button");
> ok(isBasicCardPageSaveButtonVisible, "Basic card page is rendered");
>
> + /* eslint-disable max-len */
This will disable the rule for the whole file, you should only disable it for the next line by using the different command
Attachment #8977095 -
Flags: review?(MattN+bmo)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Reporter | ||
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8977095 [details]
Bug 1461886 - Pass appropriate properties to the FTU onboarding address page.
https://reviewboard.mozilla.org/r/245172/#review251196
::: browser/components/payments/test/browser/browser_payments_onboarding_wizard.js:59
(Diff revisions 1 - 3)
> "address-form h1");
> ok(isAddressPageTitleVisible, "Address page title is visible");
> + let titleTextContent =
> + spawnPaymentDialogTask(frame, PTU.DialogContentTasks.getElementTextContent,
> + "address-form h1");
> + ok(titleTextContent, "Address page title contains text");
Well I was thinking to actually check the text content is correct, not just that it's truthy.
::: browser/components/payments/test/browser/browser_payments_onboarding_wizard.js:96
(Diff revisions 1 - 3)
> ok(isBasicCardPageTitleVisible, "Basic card page title is visible");
> + titleTextContent =
> + spawnPaymentDialogTask(frame,
> + PTU.DialogContentTasks.getElementTextContent,
> + "basic-card-form h1");
> + ok(titleTextContent, "Basic card page title contains text");
Same here.
Attachment #8977095 -
Flags: review?(MattN+bmo) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8977095 -
Attachment is obsolete: true
Reporter | ||
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8979360 [details]
Bug 1461886 - Pass appropriate properties to the FTU onboarding address page.
https://reviewboard.mozilla.org/r/245516/#review251536
Thanks
::: browser/components/payments/res/paymentRequest.js:130
(Diff revision 1)
> id: "payment-summary",
> },
> };
>
> + // Onboarding wizard flow.
> if (Object.keys(detail.savedAddresses).length == 0) {
Can you fix this to only show if `…requestShipping` is true for now so that we don't leave the UI broken until you fix the next bug.
::: browser/components/payments/test/mochitest/test_address_form.html:140
(Diff revision 1)
> errorStateChange: {
> page: {
> id: "address-page",
> error: "Generic error",
> onboardingWizard: undefined,
> + guid: undefined,
Please use `null` instead to match the default or leave this out. `onboardingWizard` above should be omitted or false.
Attachment #8979360 -
Flags: review?(MattN+bmo) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 11•7 years ago
|
||
Pushed by prathikshaprasadsuman@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/a04c1686e5ab
Pass appropriate properties to the FTU onboarding address page. r=MattN
Comment 12•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
You need to log in
before you can comment on or make changes to this bug.
Description
•