Skip to content

Commit 7634acf

Browse files
authored
Merge branch 'develop' into sample-test-run
2 parents a3afa6d + edb5c49 commit 7634acf

File tree

56 files changed

+697
-307
lines changed

Some content is hidden

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

56 files changed

+697
-307
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ dev/tests/mftf.log
1919
dev/tests/docs/*
2020
dev/tests/_output
2121
dev/tests/functional.suite.yml
22-
mftf-annotations-static-check.txt
22+

CHANGELOG.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,57 @@
11
Magento Functional Testing Framework Changelog
22
================================================
3+
3.0.0 RC5
4+
---------
5+
6+
### Enhancements
7+
8+
* Readability
9+
* Removed blacklist/whitelist terminology in MFTF.
10+
11+
### Fixes
12+
13+
* Fixed javascript error seen on chrome 81 for dragAndDrop action.
14+
* Fixed allure issue when `WebDriverCurlException` is encountered in `afterStep`.
15+
16+
3.0.0 RC4
17+
---------
18+
19+
### Enhancements
20+
21+
* Customizability
22+
* `<group value="skip"/>` no longer skips a test. Instead, the test is added to the `skip` group.
23+
* Maintainability
24+
* `mftf.log` no longer includes notices and warnings at test execution time.
25+
* Added the Chrome option `--ignore-certificate-errors` to `functional.suite.dist.yml`.
26+
* Traceability
27+
* Changed the `bin/mftf static-checks` error file directory from the current working directory to `TESTS_BP/tests/_output/static-results/`.
28+
* Readability
29+
* Documented [3.0.0 Backward Incompatible Changes.](./docs/backward-incompatible-changes.md)
30+
31+
### Fixes
32+
33+
* Fixed issue where an extended data entity would not merge array items. Array items should merge properly now.
34+
* Fixed issue where Chrome remains running after MFTF suite finishes.
35+
36+
3.0.0 RC3
37+
---------
38+
39+
### Enhancements
40+
41+
* Maintainability
42+
* Added support for Two-Factor Authentication (2FA). [See configure-2fa page for details](./docs/configure-2fa.md)
43+
* Added new static check `annotationsCheck` that checks and reports missing annotations in tests.
44+
* Updated `bin/mftf static-checks` command to allow executing static-checks defined in `staticRuleSet.json` by default. [See command page for details](./docs/commands/mftf.md#static-checks)
45+
* Added new upgrade script to remove unused arguments from action groups.
46+
* Added unhandledPromptBehavior driver capability for Chrome 75+ support.
47+
* Removed redundant and unused classes.
48+
49+
### Fixes
50+
51+
* Fixed issue with custom helper usage in suites.
52+
* Fixed issue with decryption of secrets during data entity creation.
53+
* Fixed issue with merging of `array` items in data entity.
54+
355
3.0.0 RC2
456
---------
557

@@ -138,9 +190,9 @@ Magento Functional Testing Framework Changelog
138190
* Command verifies and troubleshoots some configuration steps required for running tests
139191
* Please see DevDocs for more details
140192
* `<*Data>` actions now contain `API Endpoint` and `Request Header` artifacts.
141-
* Introduced new `.env` configurations `ENABLE_BROWSER_LOG` and `BROWSER_LOG_BLACKLIST`
193+
* Introduced new `.env` configurations `ENABLE_BROWSER_LOG` and `BROWSER_LOG_BLOCKLIST`
142194
* Configuration enables allure artifacts for browser log entries if they are present after the step.
143-
* Blacklist filters out logs from specific sources.
195+
* Blocklist filters out logs from specific sources.
144196
* Customizability
145197
* Introduced `timeout=""` to `magentoCLI` actions.
146198

bin/blacklist.txt renamed to bin/blocklist.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# #
44
# THIS FILE CANNOT CONTAIN BLANK LINES #
55
###################################################################
6-
bin/blacklist.txt
6+
bin/blocklist.txt
77
dev/tests/static/Magento/Sniffs/Commenting/FunctionCommentSniff.php
88
dev/tests/static/Magento/Sniffs/Commenting/VariableCommentSniff.php
99
dev/tests/verification/_generated

bin/copyright-check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66

77
FILE_EXTENSIONS='.php\|.xml\|.xsd'
8-
BLACKLIST='bin/blacklist.txt'
8+
BLOCKLIST='bin/blocklist.txt'
99
RESULT=''
1010

1111
# Iterate through the list of tracked files
1212
# that have the expected extensions
1313
# that are not ignored
14-
for i in `git ls-tree --full-tree -r --name-only HEAD | grep $FILE_EXTENSIONS | grep -v -f $BLACKLIST`
14+
for i in `git ls-tree --full-tree -r --name-only HEAD | grep $FILE_EXTENSIONS | grep -v -f $BLOCKLIST`
1515
do
1616
if echo `cat $i` | grep -q -v "Copyright © Magento, Inc. All rights reserved."; then
1717
# Copyright is missing

bin/copyright-check.bat

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
@echo off
55
SETLOCAL EnableDelayedExpansion
6-
SET BLACKLIST_FILE=bin/blacklist.txt
6+
SET BLOCKLIST_FILE=bin/blocklist.txt
77
SET i=0
88

99
FOR /F %%x IN ('git ls-tree --full-tree -r --name-only HEAD') DO (
@@ -12,14 +12,14 @@ FOR /F %%x IN ('git ls-tree --full-tree -r --name-only HEAD') DO (
1212
if "%%~xx"==".xml" set GOOD_EXT=1
1313
if "%%~xx"==".xsd" set GOOD_EXT=1
1414
IF DEFINED GOOD_EXT (
15-
SET BLACKLISTED=
16-
FOR /F "tokens=* skip=5" %%f IN (%BLACKLIST_FILE%) DO (
15+
SET BLOCKLISTED=
16+
FOR /F "tokens=* skip=5" %%f IN (%BLOCKLIST_FILE%) DO (
1717
SET LINE=%%x
1818
IF NOT "!LINE!"=="!LINE:%%f=!" (
19-
SET BLACKLISTED=1
19+
SET BLOCKLISTED=1
2020
)
2121
)
22-
IF NOT DEFINED BLACKLISTED (
22+
IF NOT DEFINED BLOCKLISTED (
2323
FIND "Copyright © Magento, Inc. All rights reserved." %%x >nul
2424
IF ERRORLEVEL 1 (
2525
SET /A i+=1

bin/mftf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ try {
3131
$version = $version['version'];
3232
$application = new Symfony\Component\Console\Application();
3333
$application->setName('Magento Functional Testing Framework CLI');
34-
$application->setVersion($version);
34+
$application->setVersion('3.0.0');
3535
/** @var \Magento\FunctionalTestingFramework\Console\CommandListInterface $commandList */
3636
$commandList = new \Magento\FunctionalTestingFramework\Console\CommandList;
3737
foreach ($commandList->getCommands() as $command) {

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/magento2-functional-testing-framework",
33
"description": "Magento2 Functional Testing Framework",
44
"type": "library",
5-
"version": "3.0.0",
5+
"version": "3.0.0-RC5",
66
"license": "AGPL-3.0",
77
"keywords": ["magento", "automation", "functional", "testing"],
88
"config": {
@@ -32,7 +32,8 @@
3232
"symfony/finder": "^5.0",
3333
"symfony/mime": "^5.0",
3434
"symfony/process": "^4.4",
35-
"vlucas/phpdotenv": "^2.4"
35+
"vlucas/phpdotenv": "^2.4",
36+
"weew/helpers-array": "^1.3"
3637
},
3738
"require-dev": {
3839
"brainmaestro/composer-git-hooks": "^2.3.1",

composer.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/_bootstrap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
putenv("{$key}=${value}");
5555
}
5656

57-
// Add our test module to the whitelist
58-
putenv('MODULE_WHITELIST=Magento_TestModule');
57+
// Add our test module to the allowlist
58+
putenv('MODULE_ALLOWLIST=Magento_TestModule');
5959

6060
// Define our own set of paths for the tests
6161
defined('FW_BP') || define('FW_BP', PROJECT_ROOT);

dev/tests/functional/tests/MFTF/DevDocs/Data/MessageData.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,10 @@
1717
<item name="three">3</item>
1818
</array>
1919
</entity>
20+
21+
<entity name="ExtendedMessageData" extends="MessageData">
22+
<array key="numbers">
23+
<item name="TESTING CASE">TESTING CASE</item>
24+
</array>
25+
</entity>
2026
</entities>

dev/tests/functional/tests/MFTF/DevDocs/Test/DevDocsTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
</actionGroup>
4949

5050
<assertEqualsCanonicalizing stepKey="assertMergedArray">
51-
<actualResult type="array">{{MessageData.numbers}}</actualResult>
52-
<expectedResult type="array">["Something New", "0", "1", "2", "3"]</expectedResult>
51+
<actualResult type="array">{{ExtendedMessageData.numbers}}</actualResult>
52+
<expectedResult type="array">["Something New", "0", "1", "2", "3", "TESTING CASE"]</expectedResult>
5353
</assertEqualsCanonicalizing>
5454
</test>
5555
</tests>

dev/tests/static/Magento/Sniffs/MicroOptimizations/IsNullSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class IsNullSniff implements Sniff
1313
/**
1414
* @var string
1515
*/
16-
protected $blacklist = 'is_null';
16+
protected $blocklist = 'is_null';
1717

1818
/**
1919
* @inheritdoc
@@ -29,7 +29,7 @@ public function register()
2929
public function process(File $sourceFile, $stackPtr)
3030
{
3131
$tokens = $sourceFile->getTokens();
32-
if ($tokens[$stackPtr]['content'] === $this->blacklist) {
32+
if ($tokens[$stackPtr]['content'] === $this->blocklist) {
3333
$sourceFile->addError(
3434
"is_null must be avoided. Use strict comparison instead.",
3535
$stackPtr,

dev/tests/unit/Magento/FunctionalTestFramework/Util/ModuleResolverTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -705,12 +705,12 @@ public function testApplyCustomModuleMethods()
705705
}
706706

707707
/**
708-
* Validate blacklisted modules are removed
708+
* Validate blocklisted modules are removed
709709
* Module paths are sorted according to module name in alphabetically ascending order
710710
*
711711
* @throws \Exception
712712
*/
713-
public function testGetModulePathsBlacklist()
713+
public function testGetModulePathsBlocklist()
714714
{
715715
$this->setMockResolverClass(
716716
false,
@@ -946,10 +946,10 @@ private function setMockResolverClass(
946946
* @param ModuleResolver $instance
947947
* @param array $mockPaths
948948
* @param array $mockModules
949-
* @param array $mockBlacklist
949+
* @param array $mockBlocklist
950950
* @throws \Exception
951951
*/
952-
private function setMockResolverProperties($instance, $mockPaths = null, $mockModules = null, $mockBlacklist = [])
952+
private function setMockResolverProperties($instance, $mockPaths = null, $mockModules = null, $mockBlocklist = [])
953953
{
954954
$property = new \ReflectionProperty(ModuleResolver::class, 'enabledModulePaths');
955955
$property->setAccessible(true);
@@ -959,9 +959,9 @@ private function setMockResolverProperties($instance, $mockPaths = null, $mockMo
959959
$property->setAccessible(true);
960960
$property->setValue($instance, $mockModules);
961961

962-
$property = new \ReflectionProperty(ModuleResolver::class, 'moduleBlacklist');
962+
$property = new \ReflectionProperty(ModuleResolver::class, 'moduleBlocklist');
963963
$property->setAccessible(true);
964-
$property->setValue($instance, $mockBlacklist);
964+
$property->setValue($instance, $mockBlocklist);
965965
}
966966

967967
/**

dev/tests/unit/Magento/FunctionalTestFramework/Util/Validation/NameValidationUtilTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,47 +17,47 @@ class NameValidationUtilTest extends MagentoTestCase
1717
*/
1818
public function testCurlyBracesInTestName()
1919
{
20-
$this->validateBlacklistedTestName("{{curlyBraces}}");
20+
$this->validateBlocklistedTestName("{{curlyBraces}}");
2121
}
2222

2323
/**
2424
* Validate name with quotation marks throws exception
2525
*/
2626
public function testQuotesInTestName()
2727
{
28-
$this->validateBlacklistedTestName("\"quotes\"");
28+
$this->validateBlocklistedTestName("\"quotes\"");
2929
}
3030

3131
/**
3232
* Validate name with single quotes throws exception
3333
*/
3434
public function testSingleQuotesInTestName()
3535
{
36-
$this->validateBlacklistedTestName("'singleQuotes'");
36+
$this->validateBlocklistedTestName("'singleQuotes'");
3737
}
3838

3939
/**
4040
* Validate name with parenthesis throws execption
4141
*/
4242
public function testParenthesesInTestName()
4343
{
44-
$this->validateBlacklistedTestName("(parenthesis)");
44+
$this->validateBlocklistedTestName("(parenthesis)");
4545
}
4646

4747
/**
4848
* Validate name with dollar signs throws exception
4949
*/
5050
public function testDollarSignInTestName()
5151
{
52-
$this->validateBlacklistedTestName("\$dollarSign\$");
52+
$this->validateBlocklistedTestName("\$dollarSign\$");
5353
}
5454

5555
/**
5656
* Validate name with spaces throws exception
5757
*/
5858
public function testSpacesInTestName()
5959
{
60-
$this->validateBlacklistedTestName("Test Name With Spaces");
60+
$this->validateBlocklistedTestName("Test Name With Spaces");
6161
}
6262

6363
/**
@@ -66,7 +66,7 @@ public function testSpacesInTestName()
6666
* @param string $testName
6767
* @return void
6868
*/
69-
private function validateBlacklistedTestName($testName)
69+
private function validateBlocklistedTestName($testName)
7070
{
7171
$this->expectException(XmlException::class);
7272
NameValidationUtil::validateName($testName, "Test");

dev/tests/verification/Resources/SkippedTestNoIssues.txt renamed to dev/tests/verification/Resources/GroupSkipGenerationTest.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,22 @@ use Yandex\Allure\Adapter\Model\SeverityLevel;
1313
use Yandex\Allure\Adapter\Annotation\TestCaseId;
1414

1515
/**
16-
* @Title("[NO TESTCASEID]: skippedNoIssuesTest")
17-
* @Description("<h3>Test files</h3>verification/TestModule/Test/SkippedTest/SkippedTestNoIssues.xml<br>")
16+
* @Title("[NO TESTCASEID]: GroupSkipGenerationTestTitle")
17+
* @Description("GroupSkipGenerationTestDescription<h3>Test files</h3>verification/TestModule/Test/GroupSkipGenerationTest.xml<br>")
1818
* @group skip
1919
*/
20-
class SkippedTestNoIssuesCest
20+
class GroupSkipGenerationTestCest
2121
{
2222
/**
23-
* @Stories({"skippedNo"})
23+
* @Stories({"GroupSkipGenerationTestStory"})
2424
* @Severity(level = SeverityLevel::MINOR)
2525
* @Features({"TestModule"})
2626
* @Parameter(name = "AcceptanceTester", value="$I")
2727
* @param AcceptanceTester $I
2828
* @return void
2929
* @throws \Exception
3030
*/
31-
public function SkippedTestNoIssues(AcceptanceTester $I, \Codeception\Scenario $scenario)
31+
public function GroupSkipGenerationTest(AcceptanceTester $I)
3232
{
33-
$scenario->skip("This test is skipped due to the following issues:\nNo issues have been specified.");
3433
}
3534
}

0 commit comments

Comments
 (0)