Skip to content

Commit d1b383c

Browse files
committed
MTA-2144: Maintain functional tests
1 parent b57605e commit d1b383c

File tree

13 files changed

+35
-26
lines changed

13 files changed

+35
-26
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-rc24",
3+
"magento/mtf": "1.0.0-rc25",
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/Customer/Test/Fixture/Customer/Address.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array
4949
$this->params = $params;
5050

5151
if (isset($data['presets'])) {
52-
$data['presets'] = explode(',', $data['presets']);
52+
$data['presets'] = array_map('trim', explode(',', $data['presets']));
5353
foreach ($data['presets'] as $value) {
54-
/** @var AddressFixture $addresses*/
55-
$addresses = $fixtureFactory->createByCode('address', ['dataSet' => $value]);
56-
$this->data[] = $addresses->getData();
57-
$this->addressesFixture[] = $addresses;
54+
/** @var AddressFixture $address*/
55+
$address = $fixtureFactory->createByCode('address', ['dataSet' => $value]);
56+
$this->data[] = $address->getData();
57+
$this->addressesFixture[] = $address;
5858
}
5959
} elseif (empty($data['presets']) && !empty($data['addresses'])) {
60-
foreach ($data['addresses'] as $addresses) {
61-
/** @var AddressFixture $addresses */
62-
$this->data[] = $addresses->getData();
63-
$this->addressesFixture[] = $addresses;
60+
foreach ($data['addresses'] as $address) {
61+
/** @var AddressFixture $address */
62+
$this->data[] = $address->getData();
63+
$this->addressesFixture[] = $address;
6464
}
6565
}
6666
}

dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/RegisterCustomerFrontendEntityTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public function __inject(
6060
$this->customerAccountLogout = $customerAccountLogout;
6161
$this->customerAccountCreate = $customerAccountCreate;
6262
$this->cmsIndex = $cmsIndex;
63+
$this->customerAccountLogout->open();
6364
}
6465

6566
/**

dev/tests/functional/tests/app/Magento/Integration/Test/Constraint/AssertIntegrationResourcesPopup.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ protected function verifyResources(array $formResources, array $fixtureResources
6161
if (!empty($diff)) {
6262
$errorMessage = sprintf(
6363
"Resources are not equal.\nExpected: %s\nActual: %s",
64-
implode(",\n", $fixtureResources),
65-
implode(",\n", $formResources)
64+
implode(",\n", $formResources),
65+
implode(",\n", $topFormResources)
6666
);
6767
}
6868

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@
1616
<item name="1" xsi:type="string">Sales</item>
1717
<item name="2" xsi:type="string">Products</item>
1818
<item name="3" xsi:type="string">Customers</item>
19-
<item name="4" xsi:type="string">My Account</item>
20-
<item name="5" xsi:type="string">Marketing</item>
21-
<item name="6" xsi:type="string">Content</item>
22-
<item name="7" xsi:type="string">Reports</item>
23-
<item name="8" xsi:type="string">Stores</item>
24-
<item name="9" xsi:type="string">System</item>
25-
<item name="10" xsi:type="string">Global Search</item>
19+
<item name="4" xsi:type="string">Carts</item>
20+
<item name="5" xsi:type="string">My Account</item>
21+
<item name="6" xsi:type="string">Marketing</item>
22+
<item name="7" xsi:type="string">Content</item>
23+
<item name="8" xsi:type="string">Reports</item>
24+
<item name="9" xsi:type="string">Stores</item>
25+
<item name="10" xsi:type="string">System</item>
26+
<item name="11" xsi:type="string">Global Search</item>
2627
</field>
2728
</dataset>
2829
</repository>

dev/tests/functional/tests/app/Magento/Multishipping/Test/Block/Checkout/Addresses.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function selectAddresses($bindings)
4848
{
4949
foreach ($bindings as $key => $value) {
5050
$this->_rootElement->find(
51-
'//tr[//a[text()="' . $key . '"]]/following-sibling::*//select',
51+
'//tr[.//a[text()="' . $key . '"]]//select[contains(@name,"[address]")]',
5252
Locator::SELECTOR_XPATH,
5353
'select'
5454
)->setValue($value);

dev/tests/functional/tests/app/Magento/Multishipping/Test/TestStep/FillCustomerAddressesStep.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ public function run()
7474
$bindings = [];
7575
foreach ($this->products as $key => $product) {
7676
$productName = $product->getName();
77+
$addresses = $this->customer->getDataFieldConfig('address')['source']->getAddresses();
7778
$addressRender = $this->objectManeger->create(
7879
'\Magento\Customer\Test\Block\Address\Renderer',
79-
['address' => $this->customer->getAddress()[$key], 'type' => 'oneline']
80+
['address' => $addresses[$key], 'type' => 'oneline']
8081
);
8182
$bindings[$productName] = $addressRender->render();
8283
}

dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertRefundInCreditMemoTab.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function processAssert(
4646
];
4747
$grid->search($filter);
4848
$filter['amount_from'] = number_format($amount[$key]['grand_creditmemo_total'], 2);
49-
$filter['amount_to'] = number_format($amount[$key]['grand_creditmemo_total'], 2);
49+
unset($filter['amount_to']);
5050
\PHPUnit_Framework_Assert::assertTrue(
5151
$grid->isRowVisible($filter, false, false),
5252
'Credit memo is absent on credit memos tab.'

dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/SalesCreditMemoView.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/pages.xsd">
9-
<page name="SalesCreditMemoView" area="Adminhtml" mca="sales/creditmemo/view" module="Magento_Sales">
10-
<block name="itemsBlock" class="Magento\Sales\Test\Block\Adminhtml\Order\Creditmemo\View\Items" locator=".grid" strategy="css selector"/>
11-
</page>
9+
<page name="SalesCreditMemoView" area="Adminhtml" mca="sales/creditmemo/view" module="Magento_Sales">
10+
<block name="itemsBlock" class="Magento\Sales\Test\Block\Adminhtml\Order\Creditmemo\View\Items" locator="#creditmemo_items_container" strategy="css selector" />
11+
</page>
1212
</config>

dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/basic.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<rule scope="testcase">
1616
<deny>
1717
<tag group="test_type" value="3rd_party_test" />
18-
<tag group="test_type" value="3rd_party_test_deprecated" />
18+
<tag group="test_type" value="3rd_party_test_deprecated" />
1919
</deny>
2020
</rule>
2121
</config>

0 commit comments

Comments
 (0)