Skip to content

Commit 53944d4

Browse files
committed
Merge remote-tracking branch 'origin/MFTF3.0.0-RC2' into MQE-2027-2
# Conflicts: # composer.json # composer.lock
2 parents 849e5de + 76be5a7 commit 53944d4

File tree

15 files changed

+57
-97
lines changed

15 files changed

+57
-97
lines changed

dev/tests/functional/standalone_bootstrap.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
defined('WAIT_TIMEOUT') || define('WAIT_TIMEOUT', 30);
5454
$env->setEnvironmentVariable('WAIT_TIMEOUT', WAIT_TIMEOUT);
5555

56+
defined('VERBOSE_ARTIFACTS') || define('VERBOSE_ARTIFACTS', false);
57+
$env->setEnvironmentVariable('VERBOSE_ARTIFACTS', VERBOSE_ARTIFACTS);
58+
5659
try {
5760
new DateTimeZone(DEFAULT_TIMEZONE);
5861
} catch (\Exception $e) {

dev/tests/phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<phpunit
99
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.3/phpunit.xsd"
10+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.1/phpunit.xsd"
1111
convertNoticesToExceptions="false"
1212
bootstrap="_bootstrap.php"
1313
backupGlobals="false">

dev/tests/unit/Magento/FunctionalTestFramework/Util/Sorter/ParallelGroupSorterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ public function testSortWithSuites()
101101
$this->assertCount(5, $actualResult);
102102

103103
$expectedResults = [
104-
1 => ['mockSuite1_0'],
105-
2 => ['mockSuite1_1'],
104+
1 => ['mockSuite1_0_G'],
105+
2 => ['mockSuite1_1_G'],
106106
3 => ['test3'],
107107
4 => ['test2','test5', 'test4'],
108108
5 => ['test1'],

dev/tests/verification/Resources/AssertTest.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ class AssertTestCest
4343
$I->comment("asserts without variable replacement");
4444
$I->assertArrayHasKey("apple", ['orange' => 2, 'apple' => 1], "pass"); // stepKey: assertArrayHasKey
4545
$I->assertArrayNotHasKey("kiwi", ['orange' => 2, 'apple' => 1], "pass"); // stepKey: assertArrayNotHasKey
46-
$I->assertArraySubset([1, 2], [1, 2, 3, 5], "pass"); // stepKey: assertArraySubset
4746
$I->assertContains("ab", ['item1' => 'a', 'item2' => 'ab'], "pass"); // stepKey: assertContains
4847
$I->assertStringContainsString("apple", "apple", "pass"); // stepKey: assertStringContainsString
4948
$I->assertStringContainsStringIgnoringCase("Banana", "banana", "pass"); // stepKey: assertStringContainsStringIgnoringCase
@@ -58,9 +57,6 @@ class AssertTestCest
5857
$I->assertGreaterOrEquals(2, 5, "pass"); // stepKey: assertGreaterOrEquals
5958
$I->assertGreaterThan(2, 5, "pass"); // stepKey: assertGreaterthan
6059
$I->assertGreaterThanOrEqual(2, 5, "pass"); // stepKey: assertGreaterThanOrEqual
61-
$I->assertInternalType("string", "xyz", "pass"); // stepKey: assertInternalType1
62-
$I->assertInternalType("int", 21, "pass"); // stepKey: assertInternalType2
63-
$I->assertInternalType("string", $text, "pass"); // stepKey: assertInternalType3
6460
$I->assertLessOrEquals(5, 2, "pass"); // stepKey: assertLessOrEquals
6561
$I->assertLessThan(5, 2, "pass"); // stepKey: assertLessThan
6662
$I->assertLessThanOrEqual(5, 2, "pass"); // stepKey: assertLessThanOrEquals
@@ -83,7 +79,6 @@ class AssertTestCest
8379
$I->comment("asserts backward compatible");
8480
$I->assertArrayHasKey("apple", ['orange' => 2, 'apple' => 1], "pass"); // stepKey: assertArrayHasKeyBackwardCompatible
8581
$I->assertArrayNotHasKey("kiwi", ['orange' => 2, 'apple' => 1], "pass"); // stepKey: assertArrayNotHasKeyBackwardCompatible
86-
$I->assertArraySubset([1, 2], [1, 2, 3, 5], "pass"); // stepKey: assertArraySubsetBackwardCompatible
8782
$I->assertContains("ab", ['item1' => 'a', 'item2' => 'ab'], "pass"); // stepKey: assertContainsBackwardCompatible
8883
$I->assertCount(2, ['a', 'b'], "pass"); // stepKey: assertCountBackwardCompatible
8984
$I->assertEmpty([], "pass"); // stepKey: assertEmptyBackwardCompatible
@@ -95,9 +90,6 @@ class AssertTestCest
9590
$I->assertGreaterOrEquals(2, 5, "pass"); // stepKey: assertGreaterOrEqualsBackwardCompatible
9691
$I->assertGreaterThan(2, 5, "pass"); // stepKey: assertGreaterThanBackwardCompatible
9792
$I->assertGreaterThanOrEqual(2, 5, "pass"); // stepKey: assertGreaterThanOrEqualBackwardCompatible
98-
$I->assertInternalType("string", "xyz", "pass"); // stepKey: assertInternalType1BackwardCompatible
99-
$I->assertInternalType("int", 21, "pass"); // stepKey: assertInternalType2BackwardCompatible
100-
$I->assertInternalType("string", $text, "pass"); // stepKey: assertInternalType3BackwardCompatible
10193
$I->assertLessOrEquals(5, 2, "pass"); // stepKey: assertLessOrEqualBackwardCompatibles
10294
$I->assertLessThan(5, 2, "pass"); // stepKey: assertLessThanBackwardCompatible
10395
$I->assertLessThanOrEqual(5, 2, "pass"); // stepKey: assertLessThanOrEqualBackwardCompatible
@@ -129,8 +121,6 @@ class AssertTestCest
129121
$I->assertEquals($I->retrieveEntityField('createData1', 'lastname', 'test'), $I->retrieveEntityField('createData1', 'lastname', 'test'), "pass"); // stepKey: assert5
130122
$I->comment("array type that use created data");
131123
$I->comment("array type that use created data");
132-
$I->assertArraySubset([$I->retrieveEntityField('createData1', 'lastname', 'test'), $I->retrieveEntityField('createData1', 'firstname', 'test')], [$I->retrieveEntityField('createData1', 'lastname', 'test'), $I->retrieveEntityField('createData1', 'firstname', 'test'), "1"], "pass"); // stepKey: assert9
133-
$I->assertArraySubset([$I->retrieveEntityField('createData2', 'firstname', 'test'), $I->retrieveEntityField('createData2', 'lastname', 'test')], [$I->retrieveEntityField('createData2', 'firstname', 'test'), $I->retrieveEntityField('createData2', 'lastname', 'test'), "1"], "pass"); // stepKey: assert10
134124
$I->assertArrayHasKey("lastname", ['lastname' => $I->retrieveEntityField('createData1', 'lastname', 'test'), 'firstname' => $I->retrieveEntityField('createData1', 'firstname', 'test')], "pass"); // stepKey: assert3
135125
$I->assertArrayHasKey("lastname", ['lastname' => $I->retrieveEntityField('createData2', 'lastname', 'test'), 'firstname' => $I->retrieveEntityField('createData2', 'firstname', 'test')], "pass"); // stepKey: assert4
136126
$I->comment("this section can only be generated and cannot run");

dev/tests/verification/TestModule/Test/AssertTest.xml

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131
<expectedResult type="string">kiwi</expectedResult>
3232
<actualResult type="const">['orange' => 2, 'apple' => 1]</actualResult>
3333
</assertArrayNotHasKey>
34-
<assertArraySubset stepKey="assertArraySubset" message="pass">
35-
<expectedResult type="const">[1, 2]</expectedResult>
36-
<actualResult type="const">[1, 2, 3, 5]</actualResult>
37-
</assertArraySubset>
3834
<assertContains stepKey="assertContains" message="pass">
3935
<expectedResult type="string">ab</expectedResult>
4036
<actualResult type="const">['item1' => 'a', 'item2' => 'ab']</actualResult>
@@ -87,18 +83,6 @@
8783
<expectedResult type="int">2</expectedResult>
8884
<actualResult type="int">5</actualResult>
8985
</assertGreaterThanOrEqual>
90-
<assertInternalType stepKey="assertInternalType1" message="pass">
91-
<expectedResult type="string">string</expectedResult>
92-
<actualResult type="string">xyz</actualResult>
93-
</assertInternalType>
94-
<assertInternalType stepKey="assertInternalType2" message="pass">
95-
<expectedResult type="string">int</expectedResult>
96-
<actualResult type="int">21</actualResult>
97-
</assertInternalType>
98-
<assertInternalType stepKey="assertInternalType3" message="pass">
99-
<expectedResult type="string">string</expectedResult>
100-
<actualResult type="variable">text</actualResult>
101-
</assertInternalType>
10286
<assertLessOrEquals stepKey="assertLessOrEquals" message="pass">
10387
<expectedResult type="int">5</expectedResult>
10488
<actualResult type="int">2</actualResult>
@@ -177,10 +161,6 @@
177161
<expectedResult type="string">kiwi</expectedResult>
178162
<actualResult type="const">['orange' => 2, 'apple' => 1]</actualResult>
179163
</assertArrayNotHasKey>
180-
<assertArraySubset stepKey="assertArraySubsetBackwardCompatible" message="pass">
181-
<actualResult type="const">[1, 2, 3, 5]</actualResult>
182-
<expectedResult type="const">[1, 2]</expectedResult>
183-
</assertArraySubset>
184164
<assertContains stepKey="assertContainsBackwardCompatible" message="pass">
185165
<expectedResult type="string">ab</expectedResult>
186166
<actualResult type="const">['item1' => 'a', 'item2' => 'ab']</actualResult>
@@ -221,18 +201,6 @@
221201
<actualResult type="int">5</actualResult>
222202
<expectedResult type="int">2</expectedResult>
223203
</assertGreaterThanOrEqual>
224-
<assertInternalType stepKey="assertInternalType1BackwardCompatible" message="pass">
225-
<actualResult type="string">xyz</actualResult>
226-
<expectedResult type="string">string</expectedResult>
227-
</assertInternalType>
228-
<assertInternalType stepKey="assertInternalType2BackwardCompatible" message="pass">
229-
<actualResult type="int">21</actualResult>
230-
<expectedResult type="string">int</expectedResult>
231-
</assertInternalType>
232-
<assertInternalType stepKey="assertInternalType3BackwardCompatible" message="pass">
233-
<actualResult type="variable">$text</actualResult>
234-
<expectedResult type="string">string</expectedResult>
235-
</assertInternalType>
236204
<assertLessOrEquals stepKey="assertLessOrEqualBackwardCompatibles" message="pass">
237205
<actualResult type="int">2</actualResult>
238206
<expectedResult type="int">5</expectedResult>
@@ -338,14 +306,6 @@
338306

339307
<!-- array type that use created data -->
340308
<comment stepKey="c3" userInput="array type that use created data"/>
341-
<assertArraySubset stepKey="assert9" message="pass">
342-
<expectedResult type="array">[$$createData1.lastname$$, $$createData1.firstname$$]</expectedResult>
343-
<actualResult type="array">[$$createData1.lastname$$, $$createData1.firstname$$, 1]</actualResult>
344-
</assertArraySubset>
345-
<assertArraySubset stepKey="assert10" message="pass">
346-
<expectedResult type="array">[$createData2.firstname$, $createData2.lastname$]</expectedResult>
347-
<actualResult type="array">[$createData2.firstname$, $createData2.lastname$, 1]</actualResult>
348-
</assertArraySubset>
349309
<assertArrayHasKey stepKey="assert3" message="pass">
350310
<expectedResult type="string">lastname</expectedResult>
351311
<actualResult type="array">['lastname' => $$createData1.lastname$$, 'firstname' => $$createData1.firstname$$]</actualResult>

dev/tests/verification/Tests/SuiteGenerationTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ public function testSuiteGenerationParallel()
118118
$groupName = 'functionalSuite1';
119119

120120
$expectedGroups = [
121-
'functionalSuite1_0',
122-
'functionalSuite1_1',
123-
'functionalSuite1_2',
124-
'functionalSuite1_3'
121+
'functionalSuite1_0_G',
122+
'functionalSuite1_1_G',
123+
'functionalSuite1_2_G',
124+
'functionalSuite1_3_G'
125125
];
126126

127127
$expectedContents = [

docs/configuration.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,20 @@ Example:
299299
CREDENTIAL_AWS_SECRETS_MANAGER_PROFILE=default
300300
```
301301

302+
### VERBOSE_ARTIFACTS
303+
304+
Determines if passed tests should still have all their Allure artifacts. These artifacts include `.txt` attachments for `dontSee` actions and `createData` actions.
305+
306+
If enabled, all tests will have all of their normal Allure artifacts.
307+
308+
If disabled, passed tests will have their Allure artifacts trimmed. Failed tests will still contain all their artifacts.
309+
310+
This is set `false` by default.
311+
312+
```conf
313+
VERBOSE_ARTIFACTS=true
314+
```
315+
302316
### ENABLE_BROWSER_LOG
303317

304318
Enables addition of browser logs to Allure steps

docs/test/assertions.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,6 @@ Attribute|Type|Use|Description
108108
`before`|string|optional| `stepKey` of action that must be executed next.
109109
`after`|string|optional| `stepKey` of the preceding action.
110110

111-
### assertArraySubset
112-
113-
See [assertArraySubset docs on codeception.com](http://codeception.com/docs/modules/Asserts#assertArraySubset).
114-
115-
Attribute|Type|Use|Description
116-
---|---|---|---
117-
`strict`|boolean|optional|
118-
`message`|string|optional|Text of informational message about a cause of failure.
119-
`stepKey`|string|required| A unique identifier of the text step.
120-
`before`|string|optional| `stepKey` of action that must be executed next.
121-
`after`|string|optional| `stepKey` of the preceding action.
122-
123111
### assertContains
124112

125113
See [assertContains docs on codeception.com](http://codeception.com/docs/modules/Asserts#assertContains).
@@ -297,17 +285,6 @@ Attribute|Type|Use|Description
297285
`before`|string|optional| `stepKey` of action that must be executed next.
298286
`after`|string|optional| `stepKey` of the preceding action.
299287

300-
### assertInternalType
301-
302-
See [assertInternalType docs on codeception.com](http://codeception.com/docs/modules/Asserts#assertInternalType).
303-
304-
Attribute|Type|Use|Description
305-
---|---|---|---
306-
`message`|string|optional|Text of informational message about a cause of failure.
307-
`stepKey`|string|required| A unique identifier of the text step.
308-
`before`|string|optional| `stepKey` of action that must be executed next.
309-
`after`|string|optional| `stepKey` of the preceding action.
310-
311288
### assertIsEmpty
312289

313290
See [assertIsEmpty docs on codeception.com](http://codeception.com/docs/modules/Asserts#assertIsEmpty).

etc/config/.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ MODULE_WHITELIST=Magento_Framework,ConfigurableProductWishlist,ConfigurableProdu
5959
#*** Default timeout for wait actions
6060
#WAIT_TIMEOUT=30
6161

62+
#*** Uncomment and set to enable all tests, regardless of passing status, to have all their Allure artifacts.
63+
#VERBOSE_ARTIFACTS=true
64+
6265
#*** Uncomment and set to enable browser log entries on actions in Allure. Blacklist is used to filter logs of a specific "source"
6366
#ENABLE_BROWSER_LOG=true
6467
#BROWSER_LOG_BLACKLIST=other

etc/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<!-- Entity value gets replaced in Dom.php before reading $xml -->
1010
<!DOCTYPE config [
11-
<!ENTITY commonTestActions "acceptPopup|actionGroup|amOnPage|amOnUrl|amOnSubdomain|appendField|assertArrayIsSortasserted|assertArraySubset|assertElementContainsAttribute|attachFile|cancelPopup|checkOption|clearField|click|clickWithLeftButton|clickWithRightButton|closeAdminNotification|closeTab|comment|conditionalClick|createData|deleteData|updateData|getData|dontSee|dontSeeJsError|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInFormFields|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|entity|executeJS|fillField|formatMoney|generateDate|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|magentoCLI|magentoCron|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|mSetLocale|mResetLocale|openNewTab|pause|parseFloat|pressKey|reloadPage|resetCookie|submitForm|resizeWindow|saveSessionSnapshot|scrollTo|scrollToTopOfPage|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|submitForm|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForPwaElementNotVisible|waitForPwaElementVisible|waitForJS|waitForLoadingMaskToDisappear|waitForPageLoad|waitForText|assertArrayHasKey|assertArrayNotHasKey|assertArraySubset|assertContains|assertStringContainsString|assertStringContainsStringIgnoringCase|assertCount|assertEmpty|assertEquals|assertFalse|assertFileExists|assertFileNotExists|assertGreaterOrEquals|assertGreaterThan|assertGreaterThanOrEqual|assertInstanceOf|assertInternalType|assertIsEmpty|assertLessOrEquals|assertLessThan|assertLessThanOrEqual|assertNotContains|assertStringNotContainsString|assertStringNotContainsStringIgnoringCase|assertNotEmpty|assertNotEquals|assertNotInstanceOf|assertNotNull|assertNotRegExp|assertNotSame|assertNull|assertRegExp|assertSame|assertStringStartsNotWith|assertStringStartsWith|assertTrue|expectException|fail|dontSeeFullUrlEquals|dontSee|dontSeeFullUrlMatches|dontSeeInFullUrl|seeFullUrlEquals|seeFullUrlMatches|seeInFullUrl|grabFromFullUrl|helper|assertEqualsWithDelta|assertEqualsCanonicalizing|assertEqualsIgnoringCase|assertNotEqualsWithDelta|assertNotEqualsCanonicalizing|assertNotEqualsIgnoringCase">
11+
<!ENTITY commonTestActions "acceptPopup|actionGroup|amOnPage|amOnUrl|amOnSubdomain|appendField|assertArrayIsSortasserted|assertElementContainsAttribute|attachFile|cancelPopup|checkOption|clearField|click|clickWithLeftButton|clickWithRightButton|closeAdminNotification|closeTab|comment|conditionalClick|createData|deleteData|updateData|getData|dontSee|dontSeeJsError|dontSeeCheckboxIsChecked|dontSeeCookie|dontSeeCurrentUrlEquals|dontSeeCurrentUrlMatches|dontSeeElement|dontSeeElementInDOM|dontSeeInCurrentUrl|dontSeeInField|dontSeeInFormFields|dontSeeInPageSource|dontSeeInSource|dontSeeInTitle|dontSeeLink|dontSeeOptionIsSelected|doubleClick|dragAndDrop|entity|executeJS|fillField|formatMoney|generateDate|grabAttributeFrom|grabCookie|grabFromCurrentUrl|grabMultiple|grabPageSource|grabTextFrom|grabValueFrom|loadSessionSnapshot|loginAsAdmin|magentoCLI|magentoCron|makeScreenshot|maximizeWindow|moveBack|moveForward|moveMouseOver|mSetLocale|mResetLocale|openNewTab|pause|parseFloat|pressKey|reloadPage|resetCookie|submitForm|resizeWindow|saveSessionSnapshot|scrollTo|scrollToTopOfPage|searchAndMultiSelectOption|see|seeCheckboxIsChecked|seeCookie|seeCurrentUrlEquals|seeCurrentUrlMatches|seeElement|seeElementInDOM|seeInCurrentUrl|seeInField|seeInFormFields|seeInPageSource|seeInPopup|seeInSource|seeInTitle|seeLink|seeNumberOfElements|seeOptionIsSelected|selectOption|setCookie|submitForm|switchToIFrame|switchToNextTab|switchToPreviousTab|switchToWindow|typeInPopup|uncheckOption|unselectOption|wait|waitForAjaxLoad|waitForElement|waitForElementChange|waitForElementNotVisible|waitForElementVisible|waitForPwaElementNotVisible|waitForPwaElementVisible|waitForJS|waitForLoadingMaskToDisappear|waitForPageLoad|waitForText|assertArrayHasKey|assertArrayNotHasKey|assertContains|assertStringContainsString|assertStringContainsStringIgnoringCase|assertCount|assertEmpty|assertEquals|assertFalse|assertFileExists|assertFileNotExists|assertGreaterOrEquals|assertGreaterThan|assertGreaterThanOrEqual|assertInstanceOf|assertIsEmpty|assertLessOrEquals|assertLessThan|assertLessThanOrEqual|assertNotContains|assertStringNotContainsString|assertStringNotContainsStringIgnoringCase|assertNotEmpty|assertNotEquals|assertNotInstanceOf|assertNotNull|assertNotRegExp|assertNotSame|assertNull|assertRegExp|assertSame|assertStringStartsNotWith|assertStringStartsWith|assertTrue|expectException|fail|dontSeeFullUrlEquals|dontSee|dontSeeFullUrlMatches|dontSeeInFullUrl|seeFullUrlEquals|seeFullUrlMatches|seeInFullUrl|grabFromFullUrl|helper|assertEqualsWithDelta|assertEqualsCanonicalizing|assertEqualsIgnoringCase|assertNotEqualsWithDelta|assertNotEqualsCanonicalizing|assertNotEqualsIgnoringCase">
1212
]>
1313

1414
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../src/Magento/FunctionalTestingFramework/ObjectManager/etc/config.xsd">

0 commit comments

Comments
 (0)