From ef9f6cd323a76703668cf36994f6e5507566bc86 Mon Sep 17 00:00:00 2001 From: Steve Oliver Date: Tue, 6 Dec 2016 14:20:59 -0800 Subject: [PATCH 1/2] Add test for Payments task link on Order pages. --- .../payment/tests/src/Functional/PaymentAdminTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/payment/tests/src/Functional/PaymentAdminTest.php b/modules/payment/tests/src/Functional/PaymentAdminTest.php index 199ead4331..7b65ad4adb 100644 --- a/modules/payment/tests/src/Functional/PaymentAdminTest.php +++ b/modules/payment/tests/src/Functional/PaymentAdminTest.php @@ -122,6 +122,15 @@ protected function setUp() { $this->paymentUri = 'admin/commerce/orders/' . $this->order->id() . '/payments'; } + /** + * Tests that a Payments task link exists on the order page. + */ + public function testPaymentTask() { + $this->drupalGet('admin/commerce/orders/' . $this->order->id()); + $this->assertSession()->linkExists('Payments'); + $this->assertSession()->linkByHrefExists($this->paymentUri); + } + /** * Tests creating a payment for an order. */ From 2a268400500db4172b5aa294c95c508abbd3384b Mon Sep 17 00:00:00 2001 From: Steve Oliver Date: Tue, 6 Dec 2016 14:23:39 -0800 Subject: [PATCH 2/2] Move the Payments task to the Order's canonical route. --- modules/payment/commerce_payment.links.task.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/payment/commerce_payment.links.task.yml b/modules/payment/commerce_payment.links.task.yml index 70e8cb21c8..8fa6d205f0 100644 --- a/modules/payment/commerce_payment.links.task.yml +++ b/modules/payment/commerce_payment.links.task.yml @@ -1,6 +1,6 @@ entity.commerce_payment.collection: route_name: entity.commerce_payment.collection - base_route: entity.commerce_order.edit_form + base_route: entity.commerce_order.canonical title: Payments entity.commerce_payment_gateway.edit_form: