Skip to content

Commit 1d57cc3

Browse files
committed
MQE-2669: Seprated a run:failed command to generate:failed and run:failed
- update tests
1 parent c8ac8bf commit 1d57cc3

File tree

79 files changed

+500
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+500
-2
lines changed

dev/tests/verification/Resources/ActionGroupContainsStepKeyInArgText.txt

+6
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,10 @@ class ActionGroupContainsStepKeyInArgTextCest
4141
$I->see("arg1", ".selector"); // stepKey: arg1ActionGroup
4242
$I->comment("Exiting Action Group [actionGroup] actionGroupContainsStepKeyInArgValue");
4343
}
44+
45+
public function _passed(AcceptanceTester $I)
46+
{
47+
// Deleting itself so that we can rerun only failed tests.
48+
unlink(__FILE__);
49+
}
4450
}

dev/tests/verification/Resources/ActionGroupMergedViaInsertAfter.txt

+6
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,10 @@ class ActionGroupMergedViaInsertAfterCest
3535
$I->fillField("#baz", "baz"); // stepKey: fillField3Keyone
3636
$I->comment("Exiting Action Group [keyone] FunctionalActionGroupForMassMergeAfter");
3737
}
38+
39+
public function _passed(AcceptanceTester $I)
40+
{
41+
// Deleting itself so that we can rerun only failed tests.
42+
unlink(__FILE__);
43+
}
3844
}

dev/tests/verification/Resources/ActionGroupMergedViaInsertBefore.txt

+6
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,10 @@ class ActionGroupMergedViaInsertBeforeCest
3535
$I->fillField("#baz", "baz"); // stepKey: fillField3Keyone
3636
$I->comment("Exiting Action Group [keyone] FunctionalActionGroupForMassMergeBefore");
3737
}
38+
39+
public function _passed(AcceptanceTester $I)
40+
{
41+
// Deleting itself so that we can rerun only failed tests.
42+
unlink(__FILE__);
43+
}
3844
}

dev/tests/verification/Resources/ActionGroupReturningValueTest.txt

+6
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,10 @@ class ActionGroupReturningValueTestCest
7272
$I->see($actionGroupWithReturnValue1, "#element .{$actionGroupWithReturnValue1}"); // stepKey: see1ActionGroupWithStringUsage1
7373
$I->comment("Exiting Action Group [actionGroupWithStringUsage1] actionGroupWithStringUsage");
7474
}
75+
76+
public function _passed(AcceptanceTester $I)
77+
{
78+
// Deleting itself so that we can rerun only failed tests.
79+
unlink(__FILE__);
80+
}
7581
}

dev/tests/verification/Resources/ActionGroupToExtend.txt

+6
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,10 @@ class ActionGroupToExtendCest
3131
$I->assertCount(99, $grabProductsActionGroup); // stepKey: assertCountActionGroup
3232
$I->comment("Exiting Action Group [actionGroup] ActionGroupToExtend");
3333
}
34+
35+
public function _passed(AcceptanceTester $I)
36+
{
37+
// Deleting itself so that we can rerun only failed tests.
38+
unlink(__FILE__);
39+
}
3440
}

dev/tests/verification/Resources/ActionGroupUsingCreateData.txt

+6
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,10 @@ class ActionGroupUsingCreateDataCest
3939
public function ActionGroupUsingCreateData(AcceptanceTester $I)
4040
{
4141
}
42+
43+
public function _passed(AcceptanceTester $I)
44+
{
45+
// Deleting itself so that we can rerun only failed tests.
46+
unlink(__FILE__);
47+
}
4248
}

dev/tests/verification/Resources/ActionGroupUsingNestedArgument.txt

+6
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,10 @@ class ActionGroupUsingNestedArgumentCest
3131
$I->assertCount(99, $grabProductsActionGroup); // stepKey: assertCountActionGroup
3232
$I->comment("Exiting Action Group [actionGroup] ActionGroupToExtend");
3333
}
34+
35+
public function _passed(AcceptanceTester $I)
36+
{
37+
// Deleting itself so that we can rerun only failed tests.
38+
unlink(__FILE__);
39+
}
3440
}

dev/tests/verification/Resources/ActionGroupWithDataOverrideTest.txt

