Skip to content

Commit 6c34dab

Browse files
authored
Merge branch 'develop' into MQE-1302
2 parents 58810eb + 85b44c3 commit 6c34dab

22 files changed

+214
-75
lines changed

dev/tests/static/Magento/Sniffs/Commenting/FunctionCommentSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected function processReturn(File $phpcsFile, $stackPtr, $commentStart)
6868
$phpcsFile->addError($error, $return, 'MissingReturnType');
6969
} else {
7070
// Support both a return type and a description.
71-
$split = preg_match('`^((?:\|?(?:array\([^\)]*\)|[\\\\a-z0-9\[\]]+))*)( .*)?`i', $content, $returnParts);
71+
preg_match('`^((?:\|?(?:array\([^\)]*\)|[\\\\a-z0-9\[\]]+))*)( .*)?`i', $content, $returnParts);
7272
if (isset($returnParts[1]) === false) {
7373
return;
7474
}
@@ -78,7 +78,7 @@ protected function processReturn(File $phpcsFile, $stackPtr, $commentStart)
7878
// Check return type (can be multiple, separated by '|').
7979
$typeNames = explode('|', $returnType);
8080
$suggestedNames = array();
81-
foreach ($typeNames as $i => $typeName) {
81+
foreach ($typeNames as $typeName) {
8282
$suggestedName = Common::suggestType($typeName);
8383
if (in_array($suggestedName, $suggestedNames) === false) {
8484
$suggestedNames[] = $suggestedName;

dev/tests/verification/Resources/ActionGroupWithSectionAndDataAsArguments.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ class ActionGroupWithSectionAndDataAsArgumentsCest
2727
*/
2828
public function ActionGroupWithSectionAndDataAsArguments(AcceptanceTester $I)
2929
{
30-
$I->waitForElementVisible("#element .John");
30+
$I->waitForElementVisible("#element .John", 10);
3131
}
3232
}

dev/tests/verification/Resources/BasicFunctionalTest.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class BasicFunctionalTestCest
126126
$I->moveMouseOver(".functionalTestSelector");
127127
$I->openNewTab();
128128
$I->pauseExecution();
129-
$I->performOn("#selector", function(\WebDriverElement $el) {return $el->isDisplayed();});
129+
$I->performOn("#selector", function(\WebDriverElement $el) {return $el->isDisplayed();}, 10);
130130
$I->pressKey("#page", "a");
131131
$I->pressKey("#page", ['ctrl', 'a'],'new');
132132
$I->pressKey("#page", ['shift', '111'],'1','x');
@@ -165,7 +165,7 @@ class BasicFunctionalTestCest
165165
$I->waitForElement(".functionalTestSelector", 30);
166166
$I->waitForElementNotVisible(".functionalTestSelector", 30);
167167
$I->waitForElementVisible(".functionalTestSelector", 30);
168-
$I->waitForElementChange("#selector", function(\WebDriverElement $el) {return $el->isDisplayed();});
168+
$I->waitForElementChange("#selector", function(\WebDriverElement $el) {return $el->isDisplayed();}, 10);
169169
$I->waitForJS("someJsFunction", 30);
170170
$I->waitForText("someInput", 30, ".functionalTestSelector");
171171
}

dev/tests/verification/Resources/SectionReplacementTest.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,7 @@ class SectionReplacementTestCest
6868
$I->click("#stringLiteral1-" . PersistedObjectHandler::getInstance()->retrieveEntityField('createdData', 'firstname', 'test') . " .Doe" . msq("uniqueData"));
6969
$I->click("#element .1#element .2");
7070
$I->click("#element .1#element .{$data}");
71+
$I->click("(//div[@data-role='slide'])[1]/a[@data-element='link'][contains(@href,'')]");
72+
$I->click("(//div[@data-role='slide'])[1]/a[@data-element='link'][contains(@href,' ')]");
7173
}
7274
}

dev/tests/verification/Resources/functionalSuiteHooks.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class functionalSuiteHooks extends \Codeception\GroupObject
3030

