Skip to content

MQE-1015: Test Generation Error If Suite Has Action Group With 2+ Arguments #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dev/tests/verification/Resources/functionalSuiteHooks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class functionalSuiteHooks extends \Codeception\GroupObject
$createThis = DataObjectHandler::getInstance()->getObject("createThis");
$this->create = new DataPersistenceHandler($createThis, [], $createFields);
$this->create->createEntity();
$webDriver->see("John", msq("uniqueData") . "John");

// reset configuration and close session
$this->getModule('\Magento\FunctionalTestingFramework\Module\MagentoWebDriver')->_resetConfig();
Expand Down Expand Up @@ -95,6 +96,7 @@ class functionalSuiteHooks extends \Codeception\GroupObject
$webDriver->_initializeSession();
$webDriver->amOnPage("some.url");
$webDriver->deleteEntityByUrl("deleteThis");
$webDriver->see("John", msq("uniqueData") . "John");

// reset configuration and close session
$this->getModule('\Magento\FunctionalTestingFramework\Module\MagentoWebDriver')->_resetConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
<see selector="{{SampleSection.oneParamElement('test1')}}" userInput="{{someArgument.firstname}}" stepKey="seeFirstName" />
</actionGroup>

<actionGroup name="actionGroupWithTwoArguments">
<arguments>
<argument name="somePerson"/>
<argument name="anotherPerson"/>
</arguments>

<see selector="{{anotherPerson.firstname}}" userInput="{{somePerson.firstname}}" stepKey="seeFirstName" />
</actionGroup>

<actionGroup name="actionGroupWithSingleParameterSelectorFromArgument">
<arguments>
<argument name="someArgument" defaultValue="ReplacementPerson" />
Expand Down
8 changes: 8 additions & 0 deletions dev/tests/verification/_suite/functionalSuiteHooks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,18 @@
<createData entity="createThis" stepKey="create">
<field key="someKey">dataHere</field>
</createData>
<actionGroup ref="actionGroupWithTwoArguments" stepKey="AC">
<argument name="somePerson" value="simpleData"/>
<argument name="anotherPerson" value="uniqueData"/>
</actionGroup>
</before>
<after>
<amOnPage url="some.url" stepKey="after"/>
<deleteData url="deleteThis" stepKey="delete"/>
<actionGroup ref="actionGroupWithTwoArguments" stepKey="AC">
<argument name="somePerson" value="simpleData"/>
<argument name="anotherPerson" value="uniqueData"/>
</actionGroup>
</after>
</suite>
</suites>
2 changes: 2 additions & 0 deletions etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@
<argument name="idAttributes" xsi:type="array">
<item name="/suites/suite" xsi:type="string">name</item>
<item name="/suites/suite/(before|after)/remove" xsi:type="string">keyForRemoval</item>
<item name="/suites/suite/(before|after)/actionGroup/argument" xsi:type="string">name</item>
<item name="/suites/suite/(before|after)/(actionGroup|&commonTestActions;)" xsi:type="string">stepKey</item>
<item name="/suites/suite/(before|after)/createData/requiredEntity" xsi:type="string">createDataKey</item>
<item name="/suites/suite/(before|after)/createData/field" xsi:type="string">key</item>
Expand All @@ -377,6 +378,7 @@
<argument name="assocArrayAttributes" xsi:type="array">
<item name="/suites/suite" xsi:type="string">name</item>
<item name="/suites/suite/(before|after)/remove" xsi:type="string">keyForRemoval</item>
<item name="/suites/suite/(before|after)/actionGroup/argument" xsi:type="string">name</item>
<item name="/suites/suite/(before|after)/(actionGroup|&commonTestActions;)" xsi:type="string">stepKey</item>
<item name="/suites/suite/(before|after)/createData/requiredEntity" xsi:type="string">createDataKey</item>
<item name="/suites/suite/(before|after)/createData/field" xsi:type="string">key</item>
Expand Down