+6
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,10 @@ class ActionGroupWithDataOverrideTestCest
7373
$I->comment("Exiting Action Group [actionGroupWithDataOverride1] FunctionalActionGroupWithData");
7474
$I->click("loginButton"); // stepKey: step6
7575
}
76+
77+
public function _passed(AcceptanceTester $I)
78+
{
79+
// Deleting itself so that we can rerun only failed tests.
80+
unlink(__FILE__);
81+
}
7682
}

dev/tests/verification/Resources/ActionGroupWithDataTest.txt

+6
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,10 @@ class ActionGroupWithDataTestCest
7373
$I->comment("Exiting Action Group [actionGroupWithData1] FunctionalActionGroupWithData");
7474
$I->click("loginButton"); // stepKey: step6
7575
}
76+
77+
public function _passed(AcceptanceTester $I)
78+
{
79+
// Deleting itself so that we can rerun only failed tests.
80+
unlink(__FILE__);
81+
}
7682
}

dev/tests/verification/Resources/ActionGroupWithDefaultArgumentAndStringSelectorParam.txt

+6
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,10 @@ class ActionGroupWithDefaultArgumentAndStringSelectorParamCest
3232
$I->see("John", "#element .test1"); // stepKey: seeFirstNameActionGroup
3333
$I->comment("Exiting Action Group [actionGroup] actionGroupWithDefaultArgumentAndStringSelectorParam");
3434
}
35+
36+
public function _passed(AcceptanceTester $I)
37+
{
38+
// Deleting itself so that we can rerun only failed tests.
39+
unlink(__FILE__);
40+
}
3541
}

dev/tests/verification/Resources/ActionGroupWithMultipleParameterSelectorsFromDefaultArgument.txt

+6
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,10 @@ class ActionGroupWithMultipleParameterSelectorsFromDefaultArgumentCest
3232
$I->see("Doe", "#John-Doe .test"); // stepKey: seeLastNameActionGroup
3333
$I->comment("Exiting Action Group [actionGroup] actionGroupWithMultipleParameterSelectorsFromArgument");
3434
}
35+
36+
public function _passed(AcceptanceTester $I)
37+
{
38+
// Deleting itself so that we can rerun only failed tests.
39+
unlink(__FILE__);
40+
}
3541
}

dev/tests/verification/Resources/ActionGroupWithNoArguments.txt

+6
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,10 @@ class ActionGroupWithNoArgumentsCest
3232
$I->wait(1); // stepKey: waitForNothingActionGroup
3333
$I->comment("Exiting Action Group [actionGroup] actionGroupWithoutArguments");
3434
}
35+
36+
public function _passed(AcceptanceTester $I)
37+
{
38+
// Deleting itself so that we can rerun only failed tests.
39+
unlink(__FILE__);
40+
}
3541
}

dev/tests/verification/Resources/ActionGroupWithNoDefaultTest.txt

+6
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,10 @@ class ActionGroupWithNoDefaultTestCest
7171
$I->comment("Exiting Action Group [actionGroupWithDataOverride1] FunctionalActionGroupNoDefault");
7272
$I->click("loginButton"); // stepKey: step6
7373
}
74+
75+
public function _passed(AcceptanceTester $I)
76+
{
77+
// Deleting itself so that we can rerun only failed tests.
78+
unlink(__FILE__);
79+
}
7480
}

dev/tests/verification/Resources/ActionGroupWithParameterizedElementWithHyphen.txt

+6
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,10 @@ class ActionGroupWithParameterizedElementWithHyphenCest
3030
$keyoneActionGroup = $I->executeJS("#element .full-width"); // stepKey: keyoneActionGroup
3131
$I->comment("Exiting Action Group [actionGroup] SectionArgumentWithParameterizedSelector");
3232
}
33+
34+
public function _passed(AcceptanceTester $I)
35+
{
36+
// Deleting itself so that we can rerun only failed tests.
37+
unlink(__FILE__);
38+
}
3339
}

dev/tests/verification/Resources/ActionGroupWithParameterizedElementsWithStepKeyReferences.txt

