Skip to content

Commit 3c8619d

Browse files
authored
Merge pull request #1000 from magento-mpi/MAGETWO-63642
- MAGETWO-65119 Create/update automated functional tests - MAGETWO-66178 Update marketing information, order page and order list with new labels - MAGETWO-66240 Add tags for tests that require single flow run - MAGETWO-63642 Update Order Status Based on Signifyd Guarantee Statuses
2 parents c1826ec + 8de8821 commit 3c8619d

File tree

13 files changed

+207
-22
lines changed

13 files changed

+207
-22
lines changed

app/design/adminhtml/Magento/backend/Magento_Signifyd/web/css/source/module/_config.less

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@
99
// Outer slider of configuration
1010
//
1111
.signifyd-logo-header {
12-
> .entry-edit-head {
13-
> a:after {content: url(@image-signifyd-logo-path)}
14-
}
12+
> .entry-edit-head {
13+
> a:after {
14+
content: url(@image-signifyd-logo-path);
15+
}
16+
}
1517

16-
ul {
17-
margin-left: 5em;
18-
}
18+
ul {
19+
margin-left: 5em;
20+
}
1921

20-
.webhook-url {
21-
word-break: break-all;
22-
}
22+
.webhook-url {
23+
word-break: break-all;
24+
}
2325
}

app/design/adminhtml/Magento/backend/Magento_Signifyd/web/css/source/module/_order.less

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
// ---------------------------------------------
99

1010
.order-case-table {
11-
&:extend(.abs-order-tables all);
12-
&:extend(.abs-order-tbody-border all);
11+
&:extend(.abs-order-tables all);
12+
&:extend(.abs-order-tbody-border all);
1313
}
1414

1515
//
1616
// Layout
1717
// ---------------------------------------------
1818
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
19-
.case-information {
20-
float: left;
21-
#mix-grid .width(6,12);
22-
}
19+
.case-information {
20+
float: left;
21+
#mix-grid .width(6,12);
22+
}
2323
}

dev/tests/functional/tests/app/Magento/Braintree/Test/etc/testcase.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
<step name="fillBillingInformation" module="Magento_Checkout" next="placeOrder" />
156156
<step name="placeOrder" module="Magento_Checkout" next="changeOrderStatusToPaymentReview" />
157157
<step name="changeOrderStatusToPaymentReview" module="Magento_Braintree" next="acceptPayment" />
158-
<step name="acceptPayment" module="Magento_Braintree" />
158+
<step name="acceptPayment" module="Magento_Sales" />
159159
</scenario>
160160
<scenario name="OnePageCheckoutDenyPaymentTest" firstStep="setupConfiguration">
161161
<step name="setupConfiguration" module="Magento_Config" next="createProducts" />
@@ -169,7 +169,7 @@
169169
<step name="fillBillingInformation" module="Magento_Checkout" next="placeOrder" />
170170
<step name="placeOrder" module="Magento_Checkout" next="changeOrderStatusToPaymentReview" />
171171
<step name="changeOrderStatusToPaymentReview" module="Magento_Braintree" next="denyPayment" />
172-
<step name="denyPayment" module="Magento_Braintree" />
172+
<step name="denyPayment" module="Magento_Sales" />
173173
</scenario>
174174
<scenario name="CreateOrderWithPayPalBraintreeVaultBackendTest" firstStep="setupConfiguration">
175175
<step name="setupConfiguration" module="Magento_Config" next="createProducts" />
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Customer\Test\TestStep;
7+
8+
use Magento\Customer\Test\Fixture\Customer;
9+
use Magento\Customer\Test\Page\Adminhtml\CustomerIndex;
10+
use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit;
11+
use Magento\Mtf\TestStep\TestStepInterface;
12+
13+
/**
14+
* Delete existing customer.
15+
*/
16+
class DeleteCustomerStep implements TestStepInterface
17+
{
18+
/**
19+
* @var Customer
20+
*/
21+
private $customer;
22+
23+
/**
24+
* @var CustomerIndex
25+
*/
26+
private $customerIndexPage;
27+
28+
/**
29+
* @var CustomerIndexEdit
30+
*/
31+
private $customerIndexEditPage;
32+
33+
/**
34+
* @param Customer $customer
35+
* @param CustomerIndex $customerIndexPage
36+
* @param CustomerIndexEdit $customerIndexEditPage
37+
*/
38+
public function __construct(
39+
Customer $customer,
40+
CustomerIndex $customerIndexPage,
41+
CustomerIndexEdit $customerIndexEditPage
42+
) {
43+
$this->customer = $customer;
44+
$this->customerIndexPage = $customerIndexPage;
45+
$this->customerIndexEditPage = $customerIndexEditPage;
46+
}
47+
48+
/**
49+
* @inheritdoc
50+
*/
51+
public function run()
52+
{
53+
$filter = ['email' => $this->customer->getEmail()];
54+
$this->customerIndexPage->open();
55+
$this->customerIndexPage->getCustomerGridBlock()->searchAndOpen($filter);
56+
$this->customerIndexEditPage->getPageActionsBlock()->delete();
57+
$this->customerIndexEditPage->getModalBlock()->acceptAlert();
58+
}
59+
}

