Skip to content

Commit

Permalink
Merge branch '2.3-develop' of github.com:magento/graphql-ce into date…
Browse files Browse the repository at this point in the history
…-type-not-hide-formatting
  • Loading branch information
lenaorobei committed Oct 14, 2019
2 parents 295372e + 4321600 commit 063950f
Show file tree
Hide file tree
Showing 33 changed files with 270 additions and 96 deletions.
16 changes: 8 additions & 8 deletions app/code/Magento/Backend/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -482,22 +482,22 @@
<field id="base_url" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Base URL</label>
<backend_model>Magento\Config\Model\Config\Backend\Baseurl</backend_model>
<comment>Specify URL or {{base_url}} placeholder.</comment>
<comment><![CDATA[Specify URL or {{base_url}} placeholder.]]></comment>
</field>
<field id="base_link_url" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Base Link URL</label>
<backend_model>Magento\Config\Model\Config\Backend\Baseurl</backend_model>
<comment>May start with {{unsecure_base_url}} placeholder.</comment>
<comment><![CDATA[May start with {{unsecure_base_url}} placeholder.]]></comment>
</field>
<field id="base_static_url" translate="label comment" type="text" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Base URL for Static View Files</label>
<backend_model>Magento\Config\Model\Config\Backend\Baseurl</backend_model>
<comment>May be empty or start with {{unsecure_base_url}} placeholder.</comment>
<comment><![CDATA[May be empty or start with {{unsecure_base_url}} placeholder.]]></comment>
</field>
<field id="base_media_url" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Base URL for User Media Files</label>
<backend_model>Magento\Config\Model\Config\Backend\Baseurl</backend_model>
<comment>May be empty or start with {{unsecure_base_url}} placeholder.</comment>
<comment><![CDATA[May be empty or start with {{unsecure_base_url}} placeholder.]]></comment>
</field>
</group>
<group id="secure" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
Expand All @@ -506,22 +506,22 @@
<field id="base_url" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Secure Base URL</label>
<backend_model>Magento\Config\Model\Config\Backend\Baseurl</backend_model>
<comment>Specify URL or {{base_url}}, or {{unsecure_base_url}} placeholder.</comment>
<comment><![CDATA[Specify URL or {{base_url}}, or {{unsecure_base_url}} placeholder.]]></comment>
</field>
<field id="base_link_url" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Secure Base Link URL</label>
<backend_model>Magento\Config\Model\Config\Backend\Baseurl</backend_model>
<comment>May start with {{secure_base_url}} or {{unsecure_base_url}} placeholder.</comment>
<comment><![CDATA[May start with {{secure_base_url}} or {{unsecure_base_url}} placeholder.]]></comment>
</field>
<field id="base_static_url" translate="label comment" type="text" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Secure Base URL for Static View Files</label>
<backend_model>Magento\Config\Model\Config\Backend\Baseurl</backend_model>
<comment>May be empty or start with {{secure_base_url}}, or {{unsecure_base_url}} placeholder.</comment>
<comment><![CDATA[May be empty or start with {{secure_base_url}}, or {{unsecure_base_url}} placeholder.]]></comment>
</field>
<field id="base_media_url" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Secure Base URL for User Media Files</label>
<backend_model>Magento\Config\Model\Config\Backend\Baseurl</backend_model>
<comment>May be empty or start with {{secure_base_url}}, or {{unsecure_base_url}} placeholder.</comment>
<comment><![CDATA[May be empty or start with {{secure_base_url}}, or {{unsecure_base_url}} placeholder.]]></comment>
</field>
<field id="use_in_frontend" translate="label comment" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Use Secure URLs on Storefront</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Catalog\Controller\Adminhtml\Product;

use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;

