Skip to content

Commit 5d31786

Browse files
author
Dmytro Aponasenko
committed
MTA-1814: Analyse functional test failures - Sprint 9
1 parent 82ec7a7 commit 5d31786

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

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

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@
1212
use Magento\Customer\Test\Fixture\Customer;
1313
use Magento\Customer\Test\Page\CustomerAccountEdit;
1414
use Magento\Customer\Test\Page\CustomerAccountIndex;
15-
use Magento\Customer\Test\Page\CustomerAccountLogin;
1615
use Magento\Customer\Test\Page\CustomerAddressEdit;
1716
use Magento\Mtf\Fixture\FixtureFactory;
1817
use Magento\Mtf\TestCase\Injectable;
1918

2019
/**
21-
* Test Flow:
2220
* Preconditions:
2321
* 1. Default test customer is created
2422
*
@@ -58,13 +56,6 @@ class UpdateCustomerFrontendEntityTest extends Injectable
5856
*/
5957
protected $cmsIndex;
6058

61-
/**
62-
* CustomerAccountLogin page
63-
*
64-
* @var CustomerAccountLogin
65-
*/
66-
protected $customerAccountLogin;
67-
6859
/**
6960
* CustomerAccountIndex page
7061
*
@@ -91,7 +82,6 @@ class UpdateCustomerFrontendEntityTest extends Injectable
9182
*
9283
* @param CmsIndex $cmsIndex
9384
* @param FixtureFactory $fixtureFactory
94-
* @param CustomerAccountLogin $customerAccountLogin
9585
* @param CustomerAccountIndex $customerAccountIndex
9686
* @param CustomerAccountEdit $customerAccountEdit
9787
* @param CustomerAddressEdit $customerAddressEdit
@@ -100,14 +90,12 @@ class UpdateCustomerFrontendEntityTest extends Injectable
10090
public function __inject(
10191
CmsIndex $cmsIndex,
10292
FixtureFactory $fixtureFactory,
103-
CustomerAccountLogin $customerAccountLogin,
10493
CustomerAccountIndex $customerAccountIndex,
10594
CustomerAccountEdit $customerAccountEdit,
10695
CustomerAddressEdit $customerAddressEdit
10796
) {
10897
$this->cmsIndex = $cmsIndex;
10998
$this->fixtureFactory = $fixtureFactory;
110-
$this->customerAccountLogin = $customerAccountLogin;
11199
$this->customerAccountIndex = $customerAccountIndex;
112100
$this->customerAccountEdit = $customerAccountEdit;
113101
$this->customerAddressEdit = $customerAddressEdit;
@@ -132,12 +120,10 @@ public function test(
132120
$initialCustomer->persist();
133121

134122
// Steps
135-
$this->cmsIndex->open();
136-
$this->cmsIndex->getLinksBlock()->openLink('Log In');
137-
sleep(3);
138-
$this->customerAccountLogin->getLoginBlock()->fill($initialCustomer);
139-
$this->customerAccountLogin->getLoginBlock()->submit();
140-
123+
$this->objectManager->create(
124+
'Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep',
125+
['customer' => $initialCustomer]
126+
)->run();
141127
$this->customerAccountIndex->getInfoBlock()->openEditContactInfo();
142128
$this->customerAccountEdit->getAccountInfoForm()->fill($customer);
143129
$this->customerAccountEdit->getAccountInfoForm()->submit();
@@ -157,8 +143,6 @@ public function test(
157143
*/
158144
public function tearDown()
159145
{
160-
if ($this->cmsIndex->getLinksBlock()->isVisible()) {
161-
$this->objectManager->create('Magento\Customer\Test\TestStep\LogoutCustomerOnFrontendStep')->run();
162-
}
146+
$this->objectManager->create('Magento\Customer\Test\TestStep\LogoutCustomerOnFrontendStep')->run();
163147
}
164148
}

dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertWishlistIsEmpty.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class AssertWishlistIsEmpty extends AbstractConstraint
2525
*/
2626
public function processAssert(CmsIndex $cmsIndex, WishlistIndex $wishlistIndex)
2727
{
28+
$cmsIndex->getCmsPageBlock()->waitPageInit();
2829
$cmsIndex->getLinksBlock()->openLink("My Wish List");
2930
\PHPUnit_Framework_Assert::assertTrue(
3031
$wishlistIndex->getWishlistBlock()->isEmptyBlockVisible(),

0 commit comments

Comments
 (0)