dev/tests/functional/tests/app/Magento/Paypal/Test/TestStep/PlaceOrderWithHostedProStep.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
namespace Magento\Paypal\Test\TestStep;
88

99
use Magento\Checkout\Test\Page\CheckoutOnepage;
10+
use Magento\Checkout\Test\Page\CheckoutOnepageSuccess;
1011
use Magento\Mtf\Fixture\FixtureFactory;
1112
use Magento\Mtf\Fixture\FixtureInterface;
1213
use Magento\Mtf\TestStep\TestStepInterface;
@@ -53,6 +54,11 @@ class PlaceOrderWithHostedProStep implements TestStepInterface
5354
*/
5455
private $creditCard;
5556

57+
/**
58+
* @var CheckoutOnepageSuccess
59+
*/
60+
private $checkoutOnepageSuccess;
61+
5662
/**
5763
* Fixture OrderInjectable.
5864
*
@@ -64,6 +70,7 @@ class PlaceOrderWithHostedProStep implements TestStepInterface
6470
* @param CheckoutOnepage $checkoutOnepage
6571
* @param FixtureFactory $fixtureFactory
6672
* @param CreditCard $creditCard
73+
* @param CheckoutOnepageSuccess $checkoutOnepageSuccess
6774
* @param array $payment
6875
* @param array $products
6976
* @param OrderInjectable|null $order
@@ -72,6 +79,7 @@ public function __construct(
7279
CheckoutOnepage $checkoutOnepage,
7380
FixtureFactory $fixtureFactory,
7481
CreditCard $creditCard,
82+
CheckoutOnepageSuccess $checkoutOnepageSuccess,
7583
array $payment,
7684
array $products,
7785
OrderInjectable $order = null
@@ -81,6 +89,7 @@ public function __construct(
8189
$this->creditCard = $creditCard;
8290
$this->payment = $payment;
8391
$this->products = $products;
92+
$this->checkoutOnepageSuccess = $checkoutOnepageSuccess;
8493
$this->order = $order;
8594
}
8695

@@ -100,7 +109,11 @@ public function run()
100109
$this->checkoutOnepage->getHostedProBlock()->fillPaymentData($this->creditCard);
101110
$attempts++;
102111
}
112+
113+
$orderId = $this->checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId();
114+
/** @var OrderInjectable $order */
103115
$data = [
116+
'id' => $orderId,
104117
'entity_id' => ['products' => $this->products]
105118
];
106119
$orderData = $this->order !== null ? $this->order->getData() : [];
@@ -109,6 +122,9 @@ public function run()
109122
['data' => array_merge($data, $orderData)]
110123
);
111124

112-
return ['order' => $order];
125+
return [
126+
'orderId' => $orderId,
127+
'order' => $order,
128+
];
113129
}
114130
}

dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* Order actions block.
1515
*
1616
* @SuppressWarnings(PHPMD.TooManyFields)
17+
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
1718
*/
1819
class Actions extends Block
1920
{
@@ -59,6 +60,13 @@ class Actions extends Block
5960
*/
6061
protected $hold = '[id$=hold-button]';
6162

63+
/**
64+
* 'Unhold' button.
65+
*
66+
* @var string
67+
*/
68+
protected $unhold = '[id$=unhold-button]';
69+
6270
/**
6371
* 'Invoice' button.
6472
*
@@ -231,6 +239,16 @@ public function hold()
231239
$this->_rootElement->find($this->hold)->click();
232240
}
233241

242+
/**
243+
* Unhold order.
244+
*
245+
* @return void
246+
*/
247+
public function unhold()
248+
{
249+
$this->_rootElement->find($this->unhold)->click();
250+
}
251+
234252
/**
235253
* Order credit memo.
236254
*

dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/AcceptPaymentStep.php renamed to dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/AcceptPaymentStep.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
namespace Magento\Braintree\Test\TestStep;
6+
namespace Magento\Sales\Test\TestStep;
77

88
use Magento\Sales\Test\Fixture\OrderInjectable;
99
use Magento\Sales\Test\Page\Adminhtml\OrderIndex;

dev/tests/functional/tests/app/Magento/Braintree/Test/TestStep/DenyPaymentStep.php renamed to dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/DenyPaymentStep.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
namespace Magento\Braintree\Test\TestStep;
6+
namespace Magento\Sales\Test\TestStep;
77

88
use Magento\Sales\Test\Fixture\OrderInjectable;
99
use Magento\Sales\Test\Page\Adminhtml\OrderIndex;
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Sales\Test\TestStep;
8+
9+
use Magento\Sales\Test\Fixture\OrderInjectable;
10+
use Magento\Sales\Test\Page\Adminhtml\OrderIndex;
11+
use Magento\Sales\Test\Page\Adminhtml\SalesOrderView;
12+
use Magento\Mtf\TestStep\TestStepInterface;
13+
14+
/**
15+
* Unhold order in admin.
16+
*/
17+
class UnholdOrderStep implements TestStepInterface
18+
{
19+
/**
20+
* Orders Page.
21+
*
22+
* @var OrderIndex
23+
*/
24+
protected $orderIndex;
25+
26+
/**
27+
* Order View Page.
28+
*
29+
* @var SalesOrderView
30+
*/
31+
protected $salesOrderView;
32+
33+
/**
34+
* OrderInjectable fixture.
35+
*
36+
* @var OrderInjectable
37+
*/
38+
protected $order;
39+
40+
/**
41+
* @construct
42+
* @param OrderIndex $orderIndex
43+
* @param SalesOrderView $salesOrderView
44+
* @param OrderInjectable $order
45+
*/
46+
public function __construct(OrderIndex $orderIndex, SalesOrderView $salesOrderView, OrderInjectable $order)
47+
{
48+
$this->orderIndex = $orderIndex;
49+
$this->salesOrderView = $salesOrderView;
50+
$this->order = $order;
51+
}
52+
53+
/**
54+
* On hold order in admin.
55+
*
56+
* @return void
57+
*/
58+
public function run()
59+
{
60+
$this->orderIndex->open();
61+
$this->orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $this->order->getId()]);
62+
$this->salesOrderView->getPageActions()->unhold();
63+
}
64+
}

dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/3rd_party.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,16 @@
1111
<allow>
1212
<tag group="test_type" value="3rd_party_test" />
1313
</allow>
14+
<deny>
15+
<tag group="test_type" value="3rd_party_test_single_flow" />
16+
</deny>
1417
</rule>
1518
<rule scope="variation">
1619
<allow>
1720
<tag group="test_type" value="3rd_party_test" />
1821
</allow>
22+
<deny>
23+
<tag group="test_type" value="3rd_party_test_single_flow" />
24+
</deny>
1925
</rule>
2026
</config>

0 commit comments

Comments
 (0)