Skip to content

Commit 41bde6a

Browse files
author
Roman Ganin
committed
Merge branch 'develop' of github.corp.ebay.com:magento2/magento2ce into publication-0.74.0-beta5
2 parents 64d480a + 948f734 commit 41bde6a

File tree

142 files changed

+8276
-389
lines changed

Some content is hidden

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

142 files changed

+8276
-389
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-rc22",
3+
"magento/mtf": "1.0.0-rc23",
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/Backend/Test/Block/Widget/FormTabs.php

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@
1313
use Magento\Mtf\Fixture\InjectableFixture;
1414
use Magento\Mtf\Client\BrowserInterface;
1515
use Magento\Mtf\Client\Element\SimpleElement;
16-
use Magento\Mtf\Util\Iterator\File;
17-
use Magento\Mtf\Util\XmlConverter;
1816

1917
/**
20-
* Class FormTabs
2118
* Is used to represent any form with tabs on the page
2219
*
2320
* @SuppressWarnings(PHPMD.NumberOfChildren)
@@ -30,11 +27,6 @@ class FormTabs extends Form
3027
*/
3128
protected $tabs = [];
3229

33-
/**
34-
* @var XmlConverter
35-
*/
36-
protected $xmlConverter;
37-
3830
/**
3931
* Fields which aren't assigned to any tab
4032
*
@@ -48,54 +40,24 @@ class FormTabs extends Form
4840
* @param Mapper $mapper
4941
* @param BlockFactory $blockFactory
5042
* @param BrowserInterface $browser
51-
* @param XmlConverter $xmlConverter
5243
* @param array $config
5344
*/
5445
public function __construct(
5546
SimpleElement $element,
5647
Mapper $mapper,
5748
BlockFactory $blockFactory,
5849
BrowserInterface $browser,
59-
XmlConverter $xmlConverter,
6050
array $config = []
6151
) {
62-
$this->xmlConverter = $xmlConverter;
6352
parent::__construct($element, $blockFactory, $mapper, $browser, $config);
6453
}
6554

6655
/**
6756
* Initialize block
6857
*/
69-
protected function _init()
58+
protected function init()
7059
{
71-
$this->tabs = $this->getTabs();
72-
}
73-
74-
/**
75-
* Get all tabs on the form
76-
*
77-
* @return array
78-
*/
79-
protected function getTabs()
80-
{
81-
$result = [];
82-
83-
$paths = glob(
84-
MTF_TESTS_PATH . preg_replace('/Magento\/\w+/', '*/*', str_replace('\\', '/', get_class($this))) . '.xml'
85-
);
86-
$files = new File($paths);
87-
88-
foreach ($files as $file) {
89-
$presetXml = simplexml_load_string($file);
90-
if ($presetXml instanceof \SimpleXMLElement) {
91-
$array = $this->xmlConverter->convert($presetXml);
92-
if (is_array($array)) {
93-
$result = array_replace_recursive($result, $array);
94-
}
95-
}
96-
}
97-
98-
return $result;
60+
$this->tabs = $this->getFormMapping();
9961
}
10062

10163
/**

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/AttributeForm.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Magento\Mtf\Client\Element\SimpleElement;
1616
use Magento\Mtf\Client\Locator;
1717
use Magento\Mtf\Fixture\FixtureInterface;
18-
use Magento\Mtf\Util\XmlConverter;
1918

2019
/**
2120
* Edit attribute form on catalog product edit page.
@@ -49,18 +48,16 @@ class AttributeForm extends FormTabs
4948
* @param Mapper $mapper
5049
* @param BlockFactory $blockFactory
5150
* @param BrowserInterface $browser
52-
* @param XmlConverter $xmlConverter
5351
* @param array $config
5452
*/
5553
public function __construct(
5654
SimpleElement $element,
5755
Mapper $mapper,
5856
BlockFactory $blockFactory,
5957
BrowserInterface $browser,
60-
XmlConverter $xmlConverter,
6158
array $config = []
6259
) {
63-
parent::__construct($element, $mapper, $blockFactory, $browser, $xmlConverter, $config);
60+
parent::__construct($element, $mapper, $blockFactory, $browser, $config);
6461
$this->browser->switchToFrame(new Locator($this->iFrame));
6562
}
6663

dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Product/CatalogProductView.xml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,16 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/pages.xsd">
9-
<page name="CatalogProductView" area="Product" mca="catalog/product/view" module="Magento_Catalog">
10-
<block name="viewBlock" class="Magento\Catalog\Test\Block\Product\View" locator="#maincontent" strategy="css selector"/>
11-
<block name="additionalInformationBlock" class="Magento\Catalog\Test\Block\Product\Additional" locator="#additional" strategy="css selector"/>
12-
<block name="customOptionsBlock" class="Magento\Catalog\Test\Block\Product\View\CustomOptions" locator="#product-options-wrapper" strategy="css selector"/>
13-
<block name="relatedProductBlock" class="Magento\Catalog\Test\Block\Product\ProductList\Related" locator=".block.related" strategy="css selector"/>
14-
<block name="upsellBlock" class="Magento\Catalog\Test\Block\Product\ProductList\Upsell" locator=".block.upsell" strategy="css selector"/>
15-
<block name="crosssellBlock" class="Magento\Catalog\Test\Block\Product\ProductList\Crosssell" locator=".block.crosssell" strategy="css selector"/>
16-
<block name="downloadableLinksBlock" class="Magento\Downloadable\Test\Block\Catalog\Product\View\Links" locator="[data-container-for=downloadable-links]" strategy="css selector"/>
17-
<block name="messagesBlock" class="Magento\Backend\Test\Block\Messages" locator=".page.messages .messages" strategy="css selector"/>
18-
<block name="reviewSummary" class="Magento\Review\Test\Block\Product\View\Summary" locator=".product-reviews-summary" strategy="css selector"/>
19-
<block name="customerReviewBlock" class="Magento\Review\Test\Block\Product\View" locator="#customer-reviews" strategy="css selector"/>
20-
<block name="reviewFormBlock" class="Magento\Review\Test\Block\Form" locator="#review-form" strategy="css selector"/>
21-
<block name="titleBlock" class="Magento\Theme\Test\Block\Html\Title" locator=".page-title-wrapper h1.page-title .base" strategy="css selector"/>
22-
<block name="widgetView" class="Magento\Widget\Test\Block\WidgetView" locator=".column.main .widget" strategy="css selector"/>
23-
</page>
9+
<page name="CatalogProductView" area="Product" mca="catalog/product/view" module="Magento_Catalog">
10+
<block name="viewBlock" class="Magento\Catalog\Test\Block\Product\View" locator="#maincontent" strategy="css selector" />
11+
<block name="additionalInformationBlock" class="Magento\Catalog\Test\Block\Product\Additional" locator="#additional" strategy="css selector" />
12+
<block name="customOptionsBlock" class="Magento\Catalog\Test\Block\Product\View\CustomOptions" locator="#product-options-wrapper" strategy="css selector" />
13+
<block name="relatedProductBlock" class="Magento\Catalog\Test\Block\Product\ProductList\Related" locator=".block.related" strategy="css selector" />
14+
<block name="upsellBlock" class="Magento\Catalog\Test\Block\Product\ProductList\Upsell" locator=".block.upsell" strategy="css selector" />
15+
<block name="crosssellBlock" class="Magento\Catalog\Test\Block\Product\ProductList\Crosssell" locator=".block.crosssell" strategy="css selector" />
16+
<block name="downloadableLinksBlock" class="Magento\Downloadable\Test\Block\Catalog\Product\View\Links" locator="[data-container-for=downloadable-links]" strategy="css selector" />
17+
<block name="messagesBlock" class="Magento\Backend\Test\Block\Messages" locator=".page.messages .messages" strategy="css selector" />
18+
<block name="titleBlock" class="Magento\Theme\Test\Block\Html\Title" locator=".page-title-wrapper h1.page-title .base" strategy="css selector" />
19+
<block name="widgetView" class="Magento\Widget\Test\Block\WidgetView" locator=".column.main .widget" strategy="css selector" />
20+
</page>
2421
</config>

dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@
182182
<data name="productAttribute/data/is_searchable" xsi:type="string">Yes</data>
183183
<data name="productAttribute/data/is_visible_in_advanced_search" xsi:type="string">Yes</data>
184184
<data name="productAttribute/data/is_comparable" xsi:type="string">Yes</data>
185-
<data name="issue" xsi:type="string">Bug: MAGETWO-33625</data>
186185
<constraint name="Magento\Catalog\Test\Constraint\AssertProductAttributeIsUnique" />
187186
</variation>
188187
</testCase>

dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogRuleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class CreateCatalogRuleTest extends AbstractCatalogRuleEntityTest
3333
const TEST_TYPE = 'acceptance_test';
3434
const MVP = 'yes';
3535
const DOMAIN = 'MX';
36-
const TO_MAINTAIN = 'yes';
36+
const TO_MAINTAIN = 'yes'; // Selecting conditions in parallel mode
3737
/* end tags */
3838

