Skip to content

Commit cd637e5

Browse files
authored
Merge pull request #689 from magento-qmt/mavericks-PR
[Mavericks] Extend functional tests coverage
2 parents f1c3ea0 + c769775 commit cd637e5

File tree

114 files changed

+2276
-698
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+2276
-698
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-rc49",
3+
"magento/mtf": "1.0.0-rc50",
44
"php": "~5.6.5|7.0.2|~7.0.6",
55
"phpunit/phpunit": "~4.8.0|~5.5.0",
66
"phpunit/phpunit-selenium": ">=1.2"

dev/tests/functional/credentials.xml.dist

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,32 @@
4848
<field path="payment/paypal_group_all_in_one/wpp_usuk/wpp_required_settings/wpp_and_express_checkout/api_signature" value="" />
4949
<field path="payment/paypal_express/merchant_id" value="" />
5050

51-
<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/business_account" value="" />
52-
<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/partner" value="" />
53-
<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/user" value="" />
54-
<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/pwd" value="" />
55-
<field path="payment/paypal_payment_gateways/paypal_payflowpro_with_express_checkout/paypal_payflow_required/paypal_payflow_api_settings/vendor" value="" />
51+
<field replace="payflow_pro_fraud_protection_enabled_business_account" value="" />
52+
<field replace="payflow_pro_fraud_protection_enabled_partner" value="" />
53+
<field replace="payflow_pro_fraud_protection_enabled_user" value="" />
54+
<field replace="payflow_pro_fraud_protection_enabled_pwd" value="" />
55+
<field replace="payflow_pro_fraud_protection_enabled_vendor" value="" />
56+
57+
<field replace="payflow_pro_business_account" value="" />
58+
<field replace="payflow_pro_partner" value="" />
59+
<field replace="payflow_pro_user" value="" />
60+
<field replace="payflow_pro_pwd" value="" />
61+
<field replace="payflow_pro_vendor" value="" />
62+
63+
<field replace="payflow_link_business_account_email" value="" />
64+
<field replace="payflow_link_partner" value="" />
65+
<field replace="payflow_link_user" value="" />
66+
<field replace="payflow_link_password" value="" />
67+
<field replace="payflow_link_vendor" value="" />
68+
69+
<field path="payment/paypal_group_all_in_one/payments_pro_hosted_solution_with_express_checkout/pphs_required_settings/pphs_required_settings_pphs/business_account" value="" />
70+
<field path="payment/paypal_group_all_in_one/payments_pro_hosted_solution_with_express_checkout/pphs_required_settings/pphs_required_settings_pphs/api_username" value="" />
71+
<field path="payment/paypal_group_all_in_one/payments_pro_hosted_solution_with_express_checkout/pphs_required_settings/pphs_required_settings_pphs/api_password" value="" />
72+
<field path="payment/paypal_group_all_in_one/payments_pro_hosted_solution_with_express_checkout/pphs_required_settings/pphs_required_settings_pphs/api_signature" value="" />
5673

5774
<field path="payment/paypal_alternative_payment_methods/express_checkout_us/express_checkout_required/express_checkout_required_express_checkout/business_account" value="" />
5875
<field path="payment/paypal_alternative_payment_methods/express_checkout_us/express_checkout_required/express_checkout_required_express_checkout/api_username" value="" />
5976
<field path="payment/paypal_alternative_payment_methods/express_checkout_us/express_checkout_required/express_checkout_required_express_checkout/api_password" value="" />
6077
<field path="payment/paypal_alternative_payment_methods/express_checkout_us/express_checkout_required/express_checkout_required_express_checkout/api_signature" value="" />
6178

62-
<field path="payment/paypal_payment_gateways/payflow_link_us/payflow_link_required/payflow_link_payflow_link/business_account" value="" />
63-
<field path="payment/paypal_payment_gateways/payflow_link_us/payflow_link_required/payflow_link_payflow_link/partner" value="" />
64-
<field path="payment/paypal_payment_gateways/payflow_link_us/payflow_link_required/payflow_link_payflow_link/user" value="" />
65-
<field path="payment/paypal_payment_gateways/payflow_link_us/payflow_link_required/payflow_link_payflow_link/pwd" value="" />
66-
<field path="payment/paypal_payment_gateways/payflow_link_us/payflow_link_required/payflow_link_payflow_link/vendor" value="" />
6779
</replace>

