Skip to content

MC-30228: [MFTF] Need to specify default store code for createEntity #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 96 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
9d85f41
Update include location.
dobooth Dec 13, 2019
686f052
Added clarity in selector paths
drpayyne Dec 14, 2019
0e0a514
Added clarity in selector paths
KevinBKozan Dec 20, 2019
96b7249
Grammar fixes
dobooth Jan 2, 2020
2805f11
Merge pull request #531 from magento-devdocs/db_functional_update
okolesnyk Jan 2, 2020
632ac7d
Merge pull request #532 from drpayyne/patch-1
KevinBKozan Jan 3, 2020
4e1ea0a
MQE-1513: createData throws a useless error message during runtime wh…
soumyau Jan 3, 2020
1075fd4
MQE-1513: createData throws a useless error message during runtime wh…
soumyau Jan 3, 2020
a415f05
MQE-1513: createData throws a useless error message during runtime wh…
soumyau Jan 3, 2020
fbf066d
Set of changes to TestGenerator
lbajsarowicz Jan 6, 2020
43ce9fc
Introduce magentoCron command to execute Cron Jobs taking into consid…
lbajsarowicz Jan 6, 2020
df058d7
Code Style like 80s!
lbajsarowicz Jan 6, 2020
af0a499
MQE-1513: createData throws a useless error message during runtime wh…
soumyau Jan 6, 2020
28804f4
MQE-1513: createData throws a useless error message during runtime wh…
soumyau Jan 6, 2020
188d6ba
MQE-1513: createData throws a useless error message during runtime wh…
soumyau Jan 6, 2020
052576d
Merge pull request #535 from magento/MQE-1513
soumyau Jan 6, 2020
dae9a3b
Merge branch 'develop' into refactor/mftf-test-generator
soumyau Jan 7, 2020
e005931
Merge branch 'develop' into feature/cron-command
soumyau Jan 7, 2020
20a0cef
Code Review changes
lbajsarowicz Jan 7, 2020
f83107a
Satisfy ridiculous Coding Standard
lbajsarowicz Jan 7, 2020
771716d
... Coding Standard
lbajsarowicz Jan 7, 2020
231e58d
Merge pull request #537 from lbajsarowicz/refactor/mftf-test-generator
soumyau Jan 7, 2020
ede7772
MC-30228: [MFTF] Need to specify default store code for createEntity
svitja Jan 8, 2020
995016a
MQE-1713: Generate/run test in single suite context
KevinBKozan Jan 8, 2020
1c0f078
Merge remote-tracking branch 'origin/develop' into feature/cron-command
lbajsarowicz Jan 8, 2020
1993915
Add tests to cover new feature
lbajsarowicz Jan 8, 2020
f618972
Add tests to cover new feature
lbajsarowicz Jan 8, 2020
f3bb5c2
Add documentation to `<magentoCron>` command
lbajsarowicz Jan 8, 2020
aea7e8d
MQE-1713: Generate/run test in single suite contex
KevinBKozan Jan 9, 2020
af7c2fb
MQE-1713: Generate/run test in single suite context
KevinBKozan Jan 9, 2020
c41a910
Merge pull request #538 from lbajsarowicz/feature/cron-command
soumyau Jan 9, 2020
4cdd1e9
Merge branch 'master' of github.com:magento/magento2-functional-testi…
dobooth Jan 10, 2020
ffec377
MQE-1918: MFTF AWS Secrets Manager - Local Use
jilu1 Jan 10, 2020
579c96d
MQE-1918: MFTF AWS Secrets Manager - Local Use
jilu1 Jan 10, 2020
3f7df8b
Update ActionGroups documentation
lbajsarowicz Jan 12, 2020
2d67ec9
Update Best Practices
lbajsarowicz Jan 12, 2020
970c351
Merge branch 'develop' into MC-30228
zakdma Jan 14, 2020
22e1f48
MQE-1713: Generate/run test in single suite context
KevinBKozan Jan 14, 2020
46eabbf
Added raw tags
dobooth Jan 14, 2020
ce8b333
MQE-1713: Generate/run test in single suite context
KevinBKozan Jan 14, 2020
6896c37
Merge branch 'develop' into MQE-1713
KevinBKozan Jan 14, 2020
e344c6f
Merge pull request #542 from magento/MQE-1713
KevinBKozan Jan 14, 2020
d0d9805
MQE-1918: MFTF AWS Secrets Manager - Local Use
jilu1 Jan 14, 2020
bb62cfe
MQE-1918: MFTF AWS Secrets Manager - Local Use
jilu1 Jan 15, 2020
350e896
MQE-1761: Allure reporting error for multiple suite run
jilu1 Jan 15, 2020
eb68e89
MQE-1761: Allure reporting error for multiple suite run
jilu1 Jan 15, 2020
63ddca9
Merge branch 'develop' into MQE-1761
soumyau Jan 15, 2020
2e57c94
Merge pull request #552 from magento/MQE-1761
jilu1 Jan 17, 2020
25966e6
Merge branch 'develop' into MC-30228
zakdma Jan 17, 2020
5a7c099
Merge branch 'develop' into MQE-1918
jilu1 Jan 18, 2020
12c3bdf
Merge remote-tracking branch 'origin/develop' into MQE-1918
jilu1 Jan 18, 2020
9a1fdd1
MQE-1919: MFTF AWS Secrets Manager - CI Use
jilu1 Jan 16, 2020
458bddd
Remove extra spaces
ajithkumar-maragathavel Jan 20, 2020
eb7b6a3
Remove extra spaces
ajithkumar-maragathavel Jan 21, 2020
93e221c
MQE-1919: MFTF AWS Secrets Manager - CI Use
jilu1 Jan 21, 2020
afcae2c
Merge pull request #553 from ajithkumar-maragathavel/mftf-extends-docs
jilu1 Jan 21, 2020
ca50f41
Merge branch 'develop' into MC-30228
zakdma Jan 22, 2020
0331f7e
MQE-1676: Add a static-check that ensures action groups do not have u…
soumyau Jan 22, 2020
97f7a37
Merge remote-tracking branch 'origin/develop' into MQE-1676
soumyau Jan 22, 2020
4a4fc38
MQE-1676: Add a static-check that ensures action groups do not have u…
soumyau Jan 22, 2020
58f0da6
MQE-1676: Add a static-check that ensures action groups do not have u…
soumyau Jan 22, 2020
4d91e49
Merge branch 'develop' into bugfix/501-documentation
jilu1 Jan 22, 2020
fa4cbe2
Merge pull request #548 from lbajsarowicz/bugfix/501-documentation
jilu1 Jan 22, 2020
9bd0651
MQE-1959: Static-checks command can be configured
jilu1 Jan 22, 2020
1184881
Merge branch 'develop' into MC-30228
zakdma Jan 24, 2020
cc3601a
MQE-1676: Add a static-check that ensures action groups do not have u…
soumyau Jan 24, 2020
4a306c2
MQE-1676: Add a static-check that ensures action groups do not have u…
soumyau Jan 24, 2020
f4b2d95
MQE-1676: Add a static-check that ensures action groups do not have u…
soumyau Jan 24, 2020
4f24696
Merge branch 'develop' into MQE-1676
soumyau Jan 24, 2020
d419049
Merge branch 'develop' into MQE-1959
jilu1 Jan 24, 2020
c069eca
Merge pull request #556 from magento/MQE-1959
jilu1 Jan 24, 2020
d9bea3b
Merge remote-tracking branch 'origin/develop' into MQE-1676
soumyau Jan 24, 2020
8bf99ec
Merge branch 'develop' into MC-30228
zakdma Jan 24, 2020
3166af8
MFTF deprecation notice attributes
okolesnyk Jan 25, 2020
731a770
MQE-1676: Add a static-check that ensures action groups do not have u…
soumyau Jan 27, 2020
089b88d
MQE-1676: Add a static-check that ensures action groups do not have u…
soumyau Jan 27, 2020
c0a885c
MQE-1919: MFTF AWS Secrets Manager - CI Use
jilu1 Jan 24, 2020
38cde07
Merge remote-tracking branch 'origin/develop' into MQE-1919
jilu1 Jan 27, 2020
6ff290a
MFTF deprecation notice attributes
okolesnyk Jan 27, 2020
3e86d4f
MFTF deprecation notice attributes
okolesnyk Jan 27, 2020
9775b5e
MFTF deprecation notice attributes
okolesnyk Jan 27, 2020
28fe757
MQE-1676: Add a static-check that ensures action groups do not have u…
soumyau Jan 27, 2020
27ca94d
MFTF deprecation notice attributes
okolesnyk Jan 27, 2020
6e9aeca
MFTF deprecation notice attributes
okolesnyk Jan 27, 2020
a30065a
MFTF deprecation notice attributes
okolesnyk Jan 27, 2020
64b6bdf
MFTF deprecation notice attributes
okolesnyk Jan 27, 2020
1c7c6ce
MQE-1676: Add a static-check that ensures action groups do not have u…
soumyau Jan 27, 2020
53b055d
Merge pull request #555 from magento/MQE-1676
soumyau Jan 27, 2020
a457211
Merge branch 'develop' into DeprecatedAttr
okolesnyk Jan 27, 2020
2f1c63d
Merge branch 'develop' into MQE-1919
soumyau Jan 27, 2020
a84ee26
Merge pull request #560 from magento/DeprecatedAttr
okolesnyk Jan 27, 2020
df5f4f6
Merge branch 'develop' into MQE-1919
jilu1 Jan 27, 2020
b552483
Merge pull request #554 from magento/MQE-1919
jilu1 Jan 27, 2020
ef347a4
Merge branch 'develop' into db_tips_fix
dobooth Jan 28, 2020
fc598db
Merge pull request #557 from magento-devdocs/db_tips_fix
okolesnyk Jan 28, 2020
d7eb007
Merge branch 'develop' into MC-30228
zakdma Jan 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"require": {
"php": "7.0.2||7.0.4||~7.0.6||~7.1.0||~7.2.0||~7.3.0",
"ext-curl": "*",
"ext-json": "*",
"ext-openssl": "*",
"allure-framework/allure-codeception": "~1.3.0",
"aws/aws-sdk-php": "^3.132",
"codeception/codeception": "~2.4.5",
"composer/composer": "^1.4",
"consolidation/robo": "^1.0.0",
Expand Down
148 changes: 146 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
<actionGroup name="DeprecatedCommentActionGroup" deprecated="This Action Group is outdated and will be deleted next release.">
<comment userInput="Action group to demonstrate deprecation notices." stepKey="comment" />
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
<entity name="DeprecatedMessageData" deprecated="Entity is deprecated. Please use 'MessageData'.">
<data key="message">Introduction to the Magento Functional Testing Framework</data>
</entity>
</entities>
14 changes: 14 additions & 0 deletions dev/tests/functional/tests/MFTF/DevDocs/Data/MessageData.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
<entity name="MessageData">
<data key="message">Introduction to the Magento Functional Testing Framework</data>
</entity>
</entities>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
<page name="DeprecatedMFTFDocPage" url="mftf/docs/introduction.html" area="storefront" module="MFTF_DevDocs" deprecated="New page was introduced. Please use 'MFTFDocPage'">
<section name="contentSection" />
</page>
</pages>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
<section name="contentSection">
<element name="pageIntro" type="text" selector=".page-intro"/>
<element name="deprecatedPageIntro" type="text" selector=".page-intro-old" deprecated="New element was introduced. Please use 'contentSection.pageIntro'"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
<section name="DeprecatedContentSection" deprecated="New section was introduces. Please use 'contentSection'">
<element name="pageIntro" type="text" selector=".page-intro"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
<test name="DeprecatedDevDocsTest" deprecated="Test is deprecated due to more stable test was introduces. Please use 'DevDocsTest'.">
<annotations>
<!-- Comment in Annotations for DevDocs Test are not affecting test generation -->
<features value="DevDocs available"/>
<stories value="[Deprecated] MFTF DevDocs available"/>
<title value="[Deprecated] Magento Functional Testing Framework Documentation is available."/>
<description value="[Deprecated] Magento Functional Testing Framework Documentation is available."/>
<severity value="CRITICAL"/>
<group value="mftf"/>
</annotations>

<!-- Open MFTF DevDocs Page -->
<amOnPage stepKey="openMFTFDevDocPage" url="{{DeprecatedMFTFDocPage.url}}" />
<see stepKey="verifyPageIntroText" selector="{{DeprecatedContentSection.pageIntro}}" userInput="{{DeprecatedMessageData.message}}" />
<actionGroup ref="DeprecatedCommentActionGroup" stepKey="commentActionGroup" />
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@

<!-- Open MFTF DevDocs Page -->
<amOnPage stepKey="openMFTFDevDocPage" url="{{MFTFDocPage.url}}" />
<see stepKey="verifyPageIntroText" selector="{{contentSection.pageIntro}}" userInput="Introduction to the Magento Functional Testing Framework" />
<see stepKey="verifyPageIntroText" selector="{{contentSection.pageIntro}}" userInput="{{MessageData.message}}" />
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,24 @@ public function testThreeTestOneSuiteOneGroupMix()
$this->assertEquals($expected, $actual);
}

