Skip to content

Commit 9e5b44e

Browse files
author
Oleksandr Manchenko
committed
MTA-2343: Move all test data to repositories
1 parent 4bb14cc commit 9e5b44e

28 files changed

+123
-65
lines changed

dev/tests/functional/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"magento/mtf": "1.0.0-rc27",
3+
"magento/mtf": "1.0.0-rc28",
44
"php": "~5.5.0|~5.6.0",
55
"phpunit/phpunit": "4.1.0",
66
"phpunit/phpunit-selenium": ">=1.2",

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
<data name="description" xsi:type="string">MAGETWO-12832 - Check Out as a Guest with Authorize.Net and Offline Shipping method</data>
1212
<data name="products" xsi:type="string">catalogProductSimple::product_10_dollar, configurableProduct::with_one_option, bundleProduct::bundle_fixed_100_dollar_product</data>
1313
<data name="taxRule" xsi:type="string">us_ca_ny_rule</data>
14-
<data name="customer/dataSet" xsi:type="string">default</data>
15-
<data name="billingAddress/dataSet" xsi:type="string">US_address_1</data>
14+
<data name="customer/dataset" xsi:type="string">default</data>
15+
<data name="billingAddress/dataset" xsi:type="string">US_address_1</data>
1616
<data name="checkoutMethod" xsi:type="string">guest</data>
1717
<data name="shipping/shipping_service" xsi:type="string">Flat Rate</data>
1818
<data name="shipping/shipping_method" xsi:type="string">Fixed</data>
1919
<data name="prices" xsi:type="array">
2020
<item name="grandTotal" xsi:type="string">156.81</item>
2121
</data>
2222
<data name="payment/method" xsi:type="string">authorizenet</data>
23-
<data name="creditCard/dataSet" xsi:type="string">visa_default</data>
23+
<data name="creditCard/dataset" xsi:type="string">visa_default</data>
2424
<data name="configData" xsi:type="string">authorizenet</data>
2525
<data name="tag" xsi:type="string">test_type:3rd_party_test</data>
2626
<constraint name="Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage"/>

dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/BundleSelections.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@
433433
<item name="1" xsi:type="array">
434434
<item name="title" xsi:type="string">Radio Button Option</item>
435435
<item name="type" xsi:type="string">Radio Buttons</item>
436-
<item name="required" xsi:type="string">Yes</item>
436+
<item name="required" xsi:type="string">No</item>
437437
<item name="assigned_products" xsi:type="array">
438438
<item name="0" xsi:type="array">
439439
<item name="search_data" xsi:type="array">

dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,75 +9,75 @@
99
use Magento\Mtf\Block\Block;
1010

