@@ -21,14 +21,14 @@ use Codeception\Module;
21
21
*
22
22
* To use this group extension, include it to "extensions" option of global Codeception config.
23
23
*/
24
- class functionalSuiteUsingSecretData extends \Codeception\GroupObject
24
+ class ActionsInDifferentModulesSuite extends \Codeception\GroupObject
25
25
{
26
- public static $group = 'functionalSuiteUsingSecretData ';
26
+ public static $group = 'ActionsInDifferentModulesSuite ';
27
27
private $testCount = 1;
28
28
private $preconditionFailure = null;
29
29
private $currentTestRun = 0;
30
- private static $HOOK_EXECUTION_INIT = "\n/******** Beginning execution of functionalSuiteUsingSecretData suite %s block ********/\n";
31
- private static $HOOK_EXECUTION_END = "\n/******** Execution of functionalSuiteUsingSecretData suite %s block complete ********/\n";
30
+ private static $HOOK_EXECUTION_INIT = "\n/******** Beginning execution of ActionsInDifferentModulesSuite suite %s block ********/\n";
31
+ private static $HOOK_EXECUTION_END = "\n/******** Execution of ActionsInDifferentModulesSuite suite %s block complete ********/\n";
32
32
/** @var MagentoWebDriver */
33
33
private $webDriver;
34
34
/** @var ModuleContainer */
@@ -83,6 +83,11 @@ class functionalSuiteUsingSecretData extends \Codeception\GroupObject
83
83
);
84
84
$this->getModuleForAction("fillSecretField")->fillSecretField("#fill", $this->getModuleForAction("getSecret")->getSecret("magento/some/secret") . "+" . $this->getModuleForAction("getSecret")->getSecret("magento/some/secret")); // stepKey: fillBefore
85
85
$this->getModuleForAction("click")->click(PersistedObjectHandler::getInstance()->retrieveEntityField('create2', 'key2', 'suite')); // stepKey: click
86
+ print("Entering Action Group [return1] ActionGroupReturningValueActionGroup");
87
+ $grabProducts1Return1 = $this->getModuleForAction("grabMultiple")->grabMultiple("selector"); // stepKey: grabProducts1Return1
88
+ $this->getModuleForAction("assertCount")->assertCount(1, $grabProducts1Return1); // stepKey: assertCountReturn1
89
+ $return1 = $this->getModuleForAction("return")->return($grabProducts1Return1); // stepKey: returnProducts1Return1
90
+ print("Exiting Action Group [return1] ActionGroupReturningValueActionGroup");
86
91
} catch (\Exception $exception) {
87
92
$this->preconditionFailure = $exception->getMessage();
88
93
}
@@ -133,6 +138,14 @@ class functionalSuiteUsingSecretData extends \Codeception\GroupObject
133
138
} else {
134
139
$this->webDriver->_initializeSession();
135
140
}
141
+ print("Entering Action Group [return2] ExtendedActionGroupReturningValueActionGroup");
142
+ $grabProducts1Return2 = $this->getModuleForAction("grabMultiple")->grabMultiple("selector"); // stepKey: grabProducts1Return2
143
+ $this->getModuleForAction("assertCount")->assertCount(1, $grabProducts1Return2); // stepKey: assertCountReturn2
144
+ $return2 = $this->getModuleForAction("return")->return($grabProducts1Return2); // stepKey: returnProducts1Return2
145
+ $grabProducts2Return2 = $this->getModuleForAction("grabMultiple")->grabMultiple("otherSelector"); // stepKey: grabProducts2Return2
146
+ $this->getModuleForAction("assertCount")->assertCount(2, $grabProducts2Return2); // stepKey: assertSecondCountReturn2
147
+ $return2 = $this->getModuleForAction("return")->return($grabProducts2Return2); // stepKey: returnProducts2Return2
148
+ print("Exiting Action Group [return2] ExtendedActionGroupReturningValueActionGroup");
136
149
PersistedObjectHandler::getInstance()->deleteEntity(
137
150
"create1",
138
151
"suite"
0 commit comments