Skip to content

Commit 0d0595e

Browse files
committed
Conflict resolved
1 parent bd300b5 commit 0d0595e

File tree

3 files changed

+483
-321
lines changed

3 files changed

+483
-321
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/OrderCancellation/CancelGuestOrderTest.php

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
/**
33
* Copyright 2024 Adobe
44
* All Rights Reserved.
5+
*
6+
* NOTICE: All information contained herein is, and remains
7+
* the property of Adobe and its suppliers, if any. The intellectual
8+
* and technical concepts contained herein are proprietary to Adobe
9+
* and its suppliers and are protected by all applicable intellectual
10+
* property laws, including trade secret and copyright laws.
11+
* Dissemination of this information or reproduction of this material
12+
* is strictly forbidden unless prior written permission is obtained
13+
* from Adobe.
514
*/
615
declare(strict_types=1);
716

@@ -193,13 +202,13 @@ public function testAttemptToCancelOrderWithSomeStatuses(string $status, string
193202
$this->assertEquals(
194203
[
195204
'requestGuestOrderCancel' => [
196-
'errorV2' => [
197-
'message' => 'Order already closed, complete, cancelled or on hold'
198-
],
199-
'order' => [
200-
'status' => $expectedStatus
201-
]
205+
'errorV2' => [
206+
'message' => 'Order already closed, complete, cancelled or on hold'
207+
],
208+
'order' => [
209+
'status' => $expectedStatus
202210
]
211+
]
203212
],
204213
$this->graphQlMutation($query)
205214
);
@@ -236,13 +245,13 @@ public function testAttemptToCancelOrderWithOfflinePaymentFullyInvoicedFullyShip
236245
$this->assertEquals(
237246
[
238247
'requestGuestOrderCancel' => [
239-
'errorV2' => [
240-
'message' => 'Order already closed, complete, cancelled or on hold'
241-
],
242-
'order' => [
243-
'status' => 'Complete'
244-
]
248+
'errorV2' => [
249+
'message' => 'Order already closed, complete, cancelled or on hold'
250+
],
251+
'order' => [
252+
'status' => 'Complete'
245253
]
254+
]
246255
],
247256
$this->graphQlMutation($query)
248257
);
@@ -292,13 +301,13 @@ public function testAttemptToCancelOrderWithOfflinePaymentFullyInvoicedPartially
292301
$this->assertEquals(
293302
[
294303
'requestGuestOrderCancel' => [
295-
'errorV2' => [
296-
'message' => 'Order with one or more items shipped cannot be cancelled'
297-
],
298-
'order' => [
299-
'status' => 'Processing'
300-
]
304+
'errorV2' => [
305+
'message' => 'Order with one or more items shipped cannot be cancelled'
306+
],
307+
'order' => [
308+
'status' => 'Processing'
301309
]
310+
]
302311
],
303312
$this->graphQlMutation($query)
304313
);
@@ -335,13 +344,13 @@ public function testAttemptToCancelOrderWithOfflinePaymentFullyInvoicedFullyRefu
335344
$this->assertEquals(
336345
[
337346
'requestGuestOrderCancel' => [
338-
'errorV2' => [
339-
'message' => 'Order already closed, complete, cancelled or on hold'
340-
],
341-
'order' => [
342-
'status' => 'Closed'
343-
]
347+
'errorV2' => [
348+
'message' => 'Order already closed, complete, cancelled or on hold'
349+
],
350+
'order' => [
351+
'status' => 'Closed'
344352
]
353+
]
345354
],
346355
$this->graphQlMutation($query)
347356
);
@@ -373,11 +382,11 @@ public function testCancelOrderWithOutAnyAmountPaid()
373382
$this->assertEquals(
374383
[
375384
'requestGuestOrderCancel' => [
376-
'errorV2' => null,
377-
'order' => [
378-
'status' => 'Pending'
379-
]
385+
'errorV2' => null,
386+
'order' => [
387+
'status' => 'Pending'
380388
]
389+
]
381390
],
382391
$this->graphQlMutation($query)
383392
);
@@ -467,14 +476,14 @@ private function getOrderToken(OrderInterface $order): string
467476
return Bootstrap::getObjectManager()->create(Token::class)->encrypt(
468477
$order->getIncrementId(),
469478
$order->getBillingAddress()->getEmail(),
470-
$order->getBillingAddress()->getLastname()
479+
$order->getBillingAddress()->getPostcode()
471480
);
472481
}
473482

474483
/**
475484
* @return array[]
476485
*/
477-
public static function orderStatusProvider(): array
486+
public function orderStatusProvider(): array
478487
{
479488
return [
480489
'On Hold status' => [

0 commit comments

Comments
 (0)