Skip to content

Commit ef347a4

Browse files
authored
Merge branch 'develop' into db_tips_fix
2 parents 4cdd1e9 + b552483 commit ef347a4

File tree

153 files changed

+2673
-477
lines changed

Some content is hidden

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

153 files changed

+2673
-477
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
"require": {
1212
"php": "7.0.2||7.0.4||~7.0.6||~7.1.0||~7.2.0||~7.3.0",
1313
"ext-curl": "*",
14+
"ext-json": "*",
15+
"ext-openssl": "*",
1416
"allure-framework/allure-codeception": "~1.3.0",
17+
"aws/aws-sdk-php": "^3.132",
1518
"codeception/codeception": "~2.4.5",
1619
"composer/composer": "^1.4",
1720
"consolidation/robo": "^1.0.0",

composer.lock

Lines changed: 146 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="DeprecatedCommentActionGroup" deprecated="This Action Group is outdated and will be deleted next release.">
11+
<comment userInput="Action group to demonstrate deprecation notices." stepKey="comment" />
12+
</actionGroup>
13+
</actionGroups>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="DeprecatedMessageData" deprecated="Entity is deprecated. Please use 'MessageData'.">
12+
<data key="message">Introduction to the Magento Functional Testing Framework</data>
13+
</entity>
14+
</entities>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="MessageData">
12+
<data key="message">Introduction to the Magento Functional Testing Framework</data>
13+
</entity>
14+
</entities>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
11+
<page name="DeprecatedMFTFDocPage" url="mftf/docs/introduction.html" area="storefront" module="MFTF_DevDocs" deprecated="New page was introduced. Please use 'MFTFDocPage'">
12+
<section name="contentSection" />
13+
</page>
14+
</pages>

dev/tests/functional/tests/MFTF/DevDocs/Section/ContentSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="contentSection">
1212
<element name="pageIntro" type="text" selector=".page-intro"/>
13+
<element name="deprecatedPageIntro" type="text" selector=".page-intro-old" deprecated="New element was introduced. Please use 'contentSection.pageIntro'"/>
1314
</section>
1415
</sections>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="DeprecatedContentSection" deprecated="New section was introduces. Please use 'contentSection'">
12+
<element name="pageIntro" type="text" selector=".page-intro"/>
13+
</section>
14+
</sections>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<test name="DeprecatedDevDocsTest" deprecated="Test is deprecated due to more stable test was introduces. Please use 'DevDocsTest'.">
12+
<annotations>
13+
<!-- Comment in Annotations for DevDocs Test are not affecting test generation -->
14+
<features value="DevDocs available"/>
15+
<stories value="[Deprecated] MFTF DevDocs available"/>
16+
<title value="[Deprecated] Magento Functional Testing Framework Documentation is available."/>
17+
<description value="[Deprecated] Magento Functional Testing Framework Documentation is available."/>
18+
<severity value="CRITICAL"/>
19+
<group value="mftf"/>
20+
</annotations>
21+
22+
<!-- Open MFTF DevDocs Page -->
23+
<amOnPage stepKey="openMFTFDevDocPage" url="{{DeprecatedMFTFDocPage.url}}" />
24+
<see stepKey="verifyPageIntroText" selector="{{DeprecatedContentSection.pageIntro}}" userInput="{{DeprecatedMessageData.message}}" />
25+
<actionGroup ref="DeprecatedCommentActionGroup" stepKey="commentActionGroup" />
26+
</test>
27+
</tests>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121

2222
<!-- Open MFTF DevDocs Page -->
2323
<amOnPage stepKey="openMFTFDevDocPage" url="{{MFTFDocPage.url}}" />
24-
<see stepKey="verifyPageIntroText" selector="{{contentSection.pageIntro}}" userInput="Introduction to the Magento Functional Testing Framework" />
24+
<see stepKey="verifyPageIntroText" selector="{{contentSection.pageIntro}}" userInput="{{MessageData.message}}" />
2525
</test>
2626
</tests>

dev/tests/unit/Magento/FunctionalTestFramework/Console/BaseGenerateCommandTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,24 @@ public function testThreeTestOneSuiteOneGroupMix()
156156
$this->assertEquals($expected, $actual);
157157
}
158158

159+
public function testSuiteToTestSyntax()
160+
{
161+
$testOne = new TestObject('Test1', [], [], []);
162+
$suiteOne = new SuiteObject(
163+
'Suite1',
164+
['Test1' => $testOne],
165+
[],
166+
[]
167+
);
168+
169+
$testArray = ['Test1' => $testOne];
170+
$suiteArray = ['Suite1' => $suiteOne];
171+
$this->mockHandlers($testArray, $suiteArray);
172+
$actual = json_decode($this->callTestConfig(['Suite1:Test1']), true);
173+
$expected = ['tests' => null, 'suites' => ['Suite1' => ['Test1']]];
174+
$this->assertEquals($expected, $actual);
175+
}
176+
159177
/**
160178
* Mock handlers to skip parsing
161179
* @param array $testArray

dev/tests/unit/Magento/FunctionalTestFramework/DataGenerator/Handlers/PersistedObjectHandlerTest.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,30 @@ public function setUp()
3232
TestLoggingUtil::getInstance()->setMockLoggingUtil();
3333
}
3434

35+
public function testCreateEntityWithNonExistingName()
36+
{
37+
// Test Data and Variables
38+
$entityName = "InvalidEntity";
39+
$entityStepKey = "StepKey";
40+
$scope = PersistedObjectHandler::TEST_SCOPE;
41+
42+
$exceptionMessage = "Entity \"" . $entityName . "\" does not exist." .
43+
"\nException occurred executing action at StepKey \"" . $entityStepKey . "\"";
44+
45+
$this->expectException(TestReferenceException::class);
46+
47+
$this->expectExceptionMessage($exceptionMessage);
48+
49+
$handler = PersistedObjectHandler::getInstance();
50+
51+
// Call method
52+
$handler->createEntity(
53+
$entityStepKey,
54+
$scope,
55+
$entityName
56+
);
57+
}
58+
3559
public function testCreateSimpleEntity()
3660
{
3761
// Test Data and Variables

0 commit comments

Comments
 (0)