+6
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,10 @@ class ActionGroupWithParameterizedElementsWithStepKeyReferencesCest
3535
$I->seeElement("//div[@name='Tiberius'][@class={$testVariableActionGroup}][@data-element='{$testVariable2ActionGroup}'][" . $I->retrieveEntityField('createSimpleData', 'name', 'test') . "]"); // stepKey: see1ActionGroup
3636
$I->comment("Exiting Action Group [actionGroup] actionGroupWithParametrizedSelectors");
3737
}
38+
39+
public function _passed(AcceptanceTester $I)
40+
{
41+
// Deleting itself so that we can rerun only failed tests.
42+
unlink(__FILE__);
43+
}
3844
}

dev/tests/verification/Resources/ActionGroupWithPassedArgumentAndStringSelectorParam.txt

+6
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,10 @@ class ActionGroupWithPassedArgumentAndStringSelectorParamCest
3232
$I->see("John" . msq("UniquePerson"), "#element .test1"); // stepKey: seeFirstNameActionGroup
3333
$I->comment("Exiting Action Group [actionGroup] actionGroupWithDefaultArgumentAndStringSelectorParam");
3434
}
35+
36+
public function _passed(AcceptanceTester $I)
37+
{
38+
// Deleting itself so that we can rerun only failed tests.
39+
unlink(__FILE__);
40+
}
3541
}

dev/tests/verification/Resources/ActionGroupWithPersistedData.txt

+6
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,10 @@ class ActionGroupWithPersistedDataCest
7272
$I->see("#element ." . $I->retrieveEntityField('createPerson', 'firstname', 'test')); // stepKey: see1ActionGroupWithPersistedData1
7373
$I->comment("Exiting Action Group [actionGroupWithPersistedData1] FunctionalActionGroupWithData");
7474
}
75+
76+
public function _passed(AcceptanceTester $I)
77+
{
78+
// Deleting itself so that we can rerun only failed tests.
79+
unlink(__FILE__);
80+
}
7581
}

dev/tests/verification/Resources/ActionGroupWithSectionAndDataAsArguments.txt

+6
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,10 @@ class ActionGroupWithSectionAndDataAsArgumentsCest
3030
$I->waitForElementVisible("#element .John", 10); // stepKey: arg1ActionGroup
3131
$I->comment("Exiting Action Group [actionGroup] actionGroupWithSectionAndData");
3232
}
33+
34+
public function _passed(AcceptanceTester $I)
35+
{
36+
// Deleting itself so that we can rerun only failed tests.
37+
unlink(__FILE__);
38+
}
3339
}

dev/tests/verification/Resources/ActionGroupWithSimpleDataUsageFromDefaultArgument.txt

+6
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,10 @@ class ActionGroupWithSimpleDataUsageFromDefaultArgumentCest
3232
$I->see("stringLiteral", "#element .stringLiteral"); // stepKey: see1ActionGroup
3333
$I->comment("Exiting Action Group [actionGroup] actionGroupWithStringUsage");
3434
}
35+
36+
public function _passed(AcceptanceTester $I)
37+
{
38+
// Deleting itself so that we can rerun only failed tests.
39+
unlink(__FILE__);
40+
}
3541
}

dev/tests/verification/Resources/ActionGroupWithSimpleDataUsageFromPassedArgument.txt

+6
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,10 @@ class ActionGroupWithSimpleDataUsageFromPassedArgumentCest
5959
$I->see($I->retrieveEntityField('simpleData', 'firstname[data_index]', 'test'), "#element ." . $I->retrieveEntityField('simpleData', 'firstname[data_index]', 'test')); // stepKey: see1ActionGroup7
6060
$I->comment("Exiting Action Group [actionGroup7] actionGroupWithEntityUsage");
6161
}
62+
63+
public function _passed(AcceptanceTester $I)
64+
{
65+
// Deleting itself so that we can rerun only failed tests.
66+
unlink(__FILE__);
67+
}
6268
}

dev/tests/verification/Resources/ActionGroupWithSingleParameterSelectorFromDefaultArgument.txt

+6
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,10 @@ class ActionGroupWithSingleParameterSelectorFromDefaultArgumentCest
3232
$I->see("Doe", "#element .John"); // stepKey: seeLastNameActionGroup
3333
$I->comment("Exiting Action Group [actionGroup] actionGroupWithSingleParameterSelectorFromArgument");
3434
}
35+
36+
public function _passed(AcceptanceTester $I)
37+
{
38+
// Deleting itself so that we can rerun only failed tests.
39+
unlink(__FILE__);
40+
}
3541
}