public function testSuiteToTestSyntax()
{
$testOne = new TestObject('Test1', [], [], []);
$suiteOne = new SuiteObject(
'Suite1',
['Test1' => $testOne],
[],
[]
);

$testArray = ['Test1' => $testOne];
$suiteArray = ['Suite1' => $suiteOne];
$this->mockHandlers($testArray, $suiteArray);
$actual = json_decode($this->callTestConfig(['Suite1:Test1']), true);
$expected = ['tests' => null, 'suites' => ['Suite1' => ['Test1']]];
$this->assertEquals($expected, $actual);
}

/**
* Mock handlers to skip parsing
* @param array $testArray
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,30 @@ public function setUp()
TestLoggingUtil::getInstance()->setMockLoggingUtil();
}

public function testCreateEntityWithNonExistingName()
{
// Test Data and Variables
$entityName = "InvalidEntity";
$entityStepKey = "StepKey";
$scope = PersistedObjectHandler::TEST_SCOPE;

$exceptionMessage = "Entity \"" . $entityName . "\" does not exist." .
"\nException occurred executing action at StepKey \"" . $entityStepKey . "\"";

$this->expectException(TestReferenceException::class);

$this->expectExceptionMessage($exceptionMessage);

$handler = PersistedObjectHandler::getInstance();

// Call method
$handler->createEntity(
$entityStepKey,
$scope,
$entityName
);
}

public function testCreateSimpleEntity()
{
// Test Data and Variables
Expand Down
Loading