dev/tests/functional/lib/Magento/Mtf/Client/Element/DatepickerElement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ public function setValue($value)
6767
$date[1] = ltrim($date[1], '0');
6868
$this->find($this->datePickerButton, Locator::SELECTOR_XPATH)->click();
6969
$datapicker = $this->find($this->datePickerBlock, Locator::SELECTOR_XPATH);
70-
$datapicker->find($this->datePickerMonth, Locator::SELECTOR_XPATH, 'select')->setValue($date[0]);
7170
$datapicker->find($this->datePickerYear, Locator::SELECTOR_XPATH, 'select')->setValue($date[2]);
71+
$datapicker->find($this->datePickerMonth, Locator::SELECTOR_XPATH, 'select')->setValue($date[0]);
7272
$datapicker->find(sprintf($this->datePickerCalendar, $date[1]), Locator::SELECTOR_XPATH)->click();
7373
if ($datapicker->isVisible()) {
7474
$datapicker->find($this->datePickerButtonClose, Locator::SELECTOR_XPATH)->click();

dev/tests/functional/lib/Magento/Mtf/Constraint/AbstractAssertForm.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ protected function sortData(array $data)
118118

119119
/**
120120
* Sort multidimensional array by paths.
121-
* Pattern path: key/subKey::sorkKey.
122-
* Exapmle:
121+
* Pattern path: key/subKey::sortKey.
122+
* Example:
123123
* $data = [
124124
* 'custom_options' => [
125125
* 'options' => [

dev/tests/functional/tests/app/Magento/Authorizenet/Test/Block/Form/Cc.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

dev/tests/functional/tests/app/Magento/Authorizenet/Test/Block/Form/Cc.xml

Lines changed: 0 additions & 20 deletions
This file was deleted.

dev/tests/functional/tests/app/Magento/Authorizenet/Test/Fixture/CreditCardAuthorizenet.xml

Lines changed: 0 additions & 20 deletions
This file was deleted.

dev/tests/functional/tests/app/Magento/Authorizenet/Test/TestCase/OnePageCheckoutTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
<data name="prices" xsi:type="array">
1818
<item name="grandTotal" xsi:type="string">15.00</item>
1919
</data>
20-
<data name="creditCardClass" xsi:type="string">credit_card_authorizenet</data>
2120
<data name="payment/method" xsi:type="string">authorizenet_directpost</data>
22-
<data name="creditCard/dataset" xsi:type="string">visa_authorizenet</data>
21+
<data name="creditCard/dataset" xsi:type="string">visa_default</data>
2322
<data name="configData" xsi:type="string">authorizenet</data>
2423
<data name="status" xsi:type="string">Processing</data>
2524
<data name="tag" xsi:type="string">test_type:3rd_party_test, severity:S0</data>

dev/tests/functional/tests/app/Magento/Braintree/Test/Block/Form/Cc.php renamed to dev/tests/functional/tests/app/Magento/Braintree/Test/Block/Form/BraintreeCc.php

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,33 @@
99
use Magento\Mtf\Client\Locator;
1010
use Magento\Mtf\Client\Element\SimpleElement;
1111
use Magento\Mtf\Fixture\FixtureInterface;
12-
use Magento\Payment\Test\Block\Form\Cc as CreditCard;
12+
use Magento\Mtf\ObjectManager;
13+
use Magento\Payment\Test\Block\Form\PaymentCc;
1314

1415
/**
15-
* Class Cc
16-
* Form for filling credit card data for Braintree payment method
16+
* Form for filling credit card data for Braintree payment method.
1717
*/
18-
class Cc extends CreditCard
18+
class BraintreeCc extends PaymentCc
1919
{
2020
/**
21-
* Braintree iFrame locator
21+
* Braintree iFrame locator.
2222
*
2323
* @var array
2424
*/
2525
protected $braintreeForm = [
26-
"credit_card_number" => "#braintree-hosted-field-number",
27-
"credit_card_exp_month" => "#braintree-hosted-field-expirationMonth",
28-
"credit_card_exp_year" => "#braintree-hosted-field-expirationYear",
29-
"cvv" => "#braintree-hosted-field-cvv",
26+
"cc_number" => "#braintree-hosted-field-number",
27+
"cc_exp_month" => "#braintree-hosted-field-expirationMonth",
28+
"cc_exp_year" => "#braintree-hosted-field-expirationYear",
29+
"cc_cid" => "#braintree-hosted-field-cvv",
3030
];
3131

32+
/**
33+
* Fill Braintree credit card form.
34+
*
35+
* @param FixtureInterface $fixture
36+
* @param SimpleElement|null $element
37+
* @return void
38+
*/
3239
public function fill(FixtureInterface $fixture, SimpleElement $element = null)
3340
{
3441
$mapping = $this->dataMapping($fixture->getData());
@@ -40,7 +47,8 @@ function () use ($element, $iframe) {
4047
return $fieldElement->isVisible() ? true : null;
4148
}
4249
);
43-
$this->browser->switchToFrame(new Locator($iframe));
50+
$iframeLocator = ObjectManager::getInstance()->create(Locator::class, ['value' => $iframe]);
51+
$this->browser->switchToFrame($iframeLocator);
4452
$element = $this->browser->find('body');
4553
$this->browser->waitUntil(
4654
function () use ($element) {

dev/tests/functional/tests/app/Magento/Braintree/Test/Block/Form/Cc.xml renamed to dev/tests/functional/tests/app/Magento/Braintree/Test/Block/Form/BraintreeCc.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
-->
88
<mapping strict="0">
99
<fields>
10-
<credit_card_number>
10+
<cc_number>
1111
<selector>#credit-card-number</selector>
12-
</credit_card_number>
13-
<credit_card_exp_month>
12+
</cc_number>
13+
<cc_exp_month>
1414
<selector>#expiration-month</selector>
15-
</credit_card_exp_month>
16-
<credit_card_exp_year>
15+
</cc_exp_month>
16+
<cc_exp_year>
1717
<selector>#expiration-year</selector>
18-
</credit_card_exp_year>
19-
<cvv>
18+
</cc_exp_year>
19+
<cc_cid>
2020
<selector>#cvv</selector>
21-
</cvv>
21+
</cc_cid>
2222
</fields>
2323
</mapping>

0 commit comments

Comments
 (0)