dev/tests/verification/Resources/ActionGroupWithSingleParameterSelectorFromPassedArgument.txt

+6
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,10 @@ class ActionGroupWithSingleParameterSelectorFromPassedArgumentCest
3232
$I->see("Doe", "#element .John" . msq("UniquePerson")); // stepKey: seeLastNameActionGroup
3333
$I->comment("Exiting Action Group [actionGroup] actionGroupWithSingleParameterSelectorFromArgument");
3434
}
35+
36+
public function _passed(AcceptanceTester $I)
37+
{
38+
// Deleting itself so that we can rerun only failed tests.
39+
unlink(__FILE__);
40+
}
3541
}

dev/tests/verification/Resources/ActionGroupWithStepKeyReferences.txt

+6
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,10 @@ class ActionGroupWithStepKeyReferencesCest
5555
$action16ActionGroup = $I->grabValueFrom($action16ActionGroup); // stepKey: action16ActionGroup
5656
$I->comment("Exiting Action Group [actionGroup] FunctionActionGroupWithStepKeyReferences");
5757
}
58+
59+
public function _passed(AcceptanceTester $I)
60+
{
61+
// Deleting itself so that we can rerun only failed tests.
62+
unlink(__FILE__);
63+
}
5864
}

dev/tests/verification/Resources/ActionGroupWithTopLevelPersistedData.txt

+6
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,10 @@ class ActionGroupWithTopLevelPersistedDataCest
7171
$I->see("#element ." . $I->retrieveEntityField('createPersonParam', 'firstname', 'test')); // stepKey: see1ActionGroupWithPersistedData1
7272
$I->comment("Exiting Action Group [actionGroupWithPersistedData1] FunctionalActionGroupWithData");
7373
}
74+
75+
public function _passed(AcceptanceTester $I)
76+
{
77+
// Deleting itself so that we can rerun only failed tests.
78+
unlink(__FILE__);
79+
}
7480
}

dev/tests/verification/Resources/ActionsInDifferentModulesSuite.txt

+18
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class ActionsInDifferentModulesSuite extends \Codeception\GroupObject
3636

3737
public function _before(\Codeception\Event\TestEvent $e)
3838
{
39+
$this->testCount = $this->getTestCount();
3940
$this->webDriver = $this->getModule('\Magento\FunctionalTestingFramework\Module\MagentoWebDriver');
4041
$this->moduleContainer = $this->webDriver->getModuleContainer();
4142
// increment test count per execution
@@ -215,4 +216,21 @@ class ActionsInDifferentModulesSuite extends \Codeception\GroupObject
215216
}
216217
return $module;
217218
}
219+
220+
/**
221+
* Counts how many tests in group.
222+
*
223+
* @return integer
224+
*/
225+
private function getTestCount()
226+
{
227+
$config = $this->getGlobalConfig();
228+
if (empty($config['groups']) && empty($config['groups'][self::$group])) {
229+
return $this->testCount;
230+
}
231+
$pathToGroupDir = TESTS_BP . DIRECTORY_SEPARATOR . array_first($config['groups'][self::$group]);
232+
$pathToGroupCests = $pathToGroupDir . DIRECTORY_SEPARATOR . "*Cest.php";
233+
234+
return count(glob($pathToGroupCests));
235+
}
218236
}

dev/tests/verification/Resources/ArgumentWithSameNameAsElement.txt

+6
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,10 @@ class ArgumentWithSameNameAsElementCest
6868
$I->seeElement("#element .John"); // stepKey: see2ActionGroup1
6969
$I->comment("Exiting Action Group [actionGroup1] FunctionalActionGroupWithTrickyArgument");
7070
}
71+
72+
public function _passed(AcceptanceTester $I)
73+
{
74+
// Deleting itself so that we can rerun only failed tests.
75+
unlink(__FILE__);
76+
}
7177
}

dev/tests/verification/Resources/AssertTest.txt

