Skip to content

Commit ea5c197

Browse files
authored
Merge branch 'develop' into develop
2 parents d7ea51d + 4317cc7 commit ea5c197

File tree

4 files changed

+69
-1
lines changed

4 files changed

+69
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
namespace Magento\AcceptanceTest\_default\Backend;
3+
4+
use Magento\FunctionalTestingFramework\AcceptanceTester;
5+
use Magento\FunctionalTestingFramework\DataGenerator\Handlers\CredentialStore;
6+
use Magento\FunctionalTestingFramework\DataGenerator\Handlers\PersistedObjectHandler;
7+
use \Codeception\Util\Locator;
8+
use Yandex\Allure\Adapter\Annotation\Features;
9+
use Yandex\Allure\Adapter\Annotation\Stories;
10+
use Yandex\Allure\Adapter\Annotation\Title;
11+
use Yandex\Allure\Adapter\Annotation\Description;
12+
use Yandex\Allure\Adapter\Annotation\Parameter;
13+
use Yandex\Allure\Adapter\Annotation\Severity;
14+
use Yandex\Allure\Adapter\Model\SeverityLevel;
15+
use Yandex\Allure\Adapter\Annotation\TestCaseId;
16+
17+
/**
18+
*/
19+
class ExecuteInSeleniumTestCest
20+
{
21+
/**
22+
* @Features({"TestModule"})
23+
* @Parameter(name = "AcceptanceTester", value="$I")
24+
* @param AcceptanceTester $I
25+
* @return void
26+
* @throws \Exception
27+
*/
28+
public function ExecuteInSeleniumTest(AcceptanceTester $I)
29+
{
30+
$I->executeInSelenium(function ($webdriver) { return 'Hello, World!'});
31+
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<test name="ExecuteInSeleniumTest">
12+
<executeInSelenium function="function ($webdriver) { return 'Hello, World!'}" stepKey="executeInSeleniumStep"/>
13+
</test>
14+
</tests>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace tests\verification\Tests;
7+
8+
use tests\util\MftfTestCase;
9+
10+
class ExecuteInSeleniumTest extends MftfTestCase
11+
{
12+
/**
13+
* Tests generation of executeInSelenium action.
14+
*
15+
* @throws \Exception
16+
* @throws \Magento\FunctionalTestingFramework\Exceptions\TestReferenceException
17+
*/
18+
public function testExecuteInSeleniumTest()
19+
{
20+
$this->generateAndCompareTest('ExecuteInSeleniumTest');
21+
}
22+
}

src/Magento/FunctionalTestingFramework/Test/Objects/ActionObject.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class ActionObject
6060
const ASSERTION_VALUE_ATTRIBUTE = "value";
6161
const DELETE_DATA_MUTUAL_EXCLUSIVE_ATTRIBUTES = ["url", "createDataKey"];
6262
const EXTERNAL_URL_AREA_INVALID_ACTIONS = ['amOnPage'];
63-
const FUNCTION_CLOSURE_ACTIONS = ['waitForElementChange', 'performOn'];
63+
const FUNCTION_CLOSURE_ACTIONS = ['waitForElementChange', 'performOn', 'executeInSelenium'];
6464
const MERGE_ACTION_ORDER_AFTER = 'after';
6565
const MERGE_ACTION_ORDER_BEFORE = 'before';
6666
const ACTION_ATTRIBUTE_TIMEZONE = 'timezone';

0 commit comments

Comments
 (0)