9
9
use Codeception \Module \WebDriver ;
10
10
use Codeception \Test \Descriptor ;
11
11
use Codeception \TestInterface ;
12
- use Yandex \ Allure \ Adapter \ Allure ;
12
+ use Magento \ FunctionalTestingFramework \ Allure \ AllureHelper ;
13
13
use Facebook \WebDriver \Interactions \WebDriverActions ;
14
14
use Codeception \Exception \ModuleConfigException ;
15
15
use Codeception \Exception \ModuleException ;
19
19
use Magento \FunctionalTestingFramework \Util \Protocol \CurlTransport ;
20
20
use Magento \FunctionalTestingFramework \Util \Protocol \CurlInterface ;
21
21
use Magento \FunctionalTestingFramework \Util \ConfigSanitizerUtil ;
22
- use Yandex \Allure \Adapter \Event \AddAttachmentEvent ;
23
- use Yandex \Allure \Adapter \Event \AddParameterEvent ;
24
22
use Yandex \Allure \Adapter \Support \AttachmentSupport ;
25
23
use Magento \FunctionalTestingFramework \Exceptions \TestFrameworkException ;
26
24
@@ -203,7 +201,7 @@ public function dontSeeCurrentUrlEquals($url)
203
201
{
204
202
$ actualUrl = $ this ->webDriver ->getCurrentURL ();
205
203
$ comparison = "Expected: $ url \nActual: $ actualUrl " ;
206
- Allure:: lifecycle ()-> fire ( new AddAttachmentEvent ( $ comparison , 'Comparison ' ) );
204
+ AllureHelper:: addAttachmentToCurrentStep ( $ comparison , 'Comparison ' );
207
205
$ this ->assertNotEquals ($ url , $ actualUrl );
208
206
}
209
207
@@ -217,7 +215,7 @@ public function dontSeeCurrentUrlMatches($regex)
217
215
{
218
216
$ actualUrl = $ this ->webDriver ->getCurrentURL ();
219
217
$ comparison = "Expected: $ regex \nActual: $ actualUrl " ;
220
- Allure:: lifecycle ()-> fire ( new AddAttachmentEvent ( $ comparison , 'Comparison ' ) );
218
+ AllureHelper:: addAttachmentToCurrentStep ( $ comparison , 'Comparison ' );
221
219
$ this ->assertNotRegExp ($ regex , $ actualUrl );
222
220
}
223
221
@@ -231,7 +229,7 @@ public function dontSeeInCurrentUrl($needle)
231
229
{
232
230
$ actualUrl = $ this ->webDriver ->getCurrentURL ();
233
231
$ comparison = "Expected: $ needle \nActual: $ actualUrl " ;
234
- Allure:: lifecycle ()-> fire ( new AddAttachmentEvent ( $ comparison , 'Comparison ' ) );
232
+ AllureHelper:: addAttachmentToCurrentStep ( $ comparison , 'Comparison ' );
235
233
$ this ->assertNotContains ($ needle , $ actualUrl );
236
234
}
237
235
@@ -268,7 +266,7 @@ public function seeCurrentUrlEquals($url)
268
266
{
269
267
$ actualUrl = $ this ->webDriver ->getCurrentURL ();
270
268
$ comparison = "Expected: $ url \nActual: $ actualUrl " ;
271
- Allure:: lifecycle ()-> fire ( new AddAttachmentEvent ( $ comparison , 'Comparison ' ) );
269
+ AllureHelper:: addAttachmentToCurrentStep ( $ comparison , 'Comparison ' );
272
270
$ this ->assertEquals ($ url , $ actualUrl );
273
271
}
274
272
@@ -282,7 +280,7 @@ public function seeCurrentUrlMatches($regex)
282
280
{
283
281
$ actualUrl = $ this ->webDriver ->getCurrentURL ();
284
282
$ comparison = "Expected: $ regex \nActual: $ actualUrl " ;
285
- Allure:: lifecycle ()-> fire ( new AddAttachmentEvent ( $ comparison , 'Comparison ' ) );
283
+ AllureHelper:: addAttachmentToCurrentStep ( $ comparison , 'Comparison ' );
286
284
$ this ->assertRegExp ($ regex , $ actualUrl );
287
285
}
288
286
@@ -296,7 +294,7 @@ public function seeInCurrentUrl($needle)
296
294
{
297
295
$ actualUrl = $ this ->webDriver ->getCurrentURL ();
298
296
$ comparison = "Expected: $ needle \nActual: $ actualUrl " ;
299
- Allure:: lifecycle ()-> fire ( new AddAttachmentEvent ( $ comparison , 'Comparison ' ) );
297
+ AllureHelper:: addAttachmentToCurrentStep ( $ comparison , 'Comparison ' );
300
298
$ this ->assertContains ($ needle , $ actualUrl );
301
299
}
302
300
0 commit comments