+6
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,10 @@ class AssertTestCest
160160
$I->assertNotRegExp('/placeholder\/thumbnail\.jpg/', $getSimpleProductThumbnail); // stepKey: simpleThumbnailIsNotDefault
161161
$I->assertRegExp("#var\s+adminAnalyticsMetadata\s+=\s+{\s+(\"[\w_]+\":\s+\"[^\"]*?\",\s+)*?(\"[\w_]+\":\s+\"[^\"]*?\"\s+)};#s", $pageSource, "adminAnalyticsMetadata object is invalid"); // stepKey: validateadminAnalyticsMetadata
162162
}
163+
164+
public function _passed(AcceptanceTester $I)
165+
{
166+
// Deleting itself so that we can rerun only failed tests.
167+
unlink(__FILE__);
168+
}
163169
}

dev/tests/verification/Resources/BasicActionGroupTest.txt

+6
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,10 @@ class BasicActionGroupTestCest
4949
$I->comment("Exiting Action Group [actionGroup1] FunctionalActionGroup");
5050
$I->click("loginButton"); // stepKey: step6
5151
}
52+
53+
public function _passed(AcceptanceTester $I)
54+
{
55+
// Deleting itself so that we can rerun only failed tests.
56+
unlink(__FILE__);
57+
}
5258
}

dev/tests/verification/Resources/BasicFunctionalTest.txt

+6
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,10 @@ class BasicFunctionalTestCest
185185
$I->waitForJS("someJsFunction", 30); // stepKey: waitForJSKey1
186186
$I->waitForText("someInput", 30, ".functionalTestSelector"); // stepKey: waitForText1
187187
}
188+
189+
public function _passed(AcceptanceTester $I)
190+
{
191+
// Deleting itself so that we can rerun only failed tests.
192+
unlink(__FILE__);
193+
}
188194
}

dev/tests/verification/Resources/BasicMergeTest.txt

+6
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,10 @@ class BasicMergeTestCest
7575
$I->comment("Exiting Action Group [step8Merge] FunctionalActionGroupWithData");
7676
$I->click("#step10MergedInResult"); // stepKey: step10
7777
}
78+
79+
public function _passed(AcceptanceTester $I)
80+
{
81+
// Deleting itself so that we can rerun only failed tests.
82+
unlink(__FILE__);
83+
}
7884
}

dev/tests/verification/Resources/CharacterReplacementTest.txt

+6
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,10 @@ class CharacterReplacementTestCest
3535
$I->click("#`~!@#$%^&*()-_=+{}[]|\;:\".,></?() .`~!@#$%^&*()-_=+{}[]|\;:\".,></?()"); // stepKey: allChars5
3636
$I->click("#words, and, commas, and, spaces .words, and, commas, and, spaces"); // stepKey: allChars6
3737
}
38+
39+
public function _passed(AcceptanceTester $I)
40+
{
41+
// Deleting itself so that we can rerun only failed tests.
42+
unlink(__FILE__);
43+
}
3844
}

dev/tests/verification/Resources/ChildExtendedTestAddHooks.txt

+6
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,10 @@ class ChildExtendedTestAddHooksCest
5858
public function ChildExtendedTestAddHooks(AcceptanceTester $I)
5959
{
6060
}
61+
62+
public function _passed(AcceptanceTester $I)
63+
{
64+
// Deleting itself so that we can rerun only failed tests.
65+
unlink(__FILE__);
66+
}
6167
}

dev/tests/verification/Resources/ChildExtendedTestMerging.txt

+6
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,10 @@ class ChildExtendedTestMergingCest
6464
$I->comment("After Comment");
6565
$I->comment("Last Comment");
6666
}
67+
68+
public function _passed(AcceptanceTester $I)
69+
{
70+
// Deleting itself so that we can rerun only failed tests.
71+
unlink(__FILE__);
72+
}
6773
}

dev/tests/verification/Resources/ChildExtendedTestNoParent.txt

+6
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,10 @@ class ChildExtendedTestNoParentCest
3333
{
3434
$scenario->skip("This test is skipped due to the following issues:No issues have been specified.");
3535
}
36+
37+
public function _passed(AcceptanceTester $I)
38+
{
39+
// Deleting itself so that we can rerun only failed tests.
40+
unlink(__FILE__);
41+
}
3642
}

0 commit comments

Comments
 (0)