The easy part looks the same as CurrencyTest: create, edit, delete a checkout flow (commerce/modules/price/src/Tests/CurrencyTest.php).

The less easy part is testing the checkout pane drag&drop form that's shown on the checkout flow edit form.
We'll probably want to see how core does it for Manage form / manage display (core/modules/field_ui/src/Tests/ManageDisplayTest.php,ManageFieldsTest.php).

Comments

bojanz created an issue. See original summary.

nickdickinsonwilde’s picture

Assigned: Unassigned » nickdickinsonwilde
steveoliver’s picture

Issue summary: View changes

Updating issue summary with location of reference tests.

bojanz’s picture

Issue tags: +drupaldevdays

Tagging for dev days. Of course, as long as it's unassigned it can be taken by non-devdays people too :)

@NickWilde
Any updates on progress?

bojanz’s picture

Issue tags: -drupaldevdays +DevDaysMilan
finne’s picture

I will pick this up today at DDDmilan

finne’s picture

Assigned: nickdickinsonwilde » finne
finne’s picture

Patch for this issue that adds tests:
https://github.com/drupalcommerce/commerce/pull/427

I added 2 todo's that might be added to expand the test coverage. But the basics are now tested.

mglaman’s picture

Status: Active » Needs review

Marking for review, since we have a PR in process.

bojanz’s picture

Status: Needs review » Active
Issue tags: -DevDaysMilan

Committed finne's work:
http://cgit.drupalcode.org/commerce/commit/?id=d696d45
This is a good start.

We also need to test the editing of checkout pane settings. Once that part is done, we can close this issue.

finne’s picture

Thanks for the edit, bojanz. I will continue work on this issue, hopefully somewhere this week.

borisson_’s picture

I started work on this: https://github.com/drupalcommerce/commerce/pull/463, there seems to be an error when running the test.

Exception: Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\MultistepDefault' not found or invalid function name Drupal\Core\Form\FormValidator->doValidateForm()() (Line: 277)

Not sure how to resolve that.

borisson_’s picture

Test is green locally, travis is still running.

  • bojanz committed 6bf1f1a on 8.x-2.x
    Issue #2710979: Add tests for the checkout flow UI (#463)
    
bojanz’s picture

Status: Active » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.