Closed Bug 1440530 Opened 6 years ago Closed 6 years ago

Clean up some duplication in the webpayments mochitest-browser tests for setting up dialogs

Categories

(Firefox :: WebPayments UI, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: jaws, Assigned: jaws)

Details

(Whiteboard: [webpayments])

Attachments

(1 file)

      No description provided.
Comment on attachment 8953311 [details]
Bug 1440530 - Move dialog setup code out to a helper function for the webpayments mochitest-browser tests.

https://reviewboard.mozilla.org/r/222584/#review228514

Thanks

::: toolkit/components/payments/test/browser/head.js:152
(Diff revision 1)
>                                        (subject, data) => data == "add");
>    profileStorage.creditCards.add(PTU.BasicCards.JohnDoe);
>    await onChanged;
>  }
>  
> +async function setupPaymentDialog(browser, {methodData, details, options, taskFn}) {

It's not exactly clear where the `taskFn` will run (in the merchant tab or in the dialog?). Maybe rename to merchantTaskFn like `spawnInDialogForMerchantTask`.

A JSDoc comment like the other helpers would be useful too.
Attachment #8953311 - Flags: review?(MattN+bmo) → review+
Pushed by jwein@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/624ce4190bce
Move dialog setup code out to a helper function for the webpayments mochitest-browser tests. r=mattn
https://hg.mozilla.org/mozilla-central/rev/624ce4190bce
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Priority: -- → P1
Whiteboard: [webpayments]
Product: Toolkit → Firefox
Target Milestone: mozilla60 → Firefox 60
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.