1111
/**
12-
* Base product item block on checkout page
12+
* Base product item block on checkout page.
1313
*/
1414
class AbstractCartItem extends Block
1515
{
1616
/**
17-
* Selector for product name
17+
* Selector for product name.
1818
*
1919
* @var string
2020
*/
2121
protected $productName = '.product-item-name > a';
2222

2323
/**
24-
* Selector for unit price
24+
* Selector for unit price.
2525
*
2626
* @var string
2727
*/
2828
protected $price = './/td[@class="col price"]//span[@class="price"]';
2929

3030
/**
31-
* Selector for unit price including tax
31+
* Selector for unit price including tax.
3232
*
3333
* @var string
3434
*/
3535
protected $priceInclTax = './/td[@class="col price"]/*[@class="price-including-tax"]/span';
3636

3737
/**
38-
* Selector for unit price excluding tax
38+
* Selector for unit price excluding tax.
3939
*
4040
* @var string
4141
*/
4242
protected $priceExclTax = './/td[@class="col price"]/*[@class="price-excluding-tax"]/span';
4343

4444
/**
45-
* Quantity input selector
45+
* Quantity input selector.
4646
*
4747
* @var string
4848
*/
4949
protected $qty = './/input[@data-role="cart-item-qty"]';
5050

5151
/**
52-
* Cart item sub-total xpath selector
52+
* Cart item sub-total xpath selector.
5353
*
5454
* @var string
5555
*/
5656
protected $subtotalPrice = '.col.subtotal .price';
5757

5858
/**
59-
* Cart item sub-total excluding tax xpath selector
59+
* Cart item sub-total excluding tax xpath selector.
6060
*
6161
* @var string
6262
*/
6363
protected $subTotalPriceExclTax = '.col.subtotal .price-excluding-tax .price';
6464

6565
/**
66-
* Cart item sub-total including tax xpath selector
66+
* Cart item sub-total including tax xpath selector.
6767
*
6868
* @var string
6969
*/
7070
protected $subTotalPriceInclTax = '.col.subtotal .price-including-tax .price';
7171

7272
/**
73-
* Selector for options block
73+
* Selector for options block.
7474
*
7575
* @var string
7676
*/
7777
protected $optionsBlock = './/dl[contains(@class, "item-options")]';
7878

7979
/**
80-
* Escape currency in price
80+
* Escape currency in price.
8181
*
8282
* @param string $price
8383
* @return string|null

dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class CartItem extends AbstractCartItem
4040
*
4141
* @var string
4242
*/
43-
protected $wishlistButton = '.towishlist';
43+
protected $wishlistButton = '.action-towishlist';
4444

4545
/**
4646
* Quantity input selector

dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/AbstractReview.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public function getGrandTotalInclTax()
244244
/**
245245
* Get Tax text from Order Totals.
246246
*
247-
* @return array|string
247+
* @return string|null
248248
*/
249249
public function getTax()
250250
{

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Payment extends Block
5050
protected $placeOrder = '.action.primary.checkout';
5151

5252
/**
53-
* Wait element
53+
* Wait element.
5454
*
5555
* @var string
5656
*/
@@ -120,6 +120,8 @@ public function getSelectedPaymentMethodBlock()
120120

121121
/*
122122
* Press "Place Order" button.
123+
*
124+
* @return void
123125
*/
124126
public function placeOrder()
125127
{

dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/CheckoutData.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<item name="configurable_options" xsi:type="array">
3434
<item name="0" xsi:type="array">
3535
<item name="title" xsi:type="string">attribute_key_0</item>
36-
<item name="value" xsi:type="string">option_key_0</item>
36+
<item name="value" xsi:type="string">option_key_1</item>
3737
</item>
3838
<item name="1" xsi:type="array">
3939
<item name="title" xsi:type="string">attribute_key_1</item>
40-
<item name="value" xsi:type="string">option_key_1</item>
40+
<item name="value" xsi:type="string">option_key_0</item>
4141
</item>
4242
</item>
4343
</field>

dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxCalculationAfterCheckoutDownloadable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function processAssert(
5252

5353
$checkoutCart->getProceedToCheckoutBlock()->proceedToCheckout();
5454
$cmsIndex->getCmsPageBlock()->waitPageInit();
55-
$checkoutOnepage->getPaymentMethodsBlock()->selectPaymentMethod(['method' => 'checkmo']);
55+
$checkoutOnepage->getPaymentBlock()->selectPaymentMethod(['method' => 'checkmo']);
5656
$actualPrices = [];
5757
$actualPrices = $this->getReviewPrices($actualPrices, $product);
5858
$actualPrices = $this->getReviewTotals($actualPrices);
@@ -61,7 +61,7 @@ public function processAssert(
6161
$message = 'Prices on order review should be equal to defined in dataset.';
6262
\PHPUnit_Framework_Assert::assertEquals($prices, array_filter($actualPrices), $message);
6363

64-
$checkoutOnepage->getPaymentMethodsBlock()->placeOrder();
64+
$checkoutOnepage->getPaymentBlock()->placeOrder();
6565
$checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId();
6666
$checkoutOnepageSuccess->getSuccessBlock()->openOrder();
6767
$actualPrices = [];

dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ public function processAssert(
5555
$this->catalogCategoryView = $catalogCategoryView;
5656
$this->catalogProductView = $catalogProductView;
5757
$this->checkoutCart = $checkoutCart;
58-
$actualPrices = [];
58+
5959
//Assertion steps
60+
$actualPrices = [];
6061
$productCategory = $product->getCategoryIds()[0];
6162
$this->openCategory($productCategory);
6263
$actualPrices = $this->getCategoryPrices($product, $actualPrices);

0 commit comments

Comments
 (0)