Skip to content

Commit 0f496ed

Browse files
committed
MQE-742: Add ability to pass in non-entity parameters when calling operations
- add new field arg for createEntity operations - update object model to handle new field - update verification tests
1 parent a1b7c6c commit 0f496ed

26 files changed

+366
-33
lines changed

dev/tests/verification/Resources/ActionGroupWithDataOverrideTest.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ActionGroupWithDataOverrideTestCest
3636
{
3737
$I->amGoingTo("create entity that has the stepKey: createPersonParam");
3838
$ReplacementPerson = DataObjectHandler::getInstance()->getObject("ReplacementPerson");
39-
$this->createPersonParam = new DataPersistenceHandler($ReplacementPerson);
39+
$this->createPersonParam = new DataPersistenceHandler($ReplacementPerson, []);
4040
$this->createPersonParam->createEntity();
4141
$I->fillField("#foo", "myData1");
4242
$I->fillField("#bar", "myData2");

dev/tests/verification/Resources/ActionGroupWithDataTest.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ActionGroupWithDataTestCest
3636
{
3737
$I->amGoingTo("create entity that has the stepKey: createPersonParam");
3838
$ReplacementPerson = DataObjectHandler::getInstance()->getObject("ReplacementPerson");
39-
$this->createPersonParam = new DataPersistenceHandler($ReplacementPerson);
39+
$this->createPersonParam = new DataPersistenceHandler($ReplacementPerson, []);
4040
$this->createPersonParam->createEntity();
4141
$I->fillField("#foo", "myData1");
4242
$I->fillField("#bar", "myData2");

dev/tests/verification/Resources/ActionGroupWithNoDefaultTest.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ActionGroupWithNoDefaultTestCest
3636
{
3737
$I->amGoingTo("create entity that has the stepKey: createPersonParam");
3838
$ReplacementPerson = DataObjectHandler::getInstance()->getObject("ReplacementPerson");
39-
$this->createPersonParam = new DataPersistenceHandler($ReplacementPerson);
39+
$this->createPersonParam = new DataPersistenceHandler($ReplacementPerson, []);
4040
$this->createPersonParam->createEntity();
4141
$I->fillField("#foo", "myData1");
4242
$I->fillField("#bar", "myData2");

dev/tests/verification/Resources/ActionGroupWithPersistedData.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ActionGroupWithPersistedDataCest
3636
{
3737
$I->amGoingTo("create entity that has the stepKey: createPersonParam");
3838
$ReplacementPerson = DataObjectHandler::getInstance()->getObject("ReplacementPerson");
39-
$this->createPersonParam = new DataPersistenceHandler($ReplacementPerson);
39+
$this->createPersonParam = new DataPersistenceHandler($ReplacementPerson, []);
4040
$this->createPersonParam->createEntity();
4141
$I->fillField("#foo", "myData1");
4242
$I->fillField("#bar", "myData2");
@@ -73,7 +73,7 @@ class ActionGroupWithPersistedDataCest
7373
{
7474
$I->amGoingTo("create entity that has the stepKey: createPerson");
7575
$DefaultPerson = DataObjectHandler::getInstance()->getObject("DefaultPerson");
76-
$createPerson = new DataPersistenceHandler($DefaultPerson);
76+
$createPerson = new DataPersistenceHandler($DefaultPerson, []);
7777
$createPerson->createEntity();
7878
$I->amOnPage("/" . $createPerson->getCreatedDataByName('firstname') . "/" . $createPerson->getCreatedDataByName('lastname') . ".html");
7979
$I->fillField("#foo", $createPerson->getCreatedDataByName('firstname'));

dev/tests/verification/Resources/ActionGroupWithTopLevelPersistedData.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ActionGroupWithTopLevelPersistedDataCest
3636
{
3737
$I->amGoingTo("create entity that has the stepKey: createPersonParam");
3838
$ReplacementPerson = DataObjectHandler::getInstance()->getObject("ReplacementPerson");
39-
$this->createPersonParam = new DataPersistenceHandler($ReplacementPerson);
39+
$this->createPersonParam = new DataPersistenceHandler($ReplacementPerson, []);
4040
$this->createPersonParam->createEntity();
4141
$I->fillField("#foo", "myData1");
4242
$I->fillField("#bar", "myData2");

dev/tests/verification/Resources/ArgumentWithSameNameAsElement.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ArgumentWithSameNameAsElementCest
3636
{
3737
$I->amGoingTo("create entity that has the stepKey: createPersonParam");
3838
$ReplacementPerson = DataObjectHandler::getInstance()->getObject("ReplacementPerson");
39-
$this->createPersonParam = new DataPersistenceHandler($ReplacementPerson);
39+
$this->createPersonParam = new DataPersistenceHandler($ReplacementPerson, []);
4040
$this->createPersonParam->createEntity();
4141
$I->fillField("#foo", "myData1");
4242
$I->fillField("#bar", "myData2");

dev/tests/verification/Resources/AssertTest.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class AssertTestCest
3232
{
3333
$I->amGoingTo("create entity that has the stepKey: createData1");
3434
$ReplacementPerson = DataObjectHandler::getInstance()->getObject("ReplacementPerson");
35-
$this->createData1 = new DataPersistenceHandler($ReplacementPerson);
35+
$this->createData1 = new DataPersistenceHandler($ReplacementPerson, []);
3636
$this->createData1->createEntity();
3737
}
3838

@@ -46,7 +46,7 @@ class AssertTestCest
4646
{
4747
$I->amGoingTo("create entity that has the stepKey: createData2");
4848
$UniquePerson = DataObjectHandler::getInstance()->getObject("UniquePerson");
49-
$createData2 = new DataPersistenceHandler($UniquePerson);
49+
$createData2 = new DataPersistenceHandler($UniquePerson, []);
5050
$createData2->createEntity();
5151
$grabTextFrom1 = $I->grabTextFrom(".copyright>span");
5252
$I->assertArrayIsSorted(["1", "2", "3", "4", "5"], "asc");

dev/tests/verification/Resources/BasicActionGroupTest.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class BasicActionGroupTestCest
3636
{
3737
$I->amGoingTo("create entity that has the stepKey: createPersonParam");
3838
$ReplacementPerson = DataObjectHandler::getInstance()->getObject("ReplacementPerson");
39-
$this->createPersonParam = new DataPersistenceHandler($ReplacementPerson);
39+
$this->createPersonParam = new DataPersistenceHandler($ReplacementPerson, []);
4040
$this->createPersonParam->createEntity();
4141
$I->fillField("#foo", "myData1");
4242
$I->fillField("#bar", "myData2");

dev/tests/verification/Resources/HookActionsTest.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ class HookActionsTestCest
3737
{
3838
$I->amGoingTo("create entity that has the stepKey: sampleCreateBefore");
3939
$sampleCreatedEntity = DataObjectHandler::getInstance()->getObject("sampleCreatedEntity");
40-
$this->sampleCreateBefore = new DataPersistenceHandler($sampleCreatedEntity);
40+
$this->sampleCreateBefore = new DataPersistenceHandler($sampleCreatedEntity, []);
4141
$this->sampleCreateBefore->createEntity();
4242
$I->amGoingTo("delete entity that has the createDataKey: sampleCreateBefore");
4343
$this->sampleCreateBefore->deleteEntity();
4444
$I->amGoingTo("create entity that has the stepKey: sampleCreateForAfter");
4545
$sampleCreatedEntity = DataObjectHandler::getInstance()->getObject("sampleCreatedEntity");
46-
$this->sampleCreateForAfter = new DataPersistenceHandler($sampleCreatedEntity);
46+
$this->sampleCreateForAfter = new DataPersistenceHandler($sampleCreatedEntity, []);
4747
$this->sampleCreateForAfter->createEntity();
4848
}
4949

@@ -60,7 +60,7 @@ class HookActionsTestCest
6060
{
6161
$I->amGoingTo("create entity that has the stepKey: sampleCreateAfter");
6262
$sampleCreatedEntity = DataObjectHandler::getInstance()->getObject("sampleCreatedEntity");
63-
$this->sampleCreateAfter = new DataPersistenceHandler($sampleCreatedEntity);
63+
$this->sampleCreateAfter = new DataPersistenceHandler($sampleCreatedEntity, []);
6464
$this->sampleCreateAfter->createEntity();
6565
$I->amGoingTo("delete entity that has the createDataKey: sampleCreateForAfter");
6666
$this->sampleCreateForAfter->deleteEntity();

dev/tests/verification/Resources/LocatorFunctionTest.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class LocatorFunctionTestCest
2929
{
3030
$I->amGoingTo("create entity that has the stepKey: data");
3131
$ReplacementPerson = DataObjectHandler::getInstance()->getObject("ReplacementPerson");
32-
$data = new DataPersistenceHandler($ReplacementPerson);
32+
$data = new DataPersistenceHandler($ReplacementPerson, []);
3333
$data->createEntity();
3434
$I->click(Locator::contains("'label'", "'Name'"));
3535
$I->click(Locator::contains("'label'", "'Name'"));

0 commit comments

Comments
 (0)