3939
/**

dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertOrderTotalOnReviewPage.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,25 @@
1010
use Magento\Mtf\Constraint\AbstractConstraint;
1111

1212
/**
13-
* Class AssertOrderTotalOnReviewPage
14-
* Assert that Order Grand Total is correct on checkoutOnePage
13+
* Assert that Order Grand Total is correct on checkoutOnePage.
1514
*/
1615
class AssertOrderTotalOnReviewPage extends AbstractConstraint
1716
{
1817
/**
1918
* Assert that Order Grand Total is correct on checkoutOnePage
2019
*
2120
* @param CheckoutOnepage $checkoutOnepage
22-
* @param string $grandTotal
21+
* @param array $prices
2322
* @return void
2423
*/
25-
public function processAssert(CheckoutOnepage $checkoutOnepage, $grandTotal)
24+
public function processAssert(CheckoutOnepage $checkoutOnepage, array $prices)
2625
{
2726
$checkoutReviewGrandTotal = $checkoutOnepage->getReviewBlock()->getGrandTotal();
2827

2928
\PHPUnit_Framework_Assert::assertEquals(
3029
$checkoutReviewGrandTotal,
31-
number_format($grandTotal, 2),
32-
'Grand Total price: \'' . $checkoutReviewGrandTotal
33-
. '\' not equals with price from data set: \'' . $grandTotal . '\''
30+
number_format($prices['grandTotal'], 2),
31+
"Grand Total price: $checkoutReviewGrandTotal not equals with price from data set: " . $prices['grandTotal']
3432
);
3533
}
3634

dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/PlaceOrderStep.php

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,40 @@
1212
use Magento\Mtf\TestStep\TestStepInterface;
1313

1414
/**
15-
* Class PlaceOrderStep
16-
* Place order in one page checkout
15+
* Place order in one page checkout.
1716
*/
1817
class PlaceOrderStep implements TestStepInterface
1918
{
2019
/**
21-
* Onepage checkout page
20+
* Onepage checkout page.
2221
*
2322
* @var CheckoutOnepage
2423
*/
2524
protected $checkoutOnepage;
2625

2726
/**
28-
* Assert that Order Grand Total is correct on checkout page review block
27+
* Assert that Order Grand Total is correct on checkout page review block.
2928
*
3029
* @var AssertOrderTotalOnReviewPage
3130
*/
3231
protected $assertOrderTotalOnReviewPage;
3332

3433
/**
35-
* One page checkout success page
34+
* One page checkout success page.
3635
*
3736
* @var CheckoutOnepageSuccess
3837
*/
3938
protected $checkoutOnepageSuccess;
4039

4140
/**
42-
* Grand total price
41+
* Price array.
4342
*
4443
* @var string
4544
*/
46-
protected $grandTotal;
45+
protected $prices;
4746

4847
/**
49-
* Checkout method
48+
* Checkout method.
5049
*
5150
* @var string
5251
*/
@@ -58,31 +57,31 @@ class PlaceOrderStep implements TestStepInterface
5857
* @param AssertOrderTotalOnReviewPage $assertOrderTotalOnReviewPage
5958
* @param CheckoutOnepageSuccess $checkoutOnepageSuccess
6059
* @param string $checkoutMethod
61-
* @param string|null $grandTotal
60+
* @param array $prices
6261
*/
6362
public function __construct(
6463
CheckoutOnepage $checkoutOnepage,
6564
AssertOrderTotalOnReviewPage $assertOrderTotalOnReviewPage,
6665
CheckoutOnepageSuccess $checkoutOnepageSuccess,
6766
$checkoutMethod,
68-
$grandTotal = null
67+
array $prices = []
6968
) {
7069
$this->checkoutOnepage = $checkoutOnepage;
7170
$this->assertOrderTotalOnReviewPage = $assertOrderTotalOnReviewPage;
72-
$this->grandTotal = $grandTotal;
71+
$this->prices = $prices;
7372
$this->checkoutOnepageSuccess = $checkoutOnepageSuccess;
7473
$this->checkoutMethod = $checkoutMethod;
7574
}
7675

7776
/**
78-
* Place order after checking order totals on review step
77+
* Place order after checking order totals on review step.
7978
*
8079
* @return array
8180
*/
8281
public function run()
8382
{
84-
if ($this->grandTotal !== null) {
85-
$this->assertOrderTotalOnReviewPage->processAssert($this->checkoutOnepage, $this->grandTotal);
83+
if (!empty($this->prices)) {
84+
$this->assertOrderTotalOnReviewPage->processAssert($this->checkoutOnepage, $this->prices);
8685
}
8786
$this->checkoutOnepage->getReviewBlock()->placeOrder();
8887

dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Customer.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,6 @@
5555
<field name="gender" xsi:type="string">Male</field>
5656
</dataset>
5757

58-
<dataset name="johndoe_with_balance">
59-
<field name="firstname" xsi:type="string">John</field>
60-
<field name="lastname" xsi:type="string">Doe</field>
61-
<field name="email" xsi:type="string">JohnDoe_%isolation%@example.com</field>
62-
<field name="password" xsi:type="string">123123q</field>
63-
<field name="password_confirmation" xsi:type="string">123123q</field>
64-
<field name="dob" xsi:type="string">01/01/1990</field>
65-
<field name="gender" xsi:type="string">Male</field>
66-
<field name="amount_delta" xsi:type="string">501</field>
67-
</dataset>
68-
6958
<dataset name="defaultBackend">
7059
<field name="website_id" xsi:type="string">Main Website</field>
7160
<field name="firstname" xsi:type="string">John</field>

0 commit comments

Comments
 (0)