/**
* Edit product
*/
class Edit extends \Magento\Catalog\Controller\Adminhtml\Product implements HttpGetActionInterface
{
/**
Expand Down Expand Up @@ -51,7 +55,7 @@ public function execute()
$productId = (int) $this->getRequest()->getParam('id');
$product = $this->productBuilder->build($this->getRequest());

if (($productId && !$product->getEntityId())) {
if ($productId && !$product->getEntityId()) {
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
$resultRedirect = $this->resultRedirectFactory->create();
$this->messageManager->addErrorMessage(__('This product doesn\'t exist.'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ public function setupAttributeMeta(ProductAttributeInterface $attribute, $groupC

// TODO: getAttributeModel() should not be used when MAGETWO-48284 is complete
$childData = $this->arrayManager->get($configPath, $meta, []);
if (($rules = $this->catalogEavValidationRules->build($this->getAttributeModel($attribute), $childData))) {
if ($rules = $this->catalogEavValidationRules->build($this->getAttributeModel($attribute), $childData)) {
$meta = $this->arrayManager->merge($configPath, $meta, ['validation' => $rules]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,13 @@
})(jQuery);
this.closeModal();
}
}]

}],
keyEventHandlers: {
enterKey: function (event) {
this.buttons[1].click();
event.preventDefault();
}
}
}).trigger('openModal');

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private function getCategoryUrlSuffix($storeId = null): string
CategoryUrlPathGenerator::XML_PATH_CATEGORY_URL_SUFFIX,
ScopeInterface::SCOPE_STORE,
$storeId
);
) ?? '';
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

declare(strict_types=1);

namespace Magento\Directory\Setup\Patch\Data;

use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\Patch\DataPatchInterface;

/**
* Class AddCountriesCaribbeanCuracaoKosovoSintMaarten
*
* @package Magento\Directory\Setup\Patch
*/
class AddCountriesCaribbeanCuracaoKosovoSintMaarten implements DataPatchInterface
{
/**
* @var ModuleDataSetupInterface
*/
private $moduleDataSetup;

/**
* AddCountriesCaribbeanCuracaoKosovoSintMaarten constructor.
* @param ModuleDataSetupInterface $moduleDataSetup
*/
public function __construct(
ModuleDataSetupInterface $moduleDataSetup
) {
$this->moduleDataSetup = $moduleDataSetup;
}

/**
* @inheritdoc
*/
public function apply()
{
/**
* Fill table directory/country
*/
$data = [
[
'country_id' => 'BQ',
'iso2_code' => 'BQ',
'iso3_code' => 'BES',
],
[
'country_id' => 'CW',
'iso2_code' => 'CW',
'iso3_code' => 'CUW',
],
[
'country_id' => 'SX',
'iso2_code' => 'SX',
'iso3_code' => 'SXM',
],
[
'country_id' => 'XK',
'iso2_code' => 'XK',
'iso3_code' => 'XKX',
],
];

$this->moduleDataSetup->getConnection()->insertOnDuplicate(
$this->moduleDataSetup->getTable('directory_country'),
$data
);
}

/**
* @inheritdoc
*/
public static function getDependencies()
{
return [
InitializeDirectoryData::class
];
}

/**
* @inheritdoc
*/
public function getAliases()
{
return [];
}
}
2 changes: 1 addition & 1 deletion app/code/Magento/Directory/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<general>
<country>
<optional_zip_countries>HK,IE,MO,PA,GB</optional_zip_countries>
<allow>AF,AL,DZ,AS,AD,AO,AI,AQ,AG,AR,AM,AW,AU,AT,AX,AZ,BS,BH,BD,BB,BY,BE,BZ,BJ,BM,BL,BT,BO,BA,BW,BV,BR,IO,VG,BN,BG,BF,BI,KH,CM,CA,CD,CV,KY,CF,TD,CL,CN,CX,CC,CO,KM,CG,CK,CR,HR,CU,CY,CZ,DK,DJ,DM,DO,EC,EG,SV,GQ,ER,EE,ET,FK,FO,FJ,FI,FR,GF,PF,TF,GA,GM,GE,DE,GG,GH,GI,GR,GL,GD,GP,GU,GT,GN,GW,GY,HT,HM,HN,HK,HU,IS,IM,IN,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RS,RU,RW,SH,KN,LC,PM,VC,WS,SM,ST,SA,SN,SC,SL,SG,SK,SI,SB,SO,ZA,GS,KR,ES,LK,SD,SR,SJ,SZ,SE,CH,SX,SY,TL,TW,TJ,TZ,TH,TG,TK,TO,TT,TN,TR,TM,TC,TV,VI,UG,UA,AE,GB,US,UM,UY,UZ,VU,VA,VE,VN,WF,EH,XK,YE,ZM,ZW</allow>
<default>US</default>
</country>
<locale>
Expand Down
5 changes: 4 additions & 1 deletion app/code/Magento/NewRelicReporting/Model/Apm/Deployments.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

use \Magento\Framework\HTTP\ZendClient;

/**
* Performs the request to make the deployment
*/
class Deployments
{
/**
Expand Down Expand Up @@ -88,7 +91,7 @@ public function setDeployment($description, $change = false, $user = false)
return false;
}

if (($response->getStatus() < 200 || $response->getStatus() > 210)) {
if ($response->getStatus() < 200 || $response->getStatus() > 210) {
$this->logger->warning('Deployment marker request did not send a 200 status code.');
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Persistent\Observer;

use Magento\Framework\Event\ObserverInterface;

/**
* Make persistent quote to be guest
*
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
*/
class MakePersistentQuoteGuestObserver implements ObserverInterface
{
/**
Expand Down Expand Up @@ -65,8 +71,8 @@ public function execute(\Magento\Framework\Event\Observer $observer)
/** @var $action \Magento\Persistent\Controller\Index */
$action = $observer->getEvent()->getControllerAction();
if ($action instanceof \Magento\Persistent\Controller\Index) {
if ((($this->_persistentSession->isPersistent() && !$this->_customerSession->isLoggedIn())
|| $this->_persistentData->isShoppingCartPersist())
if (($this->_persistentSession->isPersistent() && !$this->_customerSession->isLoggedIn())
|| $this->_persistentData->isShoppingCartPersist()
) {
$this->quoteManager->setGuest(true);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?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="AdminCreateOrderAddProductCheckboxTest">
<annotations>
<title value="Create Order in Admin and Add Product"/>
<stories value="Create order and add product using checkbox"/>
<description value="Create order in Admin panel, add product by clicking checkbox, and verify it is checked"/>
<features value="Sales"/>
<severity value="AVERAGE"/>
<group value="Sales"/>
</annotations>

<before>
<!-- Create simple customer -->
<createData entity="Simple_US_Customer_CA" stepKey="createSimpleCustomer"/>

<!-- Create simple product -->
<createData entity="ApiProductWithDescription" stepKey="createSimpleProduct"/>

<!-- Login to Admin Panel -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>

<!-- Initiate create new order -->
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrderWithExistingCustomer">
<argument name="customer" value="$$createSimpleCustomer$$"/>
</actionGroup>

<click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
<fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="$$createSimpleProduct.sku$$" stepKey="fillSkuFilterBundle"/>
<click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchBundle"/>
<scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/>
<checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectProduct"/>
<seeCheckboxIsChecked selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="verifyProductChecked"/>

<after>
<actionGroup ref="logout" stepKey="logout"/>
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
<deleteData createDataKey="createSimpleCustomer" stepKey="deleteSimpleCustomer"/>
</after>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ $_order = $block->getOrder() ?>
</tr>
<?php endif; ?>
<tr bgcolor="#DEE5E8">
<td colspan="2" align="right" style="padding:3px 9px"><strong><big><?= $block->escapeHtml(__('Grand Total')) ?></big></strong></td>
<td align="right" style="padding:6px 9px"><strong><big><?= /* @noEscape */ $_order->formatPrice($_order->getGrandTotal()) ?></big></strong></td>
<td colspan="2" align="right" style="padding:3px 9px"><strong style="font-size: larger"><?= $block->escapeHtml(__('Grand Total')) ?></strong></td>
<td align="right" style="padding:6px 9px"><strong style="font-size: larger"><?= /* @noEscape */ $_order->formatPrice($_order->getGrandTotal()) ?></strong></td>
</tr>
</tfoot>
</table>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
?>
<?php if ($block->getCanDisplayTotalDue()) : ?>
<tr>
<td class="label"><big><strong><?= $block->escapeHtml(__('Total Due')) ?></strong></big></td>
<td class="emph"><big><?= /* @noEscape */ $block->displayPriceAttribute('total_due', true) ?></big></td>
<td class="label"><strong style="font-size: larger"><?= $block->escapeHtml(__('Total Due')) ?></strong></td>
<td class="emph" style="font-size: larger"><?= /* @noEscape */ $block->displayPriceAttribute('total_due', true) ?></td>
</tr>
<?php endif; ?>
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

<tr>
<td class="label">
<strong><big>
<strong style="font-size: larger">
<?php if ($block->getGrandTotalTitle()) : ?>
<?= $block->escapeHtml($block->getGrandTotalTitle()) ?>
<?php else : ?>
<?= $block->escapeHtml(__('Grand Total')) ?>
<?php endif; ?>
</big></strong>
</strong>
</td>
<td class="emph"><big><?= /* @noEscape */ $block->displayPriceAttribute('grand_total', true) ?></big></td>
<td class="emph" style="font-size: larger"><?= /* @noEscape */ $block->displayPriceAttribute('grand_total', true) ?></td>
</tr>
Loading

0 comments on commit 063950f

Please sign in to comment.