Skip to content

Commit

Permalink
Merge pull request magento#281 from magento-mpi/MTA-559
Browse files Browse the repository at this point in the history
[MPI] Refactor end-to-end functional 3rd party tests
  • Loading branch information
Pechenushko committed May 12, 2015
2 parents f852aa4 + 7c6afd4 commit 740c907
Show file tree
Hide file tree
Showing 13 changed files with 505 additions and 372 deletions.
2 changes: 1 addition & 1 deletion dev/tests/functional/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"magento/mtf": "1.0.0-rc23",
"magento/mtf": "1.0.0-rc24",
"php": "~5.5.0|~5.6.0",
"phpunit/phpunit": "4.1.0",
"phpunit/phpunit-selenium": ">=1.2",
Expand Down
14 changes: 0 additions & 14 deletions dev/tests/functional/credentials.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@
<field path="carriers/fedex/key" value="" />
<field path="carriers/fedex/password" value="" />

<field path="payment/authorizenet/login" value="" />
<field path="payment/authorizenet/trans_key" value="" />

<field path="payment/paypal_group_all_in_one/wpp_usuk/wpp_required_settings/wpp_and_express_checkout/business_account" value="" />
<field path="payment/paypal_group_all_in_one/wpp_usuk/wpp_required_settings/wpp_and_express_checkout/api_username" value="" />
<field path="payment/paypal_group_all_in_one/wpp_usuk/wpp_required_settings/wpp_and_express_checkout/api_password" value="" />
<field path="payment/paypal_group_all_in_one/wpp_usuk/wpp_required_settings/wpp_and_express_checkout/api_signature" value="" />

<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/business_account" value="" />
<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/partner" value="" />
<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/user" value="" />
<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/pwd" value="" />
<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/vendor" value="" />

<field path="carriers/ups/password" value="" />
<field path="carriers/ups/username" value="" />
<field path="carriers/ups/access_license_number" value="" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@
namespace Magento\Mtf\Util\Generate\Factory;

/**
* Class Page
*
* Page Factory generator
* Page Factory generator.
*
*/
class Page extends AbstractFactory
{
protected $type = 'Page';

/**
* Collect Items
* Collect Items.
*/
protected function generateContent()
{
Expand All @@ -30,7 +28,20 @@ protected function generateContent()
}

/**
* Add Page to content
* Convert class name to camel-case.
*
* @param string $class
* @return string
*/
private function toCamelCase($class)
{
$classNameExcessSymbols = ['_', '\\', '/', 'https:', 'http:', 'com', 'www', '.', '-'];
$class = str_replace($classNameExcessSymbols, ' ', $class);
return str_replace(' ', '', ucwords($class));
}

/**
* Add Page to content.
*
* @param array $item
*/
Expand All @@ -39,7 +50,7 @@ protected function _addPageToFactory($item)
$realClass = $this->_resolveClass($item);
$reflectionClass = new \ReflectionClass($realClass);
$mca = $reflectionClass->getConstant('MCA');
$methodNameSuffix = $this->_toCamelCase($mca);
$methodNameSuffix = $this->toCamelCase($mca);

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ public function isVisibleAddToCart()
public function paypalCheckout()
{
$this->_rootElement->find($this->paypalCheckout, Locator::SELECTOR_CSS)->click();
$this->waitForElementNotVisible($this->paypalCheckout);
}

/**
Expand Down
Loading

0 comments on commit 740c907

Please sign in to comment.