Skip to content

Commit cef8d0f

Browse files
committed
Merge branch 'MTA-3230' of github.com:magento-qmt/magento2ce into PR
2 parents 65b7518 + 360cb60 commit cef8d0f

File tree

55 files changed

+624
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+624
-163
lines changed

dev/tests/functional/tests/app/Magento/Authorizenet/Test/TestCase/OnePageCheckoutTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\Checkout\Test\TestCase\OnePageCheckoutTest" summary="One page check out with Authorize.Net payment method.">
1010
<variation name="OnePageCheckoutAuthorizenetTestVariation1" summary="Check Out as a Guest with Authorize.Net and Offline Shipping method" ticketId="MAGETWO-12832">
11-
<data name="products" xsi:type="string">catalogProductSimple::product_10_dollar</data>
11+
<data name="products/0" xsi:type="string">catalogProductSimple::product_10_dollar</data>
1212
<data name="customer/dataset" xsi:type="string">default</data>
1313
<data name="shippingAddress/dataset" xsi:type="string">US_address_1</data>
1414
<data name="checkoutMethod" xsi:type="string">guest</data>

dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/OnePageCheckoutTest.xml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\Checkout\Test\TestCase\OnePageCheckoutTest" summary="One page check out with Braintree payment method.">
1010
<variation name="OnePageCheckoutBraintree3dSecureNotTriggeredThresholdTestVariation1" summary="Registered Checkout with Braintree Credit Card from Storefront with 3D Secure verification not triggered due to Threshold Amount" ticketId="MAGETWO-46763">
11-
<data name="products" xsi:type="string">catalogProductSimple::product_10_dollar, configurableProduct::with_one_option, bundleProduct::bundle_fixed_100_dollar_product</data>
11+
<data name="products/0" xsi:type="string">catalogProductSimple::product_10_dollar</data>
12+
<data name="products/1" xsi:type="string">configurableProduct::with_one_option</data>
13+
<data name="products/2" xsi:type="string">bundleProduct::bundle_fixed_100_dollar_product</data>
1214
<data name="customer/dataset" xsi:type="string">default</data>
1315
<data name="taxRule" xsi:type="string">us_ca_ny_rule</data>
1416
<data name="shippingAddress/dataset" xsi:type="string">US_address_1_without_email</data>
@@ -29,7 +31,9 @@
2931
<constraint name="Magento\Sales\Test\Constraint\AssertOrderStatusIsCorrect" />
3032
</variation>
3133
<variation name="OnePageCheckoutBraintree3dSecureNotTriggeredSpecificCountryTestVariation2" summary="Guest Checkout with Braintree Credit Card from Storefront with 3D Secure verification not triggered due to selected Specific Country" ticketId="MAGETWO-46488">
32-
<data name="products" xsi:type="string">catalogProductSimple::product_10_dollar, configurableProduct::with_one_option, bundleProduct::bundle_fixed_100_dollar_product</data>
34+
<data name="products/0" xsi:type="string">catalogProductSimple::product_10_dollar</data>
35+
<data name="products/1" xsi:type="string">configurableProduct::with_one_option</data>
36+
<data name="products/2" xsi:type="string">bundleProduct::bundle_fixed_100_dollar_product</data>
3337
<data name="customer/dataset" xsi:type="string">default</data>
3438
<data name="taxRule" xsi:type="string">us_ca_ny_rule</data>
3539
<data name="shippingAddress/dataset" xsi:type="string">US_address_1</data>
@@ -50,7 +54,9 @@
5054
<constraint name="Magento\Sales\Test\Constraint\AssertOrderStatusIsCorrect" />
5155
</variation>
5256
<variation name="OnePageCheckoutBraintreeTestVariation3" summary="Checkout with Braintree Credit Card from Storefront (Payment Action = Authorize)" ticketId="MAGETWO-38313">
53-
<data name="products" xsi:type="string">catalogProductSimple::product_10_dollar, configurableProduct::with_one_option, bundleProduct::bundle_fixed_100_dollar_product</data>
57+
<data name="products/0" xsi:type="string">catalogProductSimple::product_10_dollar</data>
58+
<data name="products/1" xsi:type="string">configurableProduct::with_one_option</data>
59+
<data name="products/2" xsi:type="string">bundleProduct::bundle_fixed_100_dollar_product</data>
5460
<data name="customer/dataset" xsi:type="string">default</data>
5561
<data name="taxRule" xsi:type="string">us_ca_ny_rule</data>
5662
<data name="shippingAddress/dataset" xsi:type="string">US_address_1</data>
@@ -72,7 +78,9 @@
7278
<constraint name="Magento\Sales\Test\Constraint\AssertAuthorizationInCommentsHistory" />
7379
</variation>
7480
<variation name="OnePageCheckoutBraintreeTestVariation4" summary="Checkout with Braintree for payment action Authorize and Capture" ticketId="MAGETWO-38420">
75-
<data name="products" xsi:type="string">catalogProductSimple::product_10_dollar, configurableProduct::with_one_option, bundleProduct::bundle_fixed_100_dollar_product</data>
81+
<data name="products/0" xsi:type="string">catalogProductSimple::product_10_dollar</data>
82+
<data name="products/1" xsi:type="string">configurableProduct::with_one_option</data>
83+
<data name="products/2" xsi:type="string">bundleProduct::bundle_fixed_100_dollar_product</data>
7684
<data name="customer/dataset" xsi:type="string">default</data>
7785
<data name="taxRule" xsi:type="string">us_ca_ny_rule</data>
7886
<data name="shippingAddress/dataset" xsi:type="string">US_address_1</data>

dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/DeleteProductFromMiniShoppingCartTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\Checkout\Test\TestCase\DeleteProductFromMiniShoppingCartTest" summary="Delete Bundle Product from Mini Shopping Cart" ticketId="MAGETWO-29104">
1010
<variation name="DeleteBundleProductFromMiniShoppingCartTestVariation">
11-
<data name="products" xsi:type="string">bundleProduct::default</data>
11+
<data name="products/0" xsi:type="string">bundleProduct::default</data>
1212
<data name="deletedProductIndex" xsi:type="string">0</data>
1313
<constraint name="Magento\Checkout\Test\Constraint\AssertCartIsEmpty" />
1414
</variation>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Catalog\Test\Constraint;
8+
9+
use Magento\Catalog\Test\Page\Product\CatalogProductView;
10+
use Magento\Mtf\Client\BrowserInterface;
11+
use Magento\Mtf\Constraint\AbstractConstraint;
12+
13+
/**
14+
* Assert that all products have Out of Stock status.
15+
*/
16+
class AssertProductsOutOfStock extends AbstractConstraint
17+
{
18+
/**
19+
* Assert that all products have Out of Stock status.
20+
*
21+
* @param CatalogProductView $catalogProductView
22+
* @param BrowserInterface $browser
23+
* @param AssertProductOutOfStock $assertProductOutOfStock
24+
* @param array $products
25+
* @return void
26+
*/
27+
public function processAssert(
28+
CatalogProductView $catalogProductView,
29+
BrowserInterface $browser,
30+
AssertProductOutOfStock $assertProductOutOfStock,
31+
array $products
32+
) {
33+
foreach ($products as $product) {
34+
$assertProductOutOfStock->processAssert($catalogProductView, $browser, $product);
35+
}
36+
}
37+
38+
/**
39+
* Returns a string representation of the object.
40+
*
41+
* @return string
42+
*/
43+
public function toString()
44+
{
45+
return 'All products have Out of Stock status.';
46+
}
47+
}

dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.xml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,58 @@
10961096
</field>
10971097
</dataset>
10981098

1099+
<dataset name="simple_with_tier_price_and_order_qty_3">
1100+
<field name="attribute_set_id" xsi:type="array">
1101+
<item name="dataset" xsi:type="string">default</item>
1102+
</field>
1103+
<field name="name" xsi:type="string">Simple Product %isolation%</field>
1104+
<field name="sku" xsi:type="string">sku_simple_product_%isolation%</field>
1105+
<field name="price" xsi:type="array">
1106+
<item name="value" xsi:type="string">50</item>
1107+
</field>
1108+
<field name="product_has_weight" xsi:type="string">This item has weight</field>
1109+
<field name="weight" xsi:type="string">1</field>
1110+
<field name="quantity_and_stock_status" xsi:type="array">
1111+
<item name="qty" xsi:type="string">3</item>
1112+
<item name="is_in_stock" xsi:type="string">In Stock</item>
1113+
</field>
1114+
<field name="tier_price" xsi:type="array">
1115+
<item name="dataset" xsi:type="string">more_is_cheaper</item>
1116+
</field>
1117+
<field name="url_key" xsi:type="string">simple-product-%isolation%</field>
1118+
<field name="checkout_data" xsi:type="array">
1119+
<item name="dataset" xsi:type="string">simple_order_qty_3</item>
1120+
</field>
1121+
</dataset>
1122+
1123+
<dataset name="product_with_qty_25">
1124+
<field name="attribute_set_id" xsi:type="array">
1125+
<item name="dataset" xsi:type="string">default</item>
1126+
</field>
1127+
<field name="name" xsi:type="string">Simple Product %isolation%</field>
1128+
<field name="sku" xsi:type="string">sku_simple_product_%isolation%</field>
1129+
<field name="product_has_weight" xsi:type="string">This item has weight</field>
1130+
<field name="weight" xsi:type="string">1</field>
1131+
<field name="quantity_and_stock_status" xsi:type="array">
1132+
<item name="qty" xsi:type="string">25</item>
1133+
<item name="is_in_stock" xsi:type="string">In Stock</item>
1134+
</field>
1135+
<field name="price" xsi:type="array">
1136+
<item name="value" xsi:type="string">10</item>
1137+
</field>
1138+
<field name="tax_class_id" xsi:type="array">
1139+
<item name="dataset" xsi:type="string">taxable_goods</item>
1140+
</field>
1141+
<field name="website_ids" xsi:type="array">
1142+
<item name="0" xsi:type="string">Main Website</item>
1143+
</field>
1144+
<field name="visibility" xsi:type="string">Catalog, Search</field>
1145+
<field name="url_key" xsi:type="string">simple-product-%isolation%</field>
1146+
<field name="checkout_data" xsi:type="array">
1147+
<item name="dataset" xsi:type="string">simple_order_qty_25</item>
1148+
</field>
1149+
</dataset>
1150+
10991151
<dataset name="sample_data_simple_product">
11001152
<field name="id" xsi:type="string">1</field>
11011153
<field name="name" xsi:type="string">Overnight Duffle</field>

dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple/CheckoutData.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,17 @@
136136
<item name="subtotal" xsi:type="string">10</item>
137137
</field>
138138
</dataset>
139+
140+
<dataset name="simple_order_qty_25">
141+
<field name="qty" xsi:type="string">25</field>
142+
<field name="cartItem" xsi:type="array">
143+
<item name="price" xsi:type="string">10</item>
144+
<item name="subtotal" xsi:type="string">250</item>
145+
</field>
146+
</dataset>
147+
148+
<dataset name="simple_order_qty_3">
149+
<field name="qty" xsi:type="string">3</field>
150+
</dataset>
139151
</repository>
140152
</config>

dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductsStep.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class CreateProductsStep implements TestStepInterface
1919
/**
2020
* Products names in data set
2121
*
22-
* @var string
22+
* @var array
2323
*/
2424
protected $products;
2525

@@ -42,10 +42,10 @@ class CreateProductsStep implements TestStepInterface
4242
*
4343
* @constructor
4444
* @param FixtureFactory $fixtureFactory
45-
* @param string $products
45+
* @param array $products
4646
* @param array $data [optional]
4747
*/
48-
public function __construct(FixtureFactory $fixtureFactory, $products, array $data = [])
48+
public function __construct(FixtureFactory $fixtureFactory, array $products, array $data = [])
4949
{
5050
$this->products = $products;
5151
$this->data = $data;
@@ -60,8 +60,7 @@ public function __construct(FixtureFactory $fixtureFactory, $products, array $da
6060
public function run()
6161
{
6262
$products = [];
63-
$productsDataSets = explode(',', $this->products);
64-
foreach ($productsDataSets as $key => $productDataSet) {
63+
foreach ($this->products as $key => $productDataSet) {
6564
$productDataSet = explode('::', $productDataSet);
6665
$fixtureClass = $productDataSet[0];
6766
$dataset = isset($productDataSet[1]) ? $productDataSet[1] : '';

dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Payment/Method/Billing.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,14 @@ public function getSameAsShippingCheckboxValue()
6868
{
6969
return $this->_rootElement->find($this->sameAsShippingCheckbox, Locator::SELECTOR_CSS, 'checkbox')->getValue();
7070
}
71+
72+
/**
73+
* Unset "Same as shipping" checkbox value.
74+
*
75+
* @return void
76+
*/
77+
public function unsetSameAsShippingCheckboxValue()
78+
{
79+
$this->_rootElement->find($this->sameAsShippingCheckbox, Locator::SELECTOR_CSS, 'checkbox')->setValue('No');
80+
}
7181
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Checkout\Test\Block\Onepage;
8+
9+
use Magento\Mtf\Block\Block;
10+
use Magento\Mtf\Client\Locator;
11+
12+
/**
13+
* One page checkout registration block.
14+
*/
15+
class Registration extends Block
16+
{
17+
/**
18+
* 'Create an Account' button.
19+
*
20+
* @var string
21+
*/
22+
protected $createAccountButton = '[data-bind*="createAccount"] input';
23+
24+
/**
25+
* Click 'Create an Account' button and wait until button will be not visible.
26+
*
27+
* @return void
28+
*/
29+
public function createAccount()
30+
{
31+
$this->_rootElement->find($this->createAccountButton, Locator::SELECTOR_CSS)->click();
32+
$this->waitForElementNotVisible($this->createAccountButton, Locator::SELECTOR_CSS);
33+
}
34+
}

dev/tests/functional/tests/app/Magento/Checkout/Test/Page/CheckoutOnepage.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/pages.xsd">
99
<page name="CheckoutOnepage" mca="checkout" module="Magento_Checkout">
10+
<block name="authenticationPopupBlock" class="Magento\Customer\Test\Block\Account\AuthenticationPopup" locator=".block-authentication" strategy="css selector" />
1011
<block name="loginBlock" class="Magento\Checkout\Test\Block\Onepage\Login" locator="[data-role='email-with-possible-login']" strategy="css selector" />
1112
<block name="shippingBlock" class="Magento\Checkout\Test\Block\Onepage\Shipping" locator="#checkout-step-shipping" strategy="css selector" />
1213
<block name="shippingMethodBlock" class="Magento\Checkout\Test\Block\Onepage\Shipping\Method" locator="#checkout-step-shipping_method" strategy="css selector" />

0 commit comments

Comments
 (0)