Skip to content

Commit ec862a1

Browse files
imeron2433okolesnyk
authored andcommitted
MQE-478: Deliver Pangolins Sprint 11
- code review fixes
1 parent 08aa0da commit ec862a1

File tree

8 files changed

+82
-13
lines changed

8 files changed

+82
-13
lines changed

dev/tests/acceptance/RoboFile.php

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class RoboFile extends \Robo\Tasks
1515

1616
/**
1717
* Duplicate the Example configuration files used to customize the Project for customization
18+
*
19+
* @return void
1820
*/
1921
function cloneFiles()
2022
{
@@ -26,6 +28,8 @@ function cloneFiles()
2628
/**
2729
* Clone the Example configuration files
2830
* Build the Codeception project
31+
*
32+
* @return void
2933
*/
3034
function buildProject()
3135
{
@@ -34,25 +38,32 @@ function buildProject()
3438
}
3539

3640
/**
37-
* Generate all Tests
41+
* Generate all Tests command.
42+
*
43+
* @param string[] $opts
44+
* @return void
3845
*/
3946
function generateTests($opts = ['config' => null, 'env' => 'chrome'])
4047
{
41-
require 'tests/functional/_bootstrap.php';
48+
require 'tests'. DIRECTORY_SEPARATOR . 'functional' . DIRECTORY_SEPARATOR . '_bootstrap.php';
4249
\Magento\FunctionalTestingFramework\Util\TestGenerator::getInstance()->createAllCestFiles($opts['config'], $opts['env']);
4350
$this->say("Generate Tests Command Run");
4451
}
4552

4653
/**
4754
* Generate a suite based on name(s) passed in as args
55+
*
56+
* @param string[] args
57+
* @return void
58+
* @throws Exception
4859
*/
4960
function generateSuite(array $args)
5061
{
5162
if (empty($args)) {
5263
throw new Exception("Please provide suite name(s) after generate:suite command");
5364
}
5465

55-
require 'tests/functional/_bootstrap.php';
66+
require 'tests'. DIRECTORY_SEPARATOR . 'functional' . DIRECTORY_SEPARATOR . '_bootstrap.php';
5667
$sg = \Magento\FunctionalTestingFramework\Suite\SuiteGenerator::getInstance();
5768

5869
foreach ($args as $arg) {
@@ -62,6 +73,8 @@ function generateSuite(array $args)
6273

6374
/**
6475
* Run all Functional tests using the Chrome environment
76+
*
77+
* @return void
6578
*/
6679
function chrome()
6780
{
@@ -70,6 +83,8 @@ function chrome()
7083

7184
/**
7285
* Run all Functional tests using the FireFox environment
86+
*
87+
* @return void
7388
*/
7489
function firefox()
7590
{
@@ -78,6 +93,8 @@ function firefox()
7893

7994
/**
8095
* Run all Functional tests using the PhantomJS environment
96+
*
97+
* @return void
8198
*/
8299
function phantomjs()
83100
{
@@ -86,6 +103,8 @@ function phantomjs()
86103

87104
/**
88105
* Run all Functional tests using the Chrome Headless environment
106+
*
107+
* @return void
89108
*/
90109
function headless()
91110
{
@@ -94,7 +113,9 @@ function headless()
94113

95114
/**
96115
* Run all Tests with the specified @group tag, excluding @group 'skip', using the Chrome environment
116+
*
97117
* @param string $args
118+
* @return void
98119
*/
99120
function group($args = '')
100121
{
@@ -103,7 +124,9 @@ function group($args = '')
103124

104125
/**
105126
* Run all Functional tests located under the Directory Path provided using the Chrome environment
127+
*
106128
* @param string $args
129+
* @return void
107130
*/
108131
function folder($args = '')
109132
{
@@ -112,6 +135,8 @@ function folder($args = '')
112135

113136
/**
114137
* Run all Tests marked with the @group tag 'example', using the Chrome environment
138+
*
139+
* @return void
115140
*/
116141
function example()
117142
{
@@ -120,6 +145,8 @@ function example()
120145

121146
/**
122147
* Generate the HTML for the Allure report based on the Test XML output - Allure v1.4.X
148+
*
149+
* @return void
123150
*/
124151
function allure1Generate()
125152
{
@@ -128,6 +155,8 @@ function allure1Generate()
128155

129156
/**
130157
* Generate the HTML for the Allure report based on the Test XML output - Allure v2.3.X
158+
*
159+
* @return void
131160
*/
132161
function allure2Generate()
133162
{
@@ -136,6 +165,8 @@ function allure2Generate()
136165

137166
/**
138167
* Open the HTML Allure report - Allure v1.4.xX
168+
*
169+
* @return void
139170
*/
140171
function allure1Open()
141172
{
@@ -144,6 +175,8 @@ function allure1Open()
144175

145176
/**
146177
* Open the HTML Allure report - Allure v2.3.X
178+
*
179+
* @return void
147180
*/
148181
function allure2Open()
149182
{
@@ -152,6 +185,8 @@ function allure2Open()
152185

153186
/**
154187
* Generate and open the HTML Allure report - Allure v1.4.X
188+
*
189+
* @return void
155190
*/
156191
function allure1Report()
157192
{
@@ -164,6 +199,8 @@ function allure1Report()
164199

165200
/**
166201
* Generate and open the HTML Allure report - Allure v2.3.X
202+
*
203+
* @return void
167204
*/
168205
function allure2Report()
169206
{
@@ -176,6 +213,8 @@ function allure2Report()
176213

177214
/**
178215
* Run the Pre-Install Check Script
216+
*
217+
* @return void
179218
*/
180219
function preInstall()
181220
{

dev/tests/acceptance/pre-install.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
6+
// @codingStandardsIgnoreStart
77
class CliColors {
88
private $foreground_colors = array();
99
private $background_colors = array();
@@ -384,4 +384,5 @@ public function verifyVersion($softwareName, $installedVersion, $supportedVersio
384384
}
385385
}
386386

387-
$preCheck = new PreInstallCheck();
387+
$preCheck = new PreInstallCheck();
388+
// @codingStandardsIgnoreEnd

dev/tests/acceptance/tests/_suite/sampleSuite.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<?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+
29
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Suite/etc/suiteSchema.xsd">
310
<suite name="mySuite">
411
<before>
@@ -20,4 +27,4 @@
2027
<group name="testGroup"/>
2128
</exclude>
2229
</suite>
23-
</suites>
30+
</suites>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Data/CustomerData.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,5 @@
4747
<entity name="Simple_US_Customer_For_Update" type="customer">
4848
<var key="id" entityKey="id" entityType="customer"/>
4949
<data key="firstname">Jane</data>
50-
5150
</entity>
5251
</config>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleTests/Cest/UpdateSimpleProductByApiCest.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!-- Test XML Example -->
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
39
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
410
<cest name="UpdateSimpleProductByApiCest">
511
<annotations>
@@ -18,12 +24,11 @@
1824
</createData>
1925
<updateData mergeKey="productHandle" entity="NewSimpleProduct" createDataKey="originalProductHandle">
2026
</updateData>
21-
2227
</before>
2328
<after>
2429
<deleteData mergeKey="delete" createDataKey="productHandle"/>
2530
</after>
2631
<test name="UpdateSimpleProductByApiTest">
2732
</test>
2833
</cest>
29-
</config>
34+
</config>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Cest/StorefrontDeletePersistedWishlistCest.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!-- Test XML Example -->
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
39
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
410
<cest name="StorefrontDeletePersistedWishlistCest">
511
<annotations>
@@ -48,4 +54,4 @@
4854
<see mergeKey="seeEmptyWishlist" userInput="You have no items in your wish list" selector="{{StorefrontCustomerWishlistSection.emptyWishlistText}}"/>
4955
</test>
5056
</cest>
51-
</config>
57+
</config>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Data/WishlistData.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<?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+
-->
28

39
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
410
<entity name="Wishlist" type="wishlist">

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Metadata/wishlist-meta.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<?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+
-->
28

39
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
410
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
@@ -9,4 +15,4 @@
915
<field key="customer_email">string</field>
1016
<field key="customer_password">string</field>
1117
</operation>
12-
</config>
18+
</config>

0 commit comments

Comments
 (0)