12
12
use Magento \Customer \Test \Fixture \Customer ;
13
13
use Magento \Customer \Test \Page \CustomerAccountEdit ;
14
14
use Magento \Customer \Test \Page \CustomerAccountIndex ;
15
- use Magento \Customer \Test \Page \CustomerAccountLogin ;
16
15
use Magento \Customer \Test \Page \CustomerAddressEdit ;
17
16
use Magento \Mtf \Fixture \FixtureFactory ;
18
17
use Magento \Mtf \TestCase \Injectable ;
19
18
20
19
/**
21
- * Test Flow:
22
20
* Preconditions:
23
21
* 1. Default test customer is created
24
22
*
@@ -58,13 +56,6 @@ class UpdateCustomerFrontendEntityTest extends Injectable
58
56
*/
59
57
protected $ cmsIndex ;
60
58
61
- /**
62
- * CustomerAccountLogin page
63
- *
64
- * @var CustomerAccountLogin
65
- */
66
- protected $ customerAccountLogin ;
67
-
68
59
/**
69
60
* CustomerAccountIndex page
70
61
*
@@ -91,7 +82,6 @@ class UpdateCustomerFrontendEntityTest extends Injectable
91
82
*
92
83
* @param CmsIndex $cmsIndex
93
84
* @param FixtureFactory $fixtureFactory
94
- * @param CustomerAccountLogin $customerAccountLogin
95
85
* @param CustomerAccountIndex $customerAccountIndex
96
86
* @param CustomerAccountEdit $customerAccountEdit
97
87
* @param CustomerAddressEdit $customerAddressEdit
@@ -100,14 +90,12 @@ class UpdateCustomerFrontendEntityTest extends Injectable
100
90
public function __inject (
101
91
CmsIndex $ cmsIndex ,
102
92
FixtureFactory $ fixtureFactory ,
103
- CustomerAccountLogin $ customerAccountLogin ,
104
93
CustomerAccountIndex $ customerAccountIndex ,
105
94
CustomerAccountEdit $ customerAccountEdit ,
106
95
CustomerAddressEdit $ customerAddressEdit
107
96
) {
108
97
$ this ->cmsIndex = $ cmsIndex ;
109
98
$ this ->fixtureFactory = $ fixtureFactory ;
110
- $ this ->customerAccountLogin = $ customerAccountLogin ;
111
99
$ this ->customerAccountIndex = $ customerAccountIndex ;
112
100
$ this ->customerAccountEdit = $ customerAccountEdit ;
113
101
$ this ->customerAddressEdit = $ customerAddressEdit ;
@@ -132,12 +120,10 @@ public function test(
132
120
$ initialCustomer ->persist ();
133
121
134
122
// 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 ();
141
127
$ this ->customerAccountIndex ->getInfoBlock ()->openEditContactInfo ();
142
128
$ this ->customerAccountEdit ->getAccountInfoForm ()->fill ($ customer );
143
129
$ this ->customerAccountEdit ->getAccountInfoForm ()->submit ();
@@ -157,8 +143,6 @@ public function test(
157
143
*/
158
144
public function tearDown ()
159
145
{
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 ();
163
147
}
164
148
}
0 commit comments