3131
if ($this->preconditionFailure != null) {
3232
//if our preconditions fail, we need to mark all the tests as incomplete.
33-
$e->getTest()->getMetadata()->setIncomplete($this->preconditionFailure);
33+
$e->getTest()->getMetadata()->setIncomplete("SUITE PRECONDITION FAILED:" . PHP_EOL . $this->preconditionFailure);
3434
}
3535
}
3636

dev/tests/verification/TestModule/Section/SampleSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
<element name="threeOneDuplicateParamElement" type="button" selector="#{{var1}}-{{var2}} .{{var1}} [{{var3}}]" parameterized="true"/>
1919
<element name="timeoutElement" type="button" selector="#foo" timeout="30"/>
2020
<element name="mergeElement" type="button" selector="#unMerge"/>
21+
<element name="anotherTwoParamsElement" type="button" selector="(//div[@data-role='slide'])[{{arg1}}]/a[@data-element='link'][contains(@href,'{{arg2}}')]" parameterized="true"/>
2122
</section>
2223
</sections>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,8 @@
5050

5151
<click stepKey="selectorReplaceTwoParamElements" selector="{{SampleSection.oneParamElement('1')}}{{SampleSection.oneParamElement('2')}}"/>
5252
<click stepKey="selectorReplaceTwoParamMixedTypes" selector="{{SampleSection.oneParamElement('1')}}{{SampleSection.oneParamElement({$data})}}"/>
53+
54+
<click stepKey="selectorParamWithEmptyString" selector="{{SampleSection.anotherTwoParamsElement('1', '')}}"/>
55+
<click stepKey="selectorParamWithASpace" selector="{{SampleSection.anotherTwoParamsElement('1', ' ')}}"/>
5356
</test>
5457
</tests>

etc/config/.env.example

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
#*** Set the base URL for your Magento instance ***#
55
MAGENTO_BASE_URL=http://devdocs.magento.com/
66

7+
#*** Uncomment if you are running Admin Panel on separate domain (used with MAGENTO_BACKEND_NAME) ***#
8+
# MAGENTO_BACKEND_BASE_HOST=http://admin.example.com/
9+
710
#*** Set the Admin Username and Password for your Magento instance ***#
811
MAGENTO_BACKEND_NAME=admin
912
MAGENTO_ADMIN_USERNAME=admin
@@ -23,8 +26,9 @@ MAGENTO_ADMIN_PASSWORD=123123q
2326
BROWSER=chrome
2427

2528
#*** Uncomment and set host & port if your dev environment needs different value other than MAGENTO_BASE_URL for Rest API Requests ***#
26-
#MAGENTO_RESTAPI_SERVER_HOST=
27-
#MAGENTO_RESTAPI_SERVER_PORT=
29+
#MAGENTO_RESTAPI_SERVER_HOST=restapi.magento.com
30+
#MAGENTO_RESTAPI_SERVER_PORT=8080
31+
#MAGENTO_RESTAPI_SERVER_PROTOCOL=https
2832

2933
#*** Uncomment these properties to set up a dev environment with symlinked projects ***#
3034
#TESTS_BP=
@@ -40,4 +44,7 @@ MODULE_WHITELIST=Magento_Framework,Magento_ConfigurableProductWishlist,Magento_C
4044

4145
#*** Bool property which allows the user to toggle debug output during test execution
4246
#MFTF_DEBUG=
47+
48+
#*** Default timeout for wait actions
49+
#WAIT_TIMEOUT=10
4350
#*** End of .env ***#

etc/config/codeception.dist.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ settings:
1212
memory_limit: 1024M
1313
extensions:
1414
enabled:
15-
- Codeception\Extension\RunFailed
1615
- Magento\FunctionalTestingFramework\Extension\TestContextExtension
1716
- Magento\FunctionalTestingFramework\Allure\Adapter\MagentoAllureAdapter
1817
config:

etc/config/functional.suite.dist.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ modules:
2020
config:
2121
\Magento\FunctionalTestingFramework\Module\MagentoWebDriver:
2222
url: "%MAGENTO_BASE_URL%"
23+
backend_url: "%MAGENTO_BACKEND_BASE_URL%"
2324
backend_name: "%MAGENTO_BACKEND_NAME%"
2425
browser: 'chrome'
2526
restart: true

0 commit comments

Comments
 (0)