Skip to content
This repository has been archived by the owner on May 20, 2019. It is now read-only.

Commit

Permalink
Merge pull request #6 from magento/2.3-develop
Browse files Browse the repository at this point in the history
update branch
  • Loading branch information
ravi-chandra3197 authored Dec 8, 2018
2 parents d116aec + 35c4f04 commit 37b2eb6
Show file tree
Hide file tree
Showing 193 changed files with 3,390 additions and 1,219 deletions.
3 changes: 3 additions & 0 deletions app/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
/* 'composer install' validation */
if (file_exists($vendorAutoload)) {
$composerAutoloader = include $vendorAutoload;
} else if (file_exists("{$vendorDir}/autoload.php")) {
$vendorAutoload = "{$vendorDir}/autoload.php";
$composerAutoloader = include $vendorAutoload;
} else {
throw new \Exception(
'Vendor autoload is not found. Please run \'composer install\' under application root directory.'
Expand Down
10 changes: 5 additions & 5 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
#ini_set('display_errors', 1);

/* PHP version validation */
if (!defined('PHP_VERSION_ID') || !(PHP_VERSION_ID === 70002 || PHP_VERSION_ID === 70004 || PHP_VERSION_ID >= 70006)) {
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 70103) {
if (PHP_SAPI == 'cli') {
echo 'Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. ' .
'Please read http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html';
echo 'Magento supports PHP 7.1.3 or later. ' .
'Please read https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html';
} else {
echo <<<HTML
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
<p>Magento supports PHP 7.0.2, 7.0.4, and 7.0.6 or later. Please read
<a target="_blank" href="http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html">
<p>Magento supports PHP 7.1.3 or later. Please read
<a target="_blank" href="https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html">
Magento System Requirements</a>.
</div>
HTML;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
<severity value="MAJOR"/>
<testCaseId value="MAGETWO-63898"/>
<group value="analytics"/>
<skip>
<issueId value="MAGETWO-96223"/>
</skip>
</annotations>

<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ $fraudDetails = $payment->getAdditionalInformation('fraud_details');
<?php endif; ?>

<?php if(!empty($fraudDetails['fraud_filters'])): ?>
<b><?= $block->escapeHtml(__('Fraud Filters')) ?>:
</b></br>
<strong><?= $block->escapeHtml(__('Fraud Filters')) ?>:
</strong></br>
<?php foreach($fraudDetails['fraud_filters'] as $filter): ?>
<?= $block->escapeHtml($filter['name']) ?>:
<?= $block->escapeHtml($filter['action']) ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
<testCaseId value="MAGETWO-94176"/>
<group value="backup"/>
<skip>
<issueId value="MQE-1187"/>
<issueId value="DEVOPS-3512"/>
<issueId value="MC-5807"/>
</skip>
</annotations>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">

<actionGroup name="AdminOrderBraintreeFillActionGroup">
<!--Select Braintree Payment method on Admin Order Create Page-->
<click stepKey="chooseBraintree" selector="{{NewOrderSection.creditCardBraintree}}"/>
<waitForPageLoad stepKey="waitForBraintreeConfigs" time="5"/>
<click stepKey="openCardTypes" selector="{{NewOrderSection.openCardTypes}}"/>
<waitForPageLoad stepKey="waitForCardTypes" time="3"/>
<click stepKey="chooseCardType" selector="{{NewOrderSection.masterCard}}"/>
<waitForPageLoad stepKey="waitForCardSelected" time="3"/>

<!--Choose Master Card from drop-down list-->
<switchToIFrame stepKey="switchToCardNumber" selector="{{NewOrderSection.cardFrame}}"/>
<fillField stepKey="fillCardNumber" selector="{{NewOrderSection.creditCardNumber}}" userInput="{{PaymentAndShippingInfo.cardNumber}}"/>
<waitForPageLoad stepKey="waitForFillCardNumber" time="1"/>
<switchToIFrame stepKey="switchBackFromCard"/>

<!--Fill expire date-->
<switchToIFrame stepKey="switchToExpirationMonth" selector="{{NewOrderSection.monthFrame}}"/>
<fillField stepKey="fillMonth" selector="{{NewOrderSection.expirationMonth}}" userInput="{{PaymentAndShippingInfo.month}}"/>
<waitForPageLoad stepKey="waitForFillMonth" time="1"/>
<switchToIFrame stepKey="switchBackFromMonth"/>
<switchToIFrame stepKey="switchToExpirationYear" selector="{{NewOrderSection.yearFrame}}"/>
<fillField stepKey="fillYear" selector="{{NewOrderSection.expirationYear}}" userInput="{{PaymentAndShippingInfo.year}}"/>
<waitForPageLoad stepKey="waitForFillYear" time="1"/>
<switchToIFrame stepKey="switchBackFromYear"/>

<!--Fill CVW code-->
<switchToIFrame stepKey="switchToCVV" selector="{{NewOrderSection.cvvFrame}}"/>
<fillField stepKey="fillCVV" selector="{{NewOrderSection.cvv}}" userInput="{{PaymentAndShippingInfo.cvv}}"/>
<wait stepKey="waitForFillCVV" time="1"/>
<switchToIFrame stepKey="switchBackFromCVV"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<requiredEntity type="merchant_id">MerchantId</requiredEntity>
<requiredEntity type="public_key">PublicKey</requiredEntity>
<requiredEntity type="private_key">PrivateKey</requiredEntity>
<requiredEntity type="active">Status</requiredEntity>
</entity>
<entity name="BraintreeTitle" type="title">
<data key="value">Credit Card (Braintree)</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<element name="sales" type="button" selector="//li[@id='menu-magento-sales-sales']"/>
<element name="catalog" type="button" selector="//li[@id='menu-magento-catalog-catalog']"/>
<element name="customers" type="button" selector="//li[@id='menu-magento-customer-customer']"/>
<element name="marketing" type="button" selector="//li[@id='//li[@id='menu-magento-backend-marketing']']"/>
<element name="marketing" type="button" selector="//li[@id='menu-magento-backend-marketing']"/>
<element name="content" type="button" selector="//li[@id='menu-magento-backend-content']"/>
<element name="reports" type="button" selector="//li[@id='menu-magento-reports-report']"/>
<element name="stores" type="button" selector="//li[@id='menu-magento-backend-stores']"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="CreateAdminOrderPayedWithOnlinePaymentIncludingTaxAndDiscount">
<annotations>
<features value="Braintree"/>
<stories value="Get access to a New Credit Memo Page from Invocie for Order payed with online payment via Admin"/>
<title value="Admin should be able to open a New Credit Memo Page from Invoice Page for Order with tax and discount and payed using online payment method"/>
<description value="Admin should be able to open a New Credit Memo Page from Invoice Page for Order with tax and discount and payed using online payment method"/>
<severity value="CRITICAL"/>
<testCaseId value="MAGETWO-94472"/>
<group value="braintree"/>
</annotations>

<before>
<!--Create Default Category-->
<createData entity="SimpleSubCategory" stepKey="createCategory"/>

<!--Create Simple product-->
<createData entity="_defaultProduct" stepKey="simpleProduct">
<requiredEntity createDataKey="createCategory"/>
</createData>

<!--Create Tax Rule is based on default tax rates (Stores>Tax Rule) US-CA-*-Rate 1 = 8.2500 US-NY-*-Rate 1 = 8.3750 -->
<createData entity="SimpleTaxRule" stepKey="createTaxRule"/>

<!--Configure Braintree Payment method-->
<createData entity="BraintreeConfig" stepKey="BraintreeConfigurationData"/>
<createData entity="CustomBraintreeConfigurationData" stepKey="enableBraintree"/>

<!--Create Retailer Customer with US_CA address-->
<createData entity="Simple_US_Customer_CA" stepKey="simpleCustomer">
<field key="group_id">3</field>
</createData>

<!--Login as Admin User-->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>

<after>
<!--Delete Cart Price Rule-->
<actionGroup ref="AdminDeleteCartPriceRuleForRetailerActionGroup" stepKey="deleteSalesRule"/>

<!--Set to default configuration Tax Shipping Class-->
<actionGroup ref="setDefaultShippingTaxClass" stepKey="setdefaultClass"/>

<!--Delete Simple Sub Category-->
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>

<!--Delete Simple Product-->
<deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/>

<!-- Delete Tax Rule -->
<deleteData createDataKey="createTaxRule" stepKey="deleteTaxRule"/>

<!-- Rollback Braintree to Default -->
<createData entity="RollBackCustomBraintreeConfigurationData" stepKey="rollbackBraintreeConfig"/>

<!--Delete Customer-->
<deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/>

<!--Log Out-->
<actionGroup ref="logout" stepKey="logout"/>
</after>

<!-- Create a cart price rule with 10% discount for whole cart -->
<click selector="{{AdminMenuSection.marketing}}" stepKey="clickOnMarketing" />
<waitForPageLoad stepKey="waitForMarketing" time="3"/>
<click selector="{{CartPriceRulesSubmenuSection.cartPriceRules}}" stepKey="clickOnCartPriceRules"/>
<waitForPageLoad stepKey="waitForCartPriceRules" time="3"/>
<click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/>
<fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{SimpleSalesRule.name}}" stepKey="fillRuleName"/>
<selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsites"/>
<actionGroup ref="selectRetailerCustomerGroup" stepKey="selectRetailerCustomerGroup"/>
<click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/>
<selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="Percent of product price discount" stepKey="selectActionType"/>
<fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="10" stepKey="fillDiscountAmount"/>
<click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForCartRuleLoad" time="3"/>
<see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/>

<!--Set Taxable Goods for Shipping Tax Class-->
<actionGroup ref="changeShippingTaxClass" stepKey="changeShippingTaxClass"/>

<!--Adding Special price to product-->
<amOnPage url="{{AdminProductEditPage.url($$simpleProduct.id$$)}}" stepKey="openAdminProductEditPage"/>
<actionGroup ref="AddSpecialPriceToProductActionGroup" stepKey="addSpecialPrice"/>
<actionGroup ref="saveProductForm" stepKey="saveProductForm"/>

<!--Create New Order-->
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrderWithExistingCustomer">
<argument name="customer" value="$$simpleCustomer$$"/>
</actionGroup>

<!--Add a product to order-->
<actionGroup ref="addSimpleProductToOrder" stepKey="addProductToOrder">
<argument name="product" value="$$simpleProduct$$"/>
</actionGroup>

<!--Select FlatRate shipping method-->
<actionGroup ref="orderSelectFlatRateShipping" stepKey="orderSelectFlatRateShippingMethod"/>

<!--Select Braintree online Payment method -->
<actionGroup ref="AdminOrderBraintreeFillActionGroup" stepKey="selectCreditCardPayment"/>

<!--Submit Order-->
<click stepKey="submitOrder" selector="{{NewOrderSection.submitOrder}}"/>
<waitForPageLoad stepKey="waitForSubmitOrder" time="5"/>
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="You created the order." stepKey="seeOrderSuccessMessage" after="waitForSubmitOrder"/>

<!-- Create New invoice-->
<actionGroup ref="adminFastCreateInvoice" stepKey="createInvoice"/>

<!--Get access to Credit Memo page from Invoice page-->
<click selector="{{AdminInvoiceMainActionsSection.openNewCreditMemoFromInvoice}}" stepKey="clickCreateNewCreditMemo"/>
<waitForPageLoad stepKey="waitForLoadNewCreditMemoPage" time="5"/>
<see selector="{{AdminCreditMemoOrderInformationSection.orderStatus}}" userInput="Processing" stepKey="seeNewCreditMemo"/>
</test>
</tests>
4 changes: 2 additions & 2 deletions app/code/Magento/Bundle/Model/Product/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -823,11 +823,11 @@ private function recursiveIntval(array $array)
private function multiToFlatArray(array $array)
{
$flatArray = [];
foreach ($array as $key => $value) {
foreach ($array as $value) {
if (is_array($value)) {
$flatArray = array_merge($flatArray, $this->multiToFlatArray($value));
} else {
$flatArray[$key] = $value;
$flatArray[] = $value;
}
}

Expand Down
7 changes: 6 additions & 1 deletion app/code/Magento/Catalog/Block/Product/AbstractProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public function __construct(\Magento\Catalog\Block\Product\Context $context, arr

/**
* Retrieve url for add product to cart
*
* Will return product view page URL if product has required options
*
* @param \Magento\Catalog\Model\Product $product
Expand Down Expand Up @@ -473,7 +474,9 @@ public function getProductDetailsHtml(\Magento\Catalog\Model\Product $product)
}

/**
* @param null $type
* Get the renderer that will be used to render the details block
*
* @param string|null $type
* @return bool|\Magento\Framework\View\Element\AbstractBlock
*/
public function getDetailsRenderer($type = null)
Expand All @@ -489,6 +492,8 @@ public function getDetailsRenderer($type = null)
}

/**
* Return the list of details
*
* @return \Magento\Framework\View\Element\RendererList
*/
protected function getDetailsRendererList()
Expand Down
Loading

0 comments on commit 37b2eb6

Please sign in to comment.