Skip to content

Commit 740c907

Browse files
committed
Merge pull request #281 from magento-mpi/MTA-559
[MPI] Refactor end-to-end functional 3rd party tests
2 parents f852aa4 + 7c6afd4 commit 740c907

File tree

13 files changed

+505
-372
lines changed

13 files changed

+505
-372
lines changed

dev/tests/functional/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"magento/mtf": "1.0.0-rc23",
3+
"magento/mtf": "1.0.0-rc24",
44
"php": "~5.5.0|~5.6.0",
55
"phpunit/phpunit": "4.1.0",
66
"phpunit/phpunit-selenium": ">=1.2",

dev/tests/functional/credentials.xml.dist

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,6 @@
1212
<field path="carriers/fedex/key" value="" />
1313
<field path="carriers/fedex/password" value="" />
1414

15-
<field path="payment/authorizenet/login" value="" />
16-
<field path="payment/authorizenet/trans_key" value="" />
17-
18-
<field path="payment/paypal_group_all_in_one/wpp_usuk/wpp_required_settings/wpp_and_express_checkout/business_account" value="" />
19-
<field path="payment/paypal_group_all_in_one/wpp_usuk/wpp_required_settings/wpp_and_express_checkout/api_username" value="" />
20-
<field path="payment/paypal_group_all_in_one/wpp_usuk/wpp_required_settings/wpp_and_express_checkout/api_password" value="" />
21-
<field path="payment/paypal_group_all_in_one/wpp_usuk/wpp_required_settings/wpp_and_express_checkout/api_signature" value="" />
22-
23-
<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/business_account" value="" />
24-
<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/partner" value="" />
25-
<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/user" value="" />
26-
<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/pwd" value="" />
27-
<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/vendor" value="" />
28-
2915
<field path="carriers/ups/password" value="" />
3016
<field path="carriers/ups/username" value="" />
3117
<field path="carriers/ups/access_license_number" value="" />

dev/tests/functional/lib/Magento/Mtf/Util/Generate/Factory/Page.php

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,15 @@
88
namespace Magento\Mtf\Util\Generate\Factory;
99

1010
/**
11-
* Class Page
12-
*
13-
* Page Factory generator
11+
* Page Factory generator.
1412
*
1513
*/
1614
class Page extends AbstractFactory
1715
{
1816
protected $type = 'Page';
1917

2018
/**
21-
* Collect Items
19+
* Collect Items.
2220
*/
2321
protected function generateContent()
2422
{
@@ -30,7 +28,20 @@ protected function generateContent()
3028
}
3129

3230
/**
33-
* Add Page to content
31+
* Convert class name to camel-case.
32+
*
33+
* @param string $class
34+
* @return string
35+
*/
36+
private function toCamelCase($class)
37+
{
38+
$classNameExcessSymbols = ['_', '\\', '/', 'https:', 'http:', 'com', 'www', '.', '-'];
39+
$class = str_replace($classNameExcessSymbols, ' ', $class);
40+
return str_replace(' ', '', ucwords($class));
41+
}
42+
43+
/**
44+
* Add Page to content.
3445
*
3546
* @param array $item
3647
*/
@@ -39,7 +50,7 @@ protected function _addPageToFactory($item)
3950
$realClass = $this->_resolveClass($item);
4051
$reflectionClass = new \ReflectionClass($realClass);
4152
$mca = $reflectionClass->getConstant('MCA');
42-
$methodNameSuffix = $this->_toCamelCase($mca);
53+
$methodNameSuffix = $this->toCamelCase($mca);
4354

4455
$fallbackComment = $this->_buildFallbackComment($item);
4556

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ public function isVisibleAddToCart()
209209
public function paypalCheckout()
210210
{
211211
$this->_rootElement->find($this->paypalCheckout, Locator::SELECTOR_CSS)->click();
212+
$this->waitForElementNotVisible($this->paypalCheckout);
212213
}
213214

214215
/**

0 commit comments

Comments
 (0)