11
11
use Magento \Captcha \Test \Constraint \AssertCaptchaFieldOnRegisterForm ;
12
12
use Magento \Customer \Test \Fixture \Customer ;
13
13
use Magento \Customer \Test \Page \CustomerAccountCreate ;
14
- use Magento \Mtf \Fixture \FixtureFactory ;
15
14
16
15
/**
17
16
* Preconditions:
18
- * 1. Enable CAPTCHA for customer.
17
+ * 1. Enable captcha for customer.
19
18
*
20
19
* Test Flow:
21
20
* 1. Open storefront account register form.
@@ -34,7 +33,7 @@ class CaptchaOnStoreFrontRegisterTest extends Injectable
34
33
private $ stepFactory ;
35
34
36
35
/**
37
- * Assert Captcha .
36
+ * Assert captcha on storefront account register page .
38
37
*
39
38
* @var AssertCaptchaFieldOnRegisterForm
40
39
*/
@@ -47,13 +46,6 @@ class CaptchaOnStoreFrontRegisterTest extends Injectable
47
46
*/
48
47
private $ customerAccountCreate ;
49
48
50
- /**
51
- * Fixture factory.
52
- *
53
- * @var FixtureFactory
54
- */
55
- private $ fixtureFactory ;
56
-
57
49
/**
58
50
* Configuration setting.
59
51
*
@@ -67,26 +59,23 @@ class CaptchaOnStoreFrontRegisterTest extends Injectable
67
59
* @param TestStepFactory $stepFactory
68
60
* @param AssertCaptchaFieldOnRegisterForm $assertCaptcha
69
61
* @param CustomerAccountCreate $customerAccount
70
- * @param FixtureFactory $fixtureFactory
71
62
* @return void
72
63
*/
73
64
public function __inject (
74
65
TestStepFactory $ stepFactory ,
75
66
AssertCaptchaFieldOnRegisterForm $ assertCaptcha ,
76
- CustomerAccountCreate $ customerAccount ,
77
- FixtureFactory $ fixtureFactory
67
+ CustomerAccountCreate $ customerAccount
78
68
) {
79
69
$ this ->stepFactory = $ stepFactory ;
80
70
$ this ->assertCaptcha = $ assertCaptcha ;
81
71
$ this ->customerAccountCreate = $ customerAccount ;
82
- $ this ->fixtureFactory = $ fixtureFactory ;
83
72
}
84
73
85
74
/**
86
75
* Test creation for customer register with captcha on storefront.
87
76
*
88
77
* @param Customer $customer
89
- * @param null| string $configData
78
+ * @param string $configData
90
79
* @return void
91
80
*/
92
81
public function test (
@@ -103,7 +92,7 @@ public function test(
103
92
104
93
$ this ->customerAccountCreate ->open ();
105
94
$ this ->assertCaptcha ->processAssertRegisterForm ($ this ->customerAccountCreate );
106
- $ this ->customerAccountCreate ->getRegisterFormWithCaptcha ()->getCaptchaReloadButton ()-> click ();
95
+ $ this ->customerAccountCreate ->getRegisterFormWithCaptcha ()->reloadCaptcha ();
107
96
$ this ->customerAccountCreate ->getRegisterFormWithCaptcha ()->registerCustomer ($ customer );
108
97
}
109
98
0 commit comments