diff --git a/README.md b/README.md index 91d0d902cb61..5fa6150d2be0 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ Please see LICENSE_EE.txt for the full text of the MEE License or visit https:// ## Community Engineering Slack -To connect with Magento and the Community, join us on the [Magento Community Engineering Slack](https://magentocommeng.slack.com). If you are interested in joining Slack, or a specific channel, send us a request at [engcom@adobe.com](mailto:engcom@adobe.com) or [self signup](https://tinyurl.com/engcom-slack). +To connect with Magento and the Community, join us on the [Magento Community Engineering Slack](https://magentocommeng.slack.com). If you are interested in joining Slack, or a specific channel, send us a request at [engcom@adobe.com](mailto:engcom@adobe.com) or [self signup](https://opensource.magento.com/slack). We have channels for each project. These channels are recommended for new members: diff --git a/app/code/Magento/Authorizenet/Test/Unit/Model/DirectpostTest.php b/app/code/Magento/Authorizenet/Test/Unit/Model/DirectpostTest.php index 95c67f67852d..a1547a056346 100644 --- a/app/code/Magento/Authorizenet/Test/Unit/Model/DirectpostTest.php +++ b/app/code/Magento/Authorizenet/Test/Unit/Model/DirectpostTest.php @@ -3,8 +3,19 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Authorizenet\Test\Unit\Model; +use Magento\Authorizenet\Helper\Backend\Data; +use Magento\Authorizenet\Helper\Data as HelperData; +use Magento\Authorizenet\Model\Directpost\Response; +use Magento\Authorizenet\Model\Directpost\Response\Factory as ResponseFactory; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\HTTP\ZendClient; +use Magento\Framework\HTTP\ZendClientFactory; +use Magento\Payment\Model\InfoInterface; +use Magento\Payment\Model\Method\ConfigInterface; use Magento\Sales\Api\PaymentFailuresInterface; use Magento\Framework\Simplexml\Element; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; @@ -13,118 +24,118 @@ use Magento\Authorizenet\Model\Request; use Magento\Authorizenet\Model\Directpost\Request\Factory; use Magento\Sales\Model\Order; +use Magento\Sales\Model\Order\Payment; +use Magento\Sales\Model\Order\Payment\Transaction; use Magento\Sales\Model\Order\Payment\Transaction\Repository as TransactionRepository; +use PHPUnit\Framework\MockObject_MockBuilder; +use PHPUnit\Framework\TestCase; +use PHPUnit_Framework_MockObject_MockObject; +use ReflectionClass; /** * Class DirectpostTest * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class DirectpostTest extends \PHPUnit\Framework\TestCase +class DirectpostTest extends TestCase { const TOTAL_AMOUNT = 100.02; const INVOICE_NUM = '00000001'; const TRANSACTION_ID = '41a23x34fd124'; /** - * @var \Magento\Authorizenet\Model\Directpost + * @var Directpost */ protected $directpost; /** - * @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ScopeConfigInterface|PHPUnit_Framework_MockObject_MockObject */ protected $scopeConfigMock; /** - * @var \Magento\Payment\Model\InfoInterface|\PHPUnit_Framework_MockObject_MockObject + * @var InfoInterface|PHPUnit_Framework_MockObject_MockObject */ protected $paymentMock; /** - * @var \Magento\Authorizenet\Helper\Data|\PHPUnit_Framework_MockObject_MockObject + * @var HelperData|PHPUnit_Framework_MockObject_MockObject */ protected $dataHelperMock; /** - * @var \Magento\Authorizenet\Model\Directpost\Response\Factory|\PHPUnit_Framework_MockObject_MockObject + * @var ResponseFactory|PHPUnit_Framework_MockObject_MockObject */ protected $responseFactoryMock; /** - * @var TransactionRepository|\PHPUnit_Framework_MockObject_MockObject + * @var TransactionRepository|PHPUnit_Framework_MockObject_MockObject */ protected $transactionRepositoryMock; /** - * @var \Magento\Authorizenet\Model\Directpost\Response|\PHPUnit_Framework_MockObject_MockObject + * @var Response|PHPUnit_Framework_MockObject_MockObject */ protected $responseMock; /** - * @var TransactionService|\PHPUnit_Framework_MockObject_MockObject + * @var TransactionService|PHPUnit_Framework_MockObject_MockObject */ protected $transactionServiceMock; /** - * @var \Magento\Framework\HTTP\ZendClient|\PHPUnit_Framework_MockObject_MockObject + * @var ZendClient|PHPUnit_Framework_MockObject_MockObject */ protected $httpClientMock; /** - * @var \Magento\Authorizenet\Model\Directpost\Request\Factory|\PHPUnit_Framework_MockObject_MockObject + * @var Factory|PHPUnit_Framework_MockObject_MockObject */ protected $requestFactory; /** - * @var PaymentFailuresInterface|\PHPUnit_Framework_MockObject_MockObject + * @var PaymentFailuresInterface|PHPUnit_Framework_MockObject_MockObject */ private $paymentFailures; + /** + * @var ZendClientFactory|PHPUnit_Framework_MockObject_MockObject + */ + private $httpClientFactoryMock; + /** * @inheritdoc */ protected function setUp() { - $this->scopeConfigMock = $this->getMockBuilder(\Magento\Framework\App\Config\ScopeConfigInterface::class) - ->getMock(); - $this->paymentMock = $this->getMockBuilder(\Magento\Sales\Model\Order\Payment::class) - ->disableOriginalConstructor() - ->setMethods([ - 'getOrder', 'getId', 'setAdditionalInformation', 'getAdditionalInformation', - 'setIsTransactionDenied', 'setIsTransactionClosed', 'decrypt', 'getCcLast4', - 'getParentTransactionId', 'getPoNumber' - ]) - ->getMock(); - $this->dataHelperMock = $this->getMockBuilder(\Magento\Authorizenet\Helper\Data::class) - ->disableOriginalConstructor() - ->getMock(); - + $this->initPaymentMock(); $this->initResponseFactoryMock(); + $this->initHttpClientMock(); - $this->transactionRepositoryMock = $this->getMockBuilder( - \Magento\Sales\Model\Order\Payment\Transaction\Repository::class - ) + $this->scopeConfigMock = $this->getMockBuilder(ScopeConfigInterface::class)->getMock(); + $this->dataHelperMock = $this->getMockBuilder(HelperData::class)->disableOriginalConstructor()->getMock(); + $this->transactionRepositoryMock = $this->getMockBuilder(TransactionRepository::class) ->disableOriginalConstructor() ->setMethods(['getByTransactionId']) ->getMock(); - - $this->transactionServiceMock = $this->getMockBuilder(\Magento\Authorizenet\Model\TransactionService::class) + $this->transactionServiceMock = $this->getMockBuilder(TransactionService::class) ->disableOriginalConstructor() ->setMethods(['getTransactionDetails']) ->getMock(); - - $this->paymentFailures = $this->getMockBuilder( - PaymentFailuresInterface::class - ) + $this->paymentFailures = $this->getMockBuilder(PaymentFailuresInterface::class) ->disableOriginalConstructor() ->getMock(); - - $this->requestFactory = $this->getRequestFactoryMock(); - $httpClientFactoryMock = $this->getHttpClientFactoryMock(); + $this->requestFactory = $this->getMockBuilder(Factory::class) + ->disableOriginalConstructor() + ->setMethods(['create']) + ->getMock(); + $this->httpClientFactoryMock = $this->getMockBuilder(ZendClientFactory::class) + ->disableOriginalConstructor() + ->setMethods(['create']) + ->getMock(); $helper = new ObjectManagerHelper($this); $this->directpost = $helper->getObject( - \Magento\Authorizenet\Model\Directpost::class, + Directpost::class, [ 'scopeConfig' => $this->scopeConfigMock, 'dataHelper' => $this->dataHelperMock, @@ -132,18 +143,97 @@ protected function setUp() 'responseFactory' => $this->responseFactoryMock, 'transactionRepository' => $this->transactionRepositoryMock, 'transactionService' => $this->transactionServiceMock, - 'httpClientFactory' => $httpClientFactoryMock, + 'httpClientFactory' => $this->httpClientFactoryMock, 'paymentFailures' => $this->paymentFailures, ] ); } + /** + * Create mock for response factory + * + * @return void + */ + private function initResponseFactoryMock() + { + $this->responseFactoryMock = $this->getMockBuilder(ResponseFactory::class) + ->disableOriginalConstructor() + ->getMock(); + $this->responseMock = $this->getMockBuilder(Response::class) + ->setMethods( + [ + 'isValidHash', + 'getXTransId', + 'getXResponseCode', + 'getXResponseReasonCode', + 'getXResponseReasonText', + 'getXAmount', + 'setXResponseCode', + 'setXResponseReasonCode', + 'setXAvsCode', + 'setXResponseReasonText', + 'setXTransId', + 'setXInvoiceNum', + 'setXAmount', + 'setXMethod', + 'setXType', + 'setData', + 'getData', + 'setXAccountNumber', + '__wakeup' + ] + ) + ->disableOriginalConstructor() + ->getMock(); + + $this->responseFactoryMock->expects($this->any())->method('create')->willReturn($this->responseMock); + } + + /** + * Create mock for payment + * + * @return void + */ + private function initPaymentMock() + { + $this->paymentMock = $this->getMockBuilder(Payment::class) + ->disableOriginalConstructor() + ->setMethods( + [ + 'getOrder', + 'setAmount', + 'setAnetTransType', + 'setXTransId', + 'getId', + 'setAdditionalInformation', + 'getAdditionalInformation', + 'setIsTransactionDenied', + 'setIsTransactionClosed', + 'decrypt', + 'getCcLast4', + 'getParentTransactionId', + 'getPoNumber' + ] + ) + ->getMock(); + } + + /** + * Create a mock for http client + * + * @return void + */ + private function initHttpClientMock() + { + $this->httpClientMock = $this->getMockBuilder(ZendClient::class) + ->disableOriginalConstructor() + ->setMethods(['request', 'getBody', '__wakeup']) + ->getMock(); + } + public function testGetConfigInterface() { - $this->assertInstanceOf( - \Magento\Payment\Model\Method\ConfigInterface::class, - $this->directpost->getConfigInterface() - ); + $this->assertInstanceOf(ConfigInterface::class, $this->directpost->getConfigInterface()); } public function testGetConfigValue() @@ -162,7 +252,7 @@ public function testSetDataHelper() $storeId = 'store-id'; $expectedResult = 'relay-url'; - $helperDataMock = $this->getMockBuilder(\Magento\Authorizenet\Helper\Backend\Data::class) + $helperDataMock = $this->getMockBuilder(Data::class) ->disableOriginalConstructor() ->getMock(); @@ -179,7 +269,7 @@ public function testAuthorize() { $paymentAction = 'some_action'; - $this->scopeConfigMock->expects($this->any()) + $this->scopeConfigMock->expects($this->once()) ->method('getValue') ->with('payment/authorizenet_directpost/payment_action', 'store', null) ->willReturn($paymentAction); @@ -190,11 +280,143 @@ public function testAuthorize() $this->directpost->authorize($this->paymentMock, 10); } + /** + * @dataProvider dataProviderCaptureWithInvalidAmount + * @expectedExceptionMessage Invalid amount for capture. + * @expectedException \Magento\Framework\Exception\LocalizedException + * + * @param int $invalidAmount + */ + public function testCaptureWithInvalidAmount($invalidAmount) + { + $this->directpost->capture($this->paymentMock, $invalidAmount); + } + + /** + * @return array + */ + public function dataProviderCaptureWithInvalidAmount() + { + return [ + [0], + [0.000], + [-1.000], + [-1], + [null], + ]; + } + + /** + * Test capture has parent transaction id. + * + * @expectedException \Magento\Framework\Exception\LocalizedException + */ + public function testCaptureHasParentTransactionId() + { + $amount = 10; + + $this->paymentMock->expects($this->once())->method('setAmount')->with($amount); + $this->paymentMock->expects($this->exactly(2))->method('getParentTransactionId')->willReturn(1); + $this->paymentMock->expects($this->once())->method('setAnetTransType')->willReturn('PRIOR_AUTH_CAPTURE'); + + $this->paymentMock->expects($this->once())->method('getId')->willReturn(1); + $orderMock = $this->getOrderMock(); + $orderMock->expects($this->once())->method('getId')->willReturn(1); + $this->paymentMock->expects($this->once())->method('getOrder')->willReturn($orderMock); + + $transactionMock = $this->getMockBuilder(Transaction::class)->disableOriginalConstructor()->getMock(); + $this->transactionRepositoryMock->expects($this->once()) + ->method('getByTransactionId') + ->with(1, 1, 1) + ->willReturn($transactionMock); + + $this->paymentMock->expects($this->once())->method('setXTransId'); + $this->responseMock->expects($this->once())->method('getData')->willReturn([1]); + + $this->directpost->capture($this->paymentMock, 10); + } + + /** + * @@expectedException \Magento\Framework\Exception\LocalizedException + */ + public function testCaptureWithoutParentTransactionId() + { + $amount = 10; + + $this->paymentMock->expects($this->once())->method('setAmount')->with($amount); + $this->paymentMock->expects($this->once())->method('getParentTransactionId')->willReturn(null); + $this->responseMock->expects($this->once())->method('getData')->willReturn([1]); + + $this->directpost->capture($this->paymentMock, 10); + } + + public function testCaptureWithoutParentTransactionIdWithoutData() + { + $amount = 10; + + $this->paymentMock->expects($this->once())->method('setAmount')->with($amount); + $this->paymentMock->expects($this->exactly(2))->method('getParentTransactionId')->willReturn(null); + $this->responseMock->expects($this->once())->method('getData')->willReturn([]); + + $this->paymentMock->expects($this->once()) + ->method('setIsTransactionClosed') + ->with(0) + ->willReturnSelf(); + + $this->httpClientFactoryMock->expects($this->once())->method('create')->willReturn($this->httpClientMock); + $this->httpClientMock->expects($this->once())->method('request')->willReturnSelf(); + + $this->buildRequestTest(); + $this->postRequestTest(); + + $this->directpost->capture($this->paymentMock, 10); + } + + private function buildRequestTest() + { + $orderMock = $this->getOrderMock(); + $orderMock->expects($this->once())->method('getStoreId')->willReturn(1); + $orderMock->expects($this->exactly(2))->method('getIncrementId')->willReturn(self::INVOICE_NUM); + $this->paymentMock->expects($this->once())->method('getOrder')->willReturn($orderMock); + + $this->addRequestMockToRequestFactoryMock(); + } + + private function postRequestTest() + { + $this->httpClientFactoryMock->expects($this->once())->method('create')->willReturn($this->httpClientMock); + $this->httpClientMock->expects($this->once())->method('request')->willReturnSelf(); + $this->responseMock->expects($this->once())->method('setXResponseCode')->willReturnSelf(); + $this->responseMock->expects($this->once())->method('setXResponseReasonCode')->willReturnSelf(); + $this->responseMock->expects($this->once())->method('setXResponseReasonText')->willReturnSelf(); + $this->responseMock->expects($this->once())->method('setXAvsCode')->willReturnSelf(); + $this->responseMock->expects($this->once())->method('setXTransId')->willReturnSelf(); + $this->responseMock->expects($this->once())->method('setXInvoiceNum')->willReturnSelf(); + $this->responseMock->expects($this->once())->method('setXAmount')->willReturnSelf(); + $this->responseMock->expects($this->once())->method('setXMethod')->willReturnSelf(); + $this->responseMock->expects($this->once())->method('setXType')->willReturnSelf(); + $this->responseMock->expects($this->once())->method('setData')->willReturnSelf(); + + $response = $this->getRefundResponseBody( + Directpost::RESPONSE_CODE_APPROVED, + Directpost::RESPONSE_REASON_CODE_APPROVED, + 'Successful' + ); + $this->httpClientMock->expects($this->once())->method('getBody')->willReturn($response); + $this->responseMock->expects($this->once()) + ->method('getXResponseCode') + ->willReturn(Directpost::RESPONSE_CODE_APPROVED); + $this->responseMock->expects($this->once()) + ->method('getXResponseReasonCode') + ->willReturn(Directpost::RESPONSE_REASON_CODE_APPROVED); + $this->dataHelperMock->expects($this->never())->method('wrapGatewayError'); + } + public function testGetCgiUrl() { $url = 'cgi/url'; - $this->scopeConfigMock->expects($this->any()) + $this->scopeConfigMock->expects($this->once()) ->method('getValue') ->with('payment/authorizenet_directpost/cgi_url', 'store', null) ->willReturn($url); @@ -204,7 +426,7 @@ public function testGetCgiUrl() public function testGetCgiUrlWithEmptyConfigValue() { - $this->scopeConfigMock->expects($this->any()) + $this->scopeConfigMock->expects($this->once()) ->method('getValue') ->with('payment/authorizenet_directpost/cgi_url', 'store', null) ->willReturn(null); @@ -218,7 +440,7 @@ public function testGetRelayUrl() $url = 'relay/url'; $this->directpost->setData('store', $storeId); - $this->dataHelperMock->expects($this->any()) + $this->dataHelperMock->expects($this->exactly(2)) ->method('getRelayUrl') ->with($storeId) ->willReturn($url); @@ -268,7 +490,7 @@ public function testValidateResponseFailure() */ protected function prepareTestValidateResponse($transMd5, $login, $isValidHash) { - $this->scopeConfigMock->expects($this->any()) + $this->scopeConfigMock->expects($this->exactly(2)) ->method('getValue') ->willReturnMap( [ @@ -276,7 +498,7 @@ protected function prepareTestValidateResponse($transMd5, $login, $isValidHash) ['payment/authorizenet_directpost/login', 'store', null, $login] ] ); - $this->responseMock->expects($this->any()) + $this->responseMock->expects($this->exactly(1)) ->method('isValidHash') ->with($transMd5, $login) ->willReturn($isValidHash); @@ -328,6 +550,20 @@ public function checkResponseCodeSuccessDataProvider() ]; } + /** + * Checks response failures behaviour. + * + * @return void + * @expectedException \Magento\Framework\Exception\LocalizedException + */ + public function testCheckResponseCodeFailureDefault() + { + $responseCode = 999999; + $this->responseMock->expects($this->once())->method('getXResponseCode')->willReturn($responseCode); + + $this->directpost->checkResponseCode(); + } + /** * Checks response failures behaviour. * @@ -338,34 +574,24 @@ public function checkResponseCodeSuccessDataProvider() * @expectedException \Magento\Framework\Exception\LocalizedException * @dataProvider checkResponseCodeFailureDataProvider */ - public function testCheckResponseCodeFailure(int $responseCode, int $failuresHandlerCalls): void + public function testCheckResponseCodeFailureDeclinedOrError(int $responseCode, int $failuresHandlerCalls): void { $reasonText = 'reason text'; $this->responseMock->expects($this->once()) ->method('getXResponseCode') ->willReturn($responseCode); - $this->responseMock->expects($this->any()) - ->method('getXResponseReasonText') - ->willReturn($reasonText); - $this->dataHelperMock->expects($this->any()) + $this->responseMock->expects($this->once())->method('getXResponseReasonText')->willReturn($reasonText); + $this->dataHelperMock->expects($this->once()) ->method('wrapGatewayError') ->with($reasonText) ->willReturn(__('Gateway error: %1', $reasonText)); - $orderMock = $this->getMockBuilder(Order::class) - ->disableOriginalConstructor() - ->getMock(); - - $orderMock->expects($this->exactly($failuresHandlerCalls)) - ->method('getQuoteId') - ->willReturn(1); - - $this->paymentFailures->expects($this->exactly($failuresHandlerCalls)) - ->method('handle') - ->with(1); + $this->paymentFailures->expects($this->exactly($failuresHandlerCalls))->method('handle')->with(1); + $orderMock = $this->getOrderMock($failuresHandlerCalls); - $reflection = new \ReflectionClass($this->directpost); + $orderMock->expects($this->exactly($failuresHandlerCalls))->method('getQuoteId')->willReturn(1); + $reflection = new ReflectionClass($this->directpost); $order = $reflection->getProperty('order'); $order->setAccessible(true); $order->setValue($this->directpost, $orderMock); @@ -381,7 +607,6 @@ public function checkResponseCodeFailureDataProvider(): array return [ ['responseCode' => Directpost::RESPONSE_CODE_DECLINED, 1], ['responseCode' => Directpost::RESPONSE_CODE_ERROR, 1], - ['responseCode' => 999999, 0], ]; } @@ -417,7 +642,7 @@ public function testCanCapture($isGatewayActionsLocked, $canCapture) { $this->directpost->setData('info_instance', $this->paymentMock); - $this->paymentMock->expects($this->any()) + $this->paymentMock->expects($this->once()) ->method('getAdditionalInformation') ->with(Directpost::GATEWAY_ACTIONS_LOCKED_STATE_KEY) ->willReturn($isGatewayActionsLocked); @@ -452,30 +677,16 @@ public function testFetchVoidedTransactionInfo($transactionId, $resultStatus, $r $paymentId = 36; $orderId = 36; - $this->paymentMock->expects(static::once()) - ->method('getId') - ->willReturn($paymentId); - - $orderMock = $this->getMockBuilder(\Magento\Sales\Model\Order::class) - ->disableOriginalConstructor() - ->setMethods(['getId', '__wakeup']) - ->getMock(); - $orderMock->expects(static::once()) - ->method('getId') - ->willReturn($orderId); + $this->paymentMock->expects($this->once())->method('getId')->willReturn($paymentId); - $this->paymentMock->expects(static::once()) - ->method('getOrder') - ->willReturn($orderMock); - - $transactionMock = $this->getMockBuilder(\Magento\Sales\Model\Order\Payment\Transaction::class) - ->disableOriginalConstructor() - ->getMock(); - $this->transactionRepositoryMock->expects(static::once()) + $orderMock = $this->getOrderMock(); + $orderMock->expects($this->once())->method('getId')->willReturn($orderId); + $this->paymentMock->expects($this->once())->method('getOrder')->willReturn($orderMock); + $transactionMock = $this->getMockBuilder(Transaction::class)->disableOriginalConstructor()->getMock(); + $this->transactionRepositoryMock->expects($this->once()) ->method('getByTransactionId') ->with($transactionId, $paymentId, $orderId) ->willReturn($transactionMock); - $document = $this->getTransactionXmlDocument( $transactionId, TransactionService::PAYMENT_UPDATE_STATUS_CODE_SUCCESS, @@ -483,20 +694,15 @@ public function testFetchVoidedTransactionInfo($transactionId, $resultStatus, $r $responseStatus, $responseCode ); - $this->transactionServiceMock->expects(static::once()) + $this->transactionServiceMock->expects($this->once()) ->method('getTransactionDetails') ->with($this->directpost, $transactionId) ->willReturn($document); // transaction should be closed - $this->paymentMock->expects(static::once()) - ->method('setIsTransactionDenied') - ->with(true); - $this->paymentMock->expects(static::once()) - ->method('setIsTransactionClosed') - ->with(true); - $transactionMock->expects(static::once()) - ->method('close'); + $this->paymentMock->expects($this->once())->method('setIsTransactionDenied')->with(true); + $this->paymentMock->expects($this->once())->method('setIsTransactionClosed')->with(true); + $transactionMock->expects($this->once())->method('close'); $this->directpost->fetchTransactionInfo($this->paymentMock, $transactionId); } @@ -509,60 +715,41 @@ public function testSuccessRefund() { $card = 1111; - $this->paymentMock->expects(static::exactly(2)) - ->method('getCcLast4') - ->willReturn($card); - $this->paymentMock->expects(static::once()) - ->method('decrypt') - ->willReturn($card); - $this->paymentMock->expects(static::exactly(3)) + $this->paymentMock->expects($this->exactly(1))->method('getCcLast4')->willReturn($card); + $this->paymentMock->expects($this->once())->method('decrypt')->willReturn($card); + $this->paymentMock->expects($this->exactly(3)) ->method('getParentTransactionId') ->willReturn(self::TRANSACTION_ID . '-capture'); - $this->paymentMock->expects(static::once()) - ->method('getPoNumber') - ->willReturn(self::INVOICE_NUM); - $this->paymentMock->expects(static::once()) + $this->paymentMock->expects($this->once())->method('getPoNumber')->willReturn(self::INVOICE_NUM); + $this->paymentMock->expects($this->once()) ->method('setIsTransactionClosed') ->with(true) ->willReturnSelf(); + $this->addRequestMockToRequestFactoryMock(); + $orderMock = $this->getOrderMock(); - $this->paymentMock->expects(static::exactly(2)) - ->method('getOrder') - ->willReturn($orderMock); + $orderMock->expects($this->once())->method('getId')->willReturn(1); + $orderMock->expects($this->exactly(2))->method('getIncrementId')->willReturn(self::INVOICE_NUM); + $orderMock->expects($this->once())->method('getStoreId')->willReturn(1); + + $this->paymentMock->expects($this->exactly(2))->method('getOrder')->willReturn($orderMock); - $transactionMock = $this->getMockBuilder(Order\Payment\Transaction::class) + $transactionMock = $this->getMockBuilder(Transaction::class) ->disableOriginalConstructor() ->setMethods(['getAdditionalInformation']) ->getMock(); - $transactionMock->expects(static::once()) + $transactionMock->expects($this->once()) ->method('getAdditionalInformation') ->with(Directpost::REAL_TRANSACTION_ID_KEY) ->willReturn(self::TRANSACTION_ID); - $this->transactionRepositoryMock->expects(static::once()) + $this->transactionRepositoryMock->expects($this->once()) ->method('getByTransactionId') ->willReturn($transactionMock); - $response = $this->getRefundResponseBody( - Directpost::RESPONSE_CODE_APPROVED, - Directpost::RESPONSE_REASON_CODE_APPROVED, - 'Successful' - ); - $this->httpClientMock->expects(static::once()) - ->method('getBody') - ->willReturn($response); - - $this->responseMock->expects(static::once()) - ->method('getXResponseCode') - ->willReturn(Directpost::RESPONSE_CODE_APPROVED); - $this->responseMock->expects(static::once()) - ->method('getXResponseReasonCode') - ->willReturn(Directpost::RESPONSE_REASON_CODE_APPROVED); - - $this->dataHelperMock->expects(static::never()) - ->method('wrapGatewayError'); + $this->postRequestTest(); $this->directpost->refund($this->paymentMock, self::TOTAL_AMOUNT); } @@ -583,65 +770,6 @@ public function dataProviderTransaction() ]; } - /** - * Create mock for response factory - * @return void - */ - private function initResponseFactoryMock() - { - $this->responseFactoryMock = $this->getMockBuilder( - \Magento\Authorizenet\Model\Directpost\Response\Factory::class - )->disableOriginalConstructor()->getMock(); - $this->responseMock = $this->getMockBuilder(\Magento\Authorizenet\Model\Directpost\Response::class) - ->setMethods( - [ - 'isValidHash', - 'getXTransId', 'getXResponseCode', 'getXResponseReasonCode', 'getXResponseReasonText', 'getXAmount', - 'setXResponseCode', 'setXResponseReasonCode', 'setXAvsCode', 'setXResponseReasonText', - 'setXTransId', 'setXInvoiceNum', 'setXAmount', 'setXMethod', 'setXType', 'setData', - 'setXAccountNumber', - '__wakeup' - ] - ) - ->disableOriginalConstructor() - ->getMock(); - - $this->responseMock->expects(static::any()) - ->method('setXResponseCode') - ->willReturnSelf(); - $this->responseMock->expects(static::any()) - ->method('setXResponseReasonCode') - ->willReturnSelf(); - $this->responseMock->expects(static::any()) - ->method('setXResponseReasonText') - ->willReturnSelf(); - $this->responseMock->expects(static::any()) - ->method('setXAvsCode') - ->willReturnSelf(); - $this->responseMock->expects(static::any()) - ->method('setXTransId') - ->willReturnSelf(); - $this->responseMock->expects(static::any()) - ->method('setXInvoiceNum') - ->willReturnSelf(); - $this->responseMock->expects(static::any()) - ->method('setXAmount') - ->willReturnSelf(); - $this->responseMock->expects(static::any()) - ->method('setXMethod') - ->willReturnSelf(); - $this->responseMock->expects(static::any()) - ->method('setXType') - ->willReturnSelf(); - $this->responseMock->expects(static::any()) - ->method('setData') - ->willReturnSelf(); - - $this->responseFactoryMock->expects($this->any()) - ->method('create') - ->willReturn($this->responseMock); - } - /** * Get transaction data * @param $transactionId @@ -694,80 +822,40 @@ private function getTransactionXmlDocument( /** * Get mock for authorize.net request factory - * @return \PHPUnit\Framework\MockObject_MockBuilder */ - private function getRequestFactoryMock() + private function addRequestMockToRequestFactoryMock() { - $requestFactory = $this->getMockBuilder(Factory::class) - ->disableOriginalConstructor() - ->setMethods(['create']) - ->getMock(); $request = $this->getMockBuilder(Request::class) ->disableOriginalConstructor() ->setMethods(['__wakeup']) ->getMock(); - $requestFactory->expects(static::any()) + $this->requestFactory->expects($this->once()) ->method('create') ->willReturn($request); - return $requestFactory; } /** * Get mock for order - * @return \PHPUnit_Framework_MockObject_MockObject + * @return PHPUnit_Framework_MockObject_MockObject */ private function getOrderMock() { - $orderMock = $this->getMockBuilder(Order::class) - ->disableOriginalConstructor() - ->setMethods([ - 'getId', 'getIncrementId', 'getStoreId', 'getBillingAddress', 'getShippingAddress', - 'getBaseCurrencyCode', 'getBaseTaxAmount', '__wakeup' - ]) - ->getMock(); - - $orderMock->expects(static::once()) - ->method('getId') - ->willReturn(1); - - $orderMock->expects(static::exactly(2)) - ->method('getIncrementId') - ->willReturn(self::INVOICE_NUM); - - $orderMock->expects(static::once()) - ->method('getStoreId') - ->willReturn(1); - - $orderMock->expects(static::once()) - ->method('getBaseCurrencyCode') - ->willReturn('USD'); - return $orderMock; - } - - /** - * Create and return mock for http client factory - * @return \PHPUnit_Framework_MockObject_MockObject - */ - private function getHttpClientFactoryMock() - { - $this->httpClientMock = $this->getMockBuilder(\Magento\Framework\HTTP\ZendClient::class) + return $this->getMockBuilder(Order::class) ->disableOriginalConstructor() - ->setMethods(['request', 'getBody', '__wakeup']) - ->getMock(); - - $this->httpClientMock->expects(static::any()) - ->method('request') - ->willReturnSelf(); - - $httpClientFactoryMock = $this->getMockBuilder(\Magento\Framework\HTTP\ZendClientFactory::class) - ->disableOriginalConstructor() - ->setMethods(['create']) + ->setMethods( + [ + 'getId', + 'getQuoteId', + 'getIncrementId', + 'getStoreId', + 'getBillingAddress', + 'getShippingAddress', + 'getBaseCurrencyCode', + 'getBaseTaxAmount', + '__wakeup' + ] + ) ->getMock(); - - $httpClientFactoryMock->expects(static::any()) - ->method('create') - ->willReturn($this->httpClientMock); - return $httpClientFactoryMock; } /** @@ -788,7 +876,9 @@ private function getRefundResponseBody($code, $reasonCode, $reasonText) $result[9] = self::TOTAL_AMOUNT; // XAmount $result[10] = Directpost::REQUEST_METHOD_CC; // XMethod $result[11] = Directpost::REQUEST_TYPE_CREDIT; // XType + // @codingStandardsIgnoreStart $result[37] = md5(self::TRANSACTION_ID); // x_MD5_Hash + // @codingStandardsIgnoreEnd $result[50] = '48329483921'; // setXAccountNumber return implode(Directpost::RESPONSE_DELIM_CHAR, $result); } diff --git a/app/code/Magento/Authorizenet/view/adminhtml/web/js/direct-post.js b/app/code/Magento/Authorizenet/view/adminhtml/web/js/direct-post.js index e43341ca2b33..eb162034bc04 100644 --- a/app/code/Magento/Authorizenet/view/adminhtml/web/js/direct-post.js +++ b/app/code/Magento/Authorizenet/view/adminhtml/web/js/direct-post.js @@ -3,18 +3,11 @@ * See COPYING.txt for license details. */ -(function (factory) { - if (typeof define === 'function' && define.amd) { - define([ - 'jquery', - 'mage/backend/validation', - 'prototype' - ], factory); - } else { - factory(jQuery); - } -}(function (jQuery) { - +define([ + 'jquery', + 'mage/backend/validation', + 'prototype' +], function (jQuery) { window.directPost = Class.create(); directPost.prototype = { initialize: function (methodCode, iframeId, controller, orderSaveUrl, cgiUrl, nativeAction) { @@ -349,4 +342,4 @@ } } }; -})); +}); diff --git a/app/code/Magento/Backend/Model/Locale/Resolver.php b/app/code/Magento/Backend/Model/Locale/Resolver.php index b9be471cd599..9086e2af83e2 100644 --- a/app/code/Magento/Backend/Model/Locale/Resolver.php +++ b/app/code/Magento/Backend/Model/Locale/Resolver.php @@ -7,8 +7,10 @@ /** * Backend locale model + * * @api * @since 100.0.2 + * @SuppressWarnings(PHPMD.CookieAndSessionMisuse) */ class Resolver extends \Magento\Framework\Locale\Resolver { @@ -40,7 +42,7 @@ class Resolver extends \Magento\Framework\Locale\Resolver * @param Manager $localeManager * @param \Magento\Framework\App\RequestInterface $request * @param \Magento\Framework\Validator\Locale $localeValidator - * @param null $locale + * @param string|null $locale * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -76,7 +78,7 @@ public function setLocale($locale = null) $sessionLocale = $this->_session->getSessionLocale(); $userLocale = $this->_localeManager->getUserInterfaceLocale(); - $localeCodes = array_filter([$forceLocale, $sessionLocale, $userLocale]); + $localeCodes = array_filter([$forceLocale, $locale, $sessionLocale, $userLocale]); if (count($localeCodes)) { $locale = reset($localeCodes); diff --git a/app/code/Magento/Backend/Test/Mftf/Data/AdminGeneralStoreInfomationConfigData.xml b/app/code/Magento/Backend/Test/Mftf/Data/AdminGeneralStoreInfomationConfigData.xml new file mode 100644 index 000000000000..a8db2f94d69a --- /dev/null +++ b/app/code/Magento/Backend/Test/Mftf/Data/AdminGeneralStoreInfomationConfigData.xml @@ -0,0 +1,33 @@ + + + + + + general/store_information/name + New Store Information + + + general/store_information/phone + + + general/store_information/country_id + + + general/store_information/city + + + general/store_information/postcode + + + general/store_information/street_line1 + + + general/store_information/street_line2 + + diff --git a/app/code/Magento/Backend/etc/adminhtml/system.xml b/app/code/Magento/Backend/etc/adminhtml/system.xml index 9e4960c12b21..d3b1cbaf7a5c 100644 --- a/app/code/Magento/Backend/etc/adminhtml/system.xml +++ b/app/code/Magento/Backend/etc/adminhtml/system.xml @@ -482,22 +482,22 @@ Magento\Config\Model\Config\Backend\Baseurl - Specify URL or {{base_url}} placeholder. + Magento\Config\Model\Config\Backend\Baseurl - May start with {{unsecure_base_url}} placeholder. + Magento\Config\Model\Config\Backend\Baseurl - May be empty or start with {{unsecure_base_url}} placeholder. + Magento\Config\Model\Config\Backend\Baseurl - May be empty or start with {{unsecure_base_url}} placeholder. + @@ -506,22 +506,22 @@ Magento\Config\Model\Config\Backend\Baseurl - Specify URL or {{base_url}}, or {{unsecure_base_url}} placeholder. + Magento\Config\Model\Config\Backend\Baseurl - May start with {{secure_base_url}} or {{unsecure_base_url}} placeholder. + Magento\Config\Model\Config\Backend\Baseurl - May be empty or start with {{secure_base_url}}, or {{unsecure_base_url}} placeholder. + Magento\Config\Model\Config\Backend\Baseurl - May be empty or start with {{secure_base_url}}, or {{unsecure_base_url}} placeholder. + diff --git a/app/code/Magento/Backend/view/adminhtml/web/js/translate.js b/app/code/Magento/Backend/view/adminhtml/web/js/translate.js index a9c30bf57791..d6e1547600c4 100644 --- a/app/code/Magento/Backend/view/adminhtml/web/js/translate.js +++ b/app/code/Magento/Backend/view/adminhtml/web/js/translate.js @@ -4,16 +4,10 @@ */ /* eslint-disable strict */ -(function (factory) { - if (typeof define === 'function' && define.amd) { - define([ - 'jquery', - 'mage/mage' - ], factory); - } else { - factory(jQuery); - } -}(function ($) { +define([ + 'jquery', + 'mage/mage' +], function ($) { $.extend(true, $, { mage: { translate: (function () { @@ -51,4 +45,4 @@ $.mage.__ = $.proxy($.mage.translate.translate, $.mage.translate); return $.mage.__; -})); +}); diff --git a/app/code/Magento/Bundle/Setup/Patch/Schema/ChangeTmpTablesEngine.php b/app/code/Magento/Bundle/Setup/Patch/Schema/ChangeTmpTablesEngine.php deleted file mode 100644 index c6a67cc5a110..000000000000 --- a/app/code/Magento/Bundle/Setup/Patch/Schema/ChangeTmpTablesEngine.php +++ /dev/null @@ -1,68 +0,0 @@ -schemaSetup = $schemaSetup; - } - - /** - * @inheritdoc - */ - public function apply() - { - $this->schemaSetup->startSetup(); - - $tables = [ - 'catalog_product_index_price_bundle_tmp', - 'catalog_product_index_price_bundle_sel_tmp', - 'catalog_product_index_price_bundle_opt_tmp', - ]; - foreach ($tables as $table) { - $tableName = $this->schemaSetup->getTable($table); - if ($this->schemaSetup->getConnection()->isTableExists($tableName)) { - $this->schemaSetup->getConnection()->changeTableEngine($tableName, 'InnoDB'); - } - } - - $this->schemaSetup->endSetup(); - } - - /** - * @inheritdoc - */ - public static function getDependencies() - { - return []; - } - - /** - * @inheritdoc - */ - public function getAliases() - { - return []; - } -} diff --git a/app/code/Magento/Bundle/Test/Mftf/Data/ProductData.xml b/app/code/Magento/Bundle/Test/Mftf/Data/ProductData.xml index 6e7e4a7a1657..e5f557dd22de 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Data/ProductData.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Data/ProductData.xml @@ -61,6 +61,20 @@ CustomAttributeDynamicPrice CustomAttributePriceView + + Api Bundle Product + api_bundle_product + bundle + 4 + 4 + 1 + api-bundle-product + EavStockItem + ApiProductDescription + ApiProductShortDescription + CustomAttributeDynamicPrice + CustomAttributePriceView + Api Bundle Product api-bundle-product diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdvanceCatalogSearchBundleProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdvanceCatalogSearchBundleProductTest.xml index 52bce6760088..c6aab0ea54ea 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdvanceCatalogSearchBundleProductTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdvanceCatalogSearchBundleProductTest.xml @@ -17,6 +17,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <description value="Guest customer should be able to advance search Bundle product with product name using the MySQL search engine"/> + <severity value="MAJOR"/> + <testCaseId value="MC-20472"/> + <group value="Bundle"/> + <group value="SearchEngineMysql"/> </annotations> <before> <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> @@ -56,7 +97,7 @@ <before> <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> <createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/> - <createData entity="ApiBundleProduct" stepKey="product"/> + <createData entity="ApiBundleProductUnderscoredSku" stepKey="product"/> <createData entity="DropDownBundleOption" stepKey="bundleOption"> <requiredEntity createDataKey="product"/> </createData> @@ -87,6 +128,47 @@ <severity value="MAJOR"/> <testCaseId value="MC-242"/> <group value="Bundle"/> + <group value="SearchEngineElasticsearch"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> + <createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/> + <createData entity="ApiBundleProduct" stepKey="product"/> + <createData entity="DropDownBundleOption" stepKey="bundleOption"> + <requiredEntity createDataKey="product"/> + </createData> + <createData entity="ApiBundleLink" stepKey="createBundleLink1"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="bundleOption"/> + <requiredEntity createDataKey="simple1"/> + </createData> + <createData entity="ApiBundleLink" stepKey="createBundleLink2"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="bundleOption"/> + <requiredEntity createDataKey="simple2"/> + </createData> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </before> + <after> + <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/> + <deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/> + </after> + <see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> + <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/> + <see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/> + <see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/> + </test> + <test name="AdvanceCatalogSearchBundleByDescriptionMysqlTest" extends="AdvanceCatalogSearchSimpleProductByDescriptionTest"> + <annotations> + <features value="Bundle"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search Bundle product with product description using the MySQL search engine"/> + <description value="Guest customer should be able to advance search Bundle product with product description using the MySQL search engine"/> + <severity value="MAJOR"/> + <testCaseId value="MC-20473"/> + <group value="Bundle"/> + <group value="SearchEngineMysql"/> </annotations> <before> <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> @@ -122,6 +204,47 @@ <severity value="MAJOR"/> <testCaseId value="MC-250"/> <group value="Bundle"/> + <group value="SearchEngineElasticsearch"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> + <createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/> + <createData entity="ApiBundleProduct" stepKey="product"/> + <createData entity="DropDownBundleOption" stepKey="bundleOption"> + <requiredEntity createDataKey="product"/> + </createData> + <createData entity="ApiBundleLink" stepKey="createBundleLink1"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="bundleOption"/> + <requiredEntity createDataKey="simple1"/> + </createData> + <createData entity="ApiBundleLink" stepKey="createBundleLink2"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="bundleOption"/> + <requiredEntity createDataKey="simple2"/> + </createData> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </before> + <after> + <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/> + <deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/> + </after> + <see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> + <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/> + <see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/> + <see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/> + </test> + <test name="AdvanceCatalogSearchBundleByShortDescriptionMysqlTest" extends="AdvanceCatalogSearchSimpleProductByShortDescriptionTest"> + <annotations> + <features value="Bundle"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search Bundle product with product short description using the MySQL search engine"/> + <description value="Guest customer should be able to advance search Bundle product with product short description using the MySQL search engine"/> + <severity value="MAJOR"/> + <testCaseId value="MC-20474"/> + <group value="Bundle"/> + <group value="SearchEngineMysql"/> </annotations> <before> <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> @@ -157,6 +280,56 @@ <severity value="MAJOR"/> <testCaseId value="MC-251"/> <group value="Bundle"/> + <group value="SearchEngineElasticsearch"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> + <createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/> + <createData entity="ApiBundleProduct" stepKey="product"/> + <createData entity="DropDownBundleOption" stepKey="bundleOption"> + <requiredEntity createDataKey="product"/> + </createData> + <createData entity="ApiBundleLink" stepKey="createBundleLink1"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="bundleOption"/> + <requiredEntity createDataKey="simple1"/> + </createData> + <createData entity="ApiBundleLink" stepKey="createBundleLink2"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="bundleOption"/> + <requiredEntity createDataKey="simple2"/> + </createData> + <getData entity="GetProduct" stepKey="arg1"> + <requiredEntity createDataKey="product"/> + </getData> + <getData entity="GetProduct" stepKey="arg2"> + <requiredEntity createDataKey="simple1"/> + </getData> + <getData entity="GetProduct" stepKey="arg3"> + <requiredEntity createDataKey="simple2"/> + </getData> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </before> + <after> + <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/> + <deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/> + </after> + <see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> + <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/> + <see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/> + <see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/> + </test> + <test name="AdvanceCatalogSearchBundleByPriceMysqlTest" extends="AdvanceCatalogSearchSimpleProductByPriceTest"> + <annotations> + <features value="Bundle"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search Bundle product with product price using the MySQL search engine"/> + <description value="Guest customer should be able to advance search Bundle product with product price the MySQL search engine"/> + <severity value="MAJOR"/> + <testCaseId value="MC-20475"/> + <group value="Bundle"/> + <group value="SearchEngineMysql"/> </annotations> <before> <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAdvanceCatalogSearchBundleBySkuWithHyphenTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAdvanceCatalogSearchBundleBySkuWithHyphenTest.xml new file mode 100644 index 000000000000..d8d6034cd1a2 --- /dev/null +++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAdvanceCatalogSearchBundleBySkuWithHyphenTest.xml @@ -0,0 +1,47 @@ +<?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="StorefrontAdvanceCatalogSearchBundleBySkuWithHyphenTest" extends="AdvanceCatalogSearchSimpleProductBySkuTest"> + <annotations> + <features value="Bundle"/> + <stories value="Advanced Catalog Product Search for all product types "/> + <title value="Guest customer should be able to advance search Bundle product with product sku that contains hyphen"/> + <description value="Guest customer should be able to advance search Bundle product with product sku that contains hyphen"/> + <severity value="MAJOR"/> + <testCaseId value="MC-20359"/> + <group value="Bundle"/> + <group value="SearchEngineMysql"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> + <createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/> + <createData entity="ApiBundleProduct" stepKey="product"/> + <createData entity="DropDownBundleOption" stepKey="bundleOption"> + <requiredEntity createDataKey="product"/> + </createData> + <createData entity="ApiBundleLink" stepKey="createBundleLink1"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="bundleOption"/> + <requiredEntity createDataKey="simple1"/> + </createData> + <createData entity="ApiBundleLink" stepKey="createBundleLink2"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="bundleOption"/> + <requiredEntity createDataKey="simple2"/> + </createData> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </before> + <after> + <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/> + <deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/> + </after> + </test> +</tests> diff --git a/app/code/Magento/Bundle/etc/db_schema.xml b/app/code/Magento/Bundle/etc/db_schema.xml index 8eafa23cbd0f..dba973243906 100644 --- a/app/code/Magento/Bundle/etc/db_schema.xml +++ b/app/code/Magento/Bundle/etc/db_schema.xml @@ -203,7 +203,7 @@ <column name="website_id"/> </constraint> </table> - <table name="catalog_product_index_price_bundle_tmp" resource="default" engine="memory" + <table name="catalog_product_index_price_bundle_tmp" resource="default" engine="innodb" comment="Catalog Product Index Price Bundle Tmp"> <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Entity ID"/> @@ -265,7 +265,7 @@ <column name="selection_id"/> </constraint> </table> - <table name="catalog_product_index_price_bundle_sel_tmp" resource="default" engine="memory" + <table name="catalog_product_index_price_bundle_sel_tmp" resource="default" engine="innodb" comment="Catalog Product Index Price Bundle Sel Tmp"> <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Entity ID"/> @@ -320,7 +320,7 @@ <column name="option_id"/> </constraint> </table> - <table name="catalog_product_index_price_bundle_opt_tmp" resource="default" engine="memory" + <table name="catalog_product_index_price_bundle_opt_tmp" resource="default" engine="innodb" comment="Catalog Product Index Price Bundle Opt Tmp"> <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Entity ID"/> diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Edit.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Edit.php index c31ceabcda65..eb1176f787c6 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Edit.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Edit.php @@ -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 { /** @@ -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.')); diff --git a/app/code/Magento/Catalog/Model/Category/DataProvider.php b/app/code/Magento/Catalog/Model/Category/DataProvider.php index c96b2aae3605..eeb4c082ff51 100644 --- a/app/code/Magento/Catalog/Model/Category/DataProvider.php +++ b/app/code/Magento/Catalog/Model/Category/DataProvider.php @@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Catalog\Model\Category; use Magento\Catalog\Api\Data\CategoryInterface; @@ -20,6 +22,7 @@ use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Filesystem; use Magento\Framework\Stdlib\ArrayManager; +use Magento\Framework\Stdlib\ArrayUtils; use Magento\Store\Model\Store; use Magento\Store\Model\StoreManagerInterface; use Magento\Ui\Component\Form\Field; @@ -28,10 +31,9 @@ use Magento\Framework\AuthorizationInterface; /** - * Class DataProvider + * Category form data provider. * * @api - * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.TooManyFields) * @since 101.0.0 @@ -52,6 +54,7 @@ class DataProvider extends \Magento\Ui\DataProvider\ModifierPoolDataProvider /** * EAV attribute properties to fetch from meta storage + * * @var array * @since 101.0.0 */ @@ -143,6 +146,11 @@ class DataProvider extends \Magento\Ui\DataProvider\ModifierPoolDataProvider */ private $arrayManager; + /** + * @var ArrayUtils + */ + private $arrayUtils; + /** * @var Filesystem */ @@ -154,8 +162,6 @@ class DataProvider extends \Magento\Ui\DataProvider\ModifierPoolDataProvider private $auth; /** - * DataProvider constructor - * * @param string $name * @param string $primaryFieldName * @param string $requestFieldName @@ -170,6 +176,8 @@ class DataProvider extends \Magento\Ui\DataProvider\ModifierPoolDataProvider * @param array $data * @param PoolInterface|null $pool * @param AuthorizationInterface|null $auth + * @param ArrayUtils|null $arrayUtils + * @throws \Magento\Framework\Exception\LocalizedException * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -186,7 +194,8 @@ public function __construct( array $meta = [], array $data = [], PoolInterface $pool = null, - ?AuthorizationInterface $auth = null + ?AuthorizationInterface $auth = null, + ?ArrayUtils $arrayUtils = null ) { $this->eavValidationRules = $eavValidationRules; $this->collection = $categoryCollectionFactory->create(); @@ -197,6 +206,7 @@ public function __construct( $this->request = $request; $this->categoryFactory = $categoryFactory; $this->auth = $auth ?? ObjectManager::getInstance()->get(AuthorizationInterface::class); + $this->arrayUtils = $arrayUtils ?? ObjectManager::getInstance()->get(ArrayUtils::class); parent::__construct($name, $primaryFieldName, $requestFieldName, $meta, $data, $pool); } @@ -226,7 +236,7 @@ public function getMeta() * @param array $meta * @return array */ - private function addUseDefaultValueCheckbox(Category $category, array $meta) + private function addUseDefaultValueCheckbox(Category $category, array $meta): array { /** @var EavAttributeInterface $attribute */ foreach ($category->getAttributes() as $attribute) { @@ -290,7 +300,7 @@ public function prepareMeta($meta) * @param array $fieldsMeta * @return array */ - private function prepareFieldsMeta($fieldsMap, $fieldsMeta) + private function prepareFieldsMeta(array $fieldsMap, array $fieldsMeta): array { $canEditDesign = $this->auth->isAllowed('Magento_Catalog::edit_category_design'); @@ -350,6 +360,8 @@ public function getAttributesMeta(Type $entityType) { $meta = []; $attributes = $entityType->getAttributeCollection(); + $fields = $this->getFields(); + $category = $this->getCurrentCategory(); /* @var EavAttribute $attribute */ foreach ($attributes as $attribute) { $code = $attribute->getAttributeCode(); @@ -374,6 +386,16 @@ public function getAttributesMeta(Type $entityType) $meta[$code]['scopeLabel'] = $this->getScopeLabel($attribute); $meta[$code]['componentType'] = Field::NAME; + + // disable fields + if ($category) { + $attributeIsLocked = $category->isLockedAttribute($code); + $meta[$code]['disabled'] = $attributeIsLocked; + $hasUseConfigField = (bool) array_search('use_config.' . $code, $fields, true); + if ($hasUseConfigField && $meta[$code]['disabled']) { + $meta['use_config.' . $code]['disabled'] = true; + } + } } $result = []; @@ -505,7 +527,7 @@ protected function filterFields($categoryData) * @param array $categoryData * @return array */ - private function convertValues($category, $categoryData) + private function convertValues($category, $categoryData): array { foreach ($category->getAttributes() as $attributeCode => $attribute) { if (!isset($categoryData[$attributeCode])) { @@ -616,13 +638,24 @@ protected function getFieldsMap() ]; } + /** + * Return list of fields names. + * + * @return array + */ + private function getFields(): array + { + $fieldsMap = $this->getFieldsMap(); + return $this->arrayUtils->flatten($fieldsMap); + } + /** * Retrieve scope overridden value * * @return ScopeOverriddenValue * @deprecated 101.1.0 */ - private function getScopeOverriddenValue() + private function getScopeOverriddenValue(): ScopeOverriddenValue { if (null === $this->scopeOverriddenValue) { $this->scopeOverriddenValue = \Magento\Framework\App\ObjectManager::getInstance()->get( @@ -639,7 +672,7 @@ private function getScopeOverriddenValue() * @return ArrayManager * @deprecated 101.1.0 */ - private function getArrayManager() + private function getArrayManager(): ArrayManager { if (null === $this->arrayManager) { $this->arrayManager = \Magento\Framework\App\ObjectManager::getInstance()->get( @@ -657,7 +690,7 @@ private function getArrayManager() * * @deprecated 101.1.0 */ - private function getFileInfo() + private function getFileInfo(): FileInfo { if ($this->fileInfo === null) { $this->fileInfo = ObjectManager::getInstance()->get(FileInfo::class); diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php b/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php index e06e85e90a2d..b374b754d7de 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php @@ -3,11 +3,16 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Catalog\Model\Product\Gallery; +use Magento\Catalog\Api\Data\ProductInterface; use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\App\ObjectManager; use Magento\Framework\EntityManager\Operation\ExtensionInterface; use Magento\MediaStorage\Model\File\Uploader as FileUploader; +use Magento\Store\Model\StoreManagerInterface; /** * Create handler for catalog product gallery @@ -74,6 +79,16 @@ class CreateHandler implements ExtensionInterface */ private $mediaAttributeCodes; + /** + * @var array + */ + private $imagesGallery; + + /** + * @var \Magento\Store\Model\StoreManagerInterface + */ + private $storeManager; + /** * @param \Magento\Framework\EntityManager\MetadataPool $metadataPool * @param \Magento\Catalog\Api\ProductAttributeRepositoryInterface $attributeRepository @@ -82,6 +97,8 @@ class CreateHandler implements ExtensionInterface * @param \Magento\Catalog\Model\Product\Media\Config $mediaConfig * @param \Magento\Framework\Filesystem $filesystem * @param \Magento\MediaStorage\Helper\File\Storage\Database $fileStorageDb + * @param \Magento\Store\Model\StoreManagerInterface|null $storeManager + * @throws \Magento\Framework\Exception\FileSystemException */ public function __construct( \Magento\Framework\EntityManager\MetadataPool $metadataPool, @@ -90,7 +107,8 @@ public function __construct( \Magento\Framework\Json\Helper\Data $jsonHelper, \Magento\Catalog\Model\Product\Media\Config $mediaConfig, \Magento\Framework\Filesystem $filesystem, - \Magento\MediaStorage\Helper\File\Storage\Database $fileStorageDb + \Magento\MediaStorage\Helper\File\Storage\Database $fileStorageDb, + \Magento\Store\Model\StoreManagerInterface $storeManager = null ) { $this->metadata = $metadataPool->getMetadata(\Magento\Catalog\Api\Data\ProductInterface::class); $this->attributeRepository = $attributeRepository; @@ -99,6 +117,7 @@ public function __construct( $this->mediaConfig = $mediaConfig; $this->mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA); $this->fileStorageDb = $fileStorageDb; + $this->storeManager = $storeManager ?: ObjectManager::getInstance()->get(StoreManagerInterface::class); } /** @@ -137,6 +156,10 @@ public function execute($product, $arguments = []) if ($product->getIsDuplicate() != true) { foreach ($value['images'] as &$image) { + if (!empty($image['removed']) && !$this->canRemoveImage($product, $image['file'])) { + $image['removed'] = ''; + } + if (!empty($image['removed'])) { $clearImages[] = $image['file']; } elseif (empty($image['value_id'])) { @@ -152,6 +175,10 @@ public function execute($product, $arguments = []) // For duplicating we need copy original images. $duplicate = []; foreach ($value['images'] as &$image) { + if (!empty($image['removed']) && !$this->canRemoveImage($product, $image['file'])) { + $image['removed'] = ''; + } + if (empty($image['value_id']) || !empty($image['removed'])) { continue; } @@ -538,4 +565,46 @@ private function processMediaAttributeLabel( ); } } + + /** + * Get product images for all stores + * + * @param ProductInterface $product + * @return array + */ + private function getImagesForAllStores(ProductInterface $product) + { + if ($this->imagesGallery === null) { + $storeIds = array_keys($this->storeManager->getStores()); + $storeIds[] = 0; + + $this->imagesGallery = $this->resourceModel->getProductImages($product, $storeIds); + } + + return $this->imagesGallery; + } + + /** + * Check possibility to remove image + * + * @param ProductInterface $product + * @param string $imageFile + * @return bool + */ + private function canRemoveImage(ProductInterface $product, string $imageFile) :bool + { + $canRemoveImage = true; + $gallery = $this->getImagesForAllStores($product); + $storeId = $product->getStoreId(); + + if (!empty($gallery)) { + foreach ($gallery as $image) { + if ($image['filepath'] === $imageFile && (int) $image['store_id'] !== $storeId) { + $canRemoveImage = false; + } + } + } + + return $canRemoveImage; + } } diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category.php b/app/code/Magento/Catalog/Model/ResourceModel/Category.php index 797ce72ae9b7..9e0d174a4ccc 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Category.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Category.php @@ -18,6 +18,8 @@ use Magento\Framework\DataObject; use Magento\Framework\EntityManager\EntityManager; use Magento\Catalog\Setup\CategorySetup; +use Magento\Framework\EntityManager\MetadataPool; +use Magento\Catalog\Api\Data\ProductInterface; /** * Resource model for category entity @@ -95,6 +97,11 @@ class Category extends AbstractResource */ private $indexerProcessor; + /** + * @var MetadataPool + */ + private $metadataPool; + /** * Category constructor. * @param \Magento\Eav\Model\Entity\Context $context @@ -106,6 +113,7 @@ class Category extends AbstractResource * @param Processor $indexerProcessor * @param array $data * @param \Magento\Framework\Serialize\Serializer\Json|null $serializer + * @param MetadataPool|null $metadataPool * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -117,7 +125,8 @@ public function __construct( \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory $categoryCollectionFactory, Processor $indexerProcessor, $data = [], - \Magento\Framework\Serialize\Serializer\Json $serializer = null + \Magento\Framework\Serialize\Serializer\Json $serializer = null, + MetadataPool $metadataPool = null ) { parent::__construct( $context, @@ -132,6 +141,7 @@ public function __construct( $this->indexerProcessor = $indexerProcessor; $this->serializer = $serializer ?: ObjectManager::getInstance() ->get(\Magento\Framework\Serialize\Serializer\Json::class); + $this->metadataPool = $metadataPool ?: ObjectManager::getInstance()->get(MetadataPool::class); } /** @@ -1160,13 +1170,14 @@ public function getCategoryWithChildren(int $categoryId): array return []; } + $linkField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField(); $select = $connection->select() ->from( ['cce' => $this->getTable('catalog_category_entity')], - ['entity_id', 'parent_id', 'path'] + [$linkField, 'parent_id', 'path'] )->join( ['cce_int' => $this->getTable('catalog_category_entity_int')], - 'cce.entity_id = cce_int.entity_id', + 'cce.' . $linkField . ' = cce_int.' . $linkField, ['is_anchor' => 'cce_int.value'] )->where( 'cce_int.attribute_id = ?', diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php index 42d55892b6ec..e1350ebb25c8 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php @@ -1595,6 +1595,8 @@ public function addAttributeToFilter($attribute, $condition = null, $joinType = } else { return parent::addAttributeToFilter($attribute, $condition, $joinType); } + + return $this; } /** @@ -2113,13 +2115,14 @@ private function getChildrenCategories(int $categoryId): array $firstCategory = array_shift($categories); if ($firstCategory['is_anchor'] == 1) { - $anchorCategory[] = (int)$firstCategory['entity_id']; + $linkField = $this->getProductEntityMetadata()->getLinkField(); + $anchorCategory[] = (int)$firstCategory[$linkField]; foreach ($categories as $category) { if (in_array($category['parent_id'], $categoryIds) && in_array($category['parent_id'], $anchorCategory)) { - $categoryIds[] = (int)$category['entity_id']; + $categoryIds[] = (int)$category[$linkField]; if ($category['is_anchor'] == 1) { - $anchorCategory[] = (int)$category['entity_id']; + $anchorCategory[] = (int)$category[$linkField]; } } } diff --git a/app/code/Magento/Catalog/Setup/Patch/Schema/ChangeTmpTablesEngine.php b/app/code/Magento/Catalog/Setup/Patch/Schema/ChangeTmpTablesEngine.php deleted file mode 100644 index c39247f9b30d..000000000000 --- a/app/code/Magento/Catalog/Setup/Patch/Schema/ChangeTmpTablesEngine.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Catalog\Setup\Patch\Schema; - -use Magento\Framework\Setup\Patch\SchemaPatchInterface; -use Magento\Framework\Setup\SchemaSetupInterface; - -/** - * Change engine for temporary tables to InnoDB. - */ -class ChangeTmpTablesEngine implements SchemaPatchInterface -{ - /** - * @var SchemaSetupInterface - */ - private $schemaSetup; - - /** - * @param SchemaSetupInterface $schemaSetup - */ - public function __construct(SchemaSetupInterface $schemaSetup) - { - $this->schemaSetup = $schemaSetup; - } - - /** - * @inheritdoc - */ - public function apply() - { - $this->schemaSetup->startSetup(); - - $tables = [ - 'catalog_product_index_price_cfg_opt_agr_tmp', - 'catalog_product_index_price_cfg_opt_tmp', - 'catalog_product_index_price_final_tmp', - 'catalog_product_index_price_opt_tmp', - 'catalog_product_index_price_opt_agr_tmp', - 'catalog_product_index_eav_tmp', - 'catalog_product_index_eav_decimal_tmp', - 'catalog_product_index_price_tmp', - 'catalog_category_product_index_tmp', - ]; - foreach ($tables as $table) { - $tableName = $this->schemaSetup->getTable($table); - if ($this->schemaSetup->getConnection()->isTableExists($tableName)) { - $this->schemaSetup->getConnection()->changeTableEngine($tableName, 'InnoDB'); - } - } - - $this->schemaSetup->endSetup(); - } - - /** - * @inheritdoc - */ - public static function getDependencies() - { - return []; - } - - /** - * @inheritdoc - */ - public function getAliases() - { - return []; - } -} diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminAssignImageRolesActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminAssignImageRolesActionGroup.xml index c6492754515f..e5cefda0aca9 100644 --- a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminAssignImageRolesActionGroup.xml +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminAssignImageRolesActionGroup.xml @@ -15,8 +15,8 @@ <arguments> <argument name="image"/> </arguments> - - <conditionalClick selector="{{AdminProductImagesSection.productImagesToggleState('closed')}}" dependentSelector="{{AdminProductImagesSection.productImagesToggleState('open')}}" visible="false" stepKey="clickSectionImage"/> + <conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageFile(image.fileName)}}" visible="false" stepKey="expandImages"/> + <waitForElementVisible selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="seeProductImageName"/> <click selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="clickProductImage"/> <waitForElementVisible selector="{{AdminProductImagesSection.altText}}" stepKey="seeAltTextSection"/> <checkOption selector="{{AdminProductImagesSection.roleBase}}" stepKey="checkRoleBase"/> @@ -25,4 +25,14 @@ <checkOption selector="{{AdminProductImagesSection.roleSwatch}}" stepKey="checkRoleSwatch"/> <click selector="{{AdminSlideOutDialogSection.closeButton}}" stepKey="clickCloseButton"/> </actionGroup> + <actionGroup name="AdminAssignImageRolesIfUnassignedActionGroup" extends="AdminAssignImageRolesActionGroup"> + <annotations> + <description>Requires the navigation to the Product Creation page. Assign the Base, Small, Thumbnail, and Swatch Roles to image.</description> + </annotations> + + <conditionalClick selector="{{AdminProductImagesSection.roleBase}}" dependentSelector="{{AdminProductImagesSection.isRoleChecked('Base')}}" visible="false" stepKey="checkRoleBase"/> + <conditionalClick selector="{{AdminProductImagesSection.roleSmall}}" dependentSelector="{{AdminProductImagesSection.isRoleChecked('Small')}}" visible="false" stepKey="checkRoleSmall"/> + <conditionalClick selector="{{AdminProductImagesSection.roleThumbnail}}" dependentSelector="{{AdminProductImagesSection.isRoleChecked('Thumbnail')}}" visible="false" stepKey="checkRoleThumbnail"/> + <conditionalClick selector="{{AdminProductImagesSection.roleSwatch}}" dependentSelector="{{AdminProductImagesSection.isRoleChecked('Swatch')}}" visible="false" stepKey="checkRoleSwatch"/> + </actionGroup> </actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductActionGroup.xml index 5c5ee0f9cb32..428b3828901c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductActionGroup.xml +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductActionGroup.xml @@ -24,7 +24,7 @@ <seeInCurrentUrl url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, product.type_id)}}" stepKey="seeNewProductUrl"/> <see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Product" stepKey="seeNewProductTitle"/> </actionGroup> - + <!--Navigate to create product page directly via ID--> <actionGroup name="goToProductPageViaID"> <annotations> @@ -108,6 +108,12 @@ <fillField selector="{{AdminProductFormSection.productName}}" userInput="{{product.name}}" stepKey="fillProductName"/> <fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{product.sku}}" stepKey="fillProductSku"/> </actionGroup> + <actionGroup name="AdminFillProductCountryOfManufactureActionGroup"> + <arguments> + <argument name="countryId" type="string" defaultValue="US"/> + </arguments> + <selectOption selector="{{AdminProductFormBundleSection.countryOfManufactureDropDown}}" userInput="{{countryId}}" stepKey="countryOfManufactureDropDown"/> + </actionGroup> <!--Check that required fields are actually required--> <actionGroup name="checkRequiredFieldsInProductForm"> @@ -184,6 +190,18 @@ <click selector="{{AdminProductImagesSection.removeImageButton}}" stepKey="clickRemoveImage"/> </actionGroup> + <!--Remove Product image by name--> + <actionGroup name="RemoveProductImageByName" extends="removeProductImage"> + <annotations> + <description>Removes a Product Image on the Admin Products creation/edit page by name.</description> + </annotations> + + <arguments> + <argument name="image" defaultValue="ProductImage"/> + </arguments> + <click selector="{{AdminProductImagesSection.removeImageButtonForExactImage(image.fileName)}}" stepKey="clickRemoveImage"/> + </actionGroup> + <!-- Assert product image in Admin Product page --> <actionGroup name="assertProductImageAdminProductPage"> <annotations> diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/DisableProductLabelActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/DisableProductLabelActionGroup.xml new file mode 100644 index 000000000000..a416957dabc2 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/DisableProductLabelActionGroup.xml @@ -0,0 +1,27 @@ +<?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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="DisableProductLabelActionGroup"> + <annotations> + <description>Disable Product Label and Change Attribute Set.</description> + </annotations> + <arguments> + <argument name="createAttributeSet"/> + </arguments> + + <checkOption selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="disableProduct"/> + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButton"/> + <waitForPageLoad time="30" stepKey="waitForChangeAttrSet"/> + <click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/> + <fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{createAttributeSet.attribute_set_name}}" stepKey="searchForAttrSet"/> + <click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet"/> + <dontSeeCheckboxIsChecked selector="{{AdminProductFormSection.productStatus}}" stepKey="dontSeeCheckboxEnableProductIsChecked"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/CustomAttributeData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/CustomAttributeData.xml index 7bd392f0aa74..1effb4ed0664 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Data/CustomAttributeData.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Data/CustomAttributeData.xml @@ -55,4 +55,20 @@ <data key="attribute_code">is_anchor</data> <data key="value">0</data> </entity> + <entity name="ProductDescriptionAdvancedSearchABC" type="custom_attribute"> + <data key="attribute_code">description</data> + <data key="value"><p>adc_Full</p></data> + </entity> + <entity name="ProductShortDescriptionAdvancedSearch" type="custom_attribute"> + <data key="attribute_code">short_description</data> + <data key="value"><p>abc_short</p></data> + </entity> + <entity name="ProductDescriptionAdvancedSearchADC123" type="custom_attribute"> + <data key="attribute_code">description</data> + <data key="value"><p>dfj_full</p></data> + </entity> + <entity name="ProductShortDescriptionAdvancedSearchADC123" type="custom_attribute"> + <data key="attribute_code">short_description</data> + <data key="value"><p>dfj_short</p></data> + </entity> </entities> diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml index 55b5089e5b0a..aad43bb7011c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml @@ -438,6 +438,34 @@ <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> </entity> + <entity name="ApiProductNameWithNoSpaces" type="product"> + <data key="sku" unique="suffix">api-simple-product</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">ApiSimpleProduct</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">api-simple-product</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> + </entity> + <entity name="ApiProductWithDescriptionAndUnderscoredSku" type="product"> + <data key="sku" unique="suffix">api_simple_product</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">Api Simple Product</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">api-simple-product</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> + </entity> <entity name="_newDefaultProduct" type="product"> <data key="sku" unique="suffix">testSku</data> <data key="type_id">simple</data> @@ -531,6 +559,20 @@ <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> </entity> + <entity name="ApiVirtualProductWithDescriptionAndUnderscoredSku" type="product"> + <data key="sku" unique="suffix">api_virtual_product</data> + <data key="type_id">virtual</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">Api Virtual Product</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">api-virtual-product</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> + </entity> <entity name="SimpleProductWithNewFromDate" type="product"> <data key="sku" unique="suffix">SimpleProduct</data> <data key="type_id">simple</data> @@ -1224,6 +1266,34 @@ <requiredEntity type="product_extension_attribute">EavStock1</requiredEntity> <requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity> </entity> + <entity name="ABC_dfj_SimpleProduct" type="product"> + <data key="name" unique="suffix">abc_dfj_</data> + <data key="sku" unique="suffix">abc_dfj</data> + <data key="price">50.00</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="status">1</data> + <data key="quantity">100</data> + <data key="weight">1</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">ProductDescriptionAdvancedSearchABC</requiredEntity> + <requiredEntity type="custom_attribute_array">ProductShortDescriptionAdvancedSearch</requiredEntity> + </entity> + <entity name="ABC_123_SimpleProduct" type="product"> + <data key="name" unique="suffix">adc_123_</data> + <data key="sku" unique="suffix">adc_123</data> + <data key="price">100.00</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="status">1</data> + <data key="quantity">100</data> + <data key="weight">1</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">ProductDescriptionAdvancedSearchADC123</requiredEntity> + <requiredEntity type="custom_attribute_array">ProductShortDescriptionAdvancedSearchADC123</requiredEntity> + </entity> <entity name="SimpleProductUpdatePrice11" type="product2"> <data key="price">11.00</data> </entity> diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductFormData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductFormData.xml new file mode 100644 index 000000000000..933276edd834 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductFormData.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="ProductFormMessages" type="message"> + <data key="remove_image_notice">The image cannot be removed as it has been assigned to the other image role</data> + <data key="save_success">You saved the product.</data> + </entity> +</entities> diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryMainActionsSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryMainActionsSection.xml index e8adede5b2de..4aca4a09602b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryMainActionsSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryMainActionsSection.xml @@ -13,6 +13,7 @@ <element name="DeleteButton" type="button" selector=".page-actions-inner #delete" timeout="30"/> <element name="CategoryStoreViewDropdownToggle" type="button" selector="#store-change-button"/> <element name="CategoryStoreViewOption" type="button" selector="//div[contains(@class, 'store-switcher')]//a[normalize-space()='{{store}}']" parameterized="true"/> + <element name="CategoryStoreViewOptionSelected" type="button" selector="//div[contains(@class, 'store-switcher')]//div[contains(@class,'actions')]//button[contains(text(),'{{store}}')]" parameterized="true"/> <element name="CategoryStoreViewModalAccept" type="button" selector=".modal-popup.confirm._show .action-accept"/> <element name="allStoreViews" type="button" selector=".store-switcher .store-switcher-all" timeout="30"/> <element name="storeSwitcher" type="text" selector=".store-switcher"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml index e9ff40f98bb1..8a993a74a58d 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml @@ -11,5 +11,6 @@ <section name="AdminCategoryProductsSection"> <element name="sectionHeader" type="button" selector="div[data-index='assign_products']" timeout="30"/> <element name="addProducts" type="button" selector="#catalog_category_add_product_tabs" timeout="30"/> + <element name="addProductsDisabled" type="button" selector="#catalog_category_add_product_tabs[disabled]" timeout="30"/> </section> </sections> \ No newline at end of file diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductImagesSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductImagesSection.xml index 89eb1ed678cc..f20e9b3a11e5 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductImagesSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductImagesSection.xml @@ -14,6 +14,7 @@ <element name="imageUploadButton" type="button" selector="div.image div.fileinput-button"/> <element name="imageFile" type="text" selector="//*[@id='media_gallery_content']//img[contains(@src, '{{url}}')]" parameterized="true"/> <element name="removeImageButton" type="button" selector=".action-remove"/> + <element name="removeImageButtonForExactImage" type="button" selector="[id='media_gallery_content'] img[src*='{{imageName}}'] + div[class='actions'] button[class='action-remove']" parameterized="true"/> <element name="modalOkBtn" type="button" selector="button.action-primary.action-accept"/> <element name="uploadProgressBar" type="text" selector=".uploader .file-row"/> <element name="productImagesToggleState" type="button" selector="[data-index='gallery'] > [data-state-collapsible='{{status}}']" parameterized="true"/> @@ -27,6 +28,7 @@ <element name="roleSmall" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Small']"/> <element name="roleThumbnail" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Thumbnail']"/> <element name="roleSwatch" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = 'Swatch']"/> + <element name="isRoleChecked" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li/label[normalize-space(.) = '{{role}}']/parent::li[contains(@class,'selected')]" parameterized="true"/> <element name="isBaseSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Base']"/> <element name="isSmallSelected" type="button" selector="//div[contains(@class, 'field-image-role')]//ul/li[contains(@class, 'selected')]/label[normalize-space(.) = 'Small']"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml index feb4fffd12f5..51ef7fb77d74 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml @@ -60,6 +60,9 @@ <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickOnSaveButton"/> <waitForLoadingMaskToDisappear stepKey="waitForLoading"/> <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/> + <!--Clear cache and reindex--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> <!--Verify product is visible in category front page --> <amOnPage url="$$createCategory.name$$.html" stepKey="openCategoryStoreFrontPage"/> <waitForPageLoad stepKey="waitForCategoryPageToLoad"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml index e1cb45be22b4..a863de2716c9 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml @@ -63,6 +63,10 @@ <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickOnSaveButton"/> <waitForLoadingMaskToDisappear stepKey="waitForLoading"/> <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/> + + <!--Run re-index task --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!--Verify product is visible in category front page --> <amOnPage url="$$createCategory.name$$.html" stepKey="openCategoryStoreFrontPage"/> <waitForPageLoad stepKey="waitForCategoryPageToLoad"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml index 9115004ad958..a6890c2ad490 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml @@ -64,6 +64,9 @@ <waitForPageLoad stepKey="waitForPageTitleToBeSaved"/> <!--Verify the Category Title--> <see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{_defaultCategory.name}}" stepKey="seePageTitle" /> + <!--Clear cache and reindex--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> <!--Verify Product in store front page--> <amOnPage url="{{StorefrontCategoryPage.url(_defaultCategory.name_lwr)}}" stepKey="amOnCategoryPage"/> <waitForPageLoad stepKey="waitForPageToBeLoaded"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml index 5c798db29b97..63a964f4b5e9 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml @@ -90,6 +90,9 @@ <waitForPageLoad stepKey="waitForProductToSave"/> <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/> + <!--Run Re-Index task --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!--Verify product attribute added in product form --> <scrollTo selector="{{AdminProductFormSection.contentTab}}" stepKey="scrollToContentTab"/> <waitForElementVisible selector="{{AdminProductFormSection.attributeTab}}" stepKey="waitForAttributeToVisible"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml index 58737dd50974..23f772a395a7 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml @@ -117,6 +117,8 @@ <!-- Verify we see success message --> <see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertVirtualProductSuccessMessage"/> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> <!-- Verify customer see created virtual product with custom options suite and import options(from above step) on storefront page and is searchable by sku --> <amOnPage url="{{StorefrontProductPage.url(virtualProductCustomImportOptions.urlKey)}}" stepKey="goToProductPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml index 78247f494359..9055e961f889 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml @@ -24,6 +24,9 @@ <createData entity="Simple_US_CA_Customer" stepKey="customer" /> </before> <after> + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteVirtualProduct"> + <argument name="product" value="virtualProductGeneralGroup"/> + </actionGroup> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="categoryEntity"/> <deleteData stepKey="deleteCustomer" createDataKey="customer"/> <actionGroup ref="logout" stepKey="logout"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml new file mode 100644 index 000000000000..f334cbc218b7 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml @@ -0,0 +1,186 @@ +<?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="AdminDeleteProductsImageInCaseOfMultipleStoresTest"> + <annotations> + <stories value="MultipleStores"/> + <features value="Catalog"/> + <title value="Delete products image in case of multiple stores"/> + <description value="Delete products image in case of multiple stores"/> + <severity value="MAJOR"/> + <testCaseId value="MC-11466"/> + <useCaseId value="MC-15391"/> + <group value="Catalog"/> + </annotations> + <before> + <!--Login as admin--> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <!--Create new website, store and store view--> + <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createWebsite"> + <argument name="newWebsiteName" value="{{NewWebSiteData.name}}"/> + <argument name="websiteCode" value="{{NewWebSiteData.code}}"/> + </actionGroup> + <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore"> + <argument name="website" value="{{NewWebSiteData.name}}"/> + <argument name="storeGroupName" value="{{NewStoreData.name}}"/> + <argument name="storeGroupCode" value="{{NewStoreData.code}}"/> + </actionGroup> + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView"> + <argument name="StoreGroup" value="NewStoreData"/> + <argument name="customStore" value="NewStoreViewData"/> + </actionGroup> + <!--Create Product--> + <createData entity="SimpleProduct2" stepKey="createProduct"/> + <createData entity="SubCategory" stepKey="createSubCategory"/> + <createData entity="NewRootCategory" stepKey="createRootCategory"/> + <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="visitAdminProductPage"/> + <waitForPageLoad stepKey="waitForProductPageLoad0"/> + <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="['Default Category', $$createRootCategory.name$$, $$createSubCategory.name$$]" stepKey="fillCategory"/> + <actionGroup ref="saveProductForm" stepKey="saveProduct"/> + <!--Add images to the product--> + <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="visitAdminProductPage2"/> + <waitForPageLoad stepKey="waitForProductPageLoad1"/> + <actionGroup ref="addProductImage" stepKey="addImageToProduct"> + <argument name="image" value="ProductImage"/> + </actionGroup> + <actionGroup ref="addProductImage" stepKey="addImage1ToProduct"> + <argument name="image" value="TestImageNew"/> + </actionGroup> + <actionGroup ref="saveProductForm" stepKey="saveProduct1"/> + <!--Enable config to view created store view on store front--> + <createData entity="EnableWebUrlOptionsConfig" stepKey="enableWebUrlOptionsConfig"/> + </before> + <after> + <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite"> + <argument name="websiteName" value="{{NewWebSiteData.name}}"/> + </actionGroup> + <magentoCLI stepKey="reindex" command="indexer:reindex"/> + <magentoCLI stepKey="flushCache" command="cache:flush"/> + <deleteData createDataKey="createSubCategory" stepKey="deleteSubCategory"/> + <deleteData createDataKey="createRootCategory" stepKey="deleteRootCategory"/> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <createData entity="DefaultWebUrlOptionsConfig" stepKey="defaultWebUrlOptionsConfig"/> + <actionGroup ref="logout" stepKey="logout"/> + </after> + <!--Grab new store view code--> + <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="navigateToNewWebsitePage"/> + <waitForPageLoad stepKey="waitForStoresPageLoad"/> + <fillField userInput="{{NewWebSiteData.name}}" selector="{{AdminStoresGridSection.websiteFilterTextField}}" stepKey="fillSearchWebsiteField"/> + <click selector="{{AdminStoresGridSection.searchButton}}" stepKey="clickSearchButton"/> + <click selector="{{AdminStoresGridSection.storeNameInFirstRow}}" stepKey="clickFirstRow"/> + <grabValueFrom selector="{{AdminNewStoreSection.storeCodeTextField}}" stepKey="grabStoreViewCode"/> + <click selector="{{AdminNewStoreViewActionsSection.backButton}}" stepKey="clickBack"/> + <click selector="{{AdminStoresGridSection.resetButton}}" stepKey="clickResetButton"/> + <waitForPageLoad stepKey="waitForStorePageLoad"/> + <!--Open product page on admin--> + <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="openProductEditPage"/> + <waitForPageLoad stepKey="waitForProductPageLoad2"/> + <!--Enable the newly created website and save the product--> + <actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="selectWebsiteInProduct2"> + <argument name="website" value="{{NewWebSiteData.name}}"/> + </actionGroup> + <actionGroup ref="saveProductForm" stepKey="saveProduct2"/> + <!--Reindex and flush cache--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <!--Switch to 'Default Store View' scope and open product page--> + <actionGroup ref="SwitchToTheNewStoreView" stepKey="SwitchDefaultStoreView"> + <argument name="storeViewName" value="'Default Store View'"/> + </actionGroup> + <waitForPageLoad stepKey="waitForProductPageLoad3"/> + <!--Assign all roles to first image on default store view--> + <actionGroup ref="AdminAssignImageRolesIfUnassignedActionGroup" stepKey="assignAllRolesToFirstImage"> + <argument name="image" value="ProductImage"/> + </actionGroup> + <actionGroup ref="saveProductForm" stepKey="saveProduct3"/> + <!--Switch to newly created Store View scope and open product page--> + <actionGroup ref="SwitchToTheNewStoreView" stepKey="SwitchNewStoreView"> + <argument name="storeViewName" value="{{NewStoreViewData.name}}"/> + </actionGroup> + <waitForPageLoad stepKey="waitForProductPageLoad4"/> + <!--Assign all roles to first image on new store view--> + <actionGroup ref="AdminAssignImageRolesIfUnassignedActionGroup" stepKey="assignAllRolesToFirstImage2"> + <argument name="image" value="ProductImage"/> + </actionGroup> + <actionGroup ref="saveProductForm" stepKey="saveProduct4"/> + <!--Switch to 'All Store Views' scope and open product page--> + <actionGroup ref="SwitchToTheNewStoreView" stepKey="SwitchAllStoreView"> + <argument name="storeViewName" value="'All Store Views'"/> + </actionGroup> + <waitForPageLoad stepKey="waitForProductPageLoad5"/> + <!--Remove product image and save--> + <actionGroup ref="RemoveProductImageByName" stepKey="removeProductImage"> + <argument name="image" value="ProductImage"/> + </actionGroup> + <actionGroup ref="saveProductForm" stepKey="saveProduct5"/> + <!--Assert notification and success messages--> + <see selector="{{StorefrontMessagesSection.success}}" userInput="{{ProductFormMessages.save_success}}" stepKey="seeSuccessMessage"/> + <see selector="{{StorefrontMessagesSection.noticeMessage}}" userInput="{{ProductFormMessages.remove_image_notice}}" stepKey="seeNotification"/> + <!--Reopen image tab and see the image is not deleted--> + <conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesTab"/> + <waitForPageLoad stepKey="waitForImagesLoad"/> + <seeElement selector="{{AdminProductImagesSection.imageFile(ProductImage.fileName)}}" stepKey="seeImageIsNotDeleted"/> + <!--Switch to newly created Store View scope and open product page--> + <actionGroup ref="SwitchToTheNewStoreView" stepKey="SwitchNewStoreView2"> + <argument name="storeViewName" value="{{NewStoreViewData.name}}"/> + </actionGroup> + <waitForPageLoad stepKey="waitForProductPageLoad6"/> + <!--Assign all roles to second image on default store view--> + <actionGroup ref="AdminAssignImageRolesIfUnassignedActionGroup" stepKey="assignAllRolesToSecondImage"> + <argument name="image" value="TestImageNew"/> + </actionGroup> + <actionGroup ref="saveProductForm" stepKey="saveProduct6"/> + <!--Switch to 'All Store Views' scope and open product page--> + <actionGroup ref="SwitchToTheNewStoreView" stepKey="SwitchAllStoreView2"> + <argument name="storeViewName" value="'All Store Views'"/> + </actionGroup> + <waitForPageLoad stepKey="waitForProductPageLoad7"/> + <!--Remove product image and save--> + <actionGroup ref="RemoveProductImageByName" stepKey="removeProductFirstImage"> + <argument name="image" value="ProductImage"/> + </actionGroup> + <actionGroup ref="saveProductForm" stepKey="saveProduct7"/> + <!--Assert notification and success messages--> + <see selector="{{StorefrontMessagesSection.success}}" userInput="{{ProductFormMessages.save_success}}" stepKey="seeSuccessMessage2"/> + <see selector="{{StorefrontMessagesSection.noticeMessage}}" userInput="{{ProductFormMessages.remove_image_notice}}" stepKey="seeNotification2"/> + <!--Reopen image tab and see the image is not deleted--> + <conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesTab2"/> + <waitForPageLoad stepKey="waitForImagesLoad2"/> + <seeElement selector="{{AdminProductImagesSection.imageFile(ProductImage.fileName)}}" stepKey="seeImageIsNotDeleted2"/> + <!--Switch to newly created Store View scope and open product page--> + <actionGroup ref="SwitchToTheNewStoreView" stepKey="SwitchNewStoreView3"> + <argument name="storeViewName" value="{{NewStoreViewData.name}}"/> + </actionGroup> + <waitForPageLoad stepKey="waitForProductPageLoad8"/> + <!--Remove second image and save--> + <actionGroup ref="RemoveProductImageByName" stepKey="removeProductSecondImage"> + <argument name="image" value="TestImageNew"/> + </actionGroup> + <actionGroup ref="saveProductForm" stepKey="saveProduct8"/> + <!--Assert success messages--> + <see selector="{{StorefrontMessagesSection.success}}" userInput="{{ProductFormMessages.save_success}}" stepKey="seeSuccessMessage3"/> + <!--Reopen image tab and see the image is deleted--> + <conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesTab3"/> + <waitForPageLoad stepKey="waitForImagesLoad3"/> + <dontSeeElement selector="{{AdminProductImagesSection.imageFile(TestImageNew.fileName)}}" stepKey="seeImageIsDeleted"/> + <!--Open Storefront on Default store view and assert image existence--> + <amOnPage url="{{StorefrontCategoryPage.url($$createSubCategory.name$$)}}" stepKey="navigateToCategoryPage"/> + <waitForPageLoad stepKey="waitForCategoryPageLoad0"/> + <grabAttributeFrom userInput="src" selector="{{StorefrontCategoryMainSection.mediaDescription($$createProduct.name$$)}}" stepKey="grabAttributeFromImage"/> + <assertContains expectedType="string" expected="{{ProductImage.filename}}" actual="$grabAttributeFromImage" stepKey="assertProductImageAbsence"/> + <!--Open Storefront on newly created store view and assert image absence--> + <amOnPage url="$grabStoreViewCode" stepKey="navigateToHomePageOfSpecificStore"/> + <waitForPageLoad stepKey="waitForHomePageLoad"/> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createSubCategory.name$$)}}" stepKey="clickCategory"/> + <waitForPageLoad stepKey="waitForCategoryPageLoad1"/> + <grabAttributeFrom userInput="src" selector="{{StorefrontCategoryMainSection.mediaDescription($$createProduct.name$$)}}" stepKey="grabAttributeFromImage2"/> + <assertContains expectedType="string" expected="small_image" actual="$grabAttributeFromImage2" stepKey="assertProductImageAbsence2"/> + </test> +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDisableProductOnChangingAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDisableProductOnChangingAttributeSetTest.xml new file mode 100644 index 000000000000..dab1704d50bf --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDisableProductOnChangingAttributeSetTest.xml @@ -0,0 +1,49 @@ +<?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="AdminDisableProductOnChangingAttributeSetTest"> + <annotations> + <features value="Catalog"/> + <stories value="Disabled product is enabled when change attribute set"/> + <title value="Verify product status while changing attribute set"/> + <description value="Value set for enabled product has to be shown when attribute set is changed"/> + <severity value="MAJOR"/> + <testCaseId value="MC-19716"/> + <group value="catalog"/> + </annotations> + <before> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + <createData entity="_defaultProduct" stepKey="createSimpleProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="CatalogAttributeSet" stepKey="createAttributeSet"/> + </before> + <after> + <deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductsFilter"/> + <actionGroup ref="logout" stepKey="logout"/> + </after> + <actionGroup ref="LoginAsAdmin" stepKey="login"/> + <amOnPage url="{{AdminProductAttributeSetEditPage.url}}/$$createAttributeSet.attribute_set_id$$/" stepKey="onAttributeSetEdit"/> + <actionGroup ref="SaveAttributeSet" stepKey="SaveAttributeSet"/> + <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct"> + <argument name="product" value="$$createSimpleProduct$$"/> + </actionGroup> + + <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct1"> + <argument name="product" value="$$createSimpleProduct$$"/> + </actionGroup> + <actionGroup ref="DisableProductLabelActionGroup" stepKey="disableWhileChangingAttributeSet" > + <argument name="createAttributeSet" value="$$createAttributeSet$$"/> + </actionGroup> + + </test> +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest.xml index bee13bec370d..18d4b9e341cc 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest.xml @@ -18,6 +18,85 @@ <testCaseId value="MC-128"/> <group value="Catalog"/> <group value="Product Attributes"/> + <group value="SearchEngineElasticsearch"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView" /> + <createData entity="ApiProductWithDescription" stepKey="createProductOne"/> + <createData entity="ApiProductWithDescription" stepKey="createProductTwo"/> + <createData entity="ApiProductNameWithNoSpaces" stepKey="createProductThree"/> + </before> + <after> + <deleteData createDataKey="createProductOne" stepKey="deleteProductOne"/> + <deleteData createDataKey="createProductTwo" stepKey="deleteProductTwo"/> + <deleteData createDataKey="createProductThree" stepKey="deleteProductThree"/> + <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="AdminDeleteStoreViewActionGroup"/> + <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> + </after> + + <!-- Search and select products --> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> + <waitForPageLoad stepKey="waitForProductIndexPageLoad"/> + <actionGroup ref="searchProductGridByKeyword2" stepKey="searchByKeyword"> + <argument name="keyword" value="api-simple-product"/> + </actionGroup> + <actionGroup ref="sortProductsByIdDescending" stepKey="sortProductsByIdDescending"/> + <click selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="clickCheckbox1"/> + <click selector="{{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey="clickCheckbox2"/> + <!-- Mass update attributes --> + <click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickDropdown"/> + <click selector="{{AdminProductGridSection.bulkActionOption('Update attributes')}}" stepKey="clickOption"/> + <waitForPageLoad stepKey="waitForBulkUpdatePage"/> + <seeInCurrentUrl stepKey="seeInUrl" url="catalog/product_action_attribute/edit/"/> + <!-- Switch store view --> + <actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchStoreViewActionGroup"/> + <!-- Update attribute --> + <click selector="{{AdminEditProductAttributesSection.ChangeAttributeDescriptionToggle}}" stepKey="toggleToChangeDescription"/> + <fillField selector="{{AdminEditProductAttributesSection.AttributeDescription}}" userInput="Updated $$createProductOne.custom_attributes[description]$$" stepKey="fillAttributeDescriptionField"/> + <click selector="{{AdminEditProductAttributesSection.Save}}" stepKey="save"/> + <see selector="{{AdminProductMessagesSection.successMessage}}" userInput="Message is added to queue" stepKey="seeAttributeUpateSuccessMsg"/> + + + <!-- Assert on storefront default view with partial word of product name --> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupDefault"/> + <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndDescriptionActionGroup" stepKey="searchByNameDefault"> + <argument name="name" value="$$createProductOne.name$$"/> + <argument name="description" value="$$createProductOne.custom_attributes[description]$$"/> + </actionGroup> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultDefault"/> + <see userInput="2 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="seeInDefault"/> + + <!-- Assert on storefront custom view with partial word of product name --> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupCustom"/> + <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="StorefrontSwitchStoreViewActionGroup"/> + <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndDescriptionActionGroup" stepKey="searchByNameCustom"> + <argument name="name" value="$$createProductOne.name$$"/> + <argument name="description" value="Updated $$createProductOne.custom_attributes[description]$$"/> + </actionGroup> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultCustom"/> + <see userInput="2 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="seeInCustom"/> + + <!-- Assert Storefront default view with exact product name --> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupDefault1"/> + <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndDescriptionActionGroup" stepKey="searchByNameDefault1"> + <argument name="name" value="$$createProductThree.name$$"/> + <argument name="description" value="$$createProductThree.custom_attributes[description]$$"/> + </actionGroup> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultDefault1"/> + <see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="seeInDefault1"/> + </test> + <test name="AdminMassUpdateProductAttributesStoreViewScopeMysqlTest"> + <annotations> + <features value="Catalog"/> + <stories value="Mass update product attributes"/> + <title value="Admin should be able to mass update product attributes in store view scope using the Mysql search engine"/> + <description value="Admin should be able to mass update product attributes in store view scope using the Mysql search engine"/> + <severity value="AVERAGE"/> + <testCaseId value="MC-20467"/> + <group value="Catalog"/> + <group value="Product Attributes"/> + <group value="SearchEngineMysql"/> </annotations> <before> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductStatusStoreViewScopeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductStatusStoreViewScopeTest.xml index e9b54e3f1a3d..02e8157282de 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductStatusStoreViewScopeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductStatusStoreViewScopeTest.xml @@ -18,6 +18,157 @@ <testCaseId value="MAGETWO-59361"/> <group value="Catalog"/> <group value="Product Attributes"/> + <group value="SearchEngineElasticsearch"/> + </annotations> + <before> + <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + + <!--Create Website --> + <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite"> + <argument name="newWebsiteName" value="Second Website"/> + <argument name="websiteCode" value="second_website"/> + </actionGroup> + + <!--Create Store --> + <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore"> + <argument name="website" value="Second Website"/> + <argument name="storeGroupName" value="Second Store"/> + <argument name="storeGroupCode" value="second_store"/> + </actionGroup> + + <!--Create Store view --> + <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/> + <waitForPageLoad stepKey="waitForSystemStorePage"/> + <click selector="{{AdminStoresMainActionsSection.createStoreViewButton}}" stepKey="createStoreViewButton"/> + <waitForPageLoad stepKey="waitForProductPageLoad"/> + <waitForElementVisible selector="//legend[contains(., 'Store View Information')]" stepKey="waitForNewStorePageToOpen"/> + <selectOption userInput="Second Store" selector="{{AdminNewStoreSection.storeGrpDropdown}}" stepKey="selectStoreGroup"/> + <fillField userInput="Second Store View" selector="{{AdminNewStoreSection.storeNameTextField}}" stepKey="fillStoreViewName"/> + <fillField userInput="second_store_view" selector="{{AdminNewStoreSection.storeCodeTextField}}" stepKey="fillStoreViewCode"/> + <selectOption selector="{{AdminNewStoreSection.statusDropdown}}" userInput="1" stepKey="enableStoreViewStatus"/> + <click selector="{{AdminNewStoreViewActionsSection.saveButton}}" stepKey="clickSaveStoreView" /> + <waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForModal" /> + <see selector="{{AdminConfirmationModalSection.title}}" userInput="Warning message" stepKey="seeWarning" /> + <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="dismissModal" /> + <waitForPageLoad stepKey="waitForPageLoad2" time="180" /> + <waitForElementVisible selector="{{AdminStoresGridSection.storeFilterTextField}}" time="150" stepKey="waitForPageReolad"/> + <see userInput="You saved the store view." stepKey="seeSavedMessage" /> + + <!--Create a Simple Product 1 --> + <actionGroup ref="createSimpleProductAndAddToWebsite" stepKey="createSimpleProduct1"> + <argument name="product" value="simpleProductForMassUpdate"/> + <argument name="website" value="Second Website"/> + </actionGroup> + + <!--Create a Simple Product 2 --> + <actionGroup ref="createSimpleProductAndAddToWebsite" stepKey="createSimpleProduct2"> + <argument name="product" value="simpleProductForMassUpdate2"/> + <argument name="website" value="Second Website"/> + </actionGroup> + </before> + <after> + <!--Delete website --> + <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteSecondWebsite"> + <argument name="websiteName" value="Second Website"/> + </actionGroup> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> + + <!--Delete Products --> + <actionGroup ref="DeleteProductActionGroup" stepKey="deleteProduct1"> + <argument name="productName" value="simpleProductForMassUpdate.name"/> + </actionGroup> + <actionGroup ref="DeleteProductActionGroup" stepKey="deleteProduct2"> + <argument name="productName" value="simpleProductForMassUpdate2.name"/> + </actionGroup> + <actionGroup ref="logout" stepKey="amOnLogoutPage"/> + </after> + + <!-- Search and select products --> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> + <waitForPageLoad stepKey="waitForProductIndexPageLoad"/> + <actionGroup ref="searchProductGridByKeyword2" stepKey="searchByKeyword"> + <argument name="keyword" value="{{simpleProductForMassUpdate.keyword}}"/> + </actionGroup> + <actionGroup ref="sortProductsByIdDescending" stepKey="sortProductsByIdDescending"/> + + <!-- Filter to Second Store View --> + <actionGroup ref="AdminFilterStoreViewActionGroup" stepKey="filterStoreView" > + <argument name="customStore" value="'Second Store View'" /> + </actionGroup> + + <!-- Select Product 2 --> + <click selector="{{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey="clickCheckbox2"/> + + <!-- Mass update attributes --> + <click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickDropdown"/> + <click selector="{{AdminProductGridSection.bulkActionOption('Change status')}}" stepKey="clickOption"/> + <click selector="{{AdminProductGridSection.bulkActionOption('Disable')}}" stepKey="clickDisabled"/> + <waitForPageLoad stepKey="waitForBulkUpdatePage"/> + + <!-- Verify Product Statuses --> + <see selector="{{AdminProductGridSection.productGridContentsOnRow('1')}}" userInput="Enabled" stepKey="checkIfProduct1IsEnabled"/> + <see selector="{{AdminProductGridSection.productGridContentsOnRow('2')}}" userInput="Disabled" stepKey="checkIfProduct2IsDisabled"/> + + <!-- Filter to Default Store View --> + <actionGroup ref="AdminFilterStoreViewActionGroup" stepKey="filterDefaultStoreView"> + <argument name="customStore" value="'Default'" /> + </actionGroup> + + <!-- Verify Product Statuses --> + <see selector="{{AdminProductGridSection.productGridContentsOnRow('1')}}" userInput="Enabled" stepKey="checkIfDefaultViewProduct1IsEnabled"/> + <see selector="{{AdminProductGridSection.productGridContentsOnRow('2')}}" userInput="Enabled" stepKey="checkIfDefaultViewProduct2IsEnabled"/> + + <!-- Assert on storefront default view with first product --> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupDefault"/> + <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndDescriptionActionGroup" stepKey="searchByNameDefault"> + <argument name="name" value="{{simpleProductForMassUpdate.name}}"/> + <argument name="description" value=""/> + </actionGroup> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultDefault"/> + <see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="seeInDefault"/> + + <!-- Assert on storefront default view with second product --> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupDefaultToSearchSecondProduct"/> + <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndDescriptionActionGroup" stepKey="searchByNameDefaultWithSecondProduct"> + <argument name="name" value="{{simpleProductForMassUpdate2.name}}"/> + <argument name="description" value=""/> + </actionGroup> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultDefaultForSecondProduct"/> + <see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="seeInDefaultSecondProductResults"/> + + <!--Enable the product in Default store view--> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex2"/> + <waitForPageLoad stepKey="waitForProductIndexPageLoad2"/> + <click selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="clickCheckboxDefaultStoreView"/> + <click selector="{{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey="clickCheckboxDefaultStoreView2"/> + + <!-- Mass update attributes --> + <click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickDropdownDefaultStoreView"/> + <click selector="{{AdminProductGridSection.bulkActionOption('Change status')}}" stepKey="clickOptionDefaultStoreView"/> + <click selector="{{AdminProductGridSection.bulkActionOption('Disable')}}" stepKey="clickDisabledDefaultStoreView"/> + <waitForPageLoad stepKey="waitForBulkUpdatePageDefaultStoreView"/> + <see selector="{{AdminProductGridSection.productGridContentsOnRow('1')}}" userInput="Disabled" stepKey="checkIfProduct2IsDisabledDefaultStoreView"/> + + <!-- Assert on storefront default view --> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupDefault2"/> + <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndDescriptionActionGroup" stepKey="searchByNameDefault2"> + <argument name="name" value="{{simpleProductForMassUpdate.name}}"/> + <argument name="description" value=""/> + </actionGroup> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultDefault2"/> + <see userInput="We can't find any items matching these search criteria." selector="{{StorefrontCatalogSearchAdvancedResultMainSection.message}}" stepKey="seeInDefault2"/> + </test> + <test name="AdminMassUpdateProductStatusStoreViewScopeMysqlTest"> + <annotations> + <features value="Catalog"/> + <stories value="Mass update product status"/> + <title value="Admin should be able to mass update product statuses in store view scope using the Mysql search engine"/> + <description value="Admin should be able to mass update product statuses in store view scope using the Mysql search engine"/> + <severity value="AVERAGE"/> + <testCaseId value="MC-20471"/> + <group value="Catalog"/> + <group value="Product Attributes"/> + <group value="SearchEngineMysql"/> </annotations> <before> <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> @@ -147,5 +298,5 @@ </actionGroup> <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultDefault2"/> <see userInput="We can't find any items matching these search criteria." selector="{{StorefrontCatalogSearchAdvancedResultMainSection.message}}" stepKey="seeInDefault2"/> - </test> -</tests> + </test> +</tests> \ No newline at end of file diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml index d17078d794b4..b613068893b0 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml @@ -59,6 +59,9 @@ <waitForPageLoad stepKey="waitForSecondCategoryToSave"/> <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/> + <!--Run re-index task --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!--Verify category displayed in store front page--> <amOnPage url="/$$createDefaultCategory.name$$/{{SimpleSubCategory.name}}.html" stepKey="seeTheCategoryInStoreFrontPage"/> <waitForPageLoad stepKey="waitForStoreFrontPageLoad"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest.xml index 41f27497a50e..df50edd20410 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest.xml @@ -144,6 +144,8 @@ <!-- Save the second product --> <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct2"/> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> <!-- Go to the admin grid and see the uploaded image --> <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductIndex3"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml index 1cb01ac11cb8..ad110ceee32d 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml @@ -64,6 +64,10 @@ <!--Verify Category Title--> <see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{_defaultCategory.name}}" stepKey="seePageTitle" /> + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <!--Verify Category in store front page--> <amOnPage url="{{StorefrontCategoryPage.url(_defaultCategory.name)}}" stepKey="seeDefaultProductPage"/> <waitForPageLoad stepKey="waitForPageToBeLoaded"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml index 637ae790c16c..82395e5d6e0e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml @@ -94,6 +94,9 @@ <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSection1"/> <seeInField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductRegularPrice245InStock.urlKey}}" stepKey="seeUrlKey"/> + <!--Run re-index task --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!--Verify customer see updated simple product link on category page --> <amOnPage url="{{StorefrontCategoryPage.url($$categoryEntity.name$$)}}" stepKey="openCategoryPage"/> <waitForPageLoad stepKey="waitForCategoryPageLoad"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml index 045b3f3420ff..4817b3497c97 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml @@ -94,6 +94,9 @@ <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSection1"/> <seeInField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductRegularPrice32501InStock.urlKey}}" stepKey="seeUrlKey"/> + <!--Run re-index task --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!--Verify customer see updated simple product link on category page --> <amOnPage url="{{StorefrontCategoryPage.url($$categoryEntity.name$$)}}" stepKey="openCategoryPage"/> <waitForPageLoad stepKey="waitForCategoryPageLoad"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceInStockVisibleInCategoryOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceInStockVisibleInCategoryOnlyTest.xml index 8ac56d09e5b4..9fa0e155a4fe 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceInStockVisibleInCategoryOnlyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceInStockVisibleInCategoryOnlyTest.xml @@ -28,6 +28,9 @@ <createData entity="SimpleSubCategory" stepKey="categoryEntity"/> </before> <after> + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteVirtualProduct"> + <argument name="product" value="updateVirtualProductRegularPrice"/> + </actionGroup> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/> <deleteData stepKey="deleteSimpleSubCategory2" createDataKey="categoryEntity"/> <actionGroup ref="logout" stepKey="logout"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryAndSearchTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryAndSearchTest.xml index d28e9ddbb127..e0e836085098 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryAndSearchTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryAndSearchTest.xml @@ -28,6 +28,9 @@ <createData entity="SimpleSubCategory" stepKey="categoryEntity"/> </before> <after> + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteVirtualProduct"> + <argument name="product" value="updateVirtualProductTierPriceInStock"/> + </actionGroup> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/> <deleteData stepKey="deleteSimpleSubCategory2" createDataKey="categoryEntity"/> <actionGroup ref="logout" stepKey="logout"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryOnlyTest.xml index 22dd2b0054db..677cc4c65ce8 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryOnlyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryOnlyTest.xml @@ -28,6 +28,9 @@ <createData entity="SimpleSubCategory" stepKey="categoryEntity"/> </before> <after> + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteVirtualProduct"> + <argument name="product" value="updateVirtualProductWithTierPriceInStock"/> + </actionGroup> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/> <deleteData stepKey="deleteSimpleSubCategory2" createDataKey="categoryEntity"/> <actionGroup ref="logout" stepKey="logout"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceOutOfStockVisibleInCategoryAndSearchTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceOutOfStockVisibleInCategoryAndSearchTest.xml index 29c7536d2162..f0148f3d384c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceOutOfStockVisibleInCategoryAndSearchTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceOutOfStockVisibleInCategoryAndSearchTest.xml @@ -28,6 +28,9 @@ <createData entity="SimpleSubCategory" stepKey="categoryEntity"/> </before> <after> + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteVirtualProduct"> + <argument name="product" value="updateVirtualTierPriceOutOfStock"/> + </actionGroup> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/> <deleteData stepKey="deleteSimpleSubCategory2" createDataKey="categoryEntity"/> <actionGroup ref="logout" stepKey="logout"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml index a4c8b492d9d8..867f097042a1 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml @@ -36,7 +36,7 @@ <group value="Catalog"/> </annotations> <before> - <createData entity="ApiProductWithDescription" stepKey="product"/> + <createData entity="ApiProductWithDescriptionAndUnderscoredSku" stepKey="product"/> </before> <after> <deleteData createDataKey="product" stepKey="delete"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchVirtualProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchVirtualProductTest.xml index 84c3f81ef6db..07b802637b2e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchVirtualProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchVirtualProductTest.xml @@ -33,7 +33,7 @@ <group value="Catalog"/> </annotations> <before> - <createData entity="ApiVirtualProductWithDescription" stepKey="product"/> + <createData entity="ApiVirtualProductWithDescriptionAndUnderscoredSku" stepKey="product"/> </before> </test> <test name="AdvanceCatalogSearchVirtualProductByDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByDescriptionTest"> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml index 7c0de6da18ca..ad66214e902f 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml @@ -17,6 +17,203 @@ <description value="User browses catalog, searches for product, adds product to cart, adds product to wishlist, compares products, uses coupon code and checks out."/> <severity value="CRITICAL"/> <testCaseId value="MAGETWO-87435"/> + <group value="SearchEngineElasticsearch"/> + </annotations> + <before> + <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> + + <createData entity="ApiCategory" stepKey="createCategory"/> + + <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct1"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createSimpleProduct1Image"> + <requiredEntity createDataKey="createSimpleProduct1"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryMagentoLogo" stepKey="createSimpleProduct1Image1"> + <requiredEntity createDataKey="createSimpleProduct1"/> + </createData> + <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct1" createDataKey="createSimpleProduct1"/> + + <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct2"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createSimpleProduct2Image"> + <requiredEntity createDataKey="createSimpleProduct2"/> + </createData> + <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct2" createDataKey="createSimpleProduct2"/> + </before> + <after> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createSimpleProduct1Image" stepKey="deleteSimpleProduct1Image"/>--> + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createSimpleProduct1Image1" stepKey="deleteSimpleProduct1Image1"/>--> + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/> + + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createSimpleProduct2Image" stepKey="deleteSimpleProduct2Image"/>--> + <deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/> + </after> + + <!--Re-index--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + + <!-- Step 1: User browses catalog --> + <comment userInput="Start of browsing catalog" stepKey="startOfBrowsingCatalog" /> + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage"/> + <waitForPageLoad stepKey="homeWaitForPageLoad"/> + <waitForElementVisible selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeWaitForWelcomeMessage"/> + <see userInput="Default welcome msg!" selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeCheckWelcome"/> + + <!-- Open Category --> + <comment userInput="Open category" stepKey="commentOpenCategory" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="browseClickCategory"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategory"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <!-- Check simple product 1 in category --> + <comment userInput="Check simple product 1 in category" stepKey="commentCheckSimpleProductInCategory" /> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct1"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="browseGrabSimpleProduct1ImageSrc"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabSimpleProduct1ImageSrc" stepKey="browseAssertSimpleProduct1ImageNotDefault"/> + <!-- Check simple product 2 in category --> + <comment userInput="Check simple product 2 in category" stepKey="commentCheckSimpleProduct2InCategory" /> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct2"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="browseGrabSimpleProduct2ImageSrc"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabSimpleProduct2ImageSrc" stepKey="browseAssertSimpleProduct2ImageNotDefault"/> + + <!-- View Simple Product 1 --> + <comment userInput="View simple product 1" stepKey="commentViewSimpleProduct1" after="browseAssertSimpleProduct2ImageNotDefault"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="browseClickCategorySimpleProduct1View" after="commentViewSimpleProduct1"/> + <waitForLoadingMaskToDisappear stepKey="waitForSimpleProduct1Viewloaded" /> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct1Page"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabSimpleProduct1PageImageSrc"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabSimpleProduct1PageImageSrc" stepKey="browseAssertSimpleProduct1PageImageNotDefault"/> + + <!-- View Simple Product 2 --> + <comment userInput="View simple product 2" stepKey="commentViewSimpleProduct2" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="clickCategory1"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct2.name$$)}}" stepKey="browseClickCategorySimpleProduct2View"/> + <waitForLoadingMaskToDisappear stepKey="waitForSimpleProduct2ViewLoaded" /> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct2Page"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabSimpleProduct2PageImageSrc"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabSimpleProduct2PageImageSrc" stepKey="browseAssertSimpleProduct2PageImageNotDefault"/> + <comment userInput="End of browsing catalog" stepKey="endOfBrowsingCatalog" after="browseAssertSimpleProduct2PageImageNotDefault"/> + + <!-- Step 4: User compares products --> + <comment userInput="Start of comparing products" stepKey="startOfComparingProducts" after="endOfBrowsingCatalog"/> + <!-- Add Simple Product 1 to comparison --> + <comment userInput="Add simple product 1 to comparison" stepKey="commentAddSimpleProduct1ToComparison" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory" /> + <waitForLoadingMaskToDisappear stepKey="waitForCategoryloaded" /> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct1"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrc"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrc" stepKey="compareAssertSimpleProduct1ImageNotDefault"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="compareClickSimpleProduct1"/> + <waitForLoadingMaskToDisappear stepKey="waitForCompareSimpleProduct1loaded" /> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="compareAssertProduct1Page"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="compareGrabSimpleProduct1PageImageSrc"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$compareGrabSimpleProduct1PageImageSrc" stepKey="compareAssertSimpleProduct2PageImageNotDefault"/> + <actionGroup ref="StorefrontAddProductToCompareActionGroup" stepKey="compareAddSimpleProduct1ToCompare"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + + <!-- Add Simple Product 2 to comparison --> + <comment userInput="Add simple product 2 to comparison" stepKey="commentAddSimpleProduct2ToComparison" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategory1"/> + <waitForLoadingMaskToDisappear stepKey="waitForCompareCategory1loaded" /> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory1"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct2"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct2ImageSrc"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct2ImageSrc" stepKey="compareAssertSimpleProduct2ImageNotDefault"/> + <actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="compareAddSimpleProduct2ToCompare"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + + <!-- Check products in comparison sidebar --> + <!-- Check simple product 1 in comparison sidebar --> + <comment userInput="Check simple product 1 in comparison sidebar" stepKey="commentCheckSimpleProduct1InComparisonSidebar" after="compareAddSimpleProduct2ToCompare"/> + <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareSimpleProduct1InSidebar" after="commentCheckSimpleProduct1InComparisonSidebar"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- Check simple product 2 in comparison sidebar --> + <comment userInput="Check simple product 2 in comparison sidebar" stepKey="commentCheckSimpleProduct2InComparisonSidebar" /> + <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareSimpleProduct2InSidebar"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + + <!-- Check products on comparison page --> + <!-- Check simple product 1 on comparison page --> + <comment userInput="Check simple product 1 on comparison page" stepKey="commentCheckSimpleProduct1OnComparisonPage" after="compareSimpleProduct2InSidebar"/> + <actionGroup ref="StorefrontOpenAndCheckComparisionActionGroup" stepKey="compareOpenComparePage" after="commentCheckSimpleProduct1OnComparisonPage"/> + <actionGroup ref="StorefrontCheckCompareSimpleProductActionGroup" stepKey="compareAssertSimpleProduct1InComparison"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct1ImageSrcInComparison"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct1ImageSrcInComparison" stepKey="compareAssertSimpleProduct1ImageNotDefaultInComparison"/> + <!-- Check simple product2 on comparison page --> + <comment userInput="Check simple product 2 on comparison page" stepKey="commentCheckSimpleProduct2OnComparisonPage" /> + <actionGroup ref="StorefrontCheckCompareSimpleProductActionGroup" stepKey="compareAssertSimpleProduct2InComparison"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="compareGrabSimpleProduct2ImageSrcInComparison"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabSimpleProduct2ImageSrcInComparison" stepKey="compareAssertSimpleProduct2ImageNotDefaultInComparison"/> + + <!-- Clear comparison sidebar --> + <comment userInput="Clear comparison sidebar" stepKey="commentClearComparisonSidebar" after="compareAssertSimpleProduct2ImageNotDefaultInComparison"/> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategoryBeforeClear" after="commentClearComparisonSidebar"/> + + + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory2"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontClearCompareActionGroup" stepKey="compareClearCompare"/> + <comment userInput="End of Comparing Products" stepKey="endOfComparingProducts" /> + </test> + <test name="EndToEndB2CGuestUserMysqlTest"> + <annotations> + <features value="End to End scenarios"/> + <stories value="B2C guest user - MAGETWO-75411"/> + <group value="e2e"/> + <title value="You should be able to pass End to End B2C Guest User scenario using the Mysql search engine"/> + <description value="User browses catalog, searches for product, adds product to cart, adds product to wishlist, compares products, uses coupon code and checks out using the Mysql search engine."/> + <severity value="CRITICAL"/> + <testCaseId value="MC-20476"/> + <group value="SearchEngineMysql"/> </annotations> <before> <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/ProductAvailableAfterEnablingSubCategoriesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/ProductAvailableAfterEnablingSubCategoriesTest.xml index 461ebde29fca..c8a7cdee66b5 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/ProductAvailableAfterEnablingSubCategoriesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/ProductAvailableAfterEnablingSubCategoriesTest.xml @@ -49,6 +49,10 @@ <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategoryWithProducts"/> <waitForPageLoad stepKey="waitForCategorySaved"/> <see userInput="You saved the category." stepKey="seeSuccessMessage"/> + + <!--Run re-index task--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <amOnPage url="$$createCategory.name$$.html" stepKey="goToCategoryStorefront"/> <waitForPageLoad stepKey="waitForCategoryStorefrontPage"/> <seeElement selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct.name$$)}}" stepKey="seeCreatedProduct"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontAdvanceCatalogSearchSimpleProductBySkuWithHyphenTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontAdvanceCatalogSearchSimpleProductBySkuWithHyphenTest.xml new file mode 100644 index 000000000000..3b1cd7ff02e6 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontAdvanceCatalogSearchSimpleProductBySkuWithHyphenTest.xml @@ -0,0 +1,29 @@ +<?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="StorefrontAdvanceCatalogSearchSimpleProductBySkuWithHyphenTest" extends="AdvanceCatalogSearchSimpleProductBySkuTest"> + <annotations> + <features value="Catalog"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search simple product with product sku that contains hyphen"/> + <description value="Guest customer should be able to advance search simple product with product sku that contains hyphen"/> + <severity value="MAJOR"/> + <testCaseId value="MC-20361"/> + <group value="Catalog"/> + <group value="SearchEngineMysql"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="product"/> + </before> + <after> + <deleteData createDataKey="product" stepKey="delete"/> + </after> + </test> +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontAdvanceCatalogSearchVirtualProductBySkuWithHyphenTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontAdvanceCatalogSearchVirtualProductBySkuWithHyphenTest.xml new file mode 100644 index 000000000000..d6b3a060ffd3 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontAdvanceCatalogSearchVirtualProductBySkuWithHyphenTest.xml @@ -0,0 +1,26 @@ +<?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="StorefrontAdvanceCatalogSearchVirtualProductBySkuWithHyphenTest" extends="AdvanceCatalogSearchSimpleProductBySkuTest"> + <annotations> + <features value="Catalog"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search virtual product with product sku that contains hyphen"/> + <description value="Guest customer should be able to advance search virtual product with product sku that contains hyphen"/> + <severity value="MAJOR"/> + <testCaseId value="MC-20385"/> + <group value="Catalog"/> + <group value="SearchEngineMysql"/> + </annotations> + <before> + <createData entity="ApiVirtualProductWithDescription" stepKey="product"/> + </before> + </test> +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml index ac2605ff5f3e..4eef6a2c0680 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml @@ -186,6 +186,11 @@ <waitForElementVisible selector="{{AdminCatalogStorefrontConfigSection.productsPerPageAllowedValues}}" stepKey="waitForSectionOpen"/> <seeInField selector="{{AdminCatalogStorefrontConfigSection.productsPerPageAllowedValues}}" userInput="12,24,36" stepKey="seeDefaultValueAllowedNumberProductsPerPage"/> <seeInField selector="{{AdminCatalogStorefrontConfigSection.productsPerPageDefaultValue}}" userInput="12" stepKey="seeDefaultValueProductPerPage"/> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <!-- Open storefront on the category page --> <comment userInput="Open storefront on the category page" stepKey="commentOpenStorefront"/> <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="goToStorefrontCreatedCategoryPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuote.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuote.xml index 386633f0e947..21f8e2e070e3 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuote.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuote.xml @@ -41,6 +41,9 @@ </actionGroup> <actionGroup ref="saveProductForm" stepKey="saveProduct"/> + <!--Run re-index task--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!--Check product in category listing--> <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="goToCategoryPage"/> <seeElement selector="{{StorefrontCategoryProductSection.ProductImageByNameAndSrc(SimpleProductNameWithDoubleQuote.name, ProductImage.fileName)}}" stepKey="seeCorrectImageCategoryPage"/> @@ -88,6 +91,9 @@ <deleteData createDataKey="createCategoryOne" stepKey="deleteCategory"/> </after> + <!--Run re-index task--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!--Check product in category listing--> <amOnPage url="{{StorefrontCategoryPage.url($$createCategoryOne.name$$)}}" stepKey="navigateToCategoryPage"/> <waitForPageLoad stepKey="waitforCategoryPageToLoad"/> @@ -111,11 +117,10 @@ <waitForPageLoad stepKey="waitforCategoryPageToLoad2"/> <!--Open product display page--> - <click selector="{{StorefrontCategoryProductSection.ProductTitleByNumber('1')}}" stepKey="goToProduct2DisplayPage"/> - <!--<click selector="{{StorefrontCategoryProductSection.ProductTitleByName(productWithHTMLEntityOne.name)}}" stepKey="clickProductToGoProductPage"/>--> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName(productWithHTMLEntityTwo.name)}}" stepKey="clickProductToGoSecondProductPage"/> <waitForPageLoad stepKey="waitForProductDisplayPageLoad3"/> - <!--Veriy the breadcrumbs on Product Display page--> + <!--Verify the breadcrumbs on Product Display page--> <see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="Home" stepKey="seeHomePageInBreadcrumbs2"/> <see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$createCategoryOne.name$$" stepKey="seeCorrectBreadCrumbCategory2"/> <see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$productTwo.name$$" stepKey="seeCorrectBreadCrumbProduct2"/> diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Category/DataProviderTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Category/DataProviderTest.php index 8f3aa66e57c5..4c3450d555f1 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Category/DataProviderTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Category/DataProviderTest.php @@ -17,6 +17,7 @@ use Magento\Store\Model\StoreManagerInterface; use Magento\Ui\DataProvider\EavValidationRules; use Magento\Ui\DataProvider\Modifier\PoolInterface; +use Magento\Framework\Stdlib\ArrayUtils; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -78,6 +79,14 @@ class DataProviderTest extends \PHPUnit\Framework\TestCase */ private $modifierPool; + /** + * @var ArrayUtils|\PHPUnit_Framework_MockObject_MockObject + */ + private $arrayUtils; + + /** + * @inheritDoc + */ protected function setUp() { $this->eavValidationRules = $this->getMockBuilder(EavValidationRules::class) @@ -128,6 +137,10 @@ protected function setUp() ->getMock(); $this->modifierPool = $this->getMockBuilder(PoolInterface::class)->getMockForAbstractClass(); + + $this->arrayUtils = $this->getMockBuilder(ArrayUtils::class) + ->setMethods(['flatten']) + ->disableOriginalConstructor()->getMock(); } /** @@ -157,7 +170,8 @@ private function getModel() 'eavConfig' => $this->eavConfig, 'request' => $this->request, 'categoryFactory' => $this->categoryFactory, - 'pool' => $this->modifierPool + 'pool' => $this->modifierPool, + 'arrayUtils' => $this->arrayUtils ] ); @@ -206,10 +220,12 @@ public function testGetDataNoFileExists() ->getMock(); $categoryMock->expects($this->exactly(2)) ->method('getData') - ->willReturnMap([ - ['', null, $categoryData], - ['image', null, $categoryData['image']], - ]); + ->willReturnMap( + [ + ['', null, $categoryData], + ['image', null, $categoryData['image']], + ] + ); $categoryMock->expects($this->any()) ->method('getExistsStoreValueFlag') ->with('url_key') @@ -280,10 +296,12 @@ public function testGetData() ->getMock(); $categoryMock->expects($this->exactly(2)) ->method('getData') - ->willReturnMap([ - ['', null, $categoryData], - ['image', null, $categoryData['image']], - ]); + ->willReturnMap( + [ + ['', null, $categoryData], + ['image', null, $categoryData['image']], + ] + ); $categoryMock->expects($this->any()) ->method('getExistsStoreValueFlag') ->with('url_key') @@ -331,10 +349,12 @@ public function testGetData() public function testGetMetaWithoutParentInheritanceResolving() { + $this->arrayUtils->expects($this->atLeastOnce())->method('flatten')->willReturn([1,3,3]); + $categoryMock = $this->getMockBuilder(\Magento\Catalog\Model\Category::class) ->disableOriginalConstructor() ->getMock(); - $this->registry->expects($this->once()) + $this->registry->expects($this->atLeastOnce()) ->method('registry') ->with('category') ->willReturn($categoryMock); diff --git a/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/CategoriesTest.php b/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/CategoriesTest.php index 932b09f7df9c..bceafee0f82a 100644 --- a/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/CategoriesTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/CategoriesTest.php @@ -10,7 +10,6 @@ use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Categories; use Magento\Catalog\Model\ResourceModel\Category\CollectionFactory as CategoryCollectionFactory; use Magento\Catalog\Model\ResourceModel\Category\Collection as CategoryCollection; -use Magento\Framework\App\CacheInterface; use Magento\Framework\DB\Helper as DbHelper; use Magento\Framework\UrlInterface; use Magento\Store\Model\Store; @@ -161,7 +160,14 @@ public function testModifyMetaLocked($locked) ->willReturnArgument(2); $modifyMeta = $this->createModel()->modifyMeta($meta); - $this->assertEquals($locked, $modifyMeta['arguments']['data']['config']['disabled']); + $this->assertEquals( + $locked, + $modifyMeta['children']['category_ids']['arguments']['data']['config']['disabled'] + ); + $this->assertEquals( + $locked, + $modifyMeta['children']['create_category_button']['arguments']['data']['config']['disabled'] + ); } /** diff --git a/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/GeneralTest.php b/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/GeneralTest.php index a9d717db7b7f..9d0e7fc57ffc 100644 --- a/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/GeneralTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/GeneralTest.php @@ -33,7 +33,7 @@ protected function setUp() parent::setUp(); $this->attributeRepositoryMock = $this->getMockBuilder(AttributeRepositoryInterface::class) - ->getMockForAbstractClass(); + ->getMockForAbstractClass(); $arrayManager = $this->objectManager->getObject(ArrayManager::class); @@ -52,10 +52,13 @@ protected function setUp() */ protected function createModel() { - return $this->objectManager->getObject(General::class, [ + return $this->objectManager->getObject( + General::class, + [ 'locator' => $this->locatorMock, 'arrayManager' => $this->arrayManagerMock, - ]); + ] + ); } public function testModifyMeta() @@ -63,8 +66,10 @@ public function testModifyMeta() $this->arrayManagerMock->expects($this->any()) ->method('merge') ->willReturnArgument(2); - $this->assertNotEmpty($this->getModel()->modifyMeta([ - 'first_panel_code' => [ + $this->assertNotEmpty( + $this->getModel()->modifyMeta( + [ + 'first_panel_code' => [ 'arguments' => [ 'data' => [ 'config' => [ @@ -72,15 +77,17 @@ public function testModifyMeta() ] ], ] - ] - ])); + ] + ] + ) + ); } /** - * @param array $data - * @param int $defaultStatusValue - * @param array $expectedResult - * @throws \Magento\Framework\Exception\NoSuchEntityException + * @param array $data + * @param int $defaultStatusValue + * @param array $expectedResult + * @throws \Magento\Framework\Exception\NoSuchEntityException * @dataProvider modifyDataDataProvider */ public function testModifyDataNewProduct(array $data, int $defaultStatusValue, array $expectedResult) @@ -100,6 +107,97 @@ public function testModifyDataNewProduct(array $data, int $defaultStatusValue, a $this->assertSame($expectedResult, $this->generalModifier->modifyData($data)); } + /** + * Verify the product attribute status set owhen editing existing product + * + * @param array $data + * @param string $modelId + * @param int $defaultStatus + * @param int $statusAttributeValue + * @param array $expectedResult + * @throws \Magento\Framework\Exception\NoSuchEntityException + * @dataProvider modifyDataOfExistingProductDataProvider + */ + public function testModifyDataOfExistingProduct( + array $data, + string $modelId, + int $defaultStatus, + int $statusAttributeValue, + array $expectedResult + ) { + $attributeMock = $this->getMockForAbstractClass(AttributeInterface::class); + $attributeMock->expects($this->any()) + ->method('getDefaultValue') + ->willReturn($defaultStatus); + $this->attributeRepositoryMock->expects($this->any()) + ->method('get') + ->with( + ProductAttributeInterface::ENTITY_TYPE_CODE, + ProductAttributeInterface::CODE_STATUS + ) + ->willReturn($attributeMock); + $this->productMock->expects($this->any()) + ->method('getId') + ->willReturn($modelId); + $this->productMock->expects($this->any()) + ->method('getStatus') + ->willReturn($statusAttributeValue); + $this->assertSame($expectedResult, current($this->generalModifier->modifyData($data))); + } + + /** + * @return array + */ + public function modifyDataOfExistingProductDataProvider(): array + { + return [ + 'With enable status value' => [ + 'data' => [], + 'modelId' => '1', + 'defaultStatus' => 1, + 'statusAttributeValue' => 1, + 'expectedResult' => [ + General::DATA_SOURCE_DEFAULT => [ + ProductAttributeInterface::CODE_STATUS => 1, + ], + ], + ], + 'Without disable status value' => [ + 'data' => [], + 'modelId' => '1', + 'defaultStatus' => 1, + 'statusAttributeValue' => 2, + 'expectedResult' => [ + General::DATA_SOURCE_DEFAULT => [ + ProductAttributeInterface::CODE_STATUS => 2, + ], + ], + ], + 'With enable status value with empty modelId' => [ + 'data' => [], + 'modelId' => '', + 'defaultStatus' => 1, + 'statusAttributeValue' => 1, + 'expectedResult' => [ + General::DATA_SOURCE_DEFAULT => [ + ProductAttributeInterface::CODE_STATUS => 1, + ], + ], + ], + 'Without disable status value with empty modelId' => [ + 'data' => [], + 'modelId' => '', + 'defaultStatus' => 2, + 'statusAttributeValue' => 2, + 'expectedResult' => [ + General::DATA_SOURCE_DEFAULT => [ + ProductAttributeInterface::CODE_STATUS => 2, + ], + ], + ], + ]; + } + /** * @return array */ diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php index 5f1907344ce8..c4ca5eca8e88 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php @@ -23,7 +23,6 @@ * Data provider for categories field of product page * * @api - * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @since 101.0.0 */ @@ -120,7 +119,7 @@ public function __construct( * @return CacheInterface * @deprecated 101.0.3 */ - private function getCacheManager() + private function getCacheManager(): CacheInterface { if (!$this->cacheManager) { $this->cacheManager = ObjectManager::getInstance() @@ -148,9 +147,9 @@ public function modifyMeta(array $meta) * * @return bool */ - private function isAllowed() + private function isAllowed(): bool { - return $this->authorization->isAllowed('Magento_Catalog::categories'); + return (bool) $this->authorization->isAllowed('Magento_Catalog::categories'); } /** @@ -234,6 +233,7 @@ protected function customizeCategoriesField(array $meta) $fieldCode = 'category_ids'; $elementPath = $this->arrayManager->findPath($fieldCode, $meta, null, 'children'); $containerPath = $this->arrayManager->findPath(static::CONTAINER_PREFIX . $fieldCode, $meta, null, 'children'); + $fieldIsDisabled = $this->locator->getProduct()->isLockedAttribute($fieldCode); if (!$elementPath) { return $meta; @@ -250,7 +250,6 @@ protected function customizeCategoriesField(array $meta) 'componentType' => 'container', 'component' => 'Magento_Ui/js/form/components/group', 'scopeLabel' => __('[GLOBAL]'), - 'disabled' => $this->locator->getProduct()->isLockedAttribute($fieldCode), ], ], ], @@ -266,6 +265,7 @@ protected function customizeCategoriesField(array $meta) 'chipsEnabled' => true, 'disableLabel' => true, 'levelsVisibility' => '1', + 'disabled' => $fieldIsDisabled, 'elementTmpl' => 'ui/grid/filters/elements/ui-select', 'options' => $this->getCategoriesTree(), 'listens' => [ @@ -291,6 +291,7 @@ protected function customizeCategoriesField(array $meta) 'formElement' => 'container', 'additionalClasses' => 'admin__field-small', 'componentType' => 'container', + 'disabled' => $fieldIsDisabled, 'component' => 'Magento_Ui/js/form/components/button', 'template' => 'ui/form/components/button/container', 'actions' => [ @@ -320,11 +321,7 @@ protected function customizeCategoriesField(array $meta) ] ]; } - $meta = $this->arrayManager->merge( - $containerPath, - $meta, - $value - ); + $meta = $this->arrayManager->merge($containerPath, $meta, $value); return $meta; } diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php index 4039ff862f6f..287b5b514ee8 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php @@ -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]); } diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php index 91c74a2da504..7c42b881bad3 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php @@ -21,13 +21,13 @@ class General extends AbstractModifier { /** - * @var LocatorInterface + * @var LocatorInterface * @since 101.0.0 */ protected $locator; /** - * @var ArrayManager + * @var ArrayManager * @since 101.0.0 */ protected $arrayManager; @@ -43,8 +43,8 @@ class General extends AbstractModifier private $attributeRepository; /** - * @param LocatorInterface $locator - * @param ArrayManager $arrayManager + * @param LocatorInterface $locator + * @param ArrayManager $arrayManager * @param AttributeRepositoryInterface|null $attributeRepository */ public function __construct( @@ -61,10 +61,10 @@ public function __construct( /** * Customize number fields for advanced price and weight fields. * - * @param array $data + * @param array $data * @return array * @throws \Magento\Framework\Exception\NoSuchEntityException - * @since 101.0.0 + * @since 101.0.0 */ public function modifyData(array $data) { @@ -72,7 +72,10 @@ public function modifyData(array $data) $data = $this->customizeAdvancedPriceFormat($data); $modelId = $this->locator->getProduct()->getId(); - if (!isset($data[$modelId][static::DATA_SOURCE_DEFAULT][ProductAttributeInterface::CODE_STATUS])) { + $productStatus = $this->locator->getProduct()->getStatus(); + if (!empty($productStatus) && !empty($modelId)) { + $data[$modelId][static::DATA_SOURCE_DEFAULT][ProductAttributeInterface::CODE_STATUS] = $productStatus; + } elseif (!isset($data[$modelId][static::DATA_SOURCE_DEFAULT][ProductAttributeInterface::CODE_STATUS])) { $attributeStatus = $this->attributeRepository->get( ProductAttributeInterface::ENTITY_TYPE_CODE, ProductAttributeInterface::CODE_STATUS @@ -87,9 +90,9 @@ public function modifyData(array $data) /** * Customizing weight fields * - * @param array $data + * @param array $data * @return array - * @since 101.0.0 + * @since 101.0.0 */ protected function customizeWeightFormat(array $data) { @@ -112,9 +115,9 @@ protected function customizeWeightFormat(array $data) /** * Customizing number fields for advanced price * - * @param array $data + * @param array $data * @return array - * @since 101.0.0 + * @since 101.0.0 */ protected function customizeAdvancedPriceFormat(array $data) { @@ -136,9 +139,9 @@ protected function customizeAdvancedPriceFormat(array $data) /** * Customize product form fields. * - * @param array $meta + * @param array $meta * @return array - * @since 101.0.0 + * @since 101.0.0 */ public function modifyMeta(array $meta) { @@ -154,9 +157,9 @@ public function modifyMeta(array $meta) /** * Disable collapsible and set empty label * - * @param array $meta + * @param array $meta * @return array - * @since 101.0.0 + * @since 101.0.0 */ protected function prepareFirstPanel(array $meta) { @@ -177,9 +180,9 @@ protected function prepareFirstPanel(array $meta) /** * Customize Status field * - * @param array $meta + * @param array $meta * @return array - * @since 101.0.0 + * @since 101.0.0 */ protected function customizeStatusField(array $meta) { @@ -203,9 +206,9 @@ protected function customizeStatusField(array $meta) /** * Customize Weight filed * - * @param array $meta + * @param array $meta * @return array - * @since 101.0.0 + * @since 101.0.0 */ protected function customizeWeightField(array $meta) { @@ -277,9 +280,9 @@ protected function customizeWeightField(array $meta) /** * Customize "Set Product as New" date fields * - * @param array $meta + * @param array $meta * @return array - * @since 101.0.0 + * @since 101.0.0 */ protected function customizeNewDateRangeField(array $meta) { @@ -335,9 +338,9 @@ protected function customizeNewDateRangeField(array $meta) /** * Add links for fields depends of product name * - * @param array $meta + * @param array $meta * @return array - * @since 101.0.0 + * @since 101.0.0 */ protected function customizeNameListeners(array $meta) { @@ -409,9 +412,9 @@ private function getLocaleCurrency() /** * Format price according to the locale of the currency * - * @param mixed $value + * @param mixed $value * @return string - * @since 101.0.0 + * @since 101.0.0 */ protected function formatPrice($value) { @@ -429,9 +432,9 @@ protected function formatPrice($value) /** * Format number according to the locale of the currency and precision of input * - * @param mixed $value + * @param mixed $value * @return string - * @since 101.0.0 + * @since 101.0.0 */ protected function formatNumber($value) { diff --git a/app/code/Magento/Catalog/etc/db_schema.xml b/app/code/Magento/Catalog/etc/db_schema.xml index 3d17db7a6666..d5b318f67172 100644 --- a/app/code/Magento/Catalog/etc/db_schema.xml +++ b/app/code/Magento/Catalog/etc/db_schema.xml @@ -1238,7 +1238,7 @@ <column name="website_id"/> </constraint> </table> - <table name="catalog_product_index_price_cfg_opt_agr_tmp" resource="default" engine="memory" + <table name="catalog_product_index_price_cfg_opt_agr_tmp" resource="default" engine="innodb" comment="Catalog Product Price Indexer Config Option Aggregate Temp Table"> <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Parent ID"/> @@ -1279,7 +1279,7 @@ <column name="website_id"/> </constraint> </table> - <table name="catalog_product_index_price_cfg_opt_tmp" resource="default" engine="memory" + <table name="catalog_product_index_price_cfg_opt_tmp" resource="default" engine="innodb" comment="Catalog Product Price Indexer Config Option Temp Table"> <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Entity ID"/> @@ -1327,7 +1327,7 @@ <column name="website_id"/> </constraint> </table> - <table name="catalog_product_index_price_final_tmp" resource="default" engine="memory" + <table name="catalog_product_index_price_final_tmp" resource="default" engine="innodb" comment="Catalog Product Price Indexer Final Temp Table"> <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Entity ID"/> @@ -1375,7 +1375,7 @@ <column name="website_id"/> </constraint> </table> - <table name="catalog_product_index_price_opt_tmp" resource="default" engine="memory" + <table name="catalog_product_index_price_opt_tmp" resource="default" engine="innodb" comment="Catalog Product Price Indexer Option Temp Table"> <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Entity ID"/> @@ -1418,7 +1418,7 @@ <column name="option_id"/> </constraint> </table> - <table name="catalog_product_index_price_opt_agr_tmp" resource="default" engine="memory" + <table name="catalog_product_index_price_opt_agr_tmp" resource="default" engine="innodb" comment="Catalog Product Price Indexer Option Aggregate Temp Table"> <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Entity ID"/> @@ -1470,7 +1470,7 @@ <column name="value"/> </index> </table> - <table name="catalog_product_index_eav_tmp" resource="default" engine="memory" + <table name="catalog_product_index_eav_tmp" resource="default" engine="innodb" comment="Catalog Product EAV Indexer Temp Table"> <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Entity ID"/> @@ -1489,13 +1489,13 @@ <column name="value"/> <column name="source_id"/> </constraint> - <index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_ATTRIBUTE_ID" indexType="hash"> + <index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_ATTRIBUTE_ID" indexType="btree"> <column name="attribute_id"/> </index> - <index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_STORE_ID" indexType="hash"> + <index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_STORE_ID" indexType="btree"> <column name="store_id"/> </index> - <index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_VALUE" indexType="hash"> + <index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_VALUE" indexType="btree"> <column name="value"/> </index> </table> @@ -1528,7 +1528,7 @@ <column name="value"/> </index> </table> - <table name="catalog_product_index_eav_decimal_tmp" resource="default" engine="memory" + <table name="catalog_product_index_eav_decimal_tmp" resource="default" engine="innodb" comment="Catalog Product EAV Decimal Indexer Temp Table"> <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Entity ID"/> @@ -1547,13 +1547,13 @@ <column name="value"/> <column name="source_id"/> </constraint> - <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_ATTRIBUTE_ID" indexType="hash"> + <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_ATTRIBUTE_ID" indexType="btree"> <column name="attribute_id"/> </index> - <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_STORE_ID" indexType="hash"> + <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_STORE_ID" indexType="btree"> <column name="store_id"/> </index> - <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_VALUE" indexType="hash"> + <index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_VALUE" indexType="btree"> <column name="value"/> </index> </table> @@ -1592,7 +1592,7 @@ <column name="min_price"/> </index> </table> - <table name="catalog_product_index_price_tmp" resource="default" engine="memory" + <table name="catalog_product_index_price_tmp" resource="default" engine="innodb" comment="Catalog Product Price Indexer Temp Table"> <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Entity ID"/> @@ -1617,17 +1617,17 @@ <column name="customer_group_id"/> <column name="website_id"/> </constraint> - <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_CUSTOMER_GROUP_ID" indexType="hash"> + <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_CUSTOMER_GROUP_ID" indexType="btree"> <column name="customer_group_id"/> </index> - <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_WEBSITE_ID" indexType="hash"> + <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_WEBSITE_ID" indexType="btree"> <column name="website_id"/> </index> - <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_MIN_PRICE" indexType="hash"> + <index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_MIN_PRICE" indexType="btree"> <column name="min_price"/> </index> </table> - <table name="catalog_category_product_index_tmp" resource="default" engine="memory" + <table name="catalog_category_product_index_tmp" resource="default" engine="innodb" comment="Catalog Category Product Indexer temporary table"> <column xsi:type="int" name="category_id" padding="10" unsigned="true" nullable="false" identity="false" default="0" comment="Category ID"/> @@ -1646,7 +1646,7 @@ <column name="product_id"/> <column name="store_id"/> </constraint> - <index referenceId="CAT_CTGR_PRD_IDX_TMP_PRD_ID_CTGR_ID_STORE_ID" indexType="hash"> + <index referenceId="CAT_CTGR_PRD_IDX_TMP_PRD_ID_CTGR_ID_STORE_ID" indexType="btree"> <column name="product_id"/> <column name="category_id"/> <column name="store_id"/> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml index 6b63a20134df..d6340330df8e 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml @@ -507,8 +507,13 @@ })(jQuery); this.closeModal(); } - }] - + }], + keyEventHandlers: { + enterKey: function (event) { + this.buttons[1].click(); + event.preventDefault(); + } + } }).trigger('openModal'); } diff --git a/app/code/Magento/Catalog/view/frontend/web/js/gallery.js b/app/code/Magento/Catalog/view/frontend/web/js/gallery.js index f6be6fd58ca2..2b3349c25c91 100644 --- a/app/code/Magento/Catalog/view/frontend/web/js/gallery.js +++ b/app/code/Magento/Catalog/view/frontend/web/js/gallery.js @@ -3,18 +3,10 @@ * See COPYING.txt for license details. */ -(function (factory) { - 'use strict'; - - if (typeof define === 'function' && define.amd) { - define([ - 'jquery', - 'jquery-ui-modules/widget' - ], factory); - } else { - factory(jQuery); - } -}(function ($) { +define([ + 'jquery', + 'jquery-ui-modules/widget' +], function ($) { 'use strict'; $.widget('mage.gallery', { @@ -49,4 +41,4 @@ }); return $.mage.gallery; -})); +}); diff --git a/app/code/Magento/Catalog/view/frontend/web/product/view/validation.js b/app/code/Magento/Catalog/view/frontend/web/product/view/validation.js index ab1753e7b9ed..3205e58297b6 100644 --- a/app/code/Magento/Catalog/view/frontend/web/product/view/validation.js +++ b/app/code/Magento/Catalog/view/frontend/web/product/view/validation.js @@ -3,19 +3,11 @@ * See COPYING.txt for license details. */ -(function (factory) { - 'use strict'; - - if (typeof define === 'function' && define.amd) { - define([ - 'jquery', - 'jquery-ui-modules/widget', - 'mage/validation/validation' - ], factory); - } else { - factory(jQuery); - } -}(function ($) { +define([ + 'jquery', + 'jquery-ui-modules/widget', + 'mage/validation/validation' +], function ($) { 'use strict'; $.widget('mage.validation', $.mage.validation, { @@ -97,4 +89,4 @@ }); return $.mage.validation; -})); +}); diff --git a/app/code/Magento/CatalogInventory/Setup/Patch/Schema/ChangeTmpTablesEngine.php b/app/code/Magento/CatalogInventory/Setup/Patch/Schema/ChangeTmpTablesEngine.php deleted file mode 100644 index 7f43cd279d4e..000000000000 --- a/app/code/Magento/CatalogInventory/Setup/Patch/Schema/ChangeTmpTablesEngine.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\CatalogInventory\Setup\Patch\Schema; - -use Magento\Framework\Setup\Patch\SchemaPatchInterface; -use Magento\Framework\Setup\SchemaSetupInterface; - -/** - * Change engine for temporary tables to InnoDB. - */ -class ChangeTmpTablesEngine implements SchemaPatchInterface -{ - /** - * @var SchemaSetupInterface - */ - private $schemaSetup; - - /** - * @param SchemaSetupInterface $schemaSetup - */ - public function __construct(SchemaSetupInterface $schemaSetup) - { - $this->schemaSetup = $schemaSetup; - } - - /** - * @inheritdoc - */ - public function apply() - { - $this->schemaSetup->startSetup(); - - $tableName = $this->schemaSetup->getTable('cataloginventory_stock_status_tmp'); - if ($this->schemaSetup->getConnection()->isTableExists($tableName)) { - $this->schemaSetup->getConnection()->changeTableEngine($tableName, 'InnoDB'); - } - - $this->schemaSetup->endSetup(); - } - - /** - * @inheritdoc - */ - public static function getDependencies() - { - return []; - } - - /** - * @inheritdoc - */ - public function getAliases() - { - return []; - } -} diff --git a/app/code/Magento/CatalogInventory/etc/db_schema.xml b/app/code/Magento/CatalogInventory/etc/db_schema.xml index d903d09dd1f8..b5c4a96f24a9 100644 --- a/app/code/Magento/CatalogInventory/etc/db_schema.xml +++ b/app/code/Magento/CatalogInventory/etc/db_schema.xml @@ -142,7 +142,7 @@ <column name="website_id"/> </index> </table> - <table name="cataloginventory_stock_status_tmp" resource="default" engine="memory" + <table name="cataloginventory_stock_status_tmp" resource="default" engine="innodb" comment="Cataloginventory Stock Status Indexer Tmp"> <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Product ID"/> @@ -159,10 +159,10 @@ <column name="website_id"/> <column name="stock_id"/> </constraint> - <index referenceId="CATALOGINVENTORY_STOCK_STATUS_TMP_STOCK_ID" indexType="hash"> + <index referenceId="CATALOGINVENTORY_STOCK_STATUS_TMP_STOCK_ID" indexType="btree"> <column name="stock_id"/> </index> - <index referenceId="CATALOGINVENTORY_STOCK_STATUS_TMP_WEBSITE_ID" indexType="hash"> + <index referenceId="CATALOGINVENTORY_STOCK_STATUS_TMP_WEBSITE_ID" indexType="btree"> <column name="website_id"/> </index> </table> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCreateNewCatalogPriceRuleActionGroup.xml b/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCreateNewCatalogPriceRuleActionGroup.xml index 00dcb68089b7..209095e0b019 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCreateNewCatalogPriceRuleActionGroup.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCreateNewCatalogPriceRuleActionGroup.xml @@ -21,7 +21,6 @@ <waitForPageLoad stepKey="waitForPageToLoad"/> <fillField stepKey="fillName" selector="{{AdminNewCatalogPriceRule.ruleName}}" userInput="{{catalogRule.name}}"/> <fillField stepKey="fillDescription" selector="{{AdminNewCatalogPriceRule.description}}" userInput="{{catalogRule.description}}"/> - <selectOption selector="{{AdminNewCatalogPriceRule.status}}" userInput="{{catalogRule.is_active}}" stepKey="selectStatus"/> <selectOption stepKey="selectWebSite" selector="{{AdminNewCatalogPriceRule.websites}}" userInput="{{catalogRule.website_ids[0]}}"/> <selectOption selector="{{AdminNewCatalogPriceRule.customerGroups}}" userInput="{{customerGroup}}" stepKey="selectCustomerGroup"/> <scrollTo selector="{{AdminNewCatalogPriceRule.actionsTab}}" stepKey="scrollToActionTab"/> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AssertCatalogPriceRuleFormActionGroup.xml b/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AssertCatalogPriceRuleFormActionGroup.xml index 77fe0f50653c..0a4b6366d11a 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AssertCatalogPriceRuleFormActionGroup.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AssertCatalogPriceRuleFormActionGroup.xml @@ -13,7 +13,7 @@ <description>Validates that the provided Catalog Rule, Status, Websites and Customer Group details are present and correct on a Admin Catalog Price Rule creation/edit page.</description> </annotations> <arguments> - <argument name="catalogRule" defaultValue="inactiveCatalogRule"/> + <argument name="catalogRule" defaultValue="inactiveCatalogRule" /> <argument name="status" type="string" defaultValue=""/> <argument name="websites" type="string"/> <argument name="customerGroup" type="string"/> @@ -21,7 +21,6 @@ <seeInField stepKey="fillName" selector="{{AdminNewCatalogPriceRule.ruleName}}" userInput="{{catalogRule.name}}"/> <seeInField stepKey="fillDescription" selector="{{AdminNewCatalogPriceRule.description}}" userInput="{{catalogRule.description}}"/> - <seeOptionIsSelected selector="{{AdminNewCatalogPriceRule.status}}" userInput="{{status}}" stepKey="selectStatus"/> <see stepKey="seeWebSite" selector="{{AdminNewCatalogPriceRule.websites}}" userInput="{{websites}}"/> <seeOptionIsSelected selector="{{AdminNewCatalogPriceRule.customerGroups}}" userInput="{{customerGroup}}" stepKey="selectCustomerGroup"/> <scrollTo selector="{{AdminNewCatalogPriceRule.actionsTab}}" stepKey="scrollToActionTab"/> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/CatalogPriceRuleActionGroup.xml b/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/CatalogPriceRuleActionGroup.xml index 39f509c68c6e..336a26db6b2b 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/CatalogPriceRuleActionGroup.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/CatalogPriceRuleActionGroup.xml @@ -25,6 +25,7 @@ <!-- Fill the form according the attributes of the entity --> <fillField stepKey="fillName" selector="{{AdminNewCatalogPriceRule.ruleName}}" userInput="{{catalogRule.name}}"/> <fillField stepKey="fillDescription" selector="{{AdminNewCatalogPriceRule.description}}" userInput="{{catalogRule.description}}"/> + <click stepKey="selectActive" selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}"/> <selectOption stepKey="selectSite" selector="{{AdminNewCatalogPriceRule.websites}}" userInput="{{catalogRule.website_ids[0]}}"/> <click stepKey="clickFromCalender" selector="{{AdminNewCatalogPriceRule.fromDateButton}}"/> <click stepKey="clickFromToday" selector="{{AdminNewCatalogPriceRule.todayDate}}"/> @@ -49,9 +50,10 @@ </arguments> <click stepKey="addNewRule" selector="{{AdminGridMainControls.add}}"/> - <fillField selector="{{AdminNewCatalogPriceRule.ruleName}}" userInput="{{catalogRule.name}}" stepKey="fillName"/> - <fillField selector="{{AdminNewCatalogPriceRule.description}}" userInput="{{catalogRule.description}}" stepKey="fillDescription"/> - <selectOption selector="{{AdminNewCatalogPriceRule.websites}}" parameterArray="{{catalogRule.website_ids}}" stepKey="selectSite"/> + <fillField selector="{{AdminNewCatalogPriceRule.ruleName}}" userInput="{{catalogRule.name}}" stepKey="fillName" /> + <click stepKey="selectActive" selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}"/> + <fillField selector="{{AdminNewCatalogPriceRule.description}}" userInput="{{catalogRule.description}}" stepKey="fillDescription" /> + <selectOption selector="{{AdminNewCatalogPriceRule.websites}}" parameterArray="{{catalogRule.website_ids}}" stepKey="selectSite" /> <click stepKey="openActionDropdown" selector="{{AdminNewCatalogPriceRule.actionsTab}}"/> <fillField stepKey="fillDiscountValue" selector="{{AdminNewCatalogPriceRuleActions.discountAmount}}" userInput="{{catalogRule.discount_amount}}"/> <scrollToTopOfPage stepKey="scrollToTop"/> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Section/AdminCatalogPriceRuleStagingSection.xml b/app/code/Magento/CatalogRule/Test/Mftf/Section/AdminCatalogPriceRuleStagingSection.xml index bab9842caaa4..7a92829e2371 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Section/AdminCatalogPriceRuleStagingSection.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Section/AdminCatalogPriceRuleStagingSection.xml @@ -10,5 +10,6 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="AdminCatalogPriceRuleStagingSection"> <element name="status" type="select" selector=".modal-component [data-index='is_active'] select"/> + <element name="isActive" type="select" selector=".modals-wrapper input[name='is_active']+label"/> </section> </sections> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Section/AdminNewCatalogPriceRuleSection.xml b/app/code/Magento/CatalogRule/Test/Mftf/Section/AdminNewCatalogPriceRuleSection.xml index ba0493d8e995..e1c168b4a025 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Section/AdminNewCatalogPriceRuleSection.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Section/AdminNewCatalogPriceRuleSection.xml @@ -20,8 +20,12 @@ <element name="ruleNameNew" type="input" selector="[name='staging[name]']"/> <element name="description" type="textarea" selector="[name='description']"/> <element name="status" type="select" selector="[name='is_active']"/> + <element name="isActive" type="select" selector="input[name='is_active']+label"/> <element name="websites" type="select" selector="[name='website_ids']"/> + <element name="active" type="checkbox" selector="//div[contains(@class, 'admin__actions-switch')]/input[@name='is_active']/../label"/> + <element name="activeIsEnabled" type="checkbox" selector="(//div[contains(@class, 'admin__actions-switch')])[1]/input[@value='1']"/> + <element name="activePosition" type="checkbox" selector="fieldset[class='admin__fieldset'] div[class*='_required']:nth-of-type(4)"/> <element name="websitesOptions" type="select" selector="[name='website_ids'] option"/> <element name="customerGroups" type="select" selector="[name='customer_group_ids']"/> <element name="customerGroupsOptions" type="select" selector="[name='customer_group_ids'] option"/> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleByCategoryTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleByCategoryTest.xml index 741da96179b8..ca534ec7f537 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleByCategoryTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleByCategoryTest.xml @@ -52,6 +52,7 @@ <waitForPageLoad stepKey="waitForIndividualRulePage"/> <fillField selector="{{AdminNewCatalogPriceRule.ruleName}}" userInput="{{_defaultCatalogRule.name}}" stepKey="fillName"/> <fillField selector="{{AdminNewCatalogPriceRule.description}}" userInput="{{_defaultCatalogRule.description}}" stepKey="fillDescription"/> + <click stepKey="selectActive" selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}"/> <selectOption selector="{{AdminNewCatalogPriceRule.websites}}" userInput="{{_defaultCatalogRule.website_ids[0]}}" stepKey="selectSite"/> <click selector="{{AdminNewCatalogPriceRule.fromDateButton}}" stepKey="clickFromCalender"/> <click selector="{{AdminNewCatalogPriceRule.todayDate}}" stepKey="clickFromToday"/> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest.xml index befe0b0ce7f9..09b924603c54 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest.xml @@ -25,6 +25,10 @@ <requiredEntity createDataKey="createCategory"/> </createData> + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <!-- log in and create the price rule --> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> <actionGroup stepKey="createNewPriceRule" ref="newCatalogPriceRuleByUI"/> @@ -150,6 +154,7 @@ <createData entity="ApiSimpleProduct" stepKey="createProduct"> <requiredEntity createDataKey="createCategory"/> </createData> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> @@ -172,6 +177,10 @@ <click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="saveAndApply"/> <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the rule." stepKey="assertSuccess"/> + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <!-- As a NOT LOGGED IN user, go to the storefront category page and should see the discount --> <amOnPage url="$$createCategory.name$$.html" stepKey="goToCategory1"/> <see selector="{{StorefrontCategoryProductSection.ProductInfoByNumber('1')}}" userInput="$$createProduct.name$$" stepKey="seeProduct1"/> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateInactiveCatalogPriceRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateInactiveCatalogPriceRuleTest.xml index 5223b18df4e4..83dff1ecdcab 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateInactiveCatalogPriceRuleTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateInactiveCatalogPriceRuleTest.xml @@ -58,6 +58,7 @@ <argument name="websites" value="Main Website"/> <argument name="customerGroup" value="General"/> </actionGroup> + <dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}" stepKey="verifyInactiveRule"/> <!-- Search Catalog Rule in Grid --> <actionGroup ref="AdminSearchCatalogRuleInGridActionGroup" stepKey="searchCreatedCatalogRule"> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest.xml index 06392764290a..ea5c2c33a0a3 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest.xml @@ -154,6 +154,10 @@ <requiredEntity createDataKey="createConfigChildProduct2"/> </createData> + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> <amOnPage url="{{AdminNewCatalogPriceRulePage.url}}" stepKey="openNewCatalogPriceRulePage"/> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml index b7a231df5045..dd54c0767e8e 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml @@ -195,6 +195,7 @@ Websites: Main Website Customer Groups: NOT LOGGED IN --> <fillField userInput="{{SimpleCatalogPriceRule.name}}" selector="{{AdminCartPriceRulesFormSection.ruleName}}" stepKey="fillRuleName"/> + <click stepKey="selectActive" selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}"/> <selectOption userInput="{{SimpleCatalogPriceRule.websites}}" selector="{{AdminCartPriceRulesFormSection.websites}}" stepKey="selectWebsite"/> <selectOption userInput="{{SimpleCatalogPriceRule.customerGroups}}" selector="{{AdminCartPriceRulesFormSection.customerGroups}}" stepKey="selectCustomerGroups"/> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml index 5b7e722c92a0..a251ee1e235d 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml @@ -77,63 +77,27 @@ <actionGroup ref="SaveAndApplyCatalogPriceRuleActionGroup" stepKey="saveAndApplyCatalogPriceRule"/> <magentoCLI command="indexer:reindex" stepKey="reindex"/> <magentoCLI command="cache:flush" stepKey="flushCache"/> - + <!-- Navigate to category on store front --> <amOnPage url="{{StorefrontProductPage.url($createCategory.name$)}}" stepKey="goToCategoryPage"/> - - <!-- Check product 1 name on store front category page --> - <actionGroup ref="AssertProductDetailsOnStorefrontActionGroup" stepKey="storefrontProduct1Name"> - <argument name="productInfo" value="$createProduct1.name$"/> - <argument name="productNumber" value="3"/> - </actionGroup> <!-- Check product 1 price on store front category page --> - <actionGroup ref="AssertProductDetailsOnStorefrontActionGroup" stepKey="storefrontProduct1Price"> - <argument name="productInfo" value="$51.10"/> - <argument name="productNumber" value="3"/> - </actionGroup> + <see selector="{{StorefrontCategoryProductSection.ProductInfoByName($createProduct1.name$)}}" userInput="$51.10" stepKey="storefrontProduct1Price"/> <!-- Check product 1 regular price on store front category page --> - <actionGroup ref="AssertProductDetailsOnStorefrontActionGroup" stepKey="storefrontProduct1RegularPrice"> - <argument name="productInfo" value="$56.78"/> - <argument name="productNumber" value="3"/> - </actionGroup> - - <!-- Check product 2 name on store front category page --> - <actionGroup ref="AssertProductDetailsOnStorefrontActionGroup" stepKey="storefrontProduct2Name"> - <argument name="productInfo" value="$createProduct2.name$"/> - <argument name="productNumber" value="2"/> - </actionGroup> + <see selector="{{StorefrontCategoryProductSection.ProductInfoByName($createProduct1.name$)}}" userInput="$56.78" stepKey="storefrontProduct1RegularPrice"/> <!-- Check product 2 price on store front category page --> - <actionGroup ref="AssertProductDetailsOnStorefrontActionGroup" stepKey="storefrontProduct2Price"> - <argument name="productInfo" value="$51.10"/> - <argument name="productNumber" value="2"/> - </actionGroup> + <see selector="{{StorefrontCategoryProductSection.ProductInfoByName($createProduct2.name$)}}" userInput="$51.10" stepKey="storefrontProduct2Price"/> - <!-- Check product 2 price on store front category page --> - <actionGroup ref="AssertProductDetailsOnStorefrontActionGroup" stepKey="storefrontProduct2RegularPrice"> - <argument name="productInfo" value="$56.78"/> - <argument name="productNumber" value="2"/> - </actionGroup> - - <!-- Check product 3 name on store front category page --> - <actionGroup ref="AssertProductDetailsOnStorefrontActionGroup" stepKey="storefrontProduct3Name"> - <argument name="productInfo" value="$createProduct3.name$"/> - <argument name="productNumber" value="1"/> - </actionGroup> + <!-- Check product 2 regular price on store front category page --> + <see selector="{{StorefrontCategoryProductSection.ProductInfoByName($createProduct2.name$)}}" userInput="$56.78" stepKey="storefrontProduct2RegularPrice"/> <!-- Check product 3 price on store front category page --> - <actionGroup ref="AssertProductDetailsOnStorefrontActionGroup" stepKey="storefrontProduct3Price"> - <argument name="productInfo" value="$51.10"/> - <argument name="productNumber" value="1"/> - </actionGroup> + <see selector="{{StorefrontCategoryProductSection.ProductInfoByName($createProduct3.name$)}}" userInput="$51.10" stepKey="storefrontProduct3Price"/> <!-- Check product 3 regular price on store front category page --> - <actionGroup ref="AssertProductDetailsOnStorefrontActionGroup" stepKey="storefrontProduct3RegularPrice"> - <argument name="productInfo" value="$56.78"/> - <argument name="productNumber" value="1"/> - </actionGroup> + <see selector="{{StorefrontCategoryProductSection.ProductInfoByName($createProduct3.name$)}}" userInput="$56.78" stepKey="storefrontProduct3RegularPrice"/> <!-- Navigate to product 1 on store front --> <amOnPage url="{{StorefrontProductPage.url($createProduct1.name$)}}" stepKey="goToProductPage1"/> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml index b486654fe9ac..08e59c631641 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml @@ -26,9 +26,14 @@ </createData> <actionGroup stepKey="createNewPriceRule" ref="newCatalogPriceRuleByUI"/> <actionGroup stepKey="selectLoggedInCustomers" ref="selectNotLoggedInCustomerGroup"/> - <selectOption selector="{{AdminNewCatalogPriceRule.status}}" userInput="Inactive" stepKey="setInactive"/> + <scrollToTopOfPage stepKey="scrollToTop"/> + <click stepKey="setInactive" selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}"/> <click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="saveAndApply"/> <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the rule." stepKey="seeSuccess"/> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/> diff --git a/app/code/Magento/CatalogRule/view/adminhtml/ui_component/catalog_rule_form.xml b/app/code/Magento/CatalogRule/view/adminhtml/ui_component/catalog_rule_form.xml index c114f6b1d77c..2af8bb0770b2 100644 --- a/app/code/Magento/CatalogRule/view/adminhtml/ui_component/catalog_rule_form.xml +++ b/app/code/Magento/CatalogRule/view/adminhtml/ui_component/catalog_rule_form.xml @@ -95,33 +95,30 @@ <dataScope>description</dataScope> </settings> </field> - <field name="is_active" formElement="select"> + <field name="is_active" formElement="checkbox"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="source" xsi:type="string">catalog_rule</item> + <item name="default" xsi:type="number">0</item> </item> </argument> <settings> - <dataType>number</dataType> - <label translate="true">Status</label> - <visible>true</visible> - <dataScope>is_active</dataScope> + <validation> + <rule name="required-entry" xsi:type="boolean">true</rule> + </validation> + <dataType>boolean</dataType> + <label translate="true">Active</label> </settings> <formElements> - <select> + <checkbox> <settings> - <options> - <option name="0" xsi:type="array"> - <item name="value" xsi:type="number">1</item> - <item name="label" xsi:type="string" translate="true">Active</item> - </option> - <option name="1" xsi:type="array"> - <item name="value" xsi:type="number">0</item> - <item name="label" xsi:type="string" translate="true">Inactive</item> - </option> - </options> + <valueMap> + <map name="false" xsi:type="number">0</map> + <map name="true" xsi:type="number">1</map> + </valueMap> + <prefer>toggle</prefer> </settings> - </select> + </checkbox> </formElements> </field> <field name="website_ids" formElement="multiselect"> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/StorefrontFillFormAdvancedSearchActionGroup.xml b/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/StorefrontFillFormAdvancedSearchActionGroup.xml new file mode 100644 index 000000000000..1afdb6e5e46f --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/StorefrontFillFormAdvancedSearchActionGroup.xml @@ -0,0 +1,29 @@ +<?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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="StorefrontFillFormAdvancedSearchActionGroup"> + <arguments> + <argument name="productName" type="string" defaultValue=""/> + <argument name="sku" type="string" defaultValue=""/> + <argument name="description" type="string" defaultValue=""/> + <argument name="short_description" type="string" defaultValue=""/> + <argument name="price_from" type="string" defaultValue=""/> + <argument name="price_to" type="string" defaultValue=""/> + </arguments> + <fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.ProductName}}" userInput="{{productName}}" stepKey="fillName"/> + <fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.SKU}}" userInput="{{sku}}" stepKey="fillSku"/> + <fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.Description}}" userInput="{{description}}" stepKey="fillDescription"/> + <fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.ShortDescription}}" userInput="{{short_description}}" stepKey="fillShortDescription"/> + <fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceFrom}}" userInput="{{price_from}}" stepKey="fillPriceFrom"/> + <fillField selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceTo}}" userInput="{{price_to}}" stepKey="fillPriceTo"/> + <click selector="{{StorefrontCatalogSearchAdvancedFormSection.SubmitButton}}" stepKey="clickSubmit"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontCatalogSearchAdvancedResultMainSection.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontCatalogSearchAdvancedResultMainSection.xml index 6b28b4f36c6a..eb3bc8e79d7b 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontCatalogSearchAdvancedResultMainSection.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Section/StorefrontCatalogSearchAdvancedResultMainSection.xml @@ -17,5 +17,6 @@ <element name="message" type="text" selector="div.message div"/> <element name="itemFound" type="text" selector=".search.found>strong"/> <element name="productName" type="text" selector=".product.name.product-item-name>a"/> + <element name="nthProductName" type="text" selector="li.product-item:nth-of-type({{var1}}) .product-item-name>a" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml index 13665100f79a..0e92d9fb0c7a 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml @@ -13,6 +13,11 @@ <features value="CatalogSearch"/> <group value="CatalogSearch"/> </annotations> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameActionGroup" stepKey="search"> <argument name="name" value="$$product.name$$"/> @@ -26,6 +31,11 @@ <features value="CatalogSearch"/> <group value="CatalogSearch"/> </annotations> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> <actionGroup ref="StorefrontAdvancedCatalogSearchByProductSkuActionGroup" stepKey="search"> <argument name="sku" value="$$product.sku$$"/> @@ -39,6 +49,10 @@ <features value="CatalogSearch"/> <group value="CatalogSearch"/> </annotations> + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> <actionGroup ref="StorefrontAdvancedCatalogSearchByDescriptionActionGroup" stepKey="search"> <argument name="description" value="$$product.custom_attributes[description]$$"/> @@ -52,6 +66,11 @@ <features value="CatalogSearch"/> <group value="CatalogSearch"/> </annotations> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> <actionGroup ref="StorefrontAdvancedCatalogSearchByShortDescriptionActionGroup" stepKey="search"> <argument name="shortDescription" value="$$product.custom_attributes[short_description]$$"/> @@ -65,6 +84,11 @@ <features value="CatalogSearch"/> <group value="CatalogSearch"/> </annotations> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/> <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndPriceActionGroup" stepKey="search"> <argument name="name" value="$$arg1.name$$"/> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml index 99f3fc00a740..aa7cf933f632 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml @@ -9,6 +9,72 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> <test name="EndToEndB2CGuestUserTest"> + <!-- Step 2: User searches for product --> + <comment userInput="Start of searching products" stepKey="startOfSearchingProducts" after="endOfBrowsingCatalog"/> + <!-- Advanced Search with Product Data --> + <comment userInput="Advanced search" stepKey="commentAdvancedSearch" after="startOfSearchingProducts"/> + <actionGroup ref="StorefrontOpenAdvancedSearchActionGroup" stepKey="searchOpenAdvancedSearchForm" after="commentAdvancedSearch"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <fillField userInput="$$createSimpleProduct1.name$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.ProductName}}" stepKey="searchAdvancedFillProductName" after="searchOpenAdvancedSearchForm"/> + <fillField userInput="$$createSimpleProduct1.sku$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.SKU}}" stepKey="searchAdvancedFillSKU" after="searchAdvancedFillProductName"/> + <fillField userInput="$$createSimpleProduct1.price$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceFrom}}" stepKey="searchAdvancedFillPriceFrom" after="searchAdvancedFillSKU"/> + <fillField userInput="$$createSimpleProduct1.price$$" selector="{{StorefrontCatalogSearchAdvancedFormSection.PriceTo}}" stepKey="searchAdvancedFillPriceTo" after="searchAdvancedFillPriceFrom"/> + <click selector="{{StorefrontCatalogSearchAdvancedFormSection.SubmitButton}}" stepKey="searchClickAdvancedSearchSubmitButton" after="searchAdvancedFillPriceTo"/> + <waitForLoadingMaskToDisappear stepKey="waitForSearchProductsloaded" after="searchClickAdvancedSearchSubmitButton"/> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="searchCheckAdvancedSearchResult" after="waitForSearchProductsloaded"/> + <see userInput="4" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productCount}} span" stepKey="searchAdvancedAssertProductCount" after="searchCheckAdvancedSearchResult"/> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertSimpleProduct1" after="searchAdvancedAssertProductCount"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="searchAdvancedGrabSimpleProduct1ImageSrc" after="searchAssertSimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchAdvancedGrabSimpleProduct1ImageSrc" stepKey="searchAdvancedAssertSimpleProduct1ImageNotDefault" after="searchAdvancedGrabSimpleProduct1ImageSrc"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="searchClickSimpleProduct1View" after="searchAdvancedAssertSimpleProduct1ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForSearchSimpleProduct1Viewloaded" after="searchClickSimpleProduct1View"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="searchAssertSimpleProduct1Page" after="waitForSearchSimpleProduct1Viewloaded"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="searchAdvancedGrabSimpleProduct1PageImageSrc" after="searchAssertSimpleProduct1Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$searchAdvancedGrabSimpleProduct1PageImageSrc" stepKey="searchAdvancedAssertSimpleProduct1PageImageNotDefault" after="searchAdvancedGrabSimpleProduct1PageImageSrc"/> + + <!-- Quick Search with common part of product names --> + <comment userInput="Quick search" stepKey="commentQuickSearch" after="searchAdvancedAssertSimpleProduct1PageImageNotDefault"/> + <actionGroup ref="StorefrontCheckQuickSearchActionGroup" stepKey="searchQuickSearchCommonPart" after="commentQuickSearch"> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="phrase" value="CONST.apiSimpleProduct"/> + </actionGroup> + <actionGroup ref="StorefrontSelectSearchFilterCategoryActionGroup" stepKey="searchSelectFilterCategoryCommonPart" after="searchQuickSearchCommonPart"> + <argument name="category" value="$$createCategory$$"/> + </actionGroup> + <see userInput="3" selector="{{StorefrontCategoryMainSection.productCount}} span" stepKey="searchAssertFilterCategoryProductCountCommonPart" after="searchSelectFilterCategoryCommonPart"/> + + <!-- Search simple product 1 --> + <comment userInput="Search simple product 1" stepKey="commentSearchSimpleProduct1" after="searchAssertFilterCategoryProductCountCommonPart"/> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertFilterCategorySimpleProduct1" after="commentSearchSimpleProduct1"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="searchGrabSimpleProduct1ImageSrc" after="searchAssertFilterCategorySimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchGrabSimpleProduct1ImageSrc" stepKey="searchAssertSimpleProduct1ImageNotDefault" after="searchGrabSimpleProduct1ImageSrc"/> + <!-- Search simple product2 --> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="searchAssertFilterCategorySimpleProduct2" after="searchAssertSimpleProduct1ImageNotDefault"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="searchGrabSimpleProduct2ImageSrc" after="searchAssertFilterCategorySimpleProduct2"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchGrabSimpleProduct2ImageSrc" stepKey="searchAssertSimpleProduct2ImageNotDefault" after="searchGrabSimpleProduct2ImageSrc"/> + + <!-- Quick Search with non-existent product name --> + <comment userInput="Quick Search with non-existent product name" stepKey="commentQuickSearchWithNonExistentProductName" after="searchAssertSimpleProduct2ImageNotDefault" /> + <actionGroup ref="StorefrontCheckQuickSearchActionGroup" stepKey="searchFillQuickSearchNonExistent" after="commentQuickSearchWithNonExistentProductName"> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="phrase" value="CONST.nonexistentProductName"/> + </actionGroup> + <see userInput="Your search returned no results." selector="{{StorefrontCatalogSearchMainSection.message}}" stepKey="searchAssertQuickSearchMessageNonExistent" after="searchFillQuickSearchNonExistent"/> + <comment userInput="End of searching products" stepKey="endOfSearchingProducts" after="searchAssertQuickSearchMessageNonExistent" /> + </test> + <test name="EndToEndB2CGuestUserMysqlTest"> <!-- Step 2: User searches for product --> <comment userInput="Start of searching products" stepKey="startOfSearchingProducts" after="endOfBrowsingCatalog"/> <!-- Advanced Search with Product 1 Data --> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/LayerNavigationOfCatalogSearchTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/LayerNavigationOfCatalogSearchTest.xml index 210b474af2e0..c8f84c732d6b 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/LayerNavigationOfCatalogSearchTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/LayerNavigationOfCatalogSearchTest.xml @@ -57,6 +57,10 @@ <fillField selector="{{AdminProductAttributeSection.customAttribute($$createPriceAttribute.attribute_code$$)}}" userInput="70" stepKey="fillCustomPrice2"/> <click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton2"/> <waitForPageLoad stepKey="waitForSimpleProductSaved2"/> + + <!--Run re-index task--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!--Navigate to category on Storefront--> <comment userInput="Navigate to category on Storefront" stepKey="comment3"/> <amOnPage url="{{StorefrontCategoryPage.url($$subCategory.name$$)}}" stepKey="goToCategoryStorefront"/> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/MinimalQueryLengthForCatalogSearchTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/MinimalQueryLengthForCatalogSearchTest.xml index b6417e12a6db..89269a1ad0d9 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/MinimalQueryLengthForCatalogSearchTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/MinimalQueryLengthForCatalogSearchTest.xml @@ -18,6 +18,7 @@ <testCaseId value="MC-6325"/> <useCaseId value="MAGETWO-58764"/> <group value="CatalogSearch"/> + <group value="SearchEngineMysql"/> </annotations> <before> <createData entity="ApiCategory" stepKey="createCategory"/> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml index 19db201e91f4..85ec8f0bdaf6 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml @@ -23,6 +23,10 @@ <createData entity="_defaultProduct" stepKey="createSimpleProduct"> <requiredEntity createDataKey="createCategory"/> </createData> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <deleteData stepKey="deleteProduct" createDataKey="createSimpleProduct"/> @@ -87,6 +91,10 @@ <createData entity="_defaultProduct" stepKey="createSimpleProduct"> <requiredEntity createDataKey="createCategory"/> </createData> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <deleteData stepKey="deleteProduct" createDataKey="createSimpleProduct"/> @@ -124,6 +132,7 @@ <severity value="MAJOR"/> <testCaseId value="MC-15034"/> <group value="CatalogSearch"/> + <group value="SearchEngineMysql"/> <group value="mtf_migrated"/> </annotations> <executeJS function="var s = '$createSimpleProduct.name$'; var ret=s.substring(0,3); return ret;" stepKey="getFirstThreeLetters" before="searchStorefront"/> @@ -160,6 +169,7 @@ <severity value="MAJOR"/> <testCaseId value="MC-14796"/> <group value="CatalogSearch"/> + <group value="SearchEngineMysql"/> <group value="mtf_migrated"/> </annotations> <before> @@ -242,6 +252,7 @@ <severity value="MAJOR"/> <testCaseId value="MC-14797"/> <group value="CatalogSearch"/> + <group value="SearchEngineMysql"/> <group value="mtf_migrated"/> </annotations> <before> @@ -306,6 +317,10 @@ <createData entity="VirtualProduct" stepKey="createVirtualProduct"> <requiredEntity createDataKey="createCategory"/> </createData> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <deleteData stepKey="deleteProduct" createDataKey="createVirtualProduct"/> @@ -336,6 +351,10 @@ <argument name="product" value="_defaultProduct"/> <argument name="category" value="$$createCategory$$"/> </actionGroup> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <deleteData stepKey="deleteCategory" createDataKey="createCategory"/> @@ -375,6 +394,10 @@ <createData entity="downloadableLink1" stepKey="addDownloadableLink1"> <requiredEntity createDataKey="createProduct"/> </createData> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <deleteData stepKey="deleteProduct" createDataKey="createProduct"/> @@ -405,6 +428,10 @@ <requiredEntity createDataKey="createProduct"/> <requiredEntity createDataKey="simple1"/> </createData> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <deleteData stepKey="deleteProduct" createDataKey="createProduct"/> @@ -450,6 +477,10 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> <amOnPage url="{{AdminProductEditPage.url($$createBundleProduct.id$$)}}" stepKey="goToProductEditPage"/> <actionGroup ref="saveProductForm" stepKey="saveProduct"/> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <deleteData stepKey="deleteBundleProduct" createDataKey="createBundleProduct"/> @@ -512,6 +543,10 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> <amOnPage url="{{AdminProductEditPage.url($$createBundleProduct.id$$)}}" stepKey="goToProductEditPage"/> <actionGroup ref="saveProductForm" stepKey="saveProduct"/> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <deleteData stepKey="deleteBundleProduct" createDataKey="createBundleProduct"/> @@ -601,6 +636,10 @@ <requiredEntity createDataKey="createConfigProduct"/> <requiredEntity createDataKey="createConfigChildProduct1"/> </createData> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToFrontPage"/> <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchStorefront"> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByAllParametersTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByAllParametersTest.xml new file mode 100644 index 000000000000..9ad868ff6db7 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByAllParametersTest.xml @@ -0,0 +1,30 @@ +<?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="StorefrontAdvancedSearchByAllParametersTest" extends="StorefrontAdvancedSearchEntitySimpleProductTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Search product in advanced search by name, sku, description, short description, price from and price to"/> + <description value="Search product in advanced search by name, sku, description, short description, price from and price to"/> + <testCaseId value="MAGETWO-24729"/> + <severity value="CRITICAL"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + </annotations> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"> + <argument name="productName" value="$$createProduct.name$$"/> + <argument name="sku" value="abc_dfj"/> + <argument name="description" value="adc_Full"/> + <argument name="short_description" value="abc_short"/> + <argument name="price_to" value="500"/> + <argument name="price_from" value="49"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByDescriptionTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByDescriptionTest.xml new file mode 100644 index 000000000000..5693721e6ed6 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByDescriptionTest.xml @@ -0,0 +1,28 @@ +<?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="StorefrontAdvancedSearchByDescriptionTest" extends="StorefrontAdvancedSearchEntitySimpleProductTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Search product in advanced search by description"/> + <description value="Search product in advanced search by description"/> + <testCaseId value="MAGETWO-24729"/> + <severity value="CRITICAL"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + </annotations> + <before> + <createData entity="ABC_123_SimpleProduct" stepKey="createProduct"/> + </before> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"> + <argument name="description" value="dfj_full"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByNameSkuDescriptionPriceTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByNameSkuDescriptionPriceTest.xml new file mode 100644 index 000000000000..4d3ba22f7935 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByNameSkuDescriptionPriceTest.xml @@ -0,0 +1,30 @@ +<?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="StorefrontAdvancedSearchByNameSkuDescriptionPriceTest" extends="StorefrontAdvancedSearchEntitySimpleProductTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Search product in advanced search by name, sku, description, short description, price from 49 and price to 50"/> + <description value="Search product in advanced search by name, sku, description, short description, price from 49 and price to 50"/> + <testCaseId value="MAGETWO-24729"/> + <severity value="CRITICAL"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + </annotations> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"> + <argument name="productName" value="$$createProduct.name$$"/> + <argument name="sku" value="abc_dfj"/> + <argument name="description" value="adc_Full"/> + <argument name="short_description" value="abc_short"/> + <argument name="price_to" value="50"/> + <argument name="price_from" value="49"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByNameTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByNameTest.xml new file mode 100644 index 000000000000..f0b81e08252f --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByNameTest.xml @@ -0,0 +1,28 @@ +<?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="StorefrontAdvancedSearchByNameTest" extends="StorefrontAdvancedSearchEntitySimpleProductTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Search product in advanced search by name"/> + <description value="Search product in advanced search by name"/> + <testCaseId value="MAGETWO-24729"/> + <severity value="CRITICAL"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + </annotations> + <before> + <createData entity="ABC_123_SimpleProduct" stepKey="createProduct"/> + </before> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"> + <argument name="productName" value="$$createProduct.name$$"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPartialNameTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPartialNameTest.xml new file mode 100644 index 000000000000..f875021bd966 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPartialNameTest.xml @@ -0,0 +1,26 @@ +<?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="StorefrontAdvancedSearchByPartialNameTest" extends="StorefrontAdvancedSearchEntitySimpleProductTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Search product in advanced search by partial name"/> + <description value="Search product in advanced search by partial name"/> + <testCaseId value="MAGETWO-24729"/> + <severity value="CRITICAL"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + <group value="SearchEngineMysql"/> + </annotations> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"> + <argument name="productName" value="abc"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPartialShortDescriptionTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPartialShortDescriptionTest.xml new file mode 100644 index 000000000000..0edc3f31216b --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPartialShortDescriptionTest.xml @@ -0,0 +1,25 @@ +<?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="StorefrontAdvancedSearchByPartialShortDescriptionTest" extends="StorefrontAdvancedSearchEntitySimpleProductTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Search product in advanced search by partial short description"/> + <description value="Search product in advanced search by partial short description"/> + <testCaseId value="MAGETWO-24729"/> + <severity value="CRITICAL"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + </annotations> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"> + <argument name="short_description" value="abc_short"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPartialSkuAndDescriptionTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPartialSkuAndDescriptionTest.xml new file mode 100644 index 000000000000..b2b4ef9cc478 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPartialSkuAndDescriptionTest.xml @@ -0,0 +1,26 @@ +<?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="StorefrontAdvancedSearchByPartialSkuAndDescriptionTest" extends="StorefrontAdvancedSearchEntitySimpleProductTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Search product in advanced search by partial sku and description"/> + <description value="Search product in advanced search by partial sku and description"/> + <testCaseId value="MAGETWO-24729"/> + <severity value="CRITICAL"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + </annotations> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"> + <argument name="sku" value="abc"/> + <argument name="description" value="adc_full"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPartialSkuTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPartialSkuTest.xml new file mode 100644 index 000000000000..45cec0a89936 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPartialSkuTest.xml @@ -0,0 +1,25 @@ +<?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="StorefrontAdvancedSearchByPartialSkuTest" extends="StorefrontAdvancedSearchEntitySimpleProductTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Search product in advanced search by partial sku"/> + <description value="Search product in advanced search by partial sku"/> + <testCaseId value="MAGETWO-24729"/> + <severity value="CRITICAL"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + </annotations> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"> + <argument name="sku" value="abc"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPriceFromAndPriceToTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPriceFromAndPriceToTest.xml new file mode 100644 index 000000000000..6b85cdf61c84 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPriceFromAndPriceToTest.xml @@ -0,0 +1,26 @@ +<?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="StorefrontAdvancedSearchByPriceFromAndPriceToTest" extends="StorefrontAdvancedSearchEntitySimpleProductTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Search product in advanced search by price from and price to"/> + <description value="Search product in advanced search by price from and price to"/> + <testCaseId value="MAGETWO-24729"/> + <severity value="CRITICAL"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + </annotations> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"> + <argument name="price_to" value="50"/> + <argument name="price_from" value="50"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPriceToTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPriceToTest.xml new file mode 100644 index 000000000000..755bb92c897e --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByPriceToTest.xml @@ -0,0 +1,33 @@ +<?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="StorefrontAdvancedSearchByPriceToTest" extends="StorefrontAdvancedSearchEntitySimpleProductTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Search product in advanced search by price to"/> + <description value="Search product in advanced search by price to"/> + <testCaseId value="MAGETWO-24729"/> + <severity value="CRITICAL"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + </annotations> + <before> + <createData entity="ABC_123_SimpleProduct" stepKey="createProduct2" after="createProduct"/> + </before> + <after> + <deleteData createDataKey="createProduct2" stepKey="deleteProduct2" after="deleteProduct"/> + </after> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"> + <argument name="price_to" value="100"/> + </actionGroup> + <see userInput="2 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> + <see userInput="$$createProduct2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productName}}" stepKey="seeProduct2Name" after="seeProductName"/> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByShortDescriptionTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByShortDescriptionTest.xml new file mode 100644 index 000000000000..c4622d02a515 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchByShortDescriptionTest.xml @@ -0,0 +1,29 @@ +<?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="StorefrontAdvancedSearchByShortDescriptionTest" extends="StorefrontAdvancedSearchEntitySimpleProductTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Search product in advanced search by short description"/> + <description value="Search product in advanced search by short description"/> + <testCaseId value="MAGETWO-24729"/> + <severity value="CRITICAL"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + </annotations> + <remove keyForRemoval="createProduct"/> + <remove keyForRemoval="deleteProduct"/> + <remove keyForRemoval="seeProductName"/> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"> + <argument name="short_description" value="dfj_short"/> + </actionGroup> + <see userInput="We can't find any items matching these search criteria. Modify your search." selector="{{StorefrontQuickSearchResultsSection.messageSection}}" stepKey="see"/> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchBySkuTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchBySkuTest.xml new file mode 100644 index 000000000000..ca5e23709968 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchBySkuTest.xml @@ -0,0 +1,25 @@ +<?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="StorefrontAdvancedSearchBySkuTest" extends="StorefrontAdvancedSearchEntitySimpleProductTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Search product in advanced search by sku"/> + <description value="Search product in advanced search by sku"/> + <testCaseId value="MAGETWO-24729"/> + <severity value="CRITICAL"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + </annotations> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"> + <argument name="sku" value="abc_dfj"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml new file mode 100644 index 000000000000..78110b531be3 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml @@ -0,0 +1,51 @@ +<?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="StorefrontAdvancedSearchEntitySimpleProductTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Use Advanced Search to Find the Product"/> + <description value="Use Advanced Search to Find the Product"/> + <severity value="CRITICAL"/> + <testCaseId value="MAGETWO-12421"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + </annotations> + <before> + <!-- Create Data --> + <createData entity="ABC_dfj_SimpleProduct" stepKey="createProduct"/> + </before> + <after> + <!-- Delete data --> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + </after> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + + <!-- 1. Navigate to Frontend --> + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefront"/> + + <!-- 2. Click "Advanced Search" --> + <actionGroup ref="StorefrontOpenAdvancedSearchActionGroup" stepKey="openAdvancedSearch"/> + + <!-- 3. Fill test data in to field(s) 4. Click "Search" button--> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"> + <argument name="productName" value="$$createProduct.name$$"/> + <argument name="sku" value="abc_dfj"/> + </actionGroup> + + <!-- 5. Perform all asserts --> + <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResult"/> + <see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> + <see userInput="$$createProduct.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.productName}}" stepKey="seeProductName"/> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchNegativeProductSearchTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchNegativeProductSearchTest.xml new file mode 100644 index 000000000000..b4f2314295a0 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchNegativeProductSearchTest.xml @@ -0,0 +1,29 @@ +<?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="StorefrontAdvancedSearchNegativeProductSearchTest" extends="StorefrontAdvancedSearchEntitySimpleProductTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Negative product search"/> + <description value="Negative product search"/> + <testCaseId value="MAGETWO-24729"/> + <severity value="CRITICAL"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + </annotations> + <remove keyForRemoval="createProduct"/> + <remove keyForRemoval="deleteProduct"/> + <remove keyForRemoval="seeProductName"/> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"> + <argument name="productName" value="Negative_product_search"/> + </actionGroup> + <see userInput="We can't find any items matching these search criteria. Modify your search." selector="{{StorefrontQuickSearchResultsSection.messageSection}}" stepKey="see"/> + </test> +</tests> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchWithoutEnteringDataTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchWithoutEnteringDataTest.xml new file mode 100644 index 000000000000..8a29ab718bd2 --- /dev/null +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchWithoutEnteringDataTest.xml @@ -0,0 +1,33 @@ +<?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="StorefrontAdvancedSearchWithoutEnteringDataTest"> + <annotations> + <stories value="Use Advanced Search"/> + <title value="Do Advanced Search without entering data"/> + <description value="'Enter a search term and try again.' error message is missed in Advanced Search"/> + <severity value="CRITICAL"/> + <testCaseId value="MAGETWO-14859"/> + <group value="searchFrontend"/> + <group value="mtf_migrated"/> + </annotations> + <!-- 1. Navigate to Frontend --> + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefront"/> + + <!-- 2. Click "Advanced Search" --> + <actionGroup ref="StorefrontOpenAdvancedSearchActionGroup" stepKey="openAdvancedSearch"/> + + <!-- 3. Fill test data in to field(s) 4. Click "Search" button--> + <actionGroup ref="StorefrontFillFormAdvancedSearchActionGroup" stepKey="search"/> + + <!-- 5. Perform all asserts --> + <see userInput="Enter a search term and try again." selector="{{StorefrontQuickSearchResultsSection.messageSection}}" stepKey="see"/> + </test> +</tests> diff --git a/app/code/Magento/CatalogUrlRewrite/Model/Storage/DynamicStorage.php b/app/code/Magento/CatalogUrlRewrite/Model/Storage/DynamicStorage.php index edca633fb14c..d9e9705ac039 100644 --- a/app/code/Magento/CatalogUrlRewrite/Model/Storage/DynamicStorage.php +++ b/app/code/Magento/CatalogUrlRewrite/Model/Storage/DynamicStorage.php @@ -148,7 +148,7 @@ private function getCategoryUrlSuffix($storeId = null): string CategoryUrlPathGenerator::XML_PATH_CATEGORY_URL_SUFFIX, ScopeInterface::SCOPE_STORE, $storeId - ); + ) ?? ''; } /** diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml index 7f6980d0c974..66f8ed541ffd 100644 --- a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml @@ -64,6 +64,7 @@ <fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{customerAddressVar.postcode}}" stepKey="enterPostcode"/> <fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{customerAddressVar.telephone}}" stepKey="enterTelephone"/> <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/> + <waitForElement selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('shippingMethod')}}" stepKey="waitForShippingMethod"/> <click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('shippingMethod')}}" stepKey="selectShippingMethod"/> <waitForElement selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/> <click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartProductSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartProductSection.xml index 3ab3fa5857b7..1b85f3b045c5 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartProductSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartProductSection.xml @@ -18,6 +18,7 @@ <element name="ProductRegularPriceByName" type="text" selector="//div[descendant::*[contains(text(), '{{var1}}')]]//*[contains(@class, 'subtotal')]" parameterized="true"/> + <element name="productFirstPrice" type="text" selector="td[class~=price] span[class='price']"/> <element name="ProductImageByName" type="text" selector="//main//table[@id='shopping-cart-table']//tbody//tr//img[contains(@class, 'product-image-photo') and @alt='{{var1}}']" parameterized="true"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml index b5392cc5e3bb..be8519f920b9 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml @@ -52,6 +52,7 @@ <element name="orderSummaryTotalIncluding" type="text" selector="//tr[@class='grand totals incl']//span[@class='price']" /> <element name="orderSummaryTotalExcluding" type="text" selector="//tr[@class='grand totals excl']//span[@class='price']" /> <element name="shippingAndBillingAddressSame" type="input" selector="#billing-address-same-as-shipping-braintree_cc_vault"/> + <element name="myShippingAndBillingAddressSame" type="input" selector=".billing-address-same-as-shipping-block"/> <element name="addressAction" type="button" selector="//span[text()='{{action}}']" parameterized="true"/> <element name="addressBook" type="button" selector="//a[text()='Address Book']"/> <element name="noQuotes" type="text" selector=".no-quotes-block"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMiniCartSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMiniCartSection.xml index 3e1de2b14ba6..e00906386e46 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMiniCartSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMiniCartSection.xml @@ -13,7 +13,9 @@ <element name="productCount" type="text" selector="//header//div[contains(@class, 'minicart-wrapper')]//a[contains(@class, 'showcart')]//span[@class='counter-number']"/> <element name="productLinkByName" type="button" selector="//header//ol[@id='mini-cart']//div[@class='product-item-details']//a[contains(text(), '{{var1}}')]" parameterized="true"/> <element name="productPriceByName" type="text" selector="//header//ol[@id='mini-cart']//div[@class='product-item-details'][.//a[contains(text(), '{{var1}}')]]//span[@class='price']" parameterized="true"/> - <element name="productImageByName" type="text" selector="//header//ol[@id='mini-cart']//span[@class='product-image-container']//img[@alt='{{var1}}']" parameterized="true"/> + <element name="productPriceByItsName" type="text" selector="//a[normalize-space()='{{prodName}}']/../following-sibling::*//*[@class='price']" parameterized="true"/> + <element name="productImageByName" type="text" selector="header ol[id='mini-cart'] span[class='product-image-container'] img[alt='{{prodName}}']" parameterized="true"/> + <element name="productImageByItsName" type="text" selector="img[alt='{{prodName}}']" parameterized="true"/> <element name="productName" type="text" selector=".product-item-name"/> <element name="productOptionsDetailsByName" type="button" selector="//header//ol[@id='mini-cart']//div[@class='product-item-details'][.//a[contains(text(), '{{var1}}')]]//span[.='See Details']" parameterized="true"/> <element name="productOptionByNameAndAttribute" type="text" selector="//header//ol[@id='mini-cart']//div[@class='product-item-details'][.//a[contains(text(), '{{var1}}')]]//dt[@class='label' and .='{{var2}}']/following-sibling::dd[@class='values']//span" parameterized="true"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/EditShippingAddressOnePageCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/EditShippingAddressOnePageCheckoutTest.xml index 20015f76e08e..c61545e51d53 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/EditShippingAddressOnePageCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/EditShippingAddressOnePageCheckoutTest.xml @@ -25,6 +25,9 @@ <requiredEntity createDataKey="createCategory"/> </createData> <createData entity="Simple_US_Customer_NY" stepKey="createCustomer"/> + <!--Clear cache and reindex--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml index 5335ec2ad775..4281a0eb77da 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml @@ -184,6 +184,194 @@ <argument name="productVar" value="$$createSimpleProduct2$$"/> </actionGroup> + <comment userInput="Place order with check money order payment" stepKey="commentPlaceOrderWithCheckMoneyOrderPayment" after="guestCheckoutCheckSimpleProduct2InCartItems" /> + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="guestSelectCheckMoneyOrderPayment" after="commentPlaceOrderWithCheckMoneyOrderPayment"/> + <actionGroup ref="CheckBillingAddressInCheckoutActionGroup" stepKey="guestSeeBillingAddress" after="guestSelectCheckMoneyOrderPayment"> + <argument name="customerVar" value="CustomerEntityOne" /> + <argument name="customerAddressVar" value="CustomerAddressSimple" /> + </actionGroup> + <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="guestPlaceorder" after="guestSeeBillingAddress"> + <argument name="orderNumberMessage" value="CONST.successGuestCheckoutOrderNumberMessage" /> + <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" /> + </actionGroup> + <comment userInput="End of checking out" stepKey="endOfCheckingOut" after="guestPlaceorder" /> + </test> + <test name="EndToEndB2CGuestUserMysqlTest"> + <!-- Step 3: User adds products to cart --> + <comment userInput="Start of adding products to cart" stepKey="startOfAddingProductsToCart" after="endOfBrowsingCatalog"/> + <!-- Add Simple Product 1 to cart --> + <comment userInput="Add Simple Product 1 to cart" stepKey="commentAddSimpleProduct1ToCart" after="startOfAddingProductsToCart" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory" after="commentAddSimpleProduct1ToCart"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartCategoryloaded" after="cartClickCategory"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory" after="waitForCartCategoryloaded"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="cartAssertSimpleProduct1" after="cartAssertCategory"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartGrabSimpleProduct1ImageSrc" after="cartAssertSimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabSimpleProduct1ImageSrc" stepKey="cartAssertSimpleProduct1ImageNotDefault" after="cartGrabSimpleProduct1ImageSrc"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createSimpleProduct1.name$$)}}" stepKey="cartClickSimpleProduct1" after="cartAssertSimpleProduct1ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct1loaded" after="cartClickSimpleProduct1"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertProduct1Page" after="waitForCartSimpleProduct1loaded"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabSimpleProduct1PageImageSrc" after="cartAssertProduct1Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabSimpleProduct1PageImageSrc" stepKey="cartAssertSimpleProduct1PageImageNotDefault" after="cartGrabSimpleProduct1PageImageSrc"/> + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddProduct1ToCart" after="cartAssertSimpleProduct1PageImageNotDefault"> + <argument name="product" value="$$createSimpleProduct1$$"/> + <argument name="productCount" value="1"/> + </actionGroup> + + <!-- Add Simple Product 2 to cart --> + <comment userInput="Add Simple Product 2 to cart" stepKey="commentAddSimpleProduct2ToCart" after="cartAddProduct1ToCart" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory1" after="commentAddSimpleProduct2ToCart"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartCategory1loaded" after="cartClickCategory1"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForSimpleProduct2" after="waitForCartCategory1loaded"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="cartAssertSimpleProduct2" after="cartAssertCategory1ForSimpleProduct2"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartGrabSimpleProduct2ImageSrc" after="cartAssertSimpleProduct2"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabSimpleProduct2ImageSrc" stepKey="cartAssertSimpleProduct2ImageNotDefault" after="cartGrabSimpleProduct2ImageSrc"/> + <actionGroup ref="StorefrontAddCategoryProductToCartActionGroup" stepKey="cartAddProduct2ToCart" after="cartAssertSimpleProduct2ImageNotDefault"> + <argument name="product" value="$$createSimpleProduct2$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="productCount" value="CONST.two"/> + </actionGroup> + + <!-- Check products in minicart --> + <!-- Check simple product 1 in minicart --> + <comment userInput="Check simple product 1 in minicart" stepKey="commentCheckSimpleProduct1InMinicart" after="cartAddProduct2ToCart"/> + <actionGroup ref="StorefrontOpenMinicartAndCheckSimpleProductActionGroup" stepKey="cartOpenMinicartAndCheckSimpleProduct1" after="commentCheckSimpleProduct1InMinicart"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct1ImageSrc" after="cartOpenMinicartAndCheckSimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabSimpleProduct1ImageSrc" stepKey="cartMinicartAssertSimpleProduct1ImageNotDefault" after="cartMinicartGrabSimpleProduct1ImageSrc"/> + <click selector="{{StorefrontMinicartSection.productLinkByName($$createSimpleProduct1.name$$)}}" stepKey="cartMinicartClickSimpleProduct1" after="cartMinicartAssertSimpleProduct1ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForMinicartSimpleProduct1loaded" after="cartMinicartClickSimpleProduct1"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertMinicartProduct1Page" after="waitForMinicartSimpleProduct1loaded"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct1PageImageSrc" after="cartAssertMinicartProduct1Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabSimpleProduct1PageImageSrc" stepKey="cartMinicartAssertSimpleProduct1PageImageNotDefault" after="cartMinicartGrabSimpleProduct1PageImageSrc"/> + <actionGroup ref="StorefrontOpenMinicartAndCheckSimpleProductActionGroup" stepKey="cartOpenMinicartAndCheckSimpleProduct2" after="cartMinicartAssertSimpleProduct1PageImageNotDefault"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- Check simple product2 in minicart --> + <comment userInput="Check simple product 2 in minicart" stepKey="commentCheckSimpleProduct2InMinicart" after="cartOpenMinicartAndCheckSimpleProduct2"/> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct2ImageSrc" after="commentCheckSimpleProduct2InMinicart"/> + <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabSimpleProduct2ImageSrc" stepKey="cartMinicartAssertSimpleProduct2ImageNotDefault" after="cartMinicartGrabSimpleProduct2ImageSrc"/> + <click selector="{{StorefrontMinicartSection.productLinkByName($$createSimpleProduct2.name$$)}}" stepKey="cartMinicartClickSimpleProduct2" after="cartMinicartAssertSimpleProduct2ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForMinicartSimpleProduct2loaded" after="cartMinicartClickSimpleProduct2"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertMinicartProduct2Page" after="waitForMinicartSimpleProduct2loaded"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabSimpleProduct2PageImageSrc" after="cartAssertMinicartProduct2Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabSimpleProduct2PageImageSrc" stepKey="cartMinicartAssertSimpleProduct2PageImageNotDefault" after="cartMinicartGrabSimpleProduct2PageImageSrc"/> + + <!-- Check products in cart --> + <comment userInput="Check cart information" stepKey="commentCheckCartInformation" after="cartMinicartAssertSimpleProduct2PageImageNotDefault" /> + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart" after="commentCheckCartInformation"/> + <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCart" after="cartOpenCart"> + <argument name="subtotal" value="480.00"/> + <argument name="shipping" value="15.00"/> + <argument name="shippingMethod" value="Flat Rate - Fixed"/> + <argument name="total" value="495.00"/> + </actionGroup> + + <!-- Check simple product 1 in cart --> + <comment userInput="Check simple product 1 in cart" stepKey="commentCheckSimpleProduct1InCart" after="cartAssertCart"/> + <actionGroup ref="StorefrontCheckCartSimpleProductActionGroup" stepKey="cartAssertCartSimpleProduct1" after="commentCheckSimpleProduct1InCart"> + <argument name="product" value="$$createSimpleProduct1$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="productQuantity" value="CONST.one"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createSimpleProduct1.name$$)}}" userInput="src" stepKey="cartCartGrabSimpleProduct1ImageSrc" after="cartAssertCartSimpleProduct1"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabSimpleProduct1ImageSrc" stepKey="cartCartAssertSimpleProduct1ImageNotDefault" after="cartCartGrabSimpleProduct1ImageSrc"/> + <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct1.name$$)}}" stepKey="cartClickCartSimpleProduct1" after="cartCartAssertSimpleProduct1ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct1loadedAgain" after="cartClickCartSimpleProduct1"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertCartProduct1Page" after="waitForCartSimpleProduct1loadedAgain"> + <argument name="product" value="$$createSimpleProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabSimpleProduct2PageImageSrc1" after="cartAssertCartProduct1Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabSimpleProduct2PageImageSrc1" stepKey="cartCartAssertSimpleProduct2PageImageNotDefault1" after="cartCartGrabSimpleProduct2PageImageSrc1"/> + + <!-- Check simple product 2 in cart --> + <comment userInput="Check simple product 2 in cart" stepKey="commentCheckSimpleProduct2InCart" after="cartCartAssertSimpleProduct2PageImageNotDefault1"/> + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart1" after="commentCheckSimpleProduct2InCart"/> + <actionGroup ref="StorefrontCheckCartSimpleProductActionGroup" stepKey="cartAssertCartSimpleProduct2" after="cartOpenCart1"> + <argument name="product" value="$$createSimpleProduct2$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="productQuantity" value="CONST.one"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createSimpleProduct2.name$$)}}" userInput="src" stepKey="cartCartGrabSimpleProduct2ImageSrc" after="cartAssertCartSimpleProduct2"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabSimpleProduct2ImageSrc" stepKey="cartCartAssertSimpleProduct2ImageNotDefault" after="cartCartGrabSimpleProduct2ImageSrc"/> + <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct2.name$$)}}" stepKey="cartClickCartSimpleProduct2" after="cartCartAssertSimpleProduct2ImageNotDefault"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartSimpleProduct2loaded" after="cartClickCartSimpleProduct2"/> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="cartAssertCartProduct2Page" after="waitForCartSimpleProduct2loaded"> + <argument name="product" value="$$createSimpleProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabSimpleProduct2PageImageSrc2" after="cartAssertCartProduct2Page"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabSimpleProduct2PageImageSrc2" stepKey="cartCartAssertSimpleProduct2PageImageNotDefault2" after="cartCartGrabSimpleProduct2PageImageSrc2"/> + <comment userInput="End of adding products to cart" stepKey="endOfAddingProductsToCart" after="cartCartAssertSimpleProduct2PageImageNotDefault2" /> + + <!-- Step 6: Check out --> + <comment userInput="Start of checking out" stepKey="startOfCheckingOut" after="endOfUsingCouponCode" /> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="guestGoToCheckoutFromMinicart" after="startOfCheckingOut"/> + <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSection" after="guestGoToCheckoutFromMinicart"> + <argument name="customerVar" value="CustomerEntityOne" /> + <argument name="customerAddressVar" value="CustomerAddressSimple" /> + </actionGroup> + + <!-- Check order summary in checkout --> + <comment userInput="Check order summary in checkout" stepKey="commentCheckOrderSummaryInCheckout" after="guestCheckoutFillingShippingSection" /> + <actionGroup ref="CheckOrderSummaryInCheckoutActionGroup" stepKey="guestCheckoutCheckOrderSummary" after="commentCheckOrderSummaryInCheckout"> + <argument name="subtotal" value="480.00"/> + <argument name="shippingTotal" value="15.00"/> + <argument name="shippingMethod" value="Flat Rate - Fixed"/> + <argument name="total" value="495.00"/> + </actionGroup> + + <!-- Check ship to information in checkout --> + <comment userInput="Check ship to information in checkout" stepKey="commentCheckShipToInformationInCheckout" after="guestCheckoutCheckOrderSummary" /> + <actionGroup ref="CheckShipToInformationInCheckoutActionGroup" stepKey="guestCheckoutCheckShipToInformation" after="commentCheckShipToInformationInCheckout"> + <argument name="customerVar" value="CustomerEntityOne" /> + <argument name="customerAddressVar" value="CustomerAddressSimple" /> + </actionGroup> + + <!-- Check shipping method in checkout --> + <comment userInput="Check shipping method in checkout" stepKey="commentCheckShippingMethodInCheckout" after="guestCheckoutCheckShipToInformation" /> + <actionGroup ref="CheckShippingMethodInCheckoutActionGroup" stepKey="guestCheckoutCheckShippingMethod" after="commentCheckShippingMethodInCheckout"> + <argument name="shippingMethod" value="E2EB2CQuote.shippingMethod" /> + </actionGroup> + + <!-- Verify Simple Product 1 is in checkout cart items --> + <comment userInput="Verify Simple Product 1 is in checkout cart items" stepKey="commentVerifySimpleProduct1IsInCheckoutCartItems" after="guestCheckoutCheckShippingMethod" /> + <actionGroup ref="CheckProductInCheckoutCartItemsActionGroup" stepKey="guestCheckoutCheckSimpleProduct1InCartItems" after="commentVerifySimpleProduct1IsInCheckoutCartItems"> + <argument name="productVar" value="$$createSimpleProduct1$$"/> + </actionGroup> + + <!-- Verify Simple Product 2 is in checkout cart items --> + <comment userInput="Verify Simple Product 2 is in checkout cart items" stepKey="commentVerifySimpleProduct2IsInCheckoutCartItems" after="guestCheckoutCheckSimpleProduct1InCartItems" /> + <actionGroup ref="CheckProductInCheckoutCartItemsActionGroup" stepKey="guestCheckoutCheckSimpleProduct2InCartItems" after="commentVerifySimpleProduct2IsInCheckoutCartItems"> + <argument name="productVar" value="$$createSimpleProduct2$$"/> + </actionGroup> + <comment userInput="Place order with check money order payment" stepKey="commentPlaceOrderWithCheckMoneyOrderPayment" after="guestCheckoutCheckSimpleProduct2InCartItems" /> <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="guestSelectCheckMoneyOrderPayment" after="commentPlaceOrderWithCheckMoneyOrderPayment"/> <actionGroup ref="CheckBillingAddressInCheckoutActionGroup" stepKey="guestSeeBillingAddress" after="guestSelectCheckMoneyOrderPayment"> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml index 3c98f9177f4a..fd6656b1d1b2 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml @@ -26,6 +26,8 @@ <field key="price">100.00</field> <requiredEntity createDataKey="createCategory"/> </createData> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml index a4f974603f1c..4e19de659be2 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml @@ -221,6 +221,10 @@ <magentoCLI command="config:set payment/checkmo/allowspecific 1" stepKey="allowSpecificValue" /> <magentoCLI command="config:set payment/checkmo/specificcountry GB" stepKey="specificCountryValue" /> <createData entity="Simple_US_Customer" stepKey="simpleuscustomer"/> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml index 02a45af80056..b6b9fe1e1a11 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml @@ -23,6 +23,10 @@ <createData entity="ApiSimpleProduct" stepKey="createProduct"> <requiredEntity createDataKey="createCategory"/> </createData> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <actionGroup ref="logout" stepKey="adminLogout"/> diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/address-converter.js b/app/code/Magento/Checkout/view/frontend/web/js/model/address-converter.js index 9b20a782c38d..d319ea501413 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/address-converter.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/address-converter.js @@ -18,6 +18,7 @@ define([ return { /** * Convert address form data to Address object + * * @param {Object} formData * @returns {Object} */ diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js b/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js index 59d1daa75713..e728a5c0fcdd 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js @@ -159,7 +159,6 @@ function ( } addressData['save_in_address_book'] = this.saveInAddressBook() ? 1 : 0; newBillingAddress = createBillingAddress(addressData); - // New address must be selected as a billing address selectBillingAddress(newBillingAddress); checkoutData.setSelectedBillingAddress(newBillingAddress.getKey()); @@ -237,6 +236,30 @@ function ( */ getCode: function (parent) { return _.isFunction(parent.getCode) ? parent.getCode() : 'shared'; + }, + + /** + * Get customer attribute label + * + * @param {*} attribute + * @returns {*} + */ + getCustomAttributeLabel: function (attribute) { + var resultAttribute; + + if (typeof attribute === 'string') { + return attribute; + } + + if (attribute.label) { + return attribute.label; + } + + resultAttribute = _.findWhere(this.source.get('customAttributes')[attribute['attribute_code']], { + value: attribute.value + }); + + return resultAttribute && resultAttribute.label || attribute.value; } }); }); diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js index 54381ad96b0b..939a2af1a25a 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js @@ -7,12 +7,13 @@ define([ 'jquery', 'ko', 'uiComponent', + 'underscore', 'Magento_Checkout/js/action/select-shipping-address', 'Magento_Checkout/js/model/quote', 'Magento_Checkout/js/model/shipping-address/form-popup-state', 'Magento_Checkout/js/checkout-data', 'Magento_Customer/js/customer-data' -], function ($, ko, Component, selectShippingAddressAction, quote, formPopUpState, checkoutData, customerData) { +], function ($, ko, Component, _, selectShippingAddressAction, quote, formPopUpState, checkoutData, customerData) { 'use strict'; var countryData = customerData.get('directory-data'); @@ -47,6 +48,30 @@ define([ return countryData()[countryId] != undefined ? countryData()[countryId].name : ''; //eslint-disable-line }, + /** + * Get customer attribute label + * + * @param {*} attribute + * @returns {*} + */ + getCustomAttributeLabel: function (attribute) { + var resultAttribute; + + if (typeof attribute === 'string') { + return attribute; + } + + if (attribute.label) { + return attribute.label; + } + + resultAttribute = _.findWhere(this.source.get('customAttributes')[attribute['attribute_code']], { + value: attribute.value + }); + + return resultAttribute && resultAttribute.label || attribute.value; + }, + /** Set selected customer shipping address */ selectAddress: function () { selectShippingAddressAction(this.address()); diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/list.js b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/list.js index 4f4fc3de3e1a..2bdfd063cb6f 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/list.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/list.js @@ -16,7 +16,8 @@ define([ var defaultRendererTemplate = { parent: '${ $.$data.parentName }', name: '${ $.$data.name }', - component: 'Magento_Checkout/js/view/shipping-address/address-renderer/default' + component: 'Magento_Checkout/js/view/shipping-address/address-renderer/default', + provider: 'checkoutProvider' }; return Component.extend({ diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information/address-renderer/default.js b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information/address-renderer/default.js index acc9f1c2391d..009178cbb19b 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information/address-renderer/default.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information/address-renderer/default.js @@ -5,8 +5,9 @@ define([ 'uiComponent', + 'underscore', 'Magento_Customer/js/customer-data' -], function (Component, customerData) { +], function (Component, _, customerData) { 'use strict'; var countryData = customerData.get('directory-data'); @@ -22,6 +23,30 @@ define([ */ getCountryName: function (countryId) { return countryData()[countryId] != undefined ? countryData()[countryId].name : ''; //eslint-disable-line + }, + + /** + * Get customer attribute label + * + * @param {*} attribute + * @returns {*} + */ + getCustomAttributeLabel: function (attribute) { + var resultAttribute; + + if (typeof attribute === 'string') { + return attribute; + } + + if (attribute.label) { + return attribute.label; + } + + resultAttribute = _.findWhere(this.source.get('customAttributes')[attribute['attribute_code']], { + value: attribute.value + }); + + return resultAttribute && resultAttribute.label || attribute.value; } }); }); diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information/list.js b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information/list.js index 28eb83c8be3e..3bb2715c78a7 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information/list.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information/list.js @@ -16,7 +16,8 @@ define([ var defaultRendererTemplate = { parent: '${ $.$data.parentName }', name: '${ $.$data.name }', - component: 'Magento_Checkout/js/view/shipping-information/address-renderer/default' + component: 'Magento_Checkout/js/view/shipping-information/address-renderer/default', + provider: 'checkoutProvider' }; return Component.extend({ diff --git a/app/code/Magento/Checkout/view/frontend/web/template/billing-address/details.html b/app/code/Magento/Checkout/view/frontend/web/template/billing-address/details.html index a0827d17d662..23bbce48fee2 100644 --- a/app/code/Magento/Checkout/view/frontend/web/template/billing-address/details.html +++ b/app/code/Magento/Checkout/view/frontend/web/template/billing-address/details.html @@ -13,19 +13,8 @@ <a if="currentBillingAddress().telephone" attr="'href': 'tel:' + currentBillingAddress().telephone" text="currentBillingAddress().telephone"></a><br/> <each args="data: currentBillingAddress().customAttributes, as: 'element'"> - <if args="typeof element === 'object'"> - <if args="element.label"> - <text args="element.label"/> - </if> - <ifnot args="element.label"> - <if args="element.value"> - <text args="element.value"/> - </if> - </ifnot> - </if> - <if args="typeof element === 'string'"> - <text args="element"/> - </if><br/> + <text args="$parent.getCustomAttributeLabel(element)"/> + <br/> </each> <button visible="!isAddressSameAsShipping()" diff --git a/app/code/Magento/Checkout/view/frontend/web/template/shipping-address/address-renderer/default.html b/app/code/Magento/Checkout/view/frontend/web/template/shipping-address/address-renderer/default.html index cf64c0140b95..b14f4da3f5f7 100644 --- a/app/code/Magento/Checkout/view/frontend/web/template/shipping-address/address-renderer/default.html +++ b/app/code/Magento/Checkout/view/frontend/web/template/shipping-address/address-renderer/default.html @@ -13,21 +13,8 @@ <a if="address().telephone" attr="'href': 'tel:' + address().telephone" text="address().telephone"></a><br/> <each args="data: address().customAttributes, as: 'element'"> - <each args="data: Object.keys(element), as: 'attribute'"> - <if args="typeof element[attribute] === 'object'"> - <if args="element[attribute].label"> - <text args="element[attribute].label"/> - </if> - <ifnot args="element[attribute].label"> - <if args="element[attribute].value"> - <text args="element[attribute].value"/> - </if> - </ifnot> - </if> - <if args="typeof element[attribute] === 'string'"> - <text args="element[attribute]"/> - </if><br/> - </each> + <text args="$parent.getCustomAttributeLabel(element)"/> + <br/> </each> <button visible="address().isEditable()" type="button" diff --git a/app/code/Magento/Checkout/view/frontend/web/template/shipping-information/address-renderer/default.html b/app/code/Magento/Checkout/view/frontend/web/template/shipping-information/address-renderer/default.html index 75e061426d81..26dd7742d1da 100644 --- a/app/code/Magento/Checkout/view/frontend/web/template/shipping-information/address-renderer/default.html +++ b/app/code/Magento/Checkout/view/frontend/web/template/shipping-information/address-renderer/default.html @@ -13,18 +13,7 @@ <a if="address().telephone" attr="'href': 'tel:' + address().telephone" text="address().telephone"></a><br/> <each args="data: address().customAttributes, as: 'element'"> - <if args="typeof element === 'object'"> - <if args="element.label"> - <text args="element.label"/> - </if> - <ifnot args="element.label"> - <if args="element.value"> - <text args="element.value"/> - </if> - </ifnot> - </if> - <if args="typeof element === 'string'"> - <text args="element"/> - </if><br/> + <text args="$parent.getCustomAttributeLabel(element)"/> + <br/> </each> </if> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductData.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductData.xml index 3f21c98068d8..6ae3c4f4e16c 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductData.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductData.xml @@ -60,6 +60,19 @@ <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> </entity> + <entity name="ApiConfigurableProductWithDescriptionUnderscoredSku" type="product"> + <data key="sku" unique="suffix">api_configurable_product</data> + <data key="type_id">configurable</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">API Configurable Product</data> + <data key="urlKey" unique="suffix">api-configurable-product</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> + </entity> <entity name="ConfigurableProductAddChild" type="ConfigurableProductAddChild"> <var key="sku" entityKey="sku" entityType="product" /> <var key="childSku" entityKey="sku" entityType="product2"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml index c47e320b3a17..cd09cbd29587 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml @@ -87,6 +87,9 @@ <see selector="{{AdminProductFormConfigurationsSection.currentVariationsSkuCells}}" userInput="LongSku-$$getConfigAttributeOption2.label$$" stepKey="seeChildProductSku2"/> <see selector="{{AdminProductFormConfigurationsSection.currentVariationsPriceCells}}" userInput="{{ProductWithLongNameSku.price}}" stepKey="seeConfigurationsPrice"/> + <!--Run re-index task--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!--Assert storefront category list page--> <amOnPage url="/" stepKey="amOnStorefront"/> <waitForPageLoad stepKey="waitForStorefrontLoad"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml index 925e7a890cea..9796c14f5519 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml @@ -129,6 +129,9 @@ <!-- Save product --> <actionGroup ref="saveConfigurableProductAddToCurrentAttributeSet" stepKey="saveProduct"/> + <!--Run re-index task--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!-- Assert configurable product in category --> <amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage"/> <waitForPageLoad stepKey="waitForCategoryPageLoad"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdvanceCatalogSearchConfigurableTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdvanceCatalogSearchConfigurableTest.xml index c303e4d19db8..037028030927 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdvanceCatalogSearchConfigurableTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdvanceCatalogSearchConfigurableTest.xml @@ -80,6 +80,8 @@ <after> <deleteData createDataKey="simple1Handle" stepKey="deleteSimple1" before="deleteSimple2"/> <deleteData createDataKey="simple2Handle" stepKey="deleteSimple2" before="delete"/> + <deleteData createDataKey="childProductHandle1" stepKey="deleteChildProduct1" before="delete"/> + <deleteData createDataKey="childProductHandle2" stepKey="deleteChildProduct2" before="delete"/> </after> </test> <test name="AdvanceCatalogSearchConfigurableBySkuTest" extends="AdvanceCatalogSearchSimpleProductBySkuTest"> @@ -104,7 +106,7 @@ </createData> <!-- TODO: Move configurable product creation to an actionGroup when MQE-697 is fixed --> - <createData entity="ApiConfigurableProductWithDescription" stepKey="product"/> + <createData entity="ApiConfigurableProductWithDescriptionUnderscoredSku" stepKey="product"/> <createData entity="productDropDownAttribute" stepKey="productAttributeHandle"/> @@ -154,6 +156,8 @@ <after> <deleteData createDataKey="simple1Handle" stepKey="deleteSimple1" before="deleteSimple2"/> <deleteData createDataKey="simple2Handle" stepKey="deleteSimple2" before="delete"/> + <deleteData createDataKey="childProductHandle1" stepKey="deleteChildProduct1" before="delete"/> + <deleteData createDataKey="childProductHandle2" stepKey="deleteChildProduct2" before="delete"/> </after> </test> <test name="AdvanceCatalogSearchConfigurableByDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByDescriptionTest"> @@ -228,6 +232,8 @@ <after> <deleteData createDataKey="simple1Handle" stepKey="deleteSimple1" before="deleteSimple2"/> <deleteData createDataKey="simple2Handle" stepKey="deleteSimple2" before="delete"/> + <deleteData createDataKey="childProductHandle1" stepKey="deleteChildProduct1" before="delete"/> + <deleteData createDataKey="childProductHandle2" stepKey="deleteChildProduct2" before="delete"/> </after> </test> <test name="AdvanceCatalogSearchConfigurableByShortDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByShortDescriptionTest"> @@ -302,6 +308,8 @@ <after> <deleteData createDataKey="simple1Handle" stepKey="deleteSimple1" before="deleteSimple2"/> <deleteData createDataKey="simple2Handle" stepKey="deleteSimple2" before="delete"/> + <deleteData createDataKey="childProductHandle1" stepKey="deleteChildProduct1" before="delete"/> + <deleteData createDataKey="childProductHandle2" stepKey="deleteChildProduct2" before="delete"/> </after> </test> </tests> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml index 47ee09e4b208..04687a2314dc 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml @@ -217,4 +217,213 @@ <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="compareGrabConfigProductImageSrcInComparison" after="compareAssertConfigProductInComparison"/> <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabConfigProductImageSrcInComparison" stepKey="compareAssertConfigProductImageNotDefaultInComparison" after="compareGrabConfigProductImageSrcInComparison"/> </test> + <test name="EndToEndB2CGuestUserMysqlTest"> + <before> + <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> + <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createConfigChildProduct1Image"> + <requiredEntity createDataKey="createConfigChildProduct1"/> + </createData> + <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryMagentoLogo" stepKey="createConfigChildProduct2Image"> + <requiredEntity createDataKey="createConfigChildProduct2"/> + </createData> + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct1"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct2"/> + </createData> + <createData entity="ApiProductAttributeMediaGalleryEntryTestImage" stepKey="createConfigProductImage"> + <requiredEntity createDataKey="createConfigProduct"/> + </createData> + <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateConfigProduct" createDataKey="createConfigProduct"/> + </before> + <after> + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createConfigChildProduct1Image" stepKey="deleteConfigChildProduct1Image"/>--> + <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createConfigChildProduct2Image" stepKey="deleteConfigChildProduct2Image"/>--> + <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> + <!-- @TODO: Uncomment once MQE-679 is fixed --> + <!--<deleteData createDataKey="createConfigProductImage" stepKey="deleteConfigProductImage"/>--> + <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> + <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> + </after> + + <!-- Verify Configurable Product in checkout cart items --> + <comment userInput="Verify Configurable Product in checkout cart items" stepKey="commentVerifyConfigurableProductInCheckoutCartItems" after="guestCheckoutCheckSimpleProduct2InCartItems" /> + <actionGroup ref="CheckConfigurableProductInCheckoutCartItemsActionGroup" stepKey="guestCheckoutCheckConfigurableProductInCartItems" after="commentVerifyConfigurableProductInCheckoutCartItems"> + <argument name="productVar" value="$$createConfigProduct$$"/> + <argument name="optionLabel" value="$$createConfigProductAttribute.attribute[frontend_labels][0][label]$$" /> + <argument name="optionValue" value="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" /> + </actionGroup> + + <!-- Check configurable product in category --> + <comment userInput="Verify Configurable Product in category" stepKey="commentVerifyConfigurableProductInCategory" after="browseAssertSimpleProduct2ImageNotDefault" /> + <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="browseAssertCategoryConfigProduct" after="commentVerifyConfigurableProductInCategory"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="browseGrabConfigProductImageSrc" after="browseAssertCategoryConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$browseGrabConfigProductImageSrc" stepKey="browseAssertConfigProductImageNotDefault" after="browseGrabConfigProductImageSrc"/> + + <!-- View Configurable Product --> + <comment userInput="View Configurable Product" stepKey="commentViewConfigurableProduct" after="browseAssertSimpleProduct2PageImageNotDefault" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="clickCategory2" after="commentViewConfigurableProduct"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createConfigProduct.name$$)}}" stepKey="browseClickCategoryConfigProductView" after="clickCategory2"/> + <waitForLoadingMaskToDisappear stepKey="waitForConfigurableProductViewloaded" after="browseClickCategoryConfigProductView"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="browseAssertConfigProductPage" after="waitForConfigurableProductViewloaded"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="browseGrabConfigProductPageImageSrc" after="browseAssertConfigProductPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$browseGrabConfigProductPageImageSrc" stepKey="browseAssertConfigProductPageImageNotDefault" after="browseGrabConfigProductPageImageSrc"/> + + <!-- Add Configurable Product to cart --> + <comment userInput="Add Configurable Product to cart" stepKey="commentAddConfigurableProductToCart" after="cartAddProduct2ToCart" /> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory2" after="commentAddConfigurableProductToCart"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartCategory2loaded" after="cartClickCategory2"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForConfigurableProduct" after="waitForCartCategory2loaded"> + <argument name="category" value="$$createCategory$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="cartAssertConfigProduct" after="cartAssertCategory1ForConfigurableProduct"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartGrabConfigProductImageSrc" after="cartAssertConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartGrabConfigProductImageSrc" stepKey="cartAssertConfigProductImageNotDefault" after="cartGrabConfigProductImageSrc"/> + <click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName($$createConfigProduct.name$$)}}" stepKey="cartClickCategoryConfigProductAddToCart" after="cartAssertConfigProductImageNotDefault"/> + <waitForElement selector="{{StorefrontMessagesSection.message('You need to choose options for your item.')}}" time="30" stepKey="cartWaitForConfigProductPageLoad" after="cartClickCategoryConfigProductAddToCart"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertConfigProductPage" after="cartWaitForConfigProductPageLoad"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabConfigProductPageImageSrc1" after="cartAssertConfigProductPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabConfigProductPageImageSrc1" stepKey="cartAssertConfigProductPageImageNotDefault1" after="cartGrabConfigProductPageImageSrc1"/> + <selectOption userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{StorefrontProductInfoMainSection.optionByAttributeId($$createConfigProductAttribute.attribute_id$$)}}" stepKey="cartConfigProductFillOption" after="cartAssertConfigProductPageImageNotDefault1"/> + <waitForLoadingMaskToDisappear stepKey="waitForConfigurableProductOptionloaded" after="cartConfigProductFillOption"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertConfigProductWithOptionPage" after="waitForConfigurableProductOptionloaded"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartGrabConfigProductPageImageSrc2" after="cartAssertConfigProductWithOptionPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartGrabConfigProductPageImageSrc2" stepKey="cartAssertConfigProductPageImageNotDefault2" after="cartGrabConfigProductPageImageSrc2"/> + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddConfigProductToCart" after="cartAssertConfigProductPageImageNotDefault2"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="productCount" value="3"/> + </actionGroup> + + <!-- Check configurable product in minicart --> + <comment userInput="Check configurable product in minicart" stepKey="commentCheckConfigurableProductInMinicart" after="cartMinicartAssertSimpleProduct2PageImageNotDefault" /> + <actionGroup ref="StorefrontOpenMinicartAndCheckConfigurableProductActionGroup" stepKey="cartOpenMinicartAndCheckConfigProduct" after="commentCheckConfigurableProductInMinicart"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontMinicartSection.productImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartMinicartGrabConfigProductImageSrc" after="cartOpenMinicartAndCheckConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/thumbnail\.jpg/'" actual="$cartMinicartGrabConfigProductImageSrc" stepKey="cartMinicartAssertConfigProductImageNotDefault" after="cartMinicartGrabConfigProductImageSrc"/> + <click selector="{{StorefrontMinicartSection.productOptionsDetailsByName($$createConfigProduct.name$$)}}" stepKey="cartMinicartClickConfigProductDetails" after="cartMinicartAssertConfigProductImageNotDefault"/> + <see userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{StorefrontMinicartSection.productOptionByNameAndAttribute($$createConfigProduct.name$$, $$createConfigProductAttribute.attribute[frontend_labels][0][label]$$)}}" stepKey="cartMinicartCheckConfigProductOption" after="cartMinicartClickConfigProductDetails"/> + <click selector="{{StorefrontMinicartSection.productLinkByName($$createConfigProduct.name$$)}}" stepKey="cartMinicartClickConfigProduct" after="cartMinicartCheckConfigProductOption"/> + <waitForLoadingMaskToDisappear stepKey="waitForMinicartConfigProductloaded" after="cartMinicartClickConfigProduct"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertMinicartConfigProductPage" after="waitForMinicartConfigProductloaded"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartMinicartGrabConfigProductPageImageSrc" after="cartAssertMinicartConfigProductPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartMinicartGrabConfigProductPageImageSrc" stepKey="cartMinicartAssertConfigProductPageImageNotDefault" after="cartMinicartGrabConfigProductPageImageSrc"/> + + <!-- Check configurable product in cart --> + <comment userInput="Check configurable product in cart" stepKey="commentCheckConfigurableProductInCart" after="cartCartAssertSimpleProduct2PageImageNotDefault2" /> + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="cartOpenCart2" after="commentCheckConfigurableProductInCart"/> + <actionGroup ref="StorefrontCheckCartConfigurableProductActionGroup" stepKey="cartAssertCartConfigProduct" after="cartOpenCart2"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct2$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="productQuantity" value="CONST.one"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{CheckoutCartProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="cartCartGrabConfigProduct2ImageSrc" after="cartAssertCartConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$cartCartGrabConfigProduct2ImageSrc" stepKey="cartCartAssertConfigProduct2ImageNotDefault" after="cartCartGrabConfigProduct2ImageSrc"/> + <see userInput="$$createConfigProductAttributeOption2.option[store_labels][1][label]$$" selector="{{CheckoutCartProductSection.ProductOptionByNameAndAttribute($$createConfigProduct.name$$, $$createConfigProductAttribute.attribute[frontend_labels][0][label]$$)}}" stepKey="cartCheckConfigProductOption" after="cartCartAssertConfigProduct2ImageNotDefault"/> + <click selector="{{CheckoutCartProductSection.ProductLinkByName($$createConfigProduct.name$$)}}" stepKey="cartClickCartConfigProduct" after="cartCheckConfigProductOption"/> + <waitForLoadingMaskToDisappear stepKey="waitForCartConfigProductloaded" after="cartClickCartConfigProduct"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="cartAssertCartConfigProductPage" after="waitForCartConfigProductloaded"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="cartCartGrabConfigProductPageImageSrc" after="cartAssertCartConfigProductPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$cartCartGrabConfigProductPageImageSrc" stepKey="cartCartAssertConfigProductPageImageNotDefault" after="cartCartGrabConfigProductPageImageSrc"/> + + <!-- Add Configurable Product to comparison --> + <comment userInput="Add Configurable Product to comparison" stepKey="commentAddConfigurableProductToComparison" after="compareAddSimpleProduct2ToCompare" /> + <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="compareAssertConfigProduct" after="commentAddConfigurableProductToComparison"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="compareGrabConfigProductImageSrc" after="compareAssertConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabConfigProductImageSrc" stepKey="compareAssertConfigProductImageNotDefault" after="compareGrabConfigProductImageSrc"/> + <actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="compareAddConfigProductToCompare" after="compareAssertConfigProductImageNotDefault"> + <argument name="productVar" value="$$createConfigProduct$$"/> + </actionGroup> + + <!-- Check configurable product in comparison sidebar --> + <comment userInput="Add Configurable Product in comparison sidebar" stepKey="commentAddConfigurableProductInComparisonSidebar" after="compareSimpleProduct2InSidebar" /> + <actionGroup ref="StorefrontCheckCompareSidebarProductActionGroup" stepKey="compareConfigProductInSidebar" after="commentAddConfigurableProductInComparisonSidebar"> + <argument name="productVar" value="$$createConfigProduct$$"/> + </actionGroup> + + <!-- Check configurable product on comparison page --> + <comment userInput="Add Configurable Product on comparison page" stepKey="commentAddConfigurableProductOnComparisonPage" after="compareAssertSimpleProduct2ImageNotDefaultInComparison" /> + <actionGroup ref="StorefrontCheckCompareConfigurableProductActionGroup" stepKey="compareAssertConfigProductInComparison" after="commentAddConfigurableProductOnComparisonPage"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductCompareMainSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="compareGrabConfigProductImageSrcInComparison" after="compareAssertConfigProductInComparison"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$compareGrabConfigProductImageSrcInComparison" stepKey="compareAssertConfigProductImageNotDefaultInComparison" after="compareGrabConfigProductImageSrcInComparison"/> + </test> </tests> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontAdvanceCatalogSearchConfigurableBySkuWithHyphenTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontAdvanceCatalogSearchConfigurableBySkuWithHyphenTest.xml new file mode 100644 index 000000000000..a8e982475253 --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontAdvanceCatalogSearchConfigurableBySkuWithHyphenTest.xml @@ -0,0 +1,88 @@ +<?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="StorefrontAdvanceCatalogSearchConfigurableBySkuWithHyphenTest" extends="AdvanceCatalogSearchSimpleProductBySkuTest"> + <annotations> + <features value="ConfigurableProduct"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search configurable product with product sku that contains hyphen"/> + <description value="Guest customer should be able to advance search configurable product with product sku that contains hyphen"/> + <severity value="MAJOR"/> + <testCaseId value="MC-20389"/> + <group value="ConfigurableProduct"/> + <group value="SearchEngineMysql"/> + </annotations> + <before> + <createData entity="SimpleSubCategory" stepKey="categoryHandle" before="simple1Handle"/> + + <createData entity="SimpleProduct" stepKey="simple1Handle" before="simple2Handle"> + <requiredEntity createDataKey="categoryHandle"/> + </createData> + + <createData entity="SimpleProduct" stepKey="simple2Handle" before="product"> + <requiredEntity createDataKey="categoryHandle"/> + </createData> + + <!-- TODO: Move configurable product creation to an actionGroup when MQE-697 is fixed --> + <createData entity="ApiConfigurableProductWithDescription" stepKey="product"/> + + <createData entity="productDropDownAttribute" stepKey="productAttributeHandle"/> + + <createData entity="productAttributeOption1" stepKey="productAttributeOption1Handle"> + <requiredEntity createDataKey="productAttributeHandle"/> + </createData> + <createData entity="productAttributeOption2" stepKey="productAttributeOption2Handle"> + <requiredEntity createDataKey="productAttributeHandle"/> + </createData> + + <createData entity="AddToDefaultSet" stepKey="addToAttributeSetHandle"> + <requiredEntity createDataKey="productAttributeHandle"/> + </createData> + + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getAttributeOption1Handle"> + <requiredEntity createDataKey="productAttributeHandle"/> + </getData> + <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getAttributeOption2Handle"> + <requiredEntity createDataKey="productAttributeHandle"/> + </getData> + + <createData entity="SimpleOne" stepKey="childProductHandle1"> + <requiredEntity createDataKey="productAttributeHandle"/> + <requiredEntity createDataKey="getAttributeOption1Handle"/> + </createData> + <createData entity="SimpleOne" stepKey="childProductHandle2"> + <requiredEntity createDataKey="productAttributeHandle"/> + <requiredEntity createDataKey="getAttributeOption2Handle"/> + </createData> + + <createData entity="ConfigurableProductTwoOptions" stepKey="configProductOptionHandle"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="productAttributeHandle"/> + <requiredEntity createDataKey="getAttributeOption1Handle"/> + <requiredEntity createDataKey="getAttributeOption2Handle"/> + </createData> + + <createData entity="ConfigurableProductAddChild" stepKey="configProductHandle1"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="childProductHandle1"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="configProductHandle2"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="childProductHandle2"/> + </createData> + </before> + <after> + <deleteData createDataKey="simple1Handle" stepKey="deleteSimple1" before="deleteSimple2"/> + <deleteData createDataKey="simple2Handle" stepKey="deleteSimple2" before="delete"/> + <deleteData createDataKey="childProductHandle1" stepKey="deleteChildProduct1" before="delete"/> + <deleteData createDataKey="childProductHandle2" stepKey="deleteChildProduct2" before="delete"/> + </after> + </test> +</tests> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml index c60b4d46f7fe..16400fa837b1 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml @@ -17,6 +17,7 @@ <severity value="MAJOR"/> <testCaseId value="MC-249"/> <group value="ConfigurableProduct"/> + <group value="SearchEngineMysql"/> </annotations> <before> <!-- TODO: This should be converted to an actionGroup once MQE-993 is fixed. --> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml index bb69122dc0be..182c8c069ab2 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml @@ -135,6 +135,9 @@ <waitForPageLoad stepKey="waitForPageLoad1"/> <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/> + <!--Run re-index task--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!--Open Category in Store Front and select product attribute option from sidebar --> <actionGroup ref="SelectStorefrontSideBarAttributeOption" stepKey="selectStorefrontProductAttributeOption"> <argument name="categoryName" value="$$createCategory.name$$"/> diff --git a/app/code/Magento/Customer/Block/Widget/Dob.php b/app/code/Magento/Customer/Block/Widget/Dob.php index d822be853f18..e020de79a3a6 100644 --- a/app/code/Magento/Customer/Block/Widget/Dob.php +++ b/app/code/Magento/Customer/Block/Widget/Dob.php @@ -267,6 +267,8 @@ public function getHtmlExtraParams() $validators['validate-date'] = [ 'dateFormat' => $this->getDateFormat() ]; + $validators['validate-dob'] = true; + return 'data-validate="' . $this->_escaper->escapeHtml(json_encode($validators)) . '"'; } diff --git a/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php b/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php index 529b0e806972..03cf4b1bddde 100644 --- a/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php +++ b/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php @@ -7,24 +7,25 @@ namespace Magento\Customer\Model\ResourceModel; use Magento\Customer\Api\CustomerMetadataInterface; +use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Customer\Api\Data\CustomerInterface; use Magento\Customer\Api\Data\CustomerSearchResultsInterfaceFactory; -use Magento\Framework\Api\ExtensibleDataObjectConverter; -use Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface; +use Magento\Customer\Model\Customer as CustomerModel; +use Magento\Customer\Model\Customer\NotificationStorage; use Magento\Customer\Model\CustomerFactory; use Magento\Customer\Model\CustomerRegistry; use Magento\Customer\Model\Data\CustomerSecureFactory; -use Magento\Customer\Model\Customer\NotificationStorage; use Magento\Customer\Model\Delegation\Data\NewOperation; -use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Model\Delegation\Storage as DelegatedStorage; use Magento\Framework\Api\DataObjectHelper; +use Magento\Framework\Api\ExtensibleDataObjectConverter; +use Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface; use Magento\Framework\Api\ImageProcessorInterface; +use Magento\Framework\Api\Search\FilterGroup; use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface; use Magento\Framework\Api\SearchCriteriaInterface; -use Magento\Framework\Api\Search\FilterGroup; -use Magento\Framework\Event\ManagerInterface; -use Magento\Customer\Model\Delegation\Storage as DelegatedStorage; use Magento\Framework\App\ObjectManager; +use Magento\Framework\Event\ManagerInterface; use Magento\Store\Model\StoreManagerInterface; /** @@ -203,7 +204,7 @@ public function save(CustomerInterface $customer, $passwordHash = null) $customer->setAddresses([]); $customerData = $this->extensibleDataObjectConverter->toNestedArray($customer, [], CustomerInterface::class); $customer->setAddresses($origAddresses); - /** @var Customer $customerModel */ + /** @var CustomerModel $customerModel */ $customerModel = $this->customerFactory->create(['data' => $customerData]); //Model's actual ID field maybe different than "id" so "id" field from $customerData may be ignored. $customerModel->setId($customer->getId()); diff --git a/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml b/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml index f96da1357846..6244a616bc6d 100644 --- a/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml +++ b/app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml @@ -327,4 +327,22 @@ <data key="postcode">90230</data> <data key="telephone">555-55-555-55</data> </entity> + <entity name="US_Address_AE" type="address"> + <data key="firstname">John</data> + <data key="lastname">Doe</data> + <data key="company">Magento</data> + <array key="street"> + <item>7700 West Parmer Lane</item> + <item>113</item> + </array> + <data key="city">Los Angeles</data> + <data key="state">Armed Forces Europe</data> + <data key="country_id">US</data> + <data key="country">United States</data> + <data key="postcode">90001</data> + <data key="telephone">512-345-6789</data> + <data key="default_billing">Yes</data> + <data key="default_shipping">Yes</data> + <requiredEntity type="region">RegionAE</requiredEntity> + </entity> </entities> diff --git a/app/code/Magento/Customer/Test/Mftf/Data/AdminGeneralStoreInfomationConfigData.xml b/app/code/Magento/Customer/Test/Mftf/Data/AdminGeneralStoreInfomationConfigData.xml new file mode 100644 index 000000000000..e4c020cc449f --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Data/AdminGeneralStoreInfomationConfigData.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="AdminGeneralSetVatNumberConfigData"> + <data key="path">general/store_information/merchant_vat_number</data> + <data key="value">111607872</data> + </entity> +</entities> diff --git a/app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml b/app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml index 96233a897860..093d6a05e8c5 100644 --- a/app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml +++ b/app/code/Magento/Customer/Test/Mftf/Data/CustomerData.xml @@ -323,4 +323,17 @@ <data key="store_id">0</data> <data key="website_id">0</data> </entity> + <entity name="Simple_US_Customer_ArmedForcesEurope" type="customer"> + <data key="group_id">0</data> + <data key="default_billing">true</data> + <data key="default_shipping">true</data> + <data key="email" unique="prefix">John.Doe@example.com</data> + <data key="firstname">John</data> + <data key="lastname">Doe</data> + <data key="fullname">John Doe</data> + <data key="password">pwdTest123!</data> + <data key="store_id">0</data> + <data key="website_id">0</data> + <requiredEntity type="address">US_Address_AE</requiredEntity> + </entity> </entities> diff --git a/app/code/Magento/Customer/Test/Mftf/Data/RegionData.xml b/app/code/Magento/Customer/Test/Mftf/Data/RegionData.xml index 280bae7de411..0a956f16767b 100644 --- a/app/code/Magento/Customer/Test/Mftf/Data/RegionData.xml +++ b/app/code/Magento/Customer/Test/Mftf/Data/RegionData.xml @@ -32,4 +32,9 @@ <data key="region_code">UT</data> <data key="region_id">58</data> </entity> + <entity name="RegionAE" type="region"> + <data key="region">Armed Forces Europe</data> + <data key="region_code">AFE</data> + <data key="region_id">9</data> + </entity> </entities> diff --git a/app/code/Magento/Customer/Test/Unit/Block/Widget/DobTest.php b/app/code/Magento/Customer/Test/Unit/Block/Widget/DobTest.php index 2e8ee7af37ce..b1d7c455324b 100644 --- a/app/code/Magento/Customer/Test/Unit/Block/Widget/DobTest.php +++ b/app/code/Magento/Customer/Test/Unit/Block/Widget/DobTest.php @@ -9,13 +9,13 @@ use Magento\Customer\Api\CustomerMetadataInterface; use Magento\Customer\Api\Data\AttributeMetadataInterface; use Magento\Customer\Api\Data\ValidationRuleInterface; +use Magento\Customer\Block\Widget\Dob; use Magento\Customer\Helper\Address; use Magento\Framework\App\CacheInterface; use Magento\Framework\Cache\FrontendInterface; use Magento\Framework\Data\Form\FilterFactory; use Magento\Framework\Escaper; use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Customer\Block\Widget\Dob; use Magento\Framework\Locale\Resolver; use Magento\Framework\Locale\ResolverInterface; use Magento\Framework\Stdlib\DateTime\Timezone; @@ -536,8 +536,8 @@ public function testGetHtmlExtraParamsWithoutRequiredOption() { $this->escaper->expects($this->any()) ->method('escapeHtml') - ->with('{"validate-date":{"dateFormat":"M\/d\/Y"}}') - ->will($this->returnValue('{"validate-date":{"dateFormat":"M\/d\/Y"}}')); + ->with('{"validate-date":{"dateFormat":"M\/d\/Y"},"validate-dob":true}') + ->will($this->returnValue('{"validate-date":{"dateFormat":"M\/d\/Y"},"validate-dob":true}')); $this->attribute->expects($this->once()) ->method("isRequired") @@ -545,7 +545,7 @@ public function testGetHtmlExtraParamsWithoutRequiredOption() $this->assertEquals( $this->_block->getHtmlExtraParams(), - 'data-validate="{"validate-date":{"dateFormat":"M\/d\/Y"}}"' + 'data-validate="{"validate-date":{"dateFormat":"M\/d\/Y"},"validate-dob":true}"' ); } @@ -559,13 +559,17 @@ public function testGetHtmlExtraParamsWithRequiredOption() ->willReturn(true); $this->escaper->expects($this->any()) ->method('escapeHtml') - ->with('{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"}}') - ->will($this->returnValue('{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"}}')); + ->with('{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"},"validate-dob":true}') + ->will( + $this->returnValue( + '{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"},"validate-dob":true}' + ) + ); $this->context->expects($this->any())->method('getEscaper')->will($this->returnValue($this->escaper)); $this->assertEquals( - 'data-validate="{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"}}"', + 'data-validate="{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"},"validate-dob":true}"', $this->_block->getHtmlExtraParams() ); } diff --git a/app/code/Magento/Customer/i18n/en_US.csv b/app/code/Magento/Customer/i18n/en_US.csv index 3495feb925cb..a70aa08dba73 100644 --- a/app/code/Magento/Customer/i18n/en_US.csv +++ b/app/code/Magento/Customer/i18n/en_US.csv @@ -539,3 +539,4 @@ Addresses,Addresses "Prefix","Prefix" "Middle Name/Initial","Middle Name/Initial" "Suffix","Suffix" +"The Date of Birth should not be greater than today.","The Date of Birth should not be greater than today." diff --git a/app/code/Magento/Customer/view/base/ui_component/customer_form.xml b/app/code/Magento/Customer/view/base/ui_component/customer_form.xml index 5fb8b17dbb8c..954b44ec19bb 100644 --- a/app/code/Magento/Customer/view/base/ui_component/customer_form.xml +++ b/app/code/Magento/Customer/view/base/ui_component/customer_form.xml @@ -265,10 +265,20 @@ <settings> <validation> <rule name="validate-date" xsi:type="boolean">true</rule> + <rule name="validate-dob" xsi:type="boolean">true</rule> </validation> <dataType>text</dataType> <visible>true</visible> </settings> + <formElements> + <date> + <settings> + <options> + <option name="maxDate" xsi:type="string">-1d</option> + </options> + </settings> + </date> + </formElements> </field> <field name="taxvat" formElement="input"> <argument name="data" xsi:type="array"> diff --git a/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml b/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml index ac4b9f93e0c5..3c2f970faade 100644 --- a/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/widget/dob.phtml @@ -35,3 +35,11 @@ $fieldCssClass .= $block->isRequired() ? ' required' : ''; <?php endif; ?> </div> </div> + +<script type="text/x-magento-init"> + { + "*": { + "Magento_Customer/js/validation": {} + } + } + </script> diff --git a/app/code/Magento/Customer/view/frontend/web/js/validation.js b/app/code/Magento/Customer/view/frontend/web/js/validation.js new file mode 100644 index 000000000000..67a714212026 --- /dev/null +++ b/app/code/Magento/Customer/view/frontend/web/js/validation.js @@ -0,0 +1,20 @@ +define([ + 'jquery', + 'moment', + 'jquery/validate', + 'mage/translate' +], function ($, moment) { + 'use strict'; + + $.validator.addMethod( + 'validate-dob', + function (value) { + if (value === '') { + return true; + } + + return moment(value).isBefore(moment()); + }, + $.mage.__('The Date of Birth should not be greater than today.') + ); +}); diff --git a/app/code/Magento/CustomerGraphQl/Model/Customer/CheckCustomerPassword.php b/app/code/Magento/CustomerGraphQl/Model/Customer/CheckCustomerPassword.php index 3cc831e1ca40..c252628b6566 100644 --- a/app/code/Magento/CustomerGraphQl/Model/Customer/CheckCustomerPassword.php +++ b/app/code/Magento/CustomerGraphQl/Model/Customer/CheckCustomerPassword.php @@ -9,12 +9,8 @@ use Magento\Customer\Model\AuthenticationInterface; use Magento\Framework\Exception\InvalidEmailOrPasswordException; -use Magento\Framework\Exception\LocalizedException; -use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Exception\State\UserLockedException; use Magento\Framework\GraphQl\Exception\GraphQlAuthenticationException; -use Magento\Framework\GraphQl\Exception\GraphQlInputException; -use Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException; /** * Check customer password @@ -41,8 +37,6 @@ public function __construct( * @param string $password * @param int $customerId * @throws GraphQlAuthenticationException - * @throws GraphQlInputException - * @throws GraphQlNoSuchEntityException */ public function execute(string $password, int $customerId) { @@ -52,10 +46,6 @@ public function execute(string $password, int $customerId) throw new GraphQlAuthenticationException(__($e->getMessage()), $e); } catch (UserLockedException $e) { throw new GraphQlAuthenticationException(__($e->getMessage()), $e); - } catch (NoSuchEntityException $e) { - throw new GraphQlNoSuchEntityException(__($e->getMessage()), $e); - } catch (LocalizedException $e) { - throw new GraphQlInputException(__($e->getMessage()), $e); } } } diff --git a/app/code/Magento/Deploy/Package/Package.php b/app/code/Magento/Deploy/Package/Package.php index 2e924d41a1b8..423f3072c462 100644 --- a/app/code/Magento/Deploy/Package/Package.php +++ b/app/code/Magento/Deploy/Package/Package.php @@ -459,17 +459,17 @@ public function getParentMap() */ public function getParentFiles($type = null) { - $files = []; + $files = [[]]; foreach ($this->getParentPackages() as $parentPackage) { if ($type === null) { // phpcs:ignore Magento2.Performance.ForeachArrayMerge.ForeachArrayMerge - $files = array_merge($files, $parentPackage->getFiles()); + $files[] = $parentPackage->getFiles(); } else { // phpcs:ignore Magento2.Performance.ForeachArrayMerge.ForeachArrayMerge - $files = array_merge($files, $parentPackage->getFilesByType($type)); + $files[] = $parentPackage->getFilesByType($type); } } - return $files; + return array_merge(...$files); } /** diff --git a/app/code/Magento/Deploy/Service/DeployPackage.php b/app/code/Magento/Deploy/Service/DeployPackage.php index 34a6b147a055..90d4cdb11696 100644 --- a/app/code/Magento/Deploy/Service/DeployPackage.php +++ b/app/code/Magento/Deploy/Service/DeployPackage.php @@ -249,23 +249,6 @@ private function checkFileSkip($filePath, array $options) */ private function register(Package $package, PackageFile $file = null, $skipLogging = false) { - $logMessage = '.'; - if ($file) { - $logMessage = "Processing file '{$file->getSourcePath()}'"; - if ($file->getArea()) { - $logMessage .= " for area '{$file->getArea()}'"; - } - if ($file->getTheme()) { - $logMessage .= ", theme '{$file->getTheme()}'"; - } - if ($file->getLocale()) { - $logMessage .= ", locale '{$file->getLocale()}'"; - } - if ($file->getModule()) { - $logMessage .= "module '{$file->getModule()}'"; - } - } - $info = [ 'count' => $this->count, 'last' => $file ? $file->getSourcePath() : '' @@ -273,6 +256,23 @@ private function register(Package $package, PackageFile $file = null, $skipLoggi $this->deployStaticFile->writeTmpFile('info.json', $package->getPath(), json_encode($info)); if (!$skipLogging) { + $logMessage = '.'; + if ($file) { + $logMessage = "Processing file '{$file->getSourcePath()}'"; + if ($file->getArea()) { + $logMessage .= " for area '{$file->getArea()}'"; + } + if ($file->getTheme()) { + $logMessage .= ", theme '{$file->getTheme()}'"; + } + if ($file->getLocale()) { + $logMessage .= ", locale '{$file->getLocale()}'"; + } + if ($file->getModule()) { + $logMessage .= "module '{$file->getModule()}'"; + } + } + $this->logger->info($logMessage); } } diff --git a/app/code/Magento/Directory/Setup/Patch/Data/AddCountriesCaribbeanCuracaoKosovoSintMaarten.php b/app/code/Magento/Directory/Setup/Patch/Data/AddCountriesCaribbeanCuracaoKosovoSintMaarten.php new file mode 100644 index 000000000000..d7bec84e5440 --- /dev/null +++ b/app/code/Magento/Directory/Setup/Patch/Data/AddCountriesCaribbeanCuracaoKosovoSintMaarten.php @@ -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 []; + } +} diff --git a/app/code/Magento/Directory/etc/config.xml b/app/code/Magento/Directory/etc/config.xml index c18c4f29d582..2ff0b484fe97 100644 --- a/app/code/Magento/Directory/etc/config.xml +++ b/app/code/Magento/Directory/etc/config.xml @@ -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,ID,IR,IQ,IE,IL,IT,CI,JE,JM,JP,JO,KZ,KE,KI,KW,KG,LA,LV,LB,LS,LR,LY,LI,LT,LU,ME,MF,MO,MK,MG,MW,MY,MV,ML,MT,MH,MQ,MR,MU,YT,FX,MX,FM,MD,MC,MN,MS,MA,MZ,MM,NA,NR,NP,NL,AN,NC,NZ,NI,NE,NG,NU,NF,KP,MP,NO,OM,PK,PW,PA,PG,PY,PE,PH,PN,PL,PS,PT,PR,QA,RE,RO,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,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,YE,ZM,ZW</allow> + <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,BQ,BA,BW,BV,BR,IO,VG,BN,BG,BF,BI,KH,CM,CA,CD,CV,KY,CF,TD,CL,CN,CX,CW,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,ID,IR,IQ,IE,IL,IT,CI,JE,JM,JP,JO,KZ,KE,KI,KW,KG,LA,LV,LB,LS,LR,LY,LI,LT,LU,ME,MF,MO,MK,MG,MW,MY,MV,ML,MT,MH,MQ,MR,MU,YT,FX,MX,FM,MD,MC,MN,MS,MA,MZ,MM,NA,NR,NP,NL,AN,NC,NZ,NI,NE,NG,NU,NF,KP,MP,NO,OM,PK,PW,PA,PG,PY,PE,PH,PN,PL,PS,PT,PR,QA,RE,RO,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> diff --git a/app/code/Magento/Downloadable/Setup/Patch/Schema/ChangeTmpTablesEngine.php b/app/code/Magento/Downloadable/Setup/Patch/Schema/ChangeTmpTablesEngine.php deleted file mode 100644 index caf2f7745a3d..000000000000 --- a/app/code/Magento/Downloadable/Setup/Patch/Schema/ChangeTmpTablesEngine.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Downloadable\Setup\Patch\Schema; - -use Magento\Framework\Setup\Patch\SchemaPatchInterface; -use Magento\Framework\Setup\SchemaSetupInterface; - -/** - * Change engine for temporary tables to InnoDB. - */ -class ChangeTmpTablesEngine implements SchemaPatchInterface -{ - /** - * @var SchemaSetupInterface - */ - private $schemaSetup; - - /** - * @param SchemaSetupInterface $schemaSetup - */ - public function __construct(SchemaSetupInterface $schemaSetup) - { - $this->schemaSetup = $schemaSetup; - } - - /** - * @inheritdoc - */ - public function apply() - { - $this->schemaSetup->startSetup(); - - $tableName = $this->schemaSetup->getTable('catalog_product_index_price_downlod_tmp'); - if ($this->schemaSetup->getConnection()->isTableExists($tableName)) { - $this->schemaSetup->getConnection()->changeTableEngine($tableName, 'InnoDB'); - } - - $this->schemaSetup->endSetup(); - } - - /** - * @inheritdoc - */ - public static function getDependencies() - { - return []; - } - - /** - * @inheritdoc - */ - public function getAliases() - { - return []; - } -} diff --git a/app/code/Magento/Downloadable/Test/Mftf/Data/ProductData.xml b/app/code/Magento/Downloadable/Test/Mftf/Data/ProductData.xml index 1a6be43b38d2..2986532ef113 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Data/ProductData.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Data/ProductData.xml @@ -74,6 +74,21 @@ <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> <requiredEntity type="downloadable_link">apiDownloadableLink</requiredEntity> </entity> + <entity name="ApiDownloadableProductUnderscoredSku" type="product"> + <data key="sku" unique="suffix">api_downloadable_product</data> + <data key="type_id">downloadable</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">Api Downloadable Product</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">api-downloadable-product</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> + <requiredEntity type="downloadable_link">apiDownloadableLink</requiredEntity> + </entity> <entity name="DownloadableProductWithTwoLink100" type="product"> <data key="sku" unique="suffix">downloadableproduct</data> <data key="type_id">downloadable</data> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Section/StorefrontDownloadableProductSection.xml b/app/code/Magento/Downloadable/Test/Mftf/Section/StorefrontDownloadableProductSection.xml index 20b62ef06030..dc2a58be138e 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Section/StorefrontDownloadableProductSection.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Section/StorefrontDownloadableProductSection.xml @@ -15,5 +15,6 @@ <element name="downloadableLinkSampleByTitle" type="text" selector="//label[contains(., '{{title}}')]/a[contains(@class, 'sample link')]" parameterized="true"/> <element name="downloadableSampleLabel" type="text" selector="//a[contains(.,normalize-space('{{title}}'))]" parameterized="true" timeout="30"/> <element name="downloadableLinkSelectAllCheckbox" type="checkbox" selector="#links_all" /> + <element name="downloadableLinkSelectAllLabel" type="text" selector="label[for='links_all']" /> </section> </sections> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdvanceCatalogSearchDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdvanceCatalogSearchDownloadableProductTest.xml index 66177b6875dd..39260b897ee1 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdvanceCatalogSearchDownloadableProductTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdvanceCatalogSearchDownloadableProductTest.xml @@ -39,7 +39,7 @@ <group value="Downloadable"/> </annotations> <before> - <createData entity="ApiDownloadableProduct" stepKey="product"/> + <createData entity="ApiDownloadableProductUnderscoredSku" stepKey="product"/> <createData entity="ApiDownloadableLink" stepKey="addDownloadableLink1"> <requiredEntity createDataKey="product"/> </createData> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/ManualSelectAllDownloadableLinksDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/ManualSelectAllDownloadableLinksDownloadableProductTest.xml new file mode 100644 index 000000000000..b0424b1976c1 --- /dev/null +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/ManualSelectAllDownloadableLinksDownloadableProductTest.xml @@ -0,0 +1,122 @@ +<?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="ManualSelectAllDownloadableLinksDownloadableProductTest"> + <annotations> + <features value="Catalog"/> + <stories value="Create Downloadable Product"/> + <title value="Manual select all downloadable links downloadable product test"/> + <description value="Manually selecting all downloadable links must change 'Select/Unselect all' button label to 'Unselect all', and 'Select all' otherwise"/> + <severity value="MAJOR"/> + <group value="Downloadable"/> + </annotations> + <before> + <!-- Create category --> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + + <!-- Login as admin --> + <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> + + <!-- Create downloadable product --> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="amOnProductGridPage"/> + <waitForPageLoad stepKey="waitForProductGridPageLoad"/> + <actionGroup ref="GoToSpecifiedCreateProductPage" stepKey="createProduct"> + <argument name="productType" value="downloadable"/> + </actionGroup> + + <!-- Fill downloadable product values --> + <actionGroup ref="fillMainProductFormNoWeight" stepKey="fillDownloadableProductForm"> + <argument name="product" value="DownloadableProduct"/> + </actionGroup> + + <!-- Add downloadable product to category --> + <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" + parameterArray="[$$createCategory.name$$]" stepKey="fillCategory"/> + + <!-- Fill downloadable link information before the creation link --> + <actionGroup ref="AdminAddDownloadableLinkInformationActionGroup" stepKey="addDownloadableLinkInformation"/> + + <!-- Links can be purchased separately --> + <checkOption selector="{{AdminProductDownloadableSection.isLinksPurchasedSeparately}}" + stepKey="checkOptionPurchaseSeparately"/> + + <!-- Add first downloadable link --> + <actionGroup ref="addDownloadableProductLinkWithMaxDownloads" stepKey="addFirstDownloadableProductLink"> + <argument name="link" value="downloadableLinkWithMaxDownloads"/> + </actionGroup> + + <!-- Add second downloadable link --> + <actionGroup ref="addDownloadableProductLink" stepKey="addSecondDownloadableProductLink"> + <argument name="link" value="downloadableLink"/> + </actionGroup> + + <!-- Save product --> + <actionGroup ref="saveProductForm" stepKey="saveProduct"/> + </before> + <after> + <!-- Delete category --> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + + <!-- Delete created downloadable product --> + <actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteProduct"> + <argument name="product" value="DownloadableProduct"/> + </actionGroup> + + <!-- Log out --> + <actionGroup ref="logout" stepKey="logout"/> + </after> + + <!-- Step 1: Navigate to store front Product page as guest --> + <amOnPage url="/{{DownloadableProduct.sku}}.html" + stepKey="amOnStorefrontProductPage"/> + + <!-- Step 2: Check first downloadable link checkbox --> + <click + selector="{{StorefrontDownloadableProductSection.downloadableLinkByTitle(downloadableLinkWithMaxDownloads.title)}}" + stepKey="selectFirstCheckbox"/> + + <!-- Step 3: Check second downloadable link checkbox --> + <click + selector="{{StorefrontDownloadableProductSection.downloadableLinkByTitle(downloadableLink.title)}}" + stepKey="selectSecondCheckbox"/> + + <!-- Step 4: Grab "Select/Unselect All" button label text --> + <grabTextFrom + selector="{{StorefrontDownloadableProductSection.downloadableLinkSelectAllLabel}}" + stepKey="grabUnselectAllButtonText"/> + + <!-- Step 5: Assert that 'Select/Unselect all' button text is 'Unselect all' after manually checking all checkboxes --> + <assertEquals + message="Assert that 'Select/Unselect all' button text is 'Unselect all' after manually checking all checkboxes" + stepKey="assertButtonTextOne"> + <expectedResult type="string">Unselect all</expectedResult> + <actualResult type="string">{$grabUnselectAllButtonText}</actualResult> + </assertEquals> + + <!-- Step 6: Uncheck second downloadable link checkbox --> + <click + selector="{{StorefrontDownloadableProductSection.downloadableLinkByTitle(downloadableLink.title)}}" + stepKey="unselectSecondCheckbox"/> + + <!-- Step 7: Grab "Select/Unselect All" button label text --> + <grabTextFrom + selector="{{StorefrontDownloadableProductSection.downloadableLinkSelectAllLabel}}" + stepKey="grabSelectAllButtonText"/> + + <!-- Step 8: Assert that 'Select/Unselect all' button text is 'Select all' after manually unchecking one checkbox --> + <assertEquals + message="Assert that 'Select/Unselect all' button text is 'Select all' after manually unchecking one checkbox" + stepKey="assertButtonTextTwo"> + <expectedResult type="string">Select all</expectedResult> + <actualResult type="string">{$grabSelectAllButtonText}</actualResult> + </assertEquals> + + </test> +</tests> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontAdvanceCatalogSearchDownloadableBySkuWithHyphenTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontAdvanceCatalogSearchDownloadableBySkuWithHyphenTest.xml new file mode 100644 index 000000000000..717412276057 --- /dev/null +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontAdvanceCatalogSearchDownloadableBySkuWithHyphenTest.xml @@ -0,0 +1,32 @@ +<?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="StorefrontAdvanceCatalogSearchDownloadableBySkuWithHyphenTest" extends="AdvanceCatalogSearchSimpleProductBySkuTest"> + <annotations> + <features value="Downloadable"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search Downloadable product with product sku that contains hyphen"/> + <description value="Guest customer should be able to advance search Downloadable product with product that contains hyphen"/> + <severity value="MAJOR"/> + <testCaseId value="MC-252"/> + <group value="Downloadable"/> + <group value="SearchEngineMysql"/> + </annotations> + <before> + <createData entity="ApiDownloadableProduct" stepKey="product"/> + <createData entity="ApiDownloadableLink" stepKey="addDownloadableLink1"> + <requiredEntity createDataKey="product"/> + </createData> + <createData entity="ApiDownloadableLink" stepKey="addDownloadableLink2"> + <requiredEntity createDataKey="product"/> + </createData> + </before> + </test> + </tests> diff --git a/app/code/Magento/Downloadable/etc/db_schema.xml b/app/code/Magento/Downloadable/etc/db_schema.xml index ccbefa4fb399..ee7b3c5683ea 100644 --- a/app/code/Magento/Downloadable/etc/db_schema.xml +++ b/app/code/Magento/Downloadable/etc/db_schema.xml @@ -233,7 +233,7 @@ <column name="website_id"/> </constraint> </table> - <table name="catalog_product_index_price_downlod_tmp" resource="default" engine="memory" + <table name="catalog_product_index_price_downlod_tmp" resource="default" engine="innodb" comment="Temporary Indexer Table for price of downloadable products"> <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Entity ID"/> diff --git a/app/code/Magento/Downloadable/view/frontend/web/js/downloadable.js b/app/code/Magento/Downloadable/view/frontend/web/js/downloadable.js index a1e8c785c696..8bdea0b3a70b 100644 --- a/app/code/Magento/Downloadable/view/frontend/web/js/downloadable.js +++ b/app/code/Magento/Downloadable/view/frontend/web/js/downloadable.js @@ -12,12 +12,17 @@ define([ ], function ($) { 'use strict'; + /** + * Downloadable widget + */ $.widget('mage.downloadable', { options: { priceHolderSelector: '.price-box' }, - /** @inheritdoc */ + /** + * @inheritdoc + */ _create: function () { var self = this; @@ -65,6 +70,32 @@ define([ } } }); + + this.reloadAllCheckText(); + }, + + /** + * Reload all-elements-checkbox's label + * @private + */ + reloadAllCheckText: function () { + var allChecked = true, + allElementsCheck = $(this.options.allElements), + allElementsLabel = $('label[for="' + allElementsCheck.attr('id') + '"] > span'); + + $(this.options.linkElement).each(function () { + if (!this.checked) { + allChecked = false; + } + }); + + if (allChecked) { + allElementsLabel.text(allElementsCheck.attr('data-checked')); + allElementsCheck.prop('checked', true); + } else { + allElementsLabel.text(allElementsCheck.attr('data-notchecked')); + allElementsCheck.prop('checked', false); + } } }); diff --git a/app/code/Magento/Elasticsearch6/Test/Mftf/Data/ConfigData.xml b/app/code/Magento/Elasticsearch6/Test/Mftf/Data/ConfigData.xml new file mode 100644 index 000000000000..f1f2f39f4457 --- /dev/null +++ b/app/code/Magento/Elasticsearch6/Test/Mftf/Data/ConfigData.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="SearchEngineElasticsearchConfigData"> + <data key="path">catalog/search/engine</data> + <data key="scope_id">1</data> + <data key="label">Elasticsearch 6.0+</data> + <data key="value">elasticsearch6</data> + </entity> +</entities> diff --git a/app/code/Magento/Elasticsearch6/Test/Mftf/Suite/SearchEngineElasticsearchSuite.xml b/app/code/Magento/Elasticsearch6/Test/Mftf/Suite/SearchEngineElasticsearchSuite.xml new file mode 100644 index 000000000000..d612f5bd17a2 --- /dev/null +++ b/app/code/Magento/Elasticsearch6/Test/Mftf/Suite/SearchEngineElasticsearchSuite.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd"> + <suite name="SearchEngineElasticsearchSuite"> + <before> + <magentoCLI stepKey="setSearchEngineToElasticsearch" command="config:set {{SearchEngineElasticsearchConfigData.path}} {{SearchEngineElasticsearchConfigData.value}}"/> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </before> + <after></after> + <include> + <group name="SearchEngineElasticsearch" /> + </include> + <exclude> + <group name="skip"/> + </exclude> + </suite> +</suites> diff --git a/app/code/Magento/Fedex/Test/Mftf/Data/FedExConfigData.xml b/app/code/Magento/Fedex/Test/Mftf/Data/FedExConfigData.xml new file mode 100644 index 000000000000..d03403970ae5 --- /dev/null +++ b/app/code/Magento/Fedex/Test/Mftf/Data/FedExConfigData.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="AdminFedexEnableForCheckoutConfigData" type="fedex_config"> + <data key="path">carriers/fedex/active</data> + <data key="value">1</data> + <data key="label">Yes</data> + </entity> + <entity name="AdminFedexEnableSandboxModeConfigData" type="fedex_config"> + <data key="path">carriers/fedex/sandbox_mode</data> + <data key="value">1</data> + <data key="label">Yes</data> + </entity> + <entity name="AdminFedexEnableDebugConfigData" type="fedex_config"> + <data key="path">carriers/fedex/debug</data> + <data key="value">1</data> + <data key="label">Yes</data> + </entity> + <entity name="AdminFedexEnableShowMethodConfigData" type="fedex_config"> + <data key="path">carriers/fedex/showmethod</data> + <data key="value">1</data> + <data key="label">Yes</data> + </entity> + <entity name="AdminFedexDisableShowMethodConfigData" type="fedex_config"> + <data key="path">carriers/fedex/showmethod</data> + <data key="value">0</data> + <data key="label">No</data> + </entity> + <entity name="AdminFedexDisableDebugConfigData" type="fedex_config"> + <data key="path">carriers/fedex/debug</data> + <data key="value">0</data> + <data key="label">No</data> + </entity> + <entity name="AdminFedexDisableSandboxModeConfigData" type="fedex_config"> + <data key="path">carriers/fedex/sandbox_mode</data> + <data key="value">0</data> + <data key="label">No</data> + </entity> + <entity name="AdminFedexDisableForCheckoutConfigData" type="fedex_config"> + <data key="path">carriers/fedex/active</data> + <data key="value">0</data> + <data key="label">No</data> + </entity> +</entities> diff --git a/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml b/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml new file mode 100644 index 000000000000..91a76383babd --- /dev/null +++ b/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml @@ -0,0 +1,130 @@ +<?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="AdminCreatingShippingLabelTest"> + <annotations> + <features value="Fedex"/> + <stories value="Shipping label"/> + <title value="Creating shipping label"/> + <description value="Creating shipping label"/> + <severity value="MAJOR"/> + <testCaseId value="MC-20287"/> + <useCaseId value="MC-18215"/> + <group value="shipping"/> + <skip> + <issueId value="MQE-1578"/> + </skip> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <!-- Create product --> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + <createData entity="SimpleProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <!--Set Fedex configs data--> + <magentoCLI command="config:set {{AdminFedexEnableForCheckoutConfigData.path}} {{AdminFedexEnableForCheckoutConfigData.value}}" stepKey="enableCheckout"/> + <magentoCLI command="config:set {{AdminFedexEnableSandboxModeConfigData.path}} {{AdminFedexEnableSandboxModeConfigData.value}}" stepKey="enableSandbox"/> + <magentoCLI command="config:set {{AdminFedexEnableDebugConfigData.path}} {{AdminFedexEnableDebugConfigData.value}}" stepKey="enableDebug"/> + <magentoCLI command="config:set {{AdminFedexEnableShowMethodConfigData.path}} {{AdminFedexEnableShowMethodConfigData.value}}" stepKey="enableShowMethod"/> + <!--TODO: add fedex credentials--> + <!--Set StoreInformation configs data--> + <magentoCLI command="config:set {{AdminGeneralSetStoreNameConfigData.path}} '{{AdminGeneralSetStoreNameConfigData.value}}'" stepKey="setStoreInformationName"/> + <magentoCLI command="config:set {{AdminGeneralSetStorePhoneConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.telephone}}" stepKey="setStoreInformationPhone"/> + <magentoCLI command="config:set {{AdminGeneralSetCountryConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.country_id}}" stepKey="setStoreInformationCountry"/> + <magentoCLI command="config:set {{AdminGeneralSetCityConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.city}}" stepKey="setStoreInformationCity"/> + <magentoCLI command="config:set {{AdminGeneralSetPostcodeConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.postcode}}" stepKey="setStoreInformationPostcode"/> + <magentoCLI command="config:set {{AdminGeneralSetStreetAddressConfigData.path}} '{{DE_Address_Berlin_Not_Default_Address.street[0]}}'" stepKey="setStoreInformationStreetAddress"/> + <magentoCLI command="config:set {{AdminGeneralSetStreetAddress2ConfigData.path}} '{{US_Address_California.street[0]}}'" stepKey="setStoreInformationStreetAddress2"/> + <magentoCLI command="config:set {{AdminGeneralSetVatNumberConfigData.path}} {{AdminGeneralSetVatNumberConfigData.value}}" stepKey="setStoreInformationVatNumber"/> + <!--Set Shipping settings origin data--> + <magentoCLI command="config:set {{AdminShippingSettingsOriginCountryConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.country_id}}" stepKey="setOriginCountry"/> + <magentoCLI command="config:set {{AdminShippingSettingsOriginCityConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.city}}" stepKey="setOriginCity"/> + <magentoCLI command="config:set {{AdminShippingSettingsOriginZipCodeConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.postcode}}" stepKey="setOriginZipCode"/> + <magentoCLI command="config:set {{AdminShippingSettingsOriginStreetAddressConfigData.path}} '{{DE_Address_Berlin_Not_Default_Address.street[0]}}'" stepKey="setOriginStreetAddress"/> + <magentoCLI command="config:set {{AdminShippingSettingsOriginStreetAddress2ConfigData.path}} '{{US_Address_California.street[0]}}'" stepKey="setOriginStreetAddress2"/> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </before> + <after> + <!--Reset configs--> + <magentoCLI command="config:set {{AdminFedexDisableForCheckoutConfigData.path}} {{AdminFedexDisableForCheckoutConfigData.value}}" stepKey="disableCheckout"/> + <magentoCLI command="config:set {{AdminFedexDisableSandboxModeConfigData.path}} {{AdminFedexDisableSandboxModeConfigData.value}}" stepKey="disableSandbox"/> + <magentoCLI command="config:set {{AdminFedexDisableDebugConfigData.path}} {{AdminFedexDisableDebugConfigData.value}}" stepKey="disableDebug"/> + <magentoCLI command="config:set {{AdminFedexDisableShowMethodConfigData.path}} {{AdminFedexDisableShowMethodConfigData.value}}" stepKey="disableShowMethod"/> + <magentoCLI command="config:set {{AdminGeneralSetStoreNameConfigData.path}} ''" stepKey="setStoreInformationName"/> + <magentoCLI command="config:set {{AdminGeneralSetStorePhoneConfigData.path}} ''" stepKey="setStoreInformationPhone"/> + <magentoCLI command="config:set {{AdminGeneralSetCityConfigData.path}} ''" stepKey="setStoreInformationCity"/> + <magentoCLI command="config:set {{AdminGeneralSetPostcodeConfigData.path}} ''" stepKey="setStoreInformationPostcode"/> + <magentoCLI command="config:set {{AdminGeneralSetStreetAddressConfigData.path}} ''" stepKey="setStoreInformationStreetAddress"/> + <magentoCLI command="config:set {{AdminGeneralSetStreetAddress2ConfigData.path}} ''" stepKey="setStoreInformationStreetAddress2"/> + <magentoCLI command="config:set {{AdminGeneralSetVatNumberConfigData.path}} ''" stepKey="setStoreInformationVatNumber"/> + <magentoCLI command="config:set {{AdminShippingSettingsOriginCityConfigData.path}} ''" stepKey="setOriginCity"/> + <magentoCLI command="config:set {{AdminShippingSettingsOriginZipCodeConfigData.path}} ''" stepKey="setOriginZipCode"/> + <magentoCLI command="config:set {{AdminShippingSettingsOriginStreetAddressConfigData.path}} ''" stepKey="setOriginStreetAddress"/> + <magentoCLI command="config:set {{AdminShippingSettingsOriginStreetAddress2ConfigData.path}} ''" stepKey="setOriginStreetAddress2"/> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <!--Delete created data--> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <actionGroup ref="logout" stepKey="logout"/> + </after> + <!--Add country of manufacture to product--> + <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="amOnEditPage"/> + <waitForPageLoad stepKey="waitForEditPage"/> + <actionGroup ref="AdminFillProductCountryOfManufactureActionGroup" stepKey="fillCountryOfManufacture"> + <argument name="countryId" value="DE"/> + </actionGroup> + <actionGroup ref="saveProductForm" stepKey="saveSimpleProduct"/> + <!--Place for order using FedEx shipping method--> + <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="amOnStorefrontProductPage"/> + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart"> + <argument name="product" value="$$createProduct$$"/> + <argument name="productCount" value="1"/> + </actionGroup> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> + <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="addAddress"> + <argument name="customerVar" value="Simple_US_Utah_Customer"/> + <argument name="customerAddressVar" value="US_Address_California"/> + <argument name="shippingMethod" value="Federal Express"/> + </actionGroup> + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectPaymentMethod"/> + <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="customerPlaceOrder"> + <argument name="orderNumberMessage" value="CONST.successGuestCheckoutOrderNumberMessage"/> + <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/> + </actionGroup> + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/> + <!--Open created order in admin--> + <amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPage"/> + <actionGroup ref="searchAdminDataGridByKeyword" stepKey="searchOrder"> + <argument name="keyword" value="$grabOrderNumber"/> + </actionGroup> + <click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/> + <!--Create Invoice--> + <actionGroup ref="AdminCreateInvoiceActionGroup" stepKey="createInvoice"/> + <!--Create shipping label--> + <actionGroup ref="goToShipmentIntoOrder" stepKey="goToShipmentIntoOrder"/> + <checkOption selector="{{AdminShipmentTotalSection.createShippingLabel}}" stepKey="checkCreateShippingLabel"/> + <click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="clickSubmitShipment"/> + <actionGroup ref="AdminShipmentCreateShippingLabelActionGroup" stepKey="createPackage"> + <argument name="productName" value="$$createProduct.name$$"/> + </actionGroup> + <actionGroup ref="AdminGoToShipmentTabActionGroup" stepKey="goToShipmentTab"/> + <click selector="{{AdminOrderShipmentsTabSection.viewGridRow('1')}}" stepKey="clickRowToViewShipment"/> + <waitForPageLoad stepKey="waitForShipmentItemsSection"/> + <seeElement selector="{{AdminShipmentTrackingInformationShippingSection.shippingInfoTable}}" stepKey="seeInformationTable"/> + <seeElement selector="{{AdminShipmentTrackingInformationShippingSection.shippingNumber}}" stepKey="seeShippingNumberElement"/> + <grabTextFrom selector="{{AdminShipmentTrackingInformationShippingSection.shippingMethod}}" stepKey="grabShippingMethod"/> + <grabTextFrom selector="{{AdminShipmentTrackingInformationShippingSection.shippingMethodTitle}}" stepKey="grabShippingMethodTitle"/> + <assertEquals actual="$grabShippingMethod" expectedType="string" expected="Federal Express" stepKey="assertShippingMethodIsFedEx"/> + <assertEquals actual="$grabShippingMethodTitle" expectedType="string" expected="Federal Express" stepKey="assertShippingMethodTitleIsFedEx"/> + </test> +</tests> diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Data/GroupedProductData.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Data/GroupedProductData.xml index ba3703e7b0ed..e6d7588289c3 100644 --- a/app/code/Magento/GroupedProduct/Test/Mftf/Data/GroupedProductData.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Data/GroupedProductData.xml @@ -28,6 +28,17 @@ <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> </entity> + <entity name="ApiGroupedProductAndUnderscoredSku" type="product3"> + <data key="sku" unique="suffix">api_grouped_product</data> + <data key="type_id">grouped</data> + <data key="attribute_set_id">4</data> + <data key="name" unique="suffix">Api Grouped Product</data> + <data key="status">1</data> + <data key="urlKey" unique="suffix">api-grouped-product</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> + </entity> <entity name="ApiGroupedProduct2" type="product3"> <data key="sku" unique="suffix">apiGroupedProduct</data> <data key="type_id">grouped</data> diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAddDefaultImageGroupedProductTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAddDefaultImageGroupedProductTest.xml index 5d65f8269023..f2cb2cc993a5 100644 --- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAddDefaultImageGroupedProductTest.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAddDefaultImageGroupedProductTest.xml @@ -29,6 +29,9 @@ </createData> </before> <after> + <actionGroup ref="deleteProductBySku" stepKey="deleteGroupedProduct"> + <argument name="sku" value="{{GroupedProduct.sku}}"/> + </actionGroup> <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> <deleteData createDataKey="createProductOne" stepKey="deleteProductOne"/> <deleteData createDataKey="createProductTwo" stepKey="deleteProductTwo"/> diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest.xml index 2a600d38250f..4fd06ccaa27e 100644 --- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest.xml @@ -17,6 +17,42 @@ <severity value="MAJOR"/> <testCaseId value="MC-141"/> <group value="GroupedProduct"/> + <group value="SearchEngineElasticsearch"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> + <createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/> + <createData entity="ApiGroupedProduct" stepKey="product"/> + <createData entity="OneSimpleProductLink" stepKey="addProductOne"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="simple1"/> + </createData> + <updateData entity="OneMoreSimpleProductLink" createDataKey="addProductOne" stepKey="addProductTwo"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="simple2"/> + </updateData> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </before> + <after> + <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/> + <deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/> + </after> + <see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> + <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/> + <see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/> + <see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/> + </test> + <test name="AdvanceCatalogSearchGroupedProductByNameMysqlTest" extends="AdvanceCatalogSearchSimpleProductByNameTest"> + <annotations> + <features value="GroupedProduct"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search Grouped product with product name using the MySQL search engine"/> + <description value="Guest customer should be able to advance search Grouped product with product name using the MySQL search engine"/> + <severity value="MAJOR"/> + <testCaseId value="MC-20464"/> + <group value="GroupedProduct"/> + <group value="SearchEngineMysql"/> </annotations> <before> <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> @@ -51,7 +87,7 @@ <before> <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> <createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/> - <createData entity="ApiGroupedProduct" stepKey="product"/> + <createData entity="ApiGroupedProductAndUnderscoredSku" stepKey="product"/> <createData entity="OneSimpleProductLink" stepKey="addProductOne"> <requiredEntity createDataKey="product"/> <requiredEntity createDataKey="simple1"/> @@ -77,6 +113,42 @@ <severity value="MAJOR"/> <testCaseId value="MC-282"/> <group value="GroupedProduct"/> + <group value="SearchEngineElasticsearch"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> + <createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/> + <createData entity="ApiGroupedProduct" stepKey="product"/> + <createData entity="OneSimpleProductLink" stepKey="addProductOne"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="simple1"/> + </createData> + <updateData entity="OneMoreSimpleProductLink" createDataKey="addProductOne" stepKey="addProductTwo"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="simple2"/> + </updateData> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </before> + <after> + <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/> + <deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/> + </after> + <see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> + <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/> + <see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/> + <see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/> + </test> + <test name="AdvanceCatalogSearchGroupedProductByDescriptionMysqlTest" extends="AdvanceCatalogSearchSimpleProductByDescriptionTest"> + <annotations> + <features value="GroupedProduct"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search Grouped product with product description using the MySQL search engine"/> + <description value="Guest customer should be able to advance search Grouped product with product description using the MYSQL search engine"/> + <severity value="MAJOR"/> + <testCaseId value="MC-20468"/> + <group value="GroupedProduct"/> + <group value="SearchEngineMysql"/> </annotations> <before> <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> @@ -107,6 +179,42 @@ <severity value="MAJOR"/> <testCaseId value="MC-283"/> <group value="GroupedProduct"/> + <group value="SearchEngineElasticsearch"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> + <createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/> + <createData entity="ApiGroupedProduct" stepKey="product"/> + <createData entity="OneSimpleProductLink" stepKey="addProductOne"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="simple1"/> + </createData> + <updateData entity="OneMoreSimpleProductLink" createDataKey="addProductOne" stepKey="addProductTwo"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="simple2"/> + </updateData> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </before> + <after> + <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/> + <deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/> + </after> + <see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> + <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/> + <see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/> + <see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/> + </test> + <test name="AdvanceCatalogSearchGroupedProductByShortDescriptionMysqlTest" extends="AdvanceCatalogSearchSimpleProductByShortDescriptionTest"> + <annotations> + <features value="GroupedProduct"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search Grouped product with product short description using the MySQL search engine"/> + <description value="Guest customer should be able to advance search Grouped product with product short description using the MySQL search engine"/> + <severity value="MAJOR"/> + <testCaseId value="MC-20469"/> + <group value="GroupedProduct"/> + <group value="SearchEngineMysql"/> </annotations> <before> <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> @@ -137,6 +245,51 @@ <severity value="MAJOR"/> <testCaseId value="MC-284"/> <group value="GroupedProduct"/> + <group value="SearchEngineElasticsearch"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> + <createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/> + <createData entity="ApiGroupedProduct" stepKey="product"/> + <createData entity="OneSimpleProductLink" stepKey="addProductOne"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="simple1"/> + </createData> + <updateData entity="OneMoreSimpleProductLink" createDataKey="addProductOne" stepKey="addProductTwo"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="simple2"/> + </updateData> + <getData entity="GetProduct3" stepKey="arg1"> + <requiredEntity createDataKey="product"/> + </getData> + <getData entity="GetProduct" stepKey="arg2"> + <requiredEntity createDataKey="simple1"/> + </getData> + <getData entity="GetProduct" stepKey="arg3"> + <requiredEntity createDataKey="simple2"/> + </getData> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </before> + <after> + <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/> + <deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/> + </after> + <see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/> + <see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/> + <see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/> + <see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/> + </test> + <test name="AdvanceCatalogSearchGroupedProductByPriceMysqlTest" extends="AdvanceCatalogSearchSimpleProductByPriceTest"> + <annotations> + <features value="GroupedProduct"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search Grouped product with product price using the MySQL search engine"/> + <description value="Guest customer should be able to advance search Grouped product with product price using the MySQL search engine"/> + <severity value="MAJOR"/> + <testCaseId value="MC-20470"/> + <group value="GroupedProduct"/> + <group value="SearchEngineMysql"/> </annotations> <before> <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/StorefrontAdvanceCatalogSearchGroupedProductBySkuWithHyphenTest b/app/code/Magento/GroupedProduct/Test/Mftf/Test/StorefrontAdvanceCatalogSearchGroupedProductBySkuWithHyphenTest new file mode 100644 index 000000000000..5220349a4aac --- /dev/null +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/StorefrontAdvanceCatalogSearchGroupedProductBySkuWithHyphenTest @@ -0,0 +1,42 @@ +<?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="StorefrontAdvanceCatalogSearchGroupedProductBySkuWithHyphenTest" extends="AdvanceCatalogSearchSimpleProductBySkuTest"> + <annotations> + <features value="GroupedProduct"/> + <stories value="Advanced Catalog Product Search for all product types"/> + <title value="Guest customer should be able to advance search Grouped product with product sku that in camelCase format"/> + <description value="Guest customer should be able to advance search Grouped product with product sku that in camelCase format"/> + <severity value="MAJOR"/> + <testCaseId value="MC-20519"/> + <group value="GroupedProduct"/> + <group value="SearchEngineMysql"/> + </annotations> + <before> + <createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/> + <createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/> + <createData entity="ApiGroupedProduct" stepKey="product"/> + <createData entity="OneSimpleProductLink" stepKey="addProductOne"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="simple1"/> + </createData> + <updateData entity="OneMoreSimpleProductLink" createDataKey="addProductOne" stepKey="addProductTwo"> + <requiredEntity createDataKey="product"/> + <requiredEntity createDataKey="simple2"/> + </updateData> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </before> + <after> + <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/> + <deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/> + </after> + </test> +</tests> diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobile.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobile.xml index 721942f58f7c..6d182d0b7a5e 100644 --- a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobile.xml +++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobile.xml @@ -17,6 +17,7 @@ <severity value="CRITICAL"/> <testCaseId value="MC-6092"/> <group value="LayeredNavigation"/> + <group value="SearchEngineMysql"/> </annotations> <before> <createData entity="productDropDownAttribute" stepKey="attribute"/> diff --git a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php index 7105fd4e9d26..d1103abfbb94 100644 --- a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php +++ b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php @@ -691,6 +691,19 @@ protected function _prepareOrder(\Magento\Quote\Model\Quote\Address $address) $this->quoteAddressToOrder->convert($address) ); + $shippingMethodCode = $address->getShippingMethod(); + if (isset($shippingMethodCode) && !empty($shippingMethodCode)) { + $rate = $address->getShippingRateByCode($shippingMethodCode); + $shippingPrice = $rate->getPrice(); + } else { + $shippingPrice = $order->getShippingAmount(); + } + $store = $order->getStore(); + $amountPrice = $store->getBaseCurrency() + ->convert($shippingPrice, $store->getCurrentCurrencyCode()); + $order->setBaseShippingAmount($shippingPrice); + $order->setShippingAmount($amountPrice); + $order->setQuote($quote); $order->setBillingAddress($this->quoteAddressToOrderAddress->convert($quote->getBillingAddress())); diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminSalesOrderActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminSalesOrderActionGroup.xml new file mode 100644 index 000000000000..67ba256f50ea --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AdminSalesOrderActionGroup.xml @@ -0,0 +1,29 @@ +<?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="urn:magento:mftf:Test/etc/testSchema.xsd"> + <actionGroup name="AdminSalesOrderActionGroup"> + <waitForPageLoad stepKey="waitForAdminSalesPageToLoad"/> + <click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRowLink"/> + <waitForPageLoad stepKey="waitForOrderPageToLoad"/> + <waitForPageLoad stepKey="waitForCheckTotalActionGroup"/> + <scrollTo selector="{{AdminOrderTotalSection.subTotal}}" stepKey="scrollToOrderTotalSection"/> + <grabTextFrom selector="{{AdminOrderTotalSection.subTotal}}" stepKey="grabvalueForSubtotal"/> + <grabTextFrom selector="{{AdminOrderTotalSection.shippingAndHandling}}" stepKey="grabvalueForShippingHandling"/> + <grabTextFrom selector="{{AdminOrderTotalSection.grandTotal}}" stepKey="grabvalueForGrandTotal"/> + <executeJS stepKey="sum_TotalValue" function=" + var subtotal = '{$grabvalueForSubtotal}'.substr(1); + var handling = '{$grabvalueForShippingHandling}'.substr(1); + var subtotal_handling = (parseFloat(subtotal) + parseFloat(handling)).toFixed(2); + return ('$' + subtotal_handling);"/> + <assertEquals stepKey="assertSubTotalPrice"> + <expectedResult type="string">$sum_TotalValue</expectedResult> + <actualResult type="string">$grabvalueForGrandTotal</actualResult> + </assertEquals> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/PlaceOrderActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/PlaceOrderActionGroup.xml index efb860e31478..349d31ef1da5 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/PlaceOrderActionGroup.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/PlaceOrderActionGroup.xml @@ -16,5 +16,4 @@ <see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/> </actionGroup> -</actionGroups> - +</actionGroups> \ No newline at end of file diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/ReviewOrderActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/ReviewOrderActionGroup.xml index af7d897910ca..bbd0e9ebad7a 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/ReviewOrderActionGroup.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/ReviewOrderActionGroup.xml @@ -35,5 +35,4 @@ </assertEquals> </actionGroup> -</actionGroups> - +</actionGroups> \ No newline at end of file diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/SalesOrderActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/SalesOrderActionGroup.xml new file mode 100644 index 000000000000..47cc3ffa455a --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/SalesOrderActionGroup.xml @@ -0,0 +1,38 @@ +<?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="urn:magento:mftf:Test/etc/testSchema.xsd"> + <actionGroup name="SalesOrderForMultiShipmentActionGroup"> + <arguments> + <argument name="shippingPrice" defaultValue="$5.00" type="string" /> + <argument name="subtotalPrice" defaultValue="$123.00" type="string" /> + <argument name="totalPrice" defaultValue="$128.00" type="string" /> + </arguments> + <waitForPageLoad stepKey="waitForSalesOrderHistoryPageToLoad" /> + <!--Click on View Order Link--> + <click stepKey="viewOrderAction" selector="{{SalesOrderSection.viewOrderLink}}"/> + <waitForPageLoad stepKey="waitForViewOrderPageToLoad" /> + <!--Check Shipping Method, Subtotal and Total Price--> + <grabTextFrom selector="{{SalesOrderSection.salesOrderPrice('subtotal')}}" stepKey="salesOrderSubtotalPrice"/> + <grabTextFrom selector="{{SalesOrderSection.salesOrderPrice('shipping')}}" stepKey="salesOrderShippingPrice"/> + <grabTextFrom selector="{{SalesOrderSection.salesOrderPrice('grand_total')}}" stepKey="salesOrderGrandTotalPrice"/> + <assertEquals stepKey="assertSubtotalPrice"> + <expectedResult type="string">{{subtotalPrice}}</expectedResult> + <actualResult type="string">$salesOrderSubtotalPrice</actualResult> + </assertEquals> + <assertEquals stepKey="assertShippingMethodPrice"> + <expectedResult type="string">{{shippingPrice}}</expectedResult> + <actualResult type="string">$salesOrderShippingPrice</actualResult> + </assertEquals> + <assertEquals stepKey="assertTotalPrice"> + <expectedResult type="string">{{totalPrice}}</expectedResult> + <actualResult type="string">$salesOrderGrandTotalPrice</actualResult> + </assertEquals> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/SelectBillingInfoActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/SelectBillingInfoActionGroup.xml index 3f7578953df7..c5dd97cadcc2 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/SelectBillingInfoActionGroup.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/SelectBillingInfoActionGroup.xml @@ -12,5 +12,4 @@ <waitForPageLoad stepKey="waitForBillingInfoPageLoad"/> <click stepKey="goToReviewOrder" selector="{{PaymentMethodSection.goToReviewOrder}}"/> </actionGroup> -</actionGroups> - +</actionGroups> \ No newline at end of file diff --git a/app/code/Magento/Multishipping/Test/Mftf/Page/MultishippingCheckoutPage.xml b/app/code/Magento/Multishipping/Test/Mftf/Page/MultishippingCheckoutPage.xml index 001002e98271..beee76a632b2 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Page/MultishippingCheckoutPage.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Page/MultishippingCheckoutPage.xml @@ -15,4 +15,4 @@ <section name="PaymentMethodSection"/> <section name="ReviewOrderSection"/> </page> -</pages> +</pages> \ No newline at end of file diff --git a/app/code/Magento/Multishipping/Test/Mftf/Section/PaymentMethodSection.xml b/app/code/Magento/Multishipping/Test/Mftf/Section/PaymentMethodSection.xml index 4e7f4a497ad4..8113ed3aa0c0 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Section/PaymentMethodSection.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Section/PaymentMethodSection.xml @@ -11,4 +11,4 @@ <section name="PaymentMethodSection"> <element name="goToReviewOrder" type="button" selector="//span[text()='Go to Review Your Order']"/> </section> -</sections> +</sections> \ No newline at end of file diff --git a/app/code/Magento/Multishipping/Test/Mftf/Section/ReviewOrderSection.xml b/app/code/Magento/Multishipping/Test/Mftf/Section/ReviewOrderSection.xml index e13f28929dcc..7961a0f811f6 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Section/ReviewOrderSection.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Section/ReviewOrderSection.xml @@ -23,5 +23,4 @@ <element name="secondOrderTotalPrice" type="text" selector="//div[@class='block-content'][position()=2]//table[position()=1]//tr[@class='grand totals'][position()=1]//td//span[@class='price']"/> <element name="grandTotalPrice" type="text" selector="//div[@class='checkout-review']//div[@class='grand totals']//span[@class='price']"/> </section> -</sections> - +</sections> \ No newline at end of file diff --git a/app/code/Magento/Multishipping/Test/Mftf/Section/SalesOrderSection.xml b/app/code/Magento/Multishipping/Test/Mftf/Section/SalesOrderSection.xml new file mode 100644 index 000000000000..c788ef5978ad --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/Section/SalesOrderSection.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <section name="SalesOrderSection"> + <element name="viewOrderLink" type="text" selector="//span[text()='View Order']"/> + <element name="salesOrderPrice" type="text" selector="//div[@class='order-details-items ordered']//tr[@class='{{price_type}}']//td[@class='amount']//span[@class='price']" parameterized="true"/> + </section> +</sections> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Section/ShippingMethodSection.xml b/app/code/Magento/Multishipping/Test/Mftf/Section/ShippingMethodSection.xml index 6a2290bcf1a4..311b3ae95906 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Section/ShippingMethodSection.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Section/ShippingMethodSection.xml @@ -14,5 +14,4 @@ <element name="secondShippingMethodRadioButton" type="select" selector="//div[@class='block block-shipping'][position()=2]//div[@class='block-content']//div[@class='box box-shipping-method']//div[@class='box-content']//dl//dd[position()=2]//fieldset//div//div//input[@class='radio']"/> <element name="goToBillingInfo" type="button" selector="//span[text()='Continue to Billing Information']"/> </section> -</sections> - +</sections> \ No newline at end of file diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMyAccountWithMultishipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMyAccountWithMultishipmentTest.xml new file mode 100644 index 000000000000..a81d24e99563 --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMyAccountWithMultishipmentTest.xml @@ -0,0 +1,69 @@ +<?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="StoreFrontMyAccountWithMultishipmentTest"> + <annotations> + <features value="Multishipping"/> + <stories value="Shipping price shows 0 on Order view page after multiple address checkout"/> + <title value="Verify Shipping price for Storefront after multiple address checkout"/> + <description value="Verify that shipping price on My account matches with shipping method prices after multiple addresses checkout (Order view page)"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-19303"/> + <group value="multishipping"/> + </annotations> + + <before> + <createData stepKey="category" entity="SimpleSubCategory"/> + <createData stepKey="product1" entity="SimpleProduct"> + <requiredEntity createDataKey="category"/> + </createData> + <createData stepKey="product2" entity="SimpleProduct"> + <requiredEntity createDataKey="category"/> + </createData> + <createData entity="Simple_US_Customer_Two_Addresses" stepKey="customer"/> + <createData entity="FreeShippinMethodConfig" stepKey="enableFreeShipping"/> + <createData entity="FlatRateShippingMethodDefault" stepKey="enableFlatRateShipping"/> + <magentoCLI command="config:set payment/checkmo/active 1" stepKey="enableCheckMoneyOrderPaymentMethod"/> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> + <argument name="Customer" value="$$customer$$"/> + </actionGroup> + </before> + + <amOnPage url="$$product1.name$$.html" stepKey="goToProduct1"/> + <actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProduct1"> + <argument name="productName" value="$$product1.name$$"/> + </actionGroup> + <amOnPage url="$$product2.name$$.html" stepKey="goToProduct2"/> + <actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProduct2"> + <argument name="productName" value="$$product2.name$$"/> + </actionGroup> + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/> + <actionGroup ref="CheckingWithMultipleAddressesActionGroup" stepKey="checkoutWithMultipleAddresses"/> + <actionGroup ref="SelectMultiShippingInfoActionGroup" stepKey="checkoutWithMultipleShipping"/> + <actionGroup ref="SelectBillingInfoActionGroup" stepKey="checkoutWithPaymentMethod"/> + <actionGroup ref="ReviewOrderForMultiShipmentActionGroup" stepKey="reviewOrderForMultiShipment"/> + <actionGroup ref="PlaceOrderActionGroup" stepKey="placeOrder"/> + <amOnPage url="{{StorefrontCustomerOrdersHistoryPage.url}}" stepKey="goToSalesOrder"/> + <actionGroup ref="SalesOrderForMultiShipmentActionGroup" stepKey="salesOrderForMultiShipment"/> + <waitForPageLoad stepKey="waitForAdminPageToLoad"/> + <!-- Go to Stores > Configuration > Sales > Orders --> + <amOnPage url="{{AdminOrdersPage.url}}" stepKey="onAdminOrdersPage"/> + <actionGroup ref="AdminSalesOrderActionGroup" stepKey="ValidateOrderTotals"/> + <after> + <deleteData stepKey="deleteCategory" createDataKey="category"/> + <deleteData stepKey="deleteProduct1" createDataKey="product1"/> + <deleteData stepKey="deleteProduct2" createDataKey="product2"/> + <deleteData stepKey="deleteCustomer" createDataKey="customer"/> + <createData entity="FreeShippinMethodDefault" stepKey="disableFreeShipping"/> + <actionGroup ref="logout" stepKey="logout"/> + </after> + </test> +</tests> diff --git a/app/code/Magento/Multishipping/Test/Unit/Model/Checkout/Type/MultishippingTest.php b/app/code/Magento/Multishipping/Test/Unit/Model/Checkout/Type/MultishippingTest.php index 02bc96687377..731365974c23 100644 --- a/app/code/Magento/Multishipping/Test/Unit/Model/Checkout/Type/MultishippingTest.php +++ b/app/code/Magento/Multishipping/Test/Unit/Model/Checkout/Type/MultishippingTest.php @@ -11,6 +11,7 @@ use Magento\Customer\Api\Data\AddressInterface; use Magento\Customer\Api\Data\AddressSearchResultsInterface; use Magento\Customer\Api\Data\CustomerInterface; +use Magento\Directory\Model\Currency; use Magento\Multishipping\Model\Checkout\Type\Multishipping\PlaceOrderDefault; use Magento\Multishipping\Model\Checkout\Type\Multishipping\PlaceOrderFactory; use Magento\Quote\Model\Quote\Address; @@ -44,6 +45,7 @@ use Magento\Quote\Model\ShippingAssignment; use Magento\Sales\Model\Order\Email\Sender\OrderSender; use Magento\Sales\Model\OrderFactory; +use Magento\Store\Model\Store; use Magento\Store\Model\StoreManagerInterface; use PHPUnit_Framework_MockObject_MockObject; use \PHPUnit\Framework\TestCase; @@ -453,7 +455,8 @@ public function testCreateOrders(): void ]; $quoteItemId = 1; $paymentProviderCode = 'checkmo'; - + $shippingPrice = '0.00'; + $currencyCode = 'USD'; $simpleProductTypeMock = $this->getMockBuilder(\Magento\Catalog\Model\Product\Type\Simple::class) ->disableOriginalConstructor() ->setMethods(['getOrderOptions']) @@ -467,6 +470,17 @@ public function testCreateOrders(): void $this->getQuoteAddressesMock($quoteAddressItemMock, $addressTotal); $this->setQuoteMockData($paymentProviderCode, $shippingAddressMock, $billingAddressMock); + $currencyMock = $this->getMockBuilder(Currency::class) + ->disableOriginalConstructor() + ->setMethods([ 'convert' ]) + ->getMock(); + $currencyMock->method('convert')->willReturn($shippingPrice); + $storeMock = $this->getMockBuilder(Store::class) + ->disableOriginalConstructor() + ->setMethods(['getBaseCurrency','getCurrentCurrencyCode' ]) + ->getMock(); + $storeMock->method('getBaseCurrency')->willReturn($currencyMock); + $storeMock->method('getCurrentCurrencyCode')->willReturn($currencyCode); $orderAddressMock = $this->createSimpleMock(\Magento\Sales\Api\Data\OrderAddressInterface::class); $orderPaymentMock = $this->createSimpleMock(\Magento\Sales\Api\Data\OrderPaymentInterface::class); $orderItemMock = $this->getMockBuilder(\Magento\Sales\Model\Order\Item::class) @@ -476,6 +490,9 @@ public function testCreateOrders(): void $orderItemMock->method('getQuoteItemId')->willReturn($quoteItemId); $orderMock = $this->getOrderMock($orderAddressMock, $orderPaymentMock, $orderItemMock); + $orderMock->expects($this->once())->method('getStore')->willReturn($storeMock); + $orderMock->expects($this->once())->method('setBaseShippingAmount')->with($shippingPrice)->willReturnSelf(); + $orderMock->expects($this->once())->method('setShippingAmount')->with($shippingPrice)->willReturnSelf(); $this->orderFactoryMock->expects($this->once())->method('create')->willReturn($orderMock); $this->dataObjectHelperMock->expects($this->once())->method('mergeDataObjects') ->with( @@ -608,12 +625,18 @@ private function getQuoteAddressesMock($quoteAddressItemMock, int $addressTotal) )->getMock(); $shippingAddressMock->method('validate')->willReturn(true); $shippingAddressMock->method('getShippingMethod')->willReturn('carrier'); - $shippingAddressMock->method('getShippingRateByCode')->willReturn('code'); $shippingAddressMock->method('getCountryId')->willReturn('EN'); $shippingAddressMock->method('getAllItems')->willReturn([$quoteAddressItemMock]); $shippingAddressMock->method('getAddressType')->willReturn('shipping'); $shippingAddressMock->method('getGrandTotal')->willReturn($addressTotal); + $shippingRateMock = $this->getMockBuilder(Address\Rate::class) + ->disableOriginalConstructor() + ->setMethods([ 'getPrice' ]) + ->getMock(); + $shippingRateMock->method('getPrice')->willReturn('0.00'); + $shippingAddressMock->method('getShippingRateByCode')->willReturn($shippingRateMock); + $billingAddressMock = $this->getMockBuilder(Address::class) ->disableOriginalConstructor() ->setMethods(['validate']) @@ -673,6 +696,9 @@ private function getOrderMock( 'getCanSendNewEmailFlag', 'getItems', 'setShippingMethod', + 'getStore', + 'setShippingAmount', + 'setBaseShippingAmount' ] )->getMock(); $orderMock->method('setQuote')->with($this->quoteMock); diff --git a/app/code/Magento/NewRelicReporting/Model/Apm/Deployments.php b/app/code/Magento/NewRelicReporting/Model/Apm/Deployments.php index bacdd3e4a81f..99d3f4d406ad 100644 --- a/app/code/Magento/NewRelicReporting/Model/Apm/Deployments.php +++ b/app/code/Magento/NewRelicReporting/Model/Apm/Deployments.php @@ -7,6 +7,9 @@ use \Magento\Framework\HTTP\ZendClient; +/** + * Performs the request to make the deployment + */ class Deployments { /** @@ -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; } diff --git a/app/code/Magento/Payment/view/base/web/js/model/credit-card-validation/validator.js b/app/code/Magento/Payment/view/base/web/js/model/credit-card-validation/validator.js index c41be40cba14..746a4bd2cf33 100644 --- a/app/code/Magento/Payment/view/base/web/js/model/credit-card-validation/validator.js +++ b/app/code/Magento/Payment/view/base/web/js/model/credit-card-validation/validator.js @@ -4,23 +4,15 @@ */ /* @api */ -(function (factory) { - 'use strict'; - - if (typeof define === 'function' && define.amd) { - define([ - 'jquery', - 'Magento_Payment/js/model/credit-card-validation/cvv-validator', - 'Magento_Payment/js/model/credit-card-validation/credit-card-number-validator', - 'Magento_Payment/js/model/credit-card-validation/expiration-date-validator/expiration-year-validator', - 'Magento_Payment/js/model/credit-card-validation/expiration-date-validator/expiration-month-validator', - 'Magento_Payment/js/model/credit-card-validation/credit-card-data', - 'mage/translate' - ], factory); - } else { - factory(jQuery); - } -}(function ($, cvvValidator, creditCardNumberValidator, yearValidator, monthValidator, creditCardData) { +define([ + 'jquery', + 'Magento_Payment/js/model/credit-card-validation/cvv-validator', + 'Magento_Payment/js/model/credit-card-validation/credit-card-number-validator', + 'Magento_Payment/js/model/credit-card-validation/expiration-date-validator/expiration-year-validator', + 'Magento_Payment/js/model/credit-card-validation/expiration-date-validator/expiration-month-validator', + 'Magento_Payment/js/model/credit-card-validation/credit-card-data', + 'mage/translate' +], function ($, cvvValidator, creditCardNumberValidator, yearValidator, monthValidator, creditCardData) { 'use strict'; $('.payment-method-content input[type="number"]').on('keyup', function () { @@ -111,4 +103,4 @@ rule.unshift(i); $.validator.addMethod.apply($.validator, rule); }); -})); +}); diff --git a/app/code/Magento/PaypalCaptcha/view/frontend/web/js/view/payment/list-mixin.js b/app/code/Magento/PaypalCaptcha/view/frontend/web/js/view/payment/list-mixin.js index 60172f696e9e..8abd57cc6913 100644 --- a/app/code/Magento/PaypalCaptcha/view/frontend/web/js/view/payment/list-mixin.js +++ b/app/code/Magento/PaypalCaptcha/view/frontend/web/js/view/payment/list-mixin.js @@ -34,14 +34,16 @@ define([ /** * Overrides default window.clearTimeout() to catch errors from iframe and reload Captcha. + * + * @param {Number} timeoutID */ - clearTimeout: function () { + clearTimeout: function (timeoutID) { var captcha = captchaList.getCaptchaByFormId(this.formId); if (captcha !== null) { captcha.refresh(); } - clearTimeout(); + clearTimeout(timeoutID); } }; diff --git a/app/code/Magento/Persistent/Observer/MakePersistentQuoteGuestObserver.php b/app/code/Magento/Persistent/Observer/MakePersistentQuoteGuestObserver.php index 94726bc9b1d0..f2f9b96fa82e 100644 --- a/app/code/Magento/Persistent/Observer/MakePersistentQuoteGuestObserver.php +++ b/app/code/Magento/Persistent/Observer/MakePersistentQuoteGuestObserver.php @@ -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 { /** @@ -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); } diff --git a/app/code/Magento/Quote/Observer/Frontend/Quote/Address/CollectTotalsObserver.php b/app/code/Magento/Quote/Observer/Frontend/Quote/Address/CollectTotalsObserver.php index 77dfec9603a5..a1228903e232 100644 --- a/app/code/Magento/Quote/Observer/Frontend/Quote/Address/CollectTotalsObserver.php +++ b/app/code/Magento/Quote/Observer/Frontend/Quote/Address/CollectTotalsObserver.php @@ -113,6 +113,8 @@ public function execute(\Magento\Framework\Event\Observer $observer) $customerCountryCode = $customerAddress->getCountryId(); $customerVatNumber = $customerAddress->getVatId(); + $address->setCountryId($customerCountryCode); + $address->setVatId($customerVatNumber); } $groupId = null; diff --git a/app/code/Magento/Quote/Test/Unit/Observer/Frontend/Quote/Address/CollectTotalsObserverTest.php b/app/code/Magento/Quote/Test/Unit/Observer/Frontend/Quote/Address/CollectTotalsObserverTest.php index 4ea067c9be8f..a590c8aa891a 100644 --- a/app/code/Magento/Quote/Test/Unit/Observer/Frontend/Quote/Address/CollectTotalsObserverTest.php +++ b/app/code/Magento/Quote/Test/Unit/Observer/Frontend/Quote/Address/CollectTotalsObserverTest.php @@ -314,6 +314,43 @@ public function testDispatchWithCustomerCountryInEU() $this->model->execute($this->observerMock); } + public function testDispatchWithAddressCustomerVatIdAndCountryId() + { + $customerCountryCode = "BE"; + $customerVat = "123123123"; + $defaultShipping = 1; + + $customerAddress = $this->createMock(\Magento\Quote\Model\Quote\Address::class); + $customerAddress->expects($this->any()) + ->method("getVatId") + ->willReturn($customerVat); + + $customerAddress->expects($this->any()) + ->method("getCountryId") + ->willReturn($customerCountryCode); + + $this->addressRepository->expects($this->once()) + ->method("getById") + ->with($defaultShipping) + ->willReturn($customerAddress); + + $this->customerMock->expects($this->atLeastOnce()) + ->method("getDefaultShipping") + ->willReturn($defaultShipping); + + $this->vatValidatorMock->expects($this->once()) + ->method('isEnabled') + ->with($this->quoteAddressMock, $this->storeId) + ->will($this->returnValue(true)); + + $this->customerVatMock->expects($this->once()) + ->method('isCountryInEU') + ->with($customerCountryCode) + ->willReturn(true); + + $this->model->execute($this->observerMock); + } + public function testDispatchWithEmptyShippingAddress() { $customerCountryCode = "DE"; diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/Address/SaveQuoteAddressToCustomerAddressBook.php b/app/code/Magento/QuoteGraphQl/Model/Cart/Address/SaveQuoteAddressToCustomerAddressBook.php new file mode 100644 index 000000000000..5c773d44e6a1 --- /dev/null +++ b/app/code/Magento/QuoteGraphQl/Model/Cart/Address/SaveQuoteAddressToCustomerAddressBook.php @@ -0,0 +1,96 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\QuoteGraphQl\Model\Cart\Address; + +use Magento\Customer\Api\AddressRepositoryInterface; +use Magento\Customer\Api\Data\AddressInterface; +use Magento\Customer\Api\Data\AddressInterfaceFactory; +use Magento\Customer\Api\Data\RegionInterface; +use Magento\Customer\Api\Data\RegionInterfaceFactory; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\GraphQl\Exception\GraphQlInputException; +use Magento\Quote\Model\Quote\Address as QuoteAddress; + +/** + * Save Address to Customer Address Book. + */ +class SaveQuoteAddressToCustomerAddressBook +{ + /** + * @var AddressInterfaceFactory + */ + private $addressFactory; + + /** + * @var AddressRepositoryInterface + */ + private $addressRepository; + + /** + * @var RegionInterfaceFactory + */ + private $regionFactory; + + /** + * @param AddressInterfaceFactory $addressFactory + * @param AddressRepositoryInterface $addressRepository + * @param RegionInterfaceFactory $regionFactory + */ + public function __construct( + AddressInterfaceFactory $addressFactory, + AddressRepositoryInterface $addressRepository, + RegionInterfaceFactory $regionFactory + ) { + $this->addressFactory = $addressFactory; + $this->addressRepository = $addressRepository; + $this->regionFactory = $regionFactory; + } + + /** + * Save Address to Customer Address Book. + * + * @param QuoteAddress $quoteAddress + * @param int $customerId + * + * @return void + * @throws GraphQlInputException + */ + public function execute(QuoteAddress $quoteAddress, int $customerId): void + { + try { + /** @var AddressInterface $customerAddress */ + $customerAddress = $this->addressFactory->create(); + $customerAddress->setFirstname($quoteAddress->getFirstname()) + ->setLastname($quoteAddress->getLastname()) + ->setMiddlename($quoteAddress->getMiddlename()) + ->setPrefix($quoteAddress->getPrefix()) + ->setSuffix($quoteAddress->getSuffix()) + ->setVatId($quoteAddress->getVatId()) + ->setCountryId($quoteAddress->getCountryId()) + ->setCompany($quoteAddress->getCompany()) + ->setRegionId($quoteAddress->getRegionId()) + ->setFax($quoteAddress->getFax()) + ->setCity($quoteAddress->getCity()) + ->setPostcode($quoteAddress->getPostcode()) + ->setStreet($quoteAddress->getStreet()) + ->setTelephone($quoteAddress->getTelephone()) + ->setCustomerId($customerId); + + /** @var RegionInterface $region */ + $region = $this->regionFactory->create(); + $region->setRegionCode($quoteAddress->getRegionCode()) + ->setRegion($quoteAddress->getRegion()) + ->setRegionId($quoteAddress->getRegionId()); + $customerAddress->setRegion($region); + + $this->addressRepository->save($customerAddress); + } catch (LocalizedException $e) { + throw new GraphQlInputException(__($e->getMessage()), $e); + } + } +} diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/GetShippingAddress.php b/app/code/Magento/QuoteGraphQl/Model/Cart/GetShippingAddress.php index 6e35091aecd7..2a57c281de18 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Cart/GetShippingAddress.php +++ b/app/code/Magento/QuoteGraphQl/Model/Cart/GetShippingAddress.php @@ -12,6 +12,7 @@ use Magento\Framework\GraphQl\Exception\GraphQlInputException; use Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException; use Magento\Quote\Model\Quote\Address; +use Magento\QuoteGraphQl\Model\Cart\Address\SaveQuoteAddressToCustomerAddressBook; /** * Get shipping address @@ -23,12 +24,21 @@ class GetShippingAddress */ private $quoteAddressFactory; + /** + * @var SaveQuoteAddressToCustomerAddressBook + */ + private $saveQuoteAddressToCustomerAddressBook; + /** * @param QuoteAddressFactory $quoteAddressFactory + * @param SaveQuoteAddressToCustomerAddressBook $saveQuoteAddressToCustomerAddressBook */ - public function __construct(QuoteAddressFactory $quoteAddressFactory) - { + public function __construct( + QuoteAddressFactory $quoteAddressFactory, + SaveQuoteAddressToCustomerAddressBook $saveQuoteAddressToCustomerAddressBook + ) { $this->quoteAddressFactory = $quoteAddressFactory; + $this->saveQuoteAddressToCustomerAddressBook = $saveQuoteAddressToCustomerAddressBook; } /** @@ -62,8 +72,38 @@ public function execute(ContextInterface $context, array $shippingAddressInput): ); } + $shippingAddress = $this->createShippingAddress($context, $customerAddressId, $addressInput); + + return $shippingAddress; + } + + /** + * Create shipping address. + * + * @param ContextInterface $context + * @param int|null $customerAddressId + * @param array|null $addressInput + * + * @return \Magento\Quote\Model\Quote\Address + * @throws GraphQlAuthorizationException + */ + private function createShippingAddress( + ContextInterface $context, + ?int $customerAddressId, + ?array $addressInput + ) { + $customerId = $context->getUserId(); + if (null === $customerAddressId) { $shippingAddress = $this->quoteAddressFactory->createBasedOnInputData($addressInput); + + // need to save address only for registered user and if save_in_address_book = true + if (0 !== $customerId + && isset($addressInput['save_in_address_book']) + && (bool)$addressInput['save_in_address_book'] === true + ) { + $this->saveQuoteAddressToCustomerAddressBook->execute($shippingAddress, $customerId); + } } else { if (false === $context->getExtensionAttributes()->getIsCustomer()) { throw new GraphQlAuthorizationException(__('The current customer isn\'t authorized.')); @@ -71,7 +111,7 @@ public function execute(ContextInterface $context, array $shippingAddressInput): $shippingAddress = $this->quoteAddressFactory->createBasedOnCustomerAddress( (int)$customerAddressId, - $context->getUserId() + $customerId ); } diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/SetBillingAddressOnCart.php b/app/code/Magento/QuoteGraphQl/Model/Cart/SetBillingAddressOnCart.php index 673debefd087..f3b96a1454fb 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Cart/SetBillingAddressOnCart.php +++ b/app/code/Magento/QuoteGraphQl/Model/Cart/SetBillingAddressOnCart.php @@ -13,6 +13,7 @@ use Magento\GraphQl\Model\Query\ContextInterface; use Magento\Quote\Api\Data\CartInterface; use Magento\Quote\Model\Quote\Address; +use Magento\QuoteGraphQl\Model\Cart\Address\SaveQuoteAddressToCustomerAddressBook; /** * Set billing address for a specified shopping cart @@ -29,16 +30,24 @@ class SetBillingAddressOnCart */ private $assignBillingAddressToCart; + /** + * @var SaveQuoteAddressToCustomerAddressBook + */ + private $saveQuoteAddressToCustomerAddressBook; + /** * @param QuoteAddressFactory $quoteAddressFactory * @param AssignBillingAddressToCart $assignBillingAddressToCart + * @param SaveQuoteAddressToCustomerAddressBook $saveQuoteAddressToCustomerAddressBook */ public function __construct( QuoteAddressFactory $quoteAddressFactory, - AssignBillingAddressToCart $assignBillingAddressToCart + AssignBillingAddressToCart $assignBillingAddressToCart, + SaveQuoteAddressToCustomerAddressBook $saveQuoteAddressToCustomerAddressBook ) { $this->quoteAddressFactory = $quoteAddressFactory; $this->assignBillingAddressToCart = $assignBillingAddressToCart; + $this->saveQuoteAddressToCustomerAddressBook = $saveQuoteAddressToCustomerAddressBook; } /** @@ -101,6 +110,15 @@ private function createBillingAddress( ): Address { if (null === $customerAddressId) { $billingAddress = $this->quoteAddressFactory->createBasedOnInputData($addressInput); + + $customerId = $context->getUserId(); + // need to save address only for registered user and if save_in_address_book = true + if (0 !== $customerId + && isset($addressInput['save_in_address_book']) + && (bool)$addressInput['save_in_address_book'] === true + ) { + $this->saveQuoteAddressToCustomerAddressBook->execute($billingAddress, $customerId); + } } else { if (false === $context->getExtensionAttributes()->getIsCustomer()) { throw new GraphQlAuthorizationException(__('The current customer isn\'t authorized.')); @@ -111,6 +129,7 @@ private function createBillingAddress( (int)$context->getUserId() ); } + return $billingAddress; } } diff --git a/app/code/Magento/QuoteGraphQl/Model/Cart/SetShippingAddressesOnCart.php b/app/code/Magento/QuoteGraphQl/Model/Cart/SetShippingAddressesOnCart.php index d4f2853467b3..6b1296eaf375 100644 --- a/app/code/Magento/QuoteGraphQl/Model/Cart/SetShippingAddressesOnCart.php +++ b/app/code/Magento/QuoteGraphQl/Model/Cart/SetShippingAddressesOnCart.php @@ -7,7 +7,6 @@ namespace Magento\QuoteGraphQl\Model\Cart; -use Magento\Framework\GraphQl\Exception\GraphQlAuthorizationException; use Magento\Framework\GraphQl\Exception\GraphQlInputException; use Magento\GraphQl\Model\Query\ContextInterface; use Magento\Quote\Api\Data\CartInterface; @@ -21,6 +20,7 @@ class SetShippingAddressesOnCart implements SetShippingAddressesOnCartInterface * @var AssignShippingAddressToCart */ private $assignShippingAddressToCart; + /** * @var GetShippingAddress */ diff --git a/app/code/Magento/QuoteGraphQl/etc/schema.graphqls b/app/code/Magento/QuoteGraphQl/etc/schema.graphqls index 221f8ba2e620..7f36964ef4bf 100644 --- a/app/code/Magento/QuoteGraphQl/etc/schema.graphqls +++ b/app/code/Magento/QuoteGraphQl/etc/schema.graphqls @@ -109,7 +109,7 @@ input CartAddressInput { postcode: String country_code: String! telephone: String! - save_in_address_book: Boolean! + save_in_address_book: Boolean } input SetShippingMethodsOnCartInput { diff --git a/app/code/Magento/Sales/Model/Order.php b/app/code/Magento/Sales/Model/Order.php index 48deddb2fe5a..89564f97ccf1 100644 --- a/app/code/Magento/Sales/Model/Order.php +++ b/app/code/Magento/Sales/Model/Order.php @@ -5,8 +5,11 @@ */ namespace Magento\Sales\Model; +use Magento\Config\Model\Config\Source\Nooptreq; use Magento\Directory\Model\Currency; use Magento\Framework\Api\AttributeValueFactory; +use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Locale\ResolverInterface; @@ -14,6 +17,7 @@ use Magento\Sales\Api\Data\OrderInterface; use Magento\Sales\Api\Data\OrderItemInterface; use Magento\Sales\Api\Data\OrderStatusHistoryInterface; +use Magento\Sales\Api\OrderItemRepositoryInterface; use Magento\Sales\Model\Order\Payment; use Magento\Sales\Model\Order\ProductOption; use Magento\Sales\Model\ResourceModel\Order\Address\Collection; @@ -24,8 +28,7 @@ use Magento\Sales\Model\ResourceModel\Order\Shipment\Collection as ShipmentCollection; use Magento\Sales\Model\ResourceModel\Order\Shipment\Track\Collection as TrackCollection; use Magento\Sales\Model\ResourceModel\Order\Status\History\Collection as HistoryCollection; -use Magento\Sales\Api\OrderItemRepositoryInterface; -use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Store\Model\ScopeInterface; /** * Order model @@ -299,6 +302,11 @@ class Order extends AbstractModel implements EntityInterface, OrderInterface */ private $searchCriteriaBuilder; + /** + * @var ScopeConfigInterface; + */ + private $scopeConfig; + /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry @@ -331,6 +339,7 @@ class Order extends AbstractModel implements EntityInterface, OrderInterface * @param ProductOption|null $productOption * @param OrderItemRepositoryInterface $itemRepository * @param SearchCriteriaBuilder $searchCriteriaBuilder + * @param ScopeConfigInterface $scopeConfig * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -364,7 +373,8 @@ public function __construct( ResolverInterface $localeResolver = null, ProductOption $productOption = null, OrderItemRepositoryInterface $itemRepository = null, - SearchCriteriaBuilder $searchCriteriaBuilder = null + SearchCriteriaBuilder $searchCriteriaBuilder = null, + ScopeConfigInterface $scopeConfig = null ) { $this->_storeManager = $storeManager; $this->_orderConfig = $orderConfig; @@ -392,6 +402,7 @@ public function __construct( ->get(OrderItemRepositoryInterface::class); $this->searchCriteriaBuilder = $searchCriteriaBuilder ?: ObjectManager::getInstance() ->get(SearchCriteriaBuilder::class); + $this->scopeConfig = $scopeConfig ?: ObjectManager::getInstance()->get(ScopeConfigInterface::class); parent::__construct( $context, @@ -1111,7 +1122,7 @@ public function addStatusHistoryComment($comment, $status = false) { return $this->addCommentToStatusHistory($comment, $status, false); } - + /** * Add a comment to order status history. * @@ -1503,7 +1514,7 @@ public function getItemById($itemId) * Get item by quote item id * * @param mixed $quoteItemId - * @return \Magento\Framework\DataObject|null + * @return \Magento\Framework\DataObject|null */ public function getItemByQuoteItemId($quoteItemId) { @@ -1967,11 +1978,23 @@ public function getRelatedObjects() */ public function getCustomerName() { - if ($this->getCustomerFirstname()) { - $customerName = $this->getCustomerFirstname() . ' ' . $this->getCustomerLastname(); - } else { - $customerName = (string)__('Guest'); + if (null === $this->getCustomerFirstname()) { + return (string)__('Guest'); } + + $customerName = ''; + if ($this->isVisibleCustomerPrefix() && strlen($this->getCustomerPrefix())) { + $customerName .= $this->getCustomerPrefix() . ' '; + } + $customerName .= $this->getCustomerFirstname(); + if ($this->isVisibleCustomerMiddlename() && strlen($this->getCustomerMiddlename())) { + $customerName .= ' ' . $this->getCustomerMiddlename(); + } + $customerName .= ' ' . $this->getCustomerLastname(); + if ($this->isVisibleCustomerSuffix() && strlen($this->getCustomerSuffix())) { + $customerName .= ' ' . $this->getCustomerSuffix(); + } + return $customerName; } @@ -4534,5 +4557,48 @@ public function setShippingMethod($shippingMethod) return $this->setData('shipping_method', $shippingMethod); } + /** + * Is visible customer middlename + * + * @return bool + */ + private function isVisibleCustomerMiddlename(): bool + { + return $this->scopeConfig->isSetFlag( + 'customer/address/middlename_show', + ScopeInterface::SCOPE_STORE + ); + } + + /** + * Is visible customer prefix + * + * @return bool + */ + private function isVisibleCustomerPrefix(): bool + { + $prefixShowValue = $this->scopeConfig->getValue( + 'customer/address/prefix_show', + ScopeInterface::SCOPE_STORE + ); + + return $prefixShowValue !== Nooptreq::VALUE_NO; + } + + /** + * Is visible customer suffix + * + * @return bool + */ + private function isVisibleCustomerSuffix(): bool + { + $prefixShowValue = $this->scopeConfig->getValue( + 'customer/address/suffix_show', + ScopeInterface::SCOPE_STORE + ); + + return $prefixShowValue !== Nooptreq::VALUE_NO; + } + //@codeCoverageIgnoreEnd } diff --git a/app/code/Magento/Sales/Model/Order/Email/SenderBuilder.php b/app/code/Magento/Sales/Model/Order/Email/SenderBuilder.php index c4523981ac72..ae188309ea64 100644 --- a/app/code/Magento/Sales/Model/Order/Email/SenderBuilder.php +++ b/app/code/Magento/Sales/Model/Order/Email/SenderBuilder.php @@ -85,8 +85,8 @@ public function sendCopyTo() $copyTo = $this->identityContainer->getEmailCopyTo(); if (!empty($copyTo)) { - $this->configureEmailTemplate(); foreach ($copyTo as $email) { + $this->configureEmailTemplate(); $this->transportBuilder->addTo($email); $transport = $this->transportBuilder->getTransport(); $transport->sendMessage(); diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderSelectShippingMethodActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderSelectShippingMethodActionGroup.xml new file mode 100644 index 000000000000..b8493bf28837 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderSelectShippingMethodActionGroup.xml @@ -0,0 +1,26 @@ +<?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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminOrderSelectShippingMethodActionGroup"> + <annotations> + <description>Select Shipping method from admin order page.</description> + </annotations> + <arguments> + <argument name="methodTitle" type="string" defaultValue="flatrate"/> + <argument name="methodName" type="string" defaultValue="fixed"/> + </arguments> + <waitForElementVisible selector="{{AdminInvoicePaymentShippingSection.getShippingMethod}}" stepKey="waitForShippingMethodsOpen"/> + <click selector="{{AdminInvoicePaymentShippingSection.getShippingMethod}}" stepKey="openShippingMethod"/> + <conditionalClick selector="{{AdminInvoicePaymentShippingSection.getShippingMethod}}" dependentSelector="{{AdminInvoicePaymentShippingSection.fixedPriceShippingMethod(methodTitle, methodName)}}" visible="false" stepKey="openShippingMethodSecondTime"/> + <waitForElementVisible selector="{{AdminInvoicePaymentShippingSection.fixedPriceShippingMethod(methodName, methodTitle)}}" stepKey="waitForShippingMethod"/> + <click selector="{{AdminInvoicePaymentShippingSection.fixedPriceShippingMethod(methodName, methodTitle)}}" stepKey="chooseShippingMethod"/> + <waitForPageLoad stepKey="waitForPageToLoad"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml index fda886a83980..32e987bea919 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml @@ -17,5 +17,7 @@ <element name="CreateShipment" type="checkbox" selector=".order-shipping-address input[name='invoice[do_shipment]']"/> <element name="getShippingMethodAndRates" type="button" selector="//span[text()='Get shipping methods and rates']" timeout="60"/> <element name="shippingMethod" type="button" selector="//label[contains(text(), 'Fixed')]" timeout="60"/> + <element name="fixedPriceShippingMethod" type="button" selector="#s_method_{{methodName}}_{{methodTitle}}" parameterized="true"/> + <element name="getShippingMethod" type="button" selector="#order-shipping-method-summary a"/> </section> -</sections> \ No newline at end of file +</sections> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml index 1ad736ade37f..4310d412d1c9 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml @@ -55,6 +55,9 @@ <amOnPage url="{{AdminProductEditPage.url($$createBundleProduct.id$$)}}" stepKey="goToProductEditPage"/> <actionGroup ref="saveProductForm" stepKey="saveProduct"/> + <!--Run re-index task--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!--Go to bundle product page--> <amOnPage url="{{StorefrontProductPage.url($$createCategory.name$$)}}" stepKey="navigateToBundleProductPage"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAddProductCheckboxTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAddProductCheckboxTest.xml new file mode 100644 index 000000000000..bd13f7c847c3 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAddProductCheckboxTest.xml @@ -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> diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/Email/SenderBuilderTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/Email/SenderBuilderTest.php index adfb697e7033..756048d287e4 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/Email/SenderBuilderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/Email/SenderBuilderTest.php @@ -37,11 +37,6 @@ class SenderBuilderTest extends \PHPUnit\Framework\TestCase protected function setUp() { - $templateId = 'test_template_id'; - $templateOptions = ['option1', 'option2']; - $templateVars = ['var1', 'var2']; - $emailIdentity = 'email_identity_test'; - $emailCopyTo = ['example@mail.com']; $this->templateContainerMock = $this->createPartialMock( \Magento\Sales\Model\Order\Email\Container\Template::class, @@ -83,36 +78,6 @@ protected function setUp() ] ); - $this->templateContainerMock->expects($this->once()) - ->method('getTemplateId') - ->will($this->returnValue($templateId)); - $this->transportBuilder->expects($this->once()) - ->method('setTemplateIdentifier') - ->with($this->equalTo($templateId)); - $this->templateContainerMock->expects($this->once()) - ->method('getTemplateOptions') - ->will($this->returnValue($templateOptions)); - $this->transportBuilder->expects($this->once()) - ->method('setTemplateOptions') - ->with($this->equalTo($templateOptions)); - $this->templateContainerMock->expects($this->once()) - ->method('getTemplateVars') - ->will($this->returnValue($templateVars)); - $this->transportBuilder->expects($this->once()) - ->method('setTemplateVars') - ->with($this->equalTo($templateVars)); - - $this->identityContainerMock->expects($this->once()) - ->method('getEmailIdentity') - ->will($this->returnValue($emailIdentity)); - $this->transportBuilder->expects($this->once()) - ->method('setFromByScope') - ->with($this->equalTo($emailIdentity), 1); - - $this->identityContainerMock->expects($this->once()) - ->method('getEmailCopyTo') - ->will($this->returnValue($emailCopyTo)); - $this->senderBuilder = new SenderBuilder( $this->templateContainerMock, $this->identityContainerMock, @@ -122,6 +87,7 @@ protected function setUp() public function testSend() { + $this->setExpectedCount(1); $customerName = 'test_name'; $customerEmail = 'test_email'; $identity = 'email_identity_test'; @@ -142,20 +108,20 @@ public function testSend() $this->identityContainerMock->expects($this->once()) ->method('getCustomerName') ->will($this->returnValue($customerName)); - $this->identityContainerMock->expects($this->once()) + $this->identityContainerMock->expects($this->exactly(1)) ->method('getStore') ->willReturn($this->storeMock); $this->storeMock->expects($this->once()) ->method('getId') ->willReturn(1); - $this->transportBuilder->expects($this->once()) + $this->transportBuilder->expects($this->exactly(1)) ->method('setFromByScope') ->with($identity, 1); - $this->transportBuilder->expects($this->once()) + $this->transportBuilder->expects($this->exactly(1)) ->method('addTo') ->with($this->equalTo($customerEmail), $this->equalTo($customerName)); - $this->transportBuilder->expects($this->once()) + $this->transportBuilder->expects($this->exactly(1)) ->method('getTransport') ->will($this->returnValue($transportMock)); @@ -164,6 +130,7 @@ public function testSend() public function testSendCopyTo() { + $this->setExpectedCount(2); $identity = 'email_identity_test'; $transportMock = $this->createMock( \Magento\Sales\Test\Unit\Model\Order\Email\Stub\TransportInterfaceMock::class @@ -172,22 +139,66 @@ public function testSendCopyTo() ->method('getCustomerEmail'); $this->identityContainerMock->expects($this->never()) ->method('getCustomerName'); - $this->transportBuilder->expects($this->once()) - ->method('addTo') - ->with($this->equalTo('example@mail.com')); - $this->transportBuilder->expects($this->once()) + $this->transportBuilder->expects($this->exactly(2)) + ->method('addTo'); + $this->transportBuilder->expects($this->exactly(2)) ->method('setFromByScope') ->with($identity, 1); - $this->identityContainerMock->expects($this->once()) + $this->identityContainerMock->expects($this->exactly(2)) ->method('getStore') ->willReturn($this->storeMock); - $this->storeMock->expects($this->once()) + $this->storeMock->expects($this->exactly(2)) ->method('getId') ->willReturn(1); - $this->transportBuilder->expects($this->once()) + $this->transportBuilder->expects($this->exactly(2)) ->method('getTransport') ->will($this->returnValue($transportMock)); $this->senderBuilder->sendCopyTo(); } + + /** + * Sets expected count invocation. + * + * @param int $count + */ + private function setExpectedCount(int $count = 1) + { + + $templateId = 'test_template_id'; + $templateOptions = ['option1', 'option2']; + $templateVars = ['var1', 'var2']; + $emailIdentity = 'email_identity_test'; + $emailCopyTo = ['example@mail.com', 'example2@mail.com']; + + $this->templateContainerMock->expects($this->exactly($count)) + ->method('getTemplateId') + ->will($this->returnValue($templateId)); + $this->transportBuilder->expects($this->exactly($count)) + ->method('setTemplateIdentifier') + ->with($this->equalTo($templateId)); + $this->templateContainerMock->expects($this->exactly($count)) + ->method('getTemplateOptions') + ->will($this->returnValue($templateOptions)); + $this->transportBuilder->expects($this->exactly($count)) + ->method('setTemplateOptions') + ->with($this->equalTo($templateOptions)); + $this->templateContainerMock->expects($this->exactly($count)) + ->method('getTemplateVars') + ->will($this->returnValue($templateVars)); + $this->transportBuilder->expects($this->exactly($count)) + ->method('setTemplateVars') + ->with($this->equalTo($templateVars)); + + $this->identityContainerMock->expects($this->exactly($count)) + ->method('getEmailIdentity') + ->will($this->returnValue($emailIdentity)); + $this->transportBuilder->expects($this->exactly($count)) + ->method('setFromByScope') + ->with($this->equalTo($emailIdentity), 1); + + $this->identityContainerMock->expects($this->once()) + ->method('getEmailCopyTo') + ->will($this->returnValue($emailCopyTo)); + } } diff --git a/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php b/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php index 705d2face230..39c54be0d9c0 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/OrderTest.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Sales\Test\Unit\Model; use Magento\Catalog\Api\Data\ProductInterface; @@ -17,6 +18,8 @@ use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Framework\Api\SearchCriteria; use Magento\Sales\Api\Data\OrderItemSearchResultInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; +use PHPUnit\Framework\MockObject\MockObject; /** * Test class for \Magento\Sales\Model\Order @@ -24,6 +27,7 @@ * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.TooManyPublicMethods) * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.TooManyFields) */ class OrderTest extends \PHPUnit\Framework\TestCase { @@ -102,6 +106,11 @@ class OrderTest extends \PHPUnit\Framework\TestCase */ private $searchCriteriaBuilder; + /** + * @var MockObject|ScopeConfigInterface $scopeConfigMock + */ + private $scopeConfigMock; + protected function setUp() { $helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); @@ -125,14 +134,17 @@ protected function setUp() \Magento\Sales\Model\ResourceModel\Order\CollectionFactory::class, ['create'] ); - $this->item = $this->createPartialMock(\Magento\Sales\Model\ResourceModel\Order\Item::class, [ + $this->item = $this->createPartialMock( + \Magento\Sales\Model\ResourceModel\Order\Item::class, + [ 'isDeleted', 'getQtyToInvoice', 'getParentItemId', 'getQuoteItemId', 'getLockedDoInvoice', 'getProductId', - ]); + ] + ); $this->salesOrderCollectionMock = $this->getMockBuilder( \Magento\Sales\Model\ResourceModel\Order\Collection::class )->disableOriginalConstructor() @@ -168,6 +180,7 @@ protected function setUp() ->setMethods(['addFilter', 'create']) ->disableOriginalConstructor()->getMockForAbstractClass(); + $this->scopeConfigMock = $this->createMock(ScopeConfigInterface::class); $this->order = $helper->getObject( \Magento\Sales\Model\Order::class, [ @@ -182,7 +195,8 @@ protected function setUp() 'localeResolver' => $this->localeResolver, 'timezone' => $this->timezone, 'itemRepository' => $this->itemRepository, - 'searchCriteriaBuilder' => $this->searchCriteriaBuilder + 'searchCriteriaBuilder' => $this->searchCriteriaBuilder, + 'scopeConfig' => $this->scopeConfigMock ] ); } @@ -354,6 +368,51 @@ public function testCanInvoice() $this->assertTrue($this->order->canInvoice()); } + /** + * Ensure customer name returned correctly. + * + * @dataProvider customerNameProvider + * @param array $expectedData + */ + public function testGetCustomerName(array $expectedData) + { + $this->order->setCustomerFirstname($expectedData['first_name']); + $this->order->setCustomerSuffix($expectedData['customer_suffix']); + $this->order->setCustomerPrefix($expectedData['customer_prefix']); + $this->scopeConfigMock->expects($this->exactly($expectedData['invocation'])) + ->method('isSetFlag') + ->willReturn(true); + $this->assertEquals($expectedData['expected_name'], $this->order->getCustomerName()); + } + + /** + * Customer name data provider + */ + public function customerNameProvider() + { + return + [ + [ + [ + 'first_name' => null, + 'invocation' => 0, + 'expected_name' => 'Guest', + 'customer_suffix' => 'smith', + 'customer_prefix' => 'mr.' + ] + ], + [ + [ + 'first_name' => 'Smith', + 'invocation' => 1, + 'expected_name' => 'mr. Smith Carl', + 'customer_suffix' => 'Carl', + 'customer_prefix' => 'mr.' + ] + ] + ]; + } + /** * @param string $status * @@ -819,9 +878,10 @@ public function testCanVoidPayment($actionFlags, $orderState) if ($orderState == \Magento\Sales\Model\Order::STATE_PAYMENT_REVIEW) { $canVoidOrder = false; } - if ($orderState == \Magento\Sales\Model\Order::STATE_HOLDED && (!isset( - $actionFlags[\Magento\Sales\Model\Order::ACTION_FLAG_UNHOLD] - ) || $actionFlags[\Magento\Sales\Model\Order::ACTION_FLAG_UNHOLD] !== false) + if ($orderState == \Magento\Sales\Model\Order::STATE_HOLDED && + (!isset($actionFlags[\Magento\Sales\Model\Order::ACTION_FLAG_UNHOLD]) || + $actionFlags[\Magento\Sales\Model\Order::ACTION_FLAG_UNHOLD] !== false + ) ) { $canVoidOrder = false; } diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/details.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/details.phtml index b700f1b3a65a..70373f177d8b 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/details.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/details.phtml @@ -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> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/due.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/due.phtml index 87d7c85c2d9e..f8e914a2c9b2 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/due.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/due.phtml @@ -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; ?> diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/grand.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/grand.phtml index dc76799251c7..af5d58d47fce 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/grand.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/grand.phtml @@ -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> diff --git a/app/code/Magento/SalesRule/Model/Rule/Condition/Address.php b/app/code/Magento/SalesRule/Model/Rule/Condition/Address.php index cf6301cb31a9..29cdf34c5a78 100644 --- a/app/code/Magento/SalesRule/Model/Rule/Condition/Address.php +++ b/app/code/Magento/SalesRule/Model/Rule/Condition/Address.php @@ -65,7 +65,6 @@ public function loadAttributeOptions() 'base_subtotal' => __('Subtotal'), 'total_qty' => __('Total Items Quantity'), 'weight' => __('Total Weight'), - 'payment_method' => __('Payment Method'), 'shipping_method' => __('Shipping Method'), 'postcode' => __('Shipping Postcode'), 'region' => __('Shipping Region'), diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml index 0d365dc089e4..e4e9a6278094 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/EndToEndB2CGuestUserTest.xml @@ -38,6 +38,45 @@ <argument name="total" value="447.00"/> </actionGroup> + <actionGroup ref="StorefrontCancelCouponActionGroup" stepKey="couponCancelCoupon" after="couponCheckCartWithDiscount"/> + <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCartAfterCancelCoupon" after="couponCancelCoupon"> + <argument name="subtotal" value="480.00"/> + <argument name="shipping" value="15.00"/> + <argument name="shippingMethod" value="Flat Rate - Fixed"/> + <argument name="total" value="495.00"/> + </actionGroup> + <comment userInput="End of using coupon code" stepKey="endOfUsingCouponCode" after="cartAssertCartAfterCancelCoupon" /> + </test> + <test name="EndToEndB2CGuestUserMysqlTest"> + <before> + <createData entity="ApiSalesRule" stepKey="createSalesRule"/> + <createData entity="ApiSalesRuleCoupon" stepKey="createSalesRuleCoupon"> + <requiredEntity createDataKey="createSalesRule"/> + </createData> + </before> + <after> + <deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/> + </after> + + <!-- Step 5: User uses coupon codes --> + <comment userInput="Start of using coupon code" stepKey="startOfUsingCouponCode" after="endOfComparingProducts" /> + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="couponOpenCart" after="startOfUsingCouponCode"/> + + <actionGroup ref="StorefrontApplyCouponActionGroup" stepKey="couponApplyCoupon" after="couponOpenCart"> + <argument name="coupon" value="$$createSalesRuleCoupon$$"/> + </actionGroup> + + <actionGroup ref="StorefrontCheckCouponAppliedActionGroup" stepKey="couponCheckAppliedDiscount" after="couponApplyCoupon"> + <argument name="rule" value="$$createSalesRule$$"/> + <argument name="discount" value="48.00"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="couponCheckCartWithDiscount" after="couponCheckAppliedDiscount"> + <argument name="subtotal" value="480.00"/> + <argument name="shipping" value="15.00"/> + <argument name="shippingMethod" value="Flat Rate - Fixed"/> + <argument name="total" value="447.00"/> + </actionGroup> + <actionGroup ref="StorefrontCancelCouponActionGroup" stepKey="couponCancelCoupon" after="couponCheckCartWithDiscount"/> <actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssertCartAfterCancelCoupon" after="couponCancelCoupon"> <argument name="subtotal" value="480.00"/> diff --git a/app/code/Magento/Search/Test/Mftf/Data/ConfigData.xml b/app/code/Magento/Search/Test/Mftf/Data/ConfigData.xml new file mode 100644 index 000000000000..4a742b290c98 --- /dev/null +++ b/app/code/Magento/Search/Test/Mftf/Data/ConfigData.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="SearchEngineMysqlConfigData"> + <data key="path">catalog/search/engine</data> + <data key="scope_id">1</data> + <data key="label">MySQL</data> + <data key="value">mysql</data> + </entity> +</entities> diff --git a/app/code/Magento/Search/Test/Mftf/Suite/SearchEngineMysqlSuite.xml b/app/code/Magento/Search/Test/Mftf/Suite/SearchEngineMysqlSuite.xml new file mode 100644 index 000000000000..9ed6ccda6220 --- /dev/null +++ b/app/code/Magento/Search/Test/Mftf/Suite/SearchEngineMysqlSuite.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd"> + <suite name="SearchEngineMysqlSuite"> + <before> + <magentoCLI stepKey="setSearchEngineToMysql" command="config:set {{SearchEngineMysqlConfigData.path}} {{SearchEngineMysqlConfigData.value}}"/> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </before> + <after></after> + <include> + <group name="SearchEngineMysql" /> + </include> + <exclude> + <group name="skip"/> + </exclude> + </suite> +</suites> diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml index 61a89b4610d6..c5124ac9c74a 100644 --- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml +++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml @@ -32,6 +32,10 @@ <!-- Create product with description --> <comment userInput="Create product with description" stepKey="createProductWithDescriptionComment"/> <createData entity="SimpleProductWithDescription" stepKey="simpleProduct"/> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <!-- Delete created product --> diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml index 119faef9f2f5..e49db08954e1 100644 --- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml +++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml @@ -24,6 +24,10 @@ <!--Create Simple Product --> <createData entity="defaultSimpleProduct" stepKey="simpleProduct"/> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> <!-- Delete create product --> diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml index ca48fb8565ca..a1aa8be999ae 100644 --- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml +++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml @@ -24,6 +24,10 @@ <!-- Create product with short description --> <createData entity="ApiProductWithDescription" stepKey="product"/> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml index 6033ea8dee28..3a8443706c9c 100644 --- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml +++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml @@ -24,6 +24,10 @@ <!--Create Simple Product --> <createData entity="defaultSimpleProduct" stepKey="simpleProduct"/> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> diff --git a/app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/View.php b/app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/View.php index 356483c9a5dd..55eecfa00d6d 100644 --- a/app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/View.php +++ b/app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/View.php @@ -43,7 +43,7 @@ public function __construct( */ protected function _prepareLayout() { - $onclick = "submitAndReloadArea($('shipment_tracking_info').parentNode, '" . $this->getSubmitUrl() . "')"; + $onclick = "saveTrackingInfo($('shipment_tracking_info').parentNode, '" . $this->getSubmitUrl() . "')"; $this->addChild( 'save_button', \Magento\Backend\Block\Widget\Button::class, @@ -86,7 +86,10 @@ public function getRemoveUrl($track) } /** + * Get carrier title + * * @param string $code + * * @return \Magento\Framework\Phrase|string|bool */ public function getCarrierTitle($code) diff --git a/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminAddTrackingNumberToShipmentActionGroup.xml b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminAddTrackingNumberToShipmentActionGroup.xml new file mode 100644 index 000000000000..87f139c9dc77 --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminAddTrackingNumberToShipmentActionGroup.xml @@ -0,0 +1,22 @@ +<?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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminAddTrackingNumberToShipmentActionGroup"> + <arguments> + <argument name="trackingTitle" type="string" defaultValue=""/> + <argument name="trackingNumber" type="string"/> + </arguments> + + <fillField selector="{{AdminShipmentTrackingSection.trackingTitle}}" userInput="{{trackingTitle}}" stepKey="fillTrackingTitle"/> + <fillField selector="{{AdminShipmentTrackingSection.trackingNumber}}" userInput="{{trackingNumber}}" stepKey="fillTrackingNumber"/> + <click selector="{{AdminShipmentTrackingSection.addTrackingNumber}}" stepKey="clickAddTrackingNumber"/> + <waitForPageLoad stepKey="waitForTrackingInformation"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminAssertExistingTrackingNumberActionGroup.xml b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminAssertExistingTrackingNumberActionGroup.xml new file mode 100644 index 000000000000..03301aa22f58 --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminAssertExistingTrackingNumberActionGroup.xml @@ -0,0 +1,18 @@ +<?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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminAssertExistingTrackingNumberActionGroup"> + <arguments> + <argument name="trackingNumber" type="string"/> + </arguments> + + <see selector="#shipment_tracking_info .col-number" userInput="{{trackingNumber}}" stepKey="seeAvailableTrackingNumber"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminAssertTrackingValidationErrorActionGroup.xml b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminAssertTrackingValidationErrorActionGroup.xml new file mode 100644 index 000000000000..3783a9b1cc4d --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminAssertTrackingValidationErrorActionGroup.xml @@ -0,0 +1,19 @@ +<?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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminAssertTrackingValidationErrorActionGroup"> + <arguments> + <argument name="inputName" type="string"/> + <argument name="errorMessage" type="string" defaultValue="This is a required field."/> + </arguments> + + <see selector="{{AdminShipmentTrackingSection.trackingInfoErrorElement(inputName)}}" userInput="{{errorMessage}}" stepKey="seeTrackingInfoValidationError"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminChangeTableRatesShippingMethodStatusActionGroup.xml b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminChangeTableRatesShippingMethodStatusActionGroup.xml index e506ca3a7662..e0fec2a6dc4d 100644 --- a/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminChangeTableRatesShippingMethodStatusActionGroup.xml +++ b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminChangeTableRatesShippingMethodStatusActionGroup.xml @@ -17,4 +17,14 @@ <uncheckOption selector="{{AdminShippingMethodTableRatesSection.enabledUseSystemValue}}" stepKey="uncheckUseSystemValue"/> <selectOption selector="{{AdminShippingMethodTableRatesSection.carriersTableRateActive}}" userInput="{{status}}" stepKey="changeTableRatesMethodStatus"/> </actionGroup> + <actionGroup name="AdminImportFileTableRatesShippingMethodActionGroup"> + <annotations> + <description>Import a file in Table Rates tab in Shipping Method config page.</description> + </annotations> + <arguments> + <argument name="file" type="string" defaultValue="test_tablerates.csv"/> + </arguments> + <conditionalClick selector="{{AdminShippingMethodTableRatesSection.carriersTableRateTab}}" dependentSelector="{{AdminShippingMethodTableRatesSection.carriersTableRateActive}}" visible="false" stepKey="expandTab"/> + <attachFile selector="{{AdminShippingMethodTableRatesSection.importFile}}" userInput="{{file}}" stepKey="attachFileForImport"/> + </actionGroup> </actionGroups> diff --git a/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminSelectFirstGridRowActionGroup.xml b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminSelectFirstGridRowActionGroup.xml new file mode 100644 index 000000000000..fc30d752f201 --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminSelectFirstGridRowActionGroup.xml @@ -0,0 +1,15 @@ +<?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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminSelectFirstGridRowActionGroup"> + <click selector="{{AdminDataGridTableSection.firstRow}}" stepKey="clickFirstRowInGrid"/> + <waitForPageLoad stepKey="waitToProcessPageToLoad"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminShipmentActionGroup.xml b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminShipmentActionGroup.xml index e9809ae0f3e7..631db885ab3d 100644 --- a/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminShipmentActionGroup.xml +++ b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/AdminShipmentActionGroup.xml @@ -62,4 +62,24 @@ <seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}" stepKey="seeViewOrderPageShipping"/> <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The shipment has been created." stepKey="seeShipmentCreateSuccess"/> </actionGroup> + <actionGroup name="AdminShipmentCreateShippingLabelActionGroup"> + <arguments> + <argument name="productName" type="string" defaultValue="{{SimpleProduct.name}}"/> + </arguments> + <waitForElementVisible selector="{{AdminShipmentCreatePackageMainSection.addProductsToPackage}}" stepKey="waitForAddProductElement"/> + <click selector="{{AdminShipmentCreatePackageMainSection.addProductsToPackage}}" stepKey="clickAddProducts"/> + <waitForElementVisible selector="{{AdminShipmentCreatePackageProductGridSection.concreteProductCheckbox('productName')}}" stepKey="waitForProductBeVisible"/> + <checkOption selector="{{AdminShipmentCreatePackageProductGridSection.concreteProductCheckbox('productName')}}" stepKey="checkProductCheckbox"/> + <waitForElementVisible selector="{{AdminShipmentCreatePackageMainSection.addSelectedProductToPackage}}" stepKey="waitForAddSelectedProductElement"/> + <click selector="{{AdminShipmentCreatePackageMainSection.addSelectedProductToPackage}}" stepKey="clickAddSelectedProduct"/> + <waitForElementNotVisible selector="{{AdminShipmentCreatePackageMainSection.saveButtonDisabled}}" stepKey="waitForBeEnabled"/> + <click selector="{{AdminShipmentCreatePackageMainSection.save}}" stepKey="clickSave"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear"/> + <waitForPageLoad stepKey="waitForSaving"/> + <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The shipment has been created. You created the shipping label." stepKey="seeShipmentCreateSuccess"/> + </actionGroup> + <actionGroup name="AdminGoToShipmentTabActionGroup"> + <click selector="{{AdminOrderDetailsOrderViewSection.shipments}}" stepKey="clickOrderShipmentsTab"/> + <waitForLoadingMaskToDisappear stepKey="waitForShipmentTabLoad" after="clickOrderShipmentsTab"/> + </actionGroup> </actionGroups> diff --git a/app/code/Magento/Shipping/Test/Mftf/ActionGroup/StorefrontSetShippingMethodActionGroup.xml b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/StorefrontSetShippingMethodActionGroup.xml new file mode 100644 index 000000000000..7fdfe6d88b8e --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/ActionGroup/StorefrontSetShippingMethodActionGroup.xml @@ -0,0 +1,21 @@ +<?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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="StorefrontSetShippingMethodActionGroup"> + <annotations> + <description>Selects the provided Shipping Method on checkout shipping and wait loading mask.</description> + </annotations> + <arguments> + <argument name="shippingMethodName" type="string" defaultValue="Flat Rate"/> + </arguments> + <checkOption selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName(shippingMethodName)}}" stepKey="selectFlatRateShippingMethod"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskForNextButton"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Shipping/Test/Mftf/Data/AdminShippingSettingsConfigData.xml b/app/code/Magento/Shipping/Test/Mftf/Data/AdminShippingSettingsConfigData.xml new file mode 100644 index 000000000000..ad366fd7294e --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/Data/AdminShippingSettingsConfigData.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="AdminShippingSettingsOriginCountryConfigData"> + <data key="path">shipping/origin/country_id</data> + </entity> + <entity name="AdminShippingSettingsOriginZipCodeConfigData"> + <data key="path">shipping/origin/postcode</data> + </entity> + <entity name="AdminShippingSettingsOriginCityConfigData"> + <data key="path">shipping/origin/city</data> + </entity> + <entity name="AdminShippingSettingsOriginStreetAddressConfigData"> + <data key="path">shipping/origin/street_line1</data> + </entity> + <entity name="AdminShippingSettingsOriginStreetAddress2ConfigData"> + <data key="path">shipping/origin/street_line2</data> + </entity> +</entities> diff --git a/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentCreatePackageSection.xml b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentCreatePackageSection.xml new file mode 100644 index 000000000000..5f33921b5a44 --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentCreatePackageSection.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="AdminShipmentCreatePackageMainSection"> + <element name="addProductsToPackage" type="button" selector="#package_block_1 button[data-action='package-add-items']"/> + <element name="addSelectedProductToPackage" type="button" selector="#package_block_1 button[data-action='package-save-items']"/> + <element name="save" type="button" selector="button[data-action='save-packages']"/> + <element name="saveButtonDisabled" type="button" selector="button[data-action='save-packages']._disabled"/> + </section> + <section name="AdminShipmentCreatePackageProductGridSection"> + <element name="concreteProductCheckbox" type="checkbox" selector="//td[contains(text(), '{{productName}}')]/parent::tr//input[contains(@class,'checkbox')]" parameterized="true"/> + </section> +</sections> diff --git a/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentTotalSection.xml b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentTotalSection.xml index f2f39d77d8d7..d76ba0493829 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentTotalSection.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentTotalSection.xml @@ -12,5 +12,6 @@ <element name="CommentText" type="textarea" selector="#shipment_comment_text"/> <element name="AppendComments" type="checkbox" selector=".order-totals input#notify_customer"/> <element name="EmailCopy" type="checkbox" selector=".order-totals input#send_email"/> + <element name="createShippingLabel" type="checkbox" selector="input#create_shipping_label"/> </section> </sections> \ No newline at end of file diff --git a/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentTrackingInformationShippingSection.xml b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentTrackingInformationShippingSection.xml new file mode 100644 index 000000000000..bbb61ed013a3 --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentTrackingInformationShippingSection.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="AdminShipmentTrackingInformationShippingSection"> + <element name="shippingInfoTable" type="block" selector="#shipment_tracking_info"/> + <element name="shippingMethod" type="text" selector="#shipment_tracking_info .odd .col-carrier"/> + <element name="shippingMethodTitle" type="text" selector="#shipment_tracking_info .odd .col-title"/> + <element name="shippingNumber" type="text" selector="#shipment_tracking_info .odd .col-number"/> + </section> +</sections> \ No newline at end of file diff --git a/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentTrackingSection.xml b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentTrackingSection.xml new file mode 100644 index 000000000000..827fcfb1e4d7 --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentTrackingSection.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> + <section name="AdminShipmentTrackingSection"> + <element name="trackingNumber" type="text" selector="#tracking-shipping-form #tracking_number"/> + <element name="trackingTitle" type="text" selector="#tracking-shipping-form #tracking_title"/> + <element name="addTrackingNumber" type="button" selector="#tracking-shipping-form button.save"/> + <element name="trackingInfoErrorElement" type="text" selector="#tracking-shipping-form #{{inputName}}-error" parameterized="true" /> + </section> +</sections> \ No newline at end of file diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml new file mode 100644 index 000000000000..b2e3e2516a5c --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml @@ -0,0 +1,107 @@ +<?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="AdminCreateOrderCustomStoreShippingMethodTableRatesTest"> + <annotations> + <features value="Shipping"/> + <stories value="Shipping method Table Rates"/> + <title value="Create order on second store with shipping method Table Rates"/> + <description value="Create order on second store with shipping method Table Rates"/> + <severity value="MAJOR"/> + <testCaseId value="MC-6411"/> + <useCaseId value="MAGETWO-91702"/> + <group value="shipping"/> + </annotations> + <before> + <!--Create product and customer--> + <createData entity="SimpleProduct2" stepKey="createProduct"/> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <!--Create website, store group and store view--> + <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createWebsite"> + <argument name="newWebsiteName" value="{{customWebsite.name}}"/> + <argument name="websiteCode" value="{{customWebsite.code}}"/> + </actionGroup> + <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore"> + <argument name="website" value="{{customWebsite.name}}"/> + <argument name="storeGroupName" value="{{customStoreGroup.name}}"/> + <argument name="storeGroupCode" value="{{customStoreGroup.code}}"/> + </actionGroup> + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView"> + <argument name="StoreGroup" value="customStoreGroup"/> + <argument name="customStore" value="customStore"/> + </actionGroup> + <!--Create customer associated to website--> + <actionGroup ref="AdminGoCreatedWebsitePageActionGroup" stepKey="DeleteWebsite"> + <argument name="websiteName" value="{{customWebsite.name}}"/> + </actionGroup> + <grabFromCurrentUrl regex="~/website_id/(\d+)/~" stepKey="grabWebsiteIdFromURL"/> + <createData entity="Simple_Customer_Without_Address" stepKey="createCustomer"> + <field key="website_id">$grabWebsiteIdFromURL</field> + </createData> + <!--Enable Table Rate method and import csv file--> + <actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/> + <actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="switchDefaultWebsite"> + <argument name="website" value="_defaultWebsite"/> + </actionGroup> + <actionGroup ref="AdminChangeTableRatesShippingMethodStatusActionGroup" stepKey="enableTableRatesShippingMethodForDefaultWebsite"> + <argument name="status" value="0"/> + </actionGroup> + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfigForDefaultWebsite"/> + <actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="switchCustomWebsite"> + <argument name="website" value="customWebsite"/> + </actionGroup> + <actionGroup ref="AdminChangeTableRatesShippingMethodStatusActionGroup" stepKey="enableTableRatesShippingMethod"> + <argument name="status" value="1"/> + </actionGroup> + <actionGroup ref="AdminImportFileTableRatesShippingMethodActionGroup" stepKey="importCSVFile"> + <argument name="file" value="usa_tablerates.csv"/> + </actionGroup> + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + </before> + <after> + <!--Delete created data--> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="DeleteWebsite"> + <argument name="websiteName" value="{{customWebsite.name}}"/> + </actionGroup> + <actionGroup ref="logout" stepKey="logout"/> + </after> + <!--Assign product to custom website--> + <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="goToProductEditPage"/> + <waitForPageLoad stepKey="waitForProductPageLoad"/> + <actionGroup ref="unassignWebsiteFromProductActionGroup" stepKey="unassignWebsiteInProduct"> + <argument name="website" value="{{_defaultWebsite.name}}"/> + </actionGroup> + <actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="selectWebsiteInProduct"> + <argument name="website" value="{{customWebsite.name}}"/> + </actionGroup> + <actionGroup ref="saveProductForm" stepKey="saveProduct"/> + <!--Create order--> + <actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrderWithExistingCustomer"> + <argument name="customer" value="$$createCustomer$$"/> + <argument name="storeView" value="customStore"/> + </actionGroup> + <actionGroup ref="addSimpleProductToOrder" stepKey="addSimpleProductToTheOrder"> + <argument name="product" value="$$createProduct$$"/> + </actionGroup> + <actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerInfo"> + <argument name="customer" value="$$createCustomer$$"/> + <argument name="address" value="US_Address_TX"/> + </actionGroup> + <!--Choose Best Way shipping Method--> + <actionGroup ref="AdminOrderSelectShippingMethodActionGroup" stepKey="chooseBestWayMethod"> + <argument name="methodTitle" value="bestway"/> + <argument name="methodName" value="tablerate"/> + </actionGroup> + <actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/> + </test> +</tests> diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminValidateShippingTrackingNumberTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminValidateShippingTrackingNumberTest.xml new file mode 100644 index 000000000000..ca4d731eb82b --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminValidateShippingTrackingNumberTest.xml @@ -0,0 +1,52 @@ +<?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="AdminValidateShippingTrackingNumberTest"> + <annotations> + <stories value="Admin validate the shipping tracking number for an order"/> + <title value="Admin validate the shipping tracking number for an order"/> + <description value="Testing for a required tracking number when adding new shipping information"/> + <severity value="CRITICAL"/> + <group value="shipping"/> + </annotations> + <before> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> + <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> + </before> + <after> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> + <actionGroup ref="logout" stepKey="logout"/> + </after> + <actionGroup ref="CreateOrderActionGroup" stepKey="goToCreateOrderPage"> + <argument name="customer" value="$$createCustomer$$"/> + <argument name="product" value="$$createSimpleProduct$$"/> + </actionGroup> + <grabTextFrom selector="|Order # (\d+)|" stepKey="orderId"/> + <actionGroup ref="AdminShipThePendingOrderActionGroup" stepKey="createShipmentForOrder"/> + <actionGroup ref="FilterShipmentGridByOrderIdActionGroup" stepKey="filterForNewlyCreatedShipment"> + <argument name="orderId" value="$orderId"/> + </actionGroup> + <actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="selectShipmentFromGrid"/> + <actionGroup ref="AdminAddTrackingNumberToShipmentActionGroup" stepKey="addTrackingInformation"> + <argument name="trackingNumber" value=""/> + </actionGroup> + <actionGroup ref="AdminAssertTrackingValidationErrorActionGroup" stepKey="assertValidateTrackingNumber"> + <argument name="inputName" value="tracking_number"/> + </actionGroup> + <actionGroup ref="AdminAddTrackingNumberToShipmentActionGroup" stepKey="addTrackingNumber"> + <argument name="trackingNumber" value="123123"/> + </actionGroup> + <actionGroup ref="AdminAssertExistingTrackingNumberActionGroup" stepKey="checkAddedTrackingNumber"> + <argument name="trackingNumber" value="123123"/> + </actionGroup> + </test> +</tests> diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/StorefrontDisplayTableRatesShippingMethodForAETest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/StorefrontDisplayTableRatesShippingMethodForAETest.xml new file mode 100644 index 000000000000..bb29a4a28bcf --- /dev/null +++ b/app/code/Magento/Shipping/Test/Mftf/Test/StorefrontDisplayTableRatesShippingMethodForAETest.xml @@ -0,0 +1,76 @@ +<?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="StorefrontDisplayTableRatesShippingMethodForAETest"> + <annotations> + <features value="Shipping"/> + <stories value="Table Rates"/> + <title value="Displaying of Table Rates for Armed Forces Europe (AE)"/> + <description value="Displaying of Table Rates for Armed Forces Europe (AE)"/> + <severity value="MAJOR"/> + <testCaseId value="MC-6405"/> + <group value="shipping"/> + </annotations> + <before> + <createData entity="_defaultCategory" stepKey="createCategory"/> + <createData entity="SimpleProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="Simple_US_Customer_ArmedForcesEurope" stepKey="createCustomer"/> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + </before> + <after> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <!--Rollback config--> + <actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodSystemConfigPage"/> + <actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="AdminSwitchStoreViewToMainWebsite"> + <argument name="website" value="_defaultWebsite"/> + </actionGroup> + <actionGroup ref="AdminChangeTableRatesShippingMethodStatusActionGroup" stepKey="disableTableRatesShippingMethod"> + <argument name="status" value="0"/> + </actionGroup> + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveSystemConfig"/> + <actionGroup ref="logout" stepKey="logout"/> + </after> + <!--Admin Configuration: enable Table Rates and import CSV file with the rates--> + <actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/> + <actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="AdminSwitchStoreView"> + <argument name="website" value="_defaultWebsite"/> + </actionGroup> + <actionGroup ref="AdminChangeTableRatesShippingMethodStatusActionGroup" stepKey="enableTableRatesShippingMethod"/> + <attachFile selector="{{AdminShippingMethodTableRatesSection.importFile}}" userInput="tablerates.csv" stepKey="attachFileForImport"/> + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/> + <!--Login as created customer--> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> + <argument name="Customer" value="$$createCustomer$$"/> + </actionGroup> + <!--Add the created product to the shopping cart--> + <actionGroup ref="AddSimpleProductToCart" stepKey="addProductToCart"> + <argument name="product" value="$$createProduct$$"/> + </actionGroup> + <!--Proceed to Checkout from the mini cart--> + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart" /> + <!--Shipping Method: select table rate--> + <actionGroup ref="AssertStoreFrontShippingMethodAvailableActionGroup" stepKey="assertShippingMethodAvailable"> + <argument name="shippingMethodName" value="Best Way"/> + </actionGroup> + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="setShippingMethodTableRate"> + <argument name="shippingMethodName" value="Best Way"/> + </actionGroup> + <!--Proceed to Review and Payments section--> + <click selector="{{CheckoutShippingSection.next}}" stepKey="clickToSaveShippingInfo"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskAfterClickNext"/> + <waitForPageLoad stepKey="waitForReviewAndPaymentsPageIsLoaded"/> + <!--Place order and assert the message of success--> + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrderProductSuccessful"/> + </test> +</tests> diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml index cd25cb919adb..28322d953492 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml @@ -31,7 +31,7 @@ $girthEnabled = $block->isDisplayGirthValue() && $block->isGirthAllowed() ? 1 : packaging.sendCreateLabelRequest(); }); packaging.setLabelCreatedCallback(function(response){ - setLocation("<?php $block->escapeJs($block->escapeUrl($block->getUrl( + setLocation("<?= $block->escapeJs($block->escapeUrl($block->getUrl( 'sales/order/view', ['order_id' => $block->getShipment()->getOrderId()] ))); ?>"); diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking/view.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking/view.phtml index 67587f19774c..afeecf5cdcb8 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking/view.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking/view.phtml @@ -9,76 +9,85 @@ ?> <?php /** @var $block Magento\Shipping\Block\Adminhtml\Order\Tracking\View */ ?> <div class="admin__control-table-wrapper"> - <table class="data-table admin__control-table" id="shipment_tracking_info"> - <thead> - <tr class="headings"> - <th class="col-carrier"><?= $block->escapeHtml(__('Carrier')) ?></th> - <th class="col-title"><?= $block->escapeHtml(__('Title')) ?></th> - <th class="col-number"><?= $block->escapeHtml(__('Number')) ?></th> - <th class="col-delete last"><?= $block->escapeHtml(__('Action')) ?></th> - </tr> - </thead> - <tfoot> - <tr> - <td class="col-carrier"> - <select name="carrier" - class="select admin__control-select" - onchange="selectCarrier(this)"> - <?php foreach ($block->getCarriers() as $_code => $_name) : ?> - <option value="<?= $block->escapeHtmlAttr($_code) ?>"><?= $block->escapeHtml($_name) ?></option> - <?php endforeach; ?> - </select> - </td> - <td class="col-title"> - <input class="input-text admin__control-text" - type="text" - id="tracking_title" - name="title" - value="" /> - </td> - <td class="col-number"> - <input class="input-text admin__control-text" - type="text" - id="tracking_number" - name="number" - value="" /> - </td> - <td class="col-delete last"><?= $block->getSaveButtonHtml() ?></td> - </tr> - </tfoot> - <?php if ($_tracks = $block->getShipment()->getAllTracks()) : ?> - <tbody> - <?php $i = 0; foreach ($_tracks as $_track) :$i++ ?> - <tr class="<?= /* @noEscape */ ($i%2 == 0) ? 'even' : 'odd' ?>"> - <td class="col-carrier"> - <?= $block->escapeHtml($block->getCarrierTitle($_track->getCarrierCode())) ?> - </td> - <td class="col-title"><?= $block->escapeHtml($_track->getTitle()) ?></td> - <td class="col-number"> - <?php if ($_track->isCustom()) : ?> - <?= $block->escapeHtml($_track->getNumber()) ?> - <?php else : ?> - <a href="#" onclick="popWin('<?= $block->escapeJs($block->escapeUrl($this->helper(Magento\Shipping\Helper\Data::class)->getTrackingPopupUrlBySalesModel($_track))) ?>','trackorder','width=800,height=600,resizable=yes,scrollbars=yes')"><?= $block->escapeHtml($_track->getNumber()) ?></a> - <div id="shipment_tracking_info_response_<?= (int) $_track->getId() ?>"></div> - <?php endif; ?> - </td> - <td class="col-delete last"><button class="action-delete" type="button" onclick="deleteTrackingNumber('<?= $block->escapeJs($block->escapeUrl($block->getRemoveUrl($_track))) ?>'); return false;"><span><?= $block->escapeHtml(__('Delete')) ?></span></button></td> - </tr> - <?php endforeach; ?> - </tbody> - <?php endif; ?> - </table> + <form id="tracking-shipping-form" data-mage-init='{"validation": {}}'> + <table class="data-table admin__control-table" id="shipment_tracking_info"> + <thead> + <tr class="headings"> + <th class="col-carrier"><?= $block->escapeHtml(__('Carrier')) ?></th> + <th class="col-title"><?= $block->escapeHtml(__('Title')) ?></th> + <th class="col-number"><?= $block->escapeHtml(__('Number')) ?></th> + <th class="col-delete last"><?= $block->escapeHtml(__('Action')) ?></th> + </tr> + </thead> + <tfoot> + <tr> + <td class="col-carrier"> + <select name="carrier" + class="select admin__control-select" + onchange="selectCarrier(this)"> + <?php foreach ($block->getCarriers() as $_code => $_name) : ?> + <option value="<?= $block->escapeHtmlAttr($_code) ?>"><?= $block->escapeHtml($_name) ?></option> + <?php endforeach; ?> + </select> + </td> + <td class="col-title"> + <input class="input-text admin__control-text" + type="text" + id="tracking_title" + name="title" + value="" /> + </td> + <td class="col-number"> + <input class="input-text admin__control-text required-entry" + type="text" + id="tracking_number" + name="number" + value="" /> + </td> + <td class="col-delete last"><?= $block->getSaveButtonHtml() ?></td> + </tr> + </tfoot> + <?php if ($_tracks = $block->getShipment()->getAllTracks()) : ?> + <tbody> + <?php $i = 0; foreach ($_tracks as $_track) :$i++ ?> + <tr class="<?= /* @noEscape */ ($i%2 == 0) ? 'even' : 'odd' ?>"> + <td class="col-carrier"> + <?= $block->escapeHtml($block->getCarrierTitle($_track->getCarrierCode())) ?> + </td> + <td class="col-title"><?= $block->escapeHtml($_track->getTitle()) ?></td> + <td class="col-number"> + <?php if ($_track->isCustom()) : ?> + <?= $block->escapeHtml($_track->getNumber()) ?> + <?php else : ?> + <a href="#" onclick="popWin('<?= $block->escapeJs($block->escapeUrl($this->helper(Magento\Shipping\Helper\Data::class)->getTrackingPopupUrlBySalesModel($_track))) ?>','trackorder','width=800,height=600,resizable=yes,scrollbars=yes')"><?= $block->escapeHtml($_track->getNumber()) ?></a> + <div id="shipment_tracking_info_response_<?= (int) $_track->getId() ?>"></div> + <?php endif; ?> + </td> + <td class="col-delete last"><button class="action-delete" type="button" onclick="deleteTrackingNumber('<?= $block->escapeJs($block->escapeUrl($block->getRemoveUrl($_track))) ?>'); return false;"><span><?= $block->escapeHtml(__('Delete')) ?></span></button></td> + </tr> + <?php endforeach; ?> + </tbody> + <?php endif; ?> + </table> + </form> </div> <script> -require(['prototype'], function(){ - +require(['prototype', 'jquery'], function(prototype, $j) { //<![CDATA[ function selectCarrier(elem) { var option = elem.options[elem.selectedIndex]; $('tracking_title').value = option.value && option.value != 'custom' ? option.text : ''; } +function saveTrackingInfo(node, url) { + var form = $j('#tracking-shipping-form'); + + if (form.validation() && form.validation('isValid')) { + submitAndReloadArea(node, url); + } +} + function deleteTrackingNumber(url) { if (confirm('<?= $block->escapeJs($block->escapeHtml(__('Are you sure?'))) ?>')) { submitAndReloadArea($('shipment_tracking_info').parentNode, url) @@ -87,6 +96,7 @@ function deleteTrackingNumber(url) { window.selectCarrier = selectCarrier; window.deleteTrackingNumber = deleteTrackingNumber; +window.saveTrackingInfo = saveTrackingInfo; //]]> }); diff --git a/app/code/Magento/Store/App/FrontController/Plugin/RequestPreprocessor.php b/app/code/Magento/Store/App/FrontController/Plugin/RequestPreprocessor.php index 5df50581792c..de2da5442382 100644 --- a/app/code/Magento/Store/App/FrontController/Plugin/RequestPreprocessor.php +++ b/app/code/Magento/Store/App/FrontController/Plugin/RequestPreprocessor.php @@ -5,6 +5,9 @@ */ namespace Magento\Store\App\FrontController\Plugin; +/** + * Class RequestPreprocessor + */ class RequestPreprocessor { /** @@ -52,6 +55,7 @@ public function __construct( /** * Auto-redirect to base url (without SID) if the requested url doesn't match it. + * * By default this feature is enabled in configuration. * * @param \Magento\Framework\App\FrontController $subject @@ -72,10 +76,11 @@ public function aroundDispatch( $this->_storeManager->getStore()->isCurrentlySecure() ); if ($baseUrl) { + // phpcs:disable Magento2.Functions.DiscouragedFunction $uri = parse_url($baseUrl); if (!$this->getBaseUrlChecker()->execute($uri, $request)) { $redirectUrl = $this->_url->getRedirectUrl( - $this->_url->getUrl(ltrim($request->getPathInfo(), '/'), ['_nosid' => true]) + $this->_url->getDirectUrl(ltrim($request->getPathInfo(), '/'), ['_nosid' => true]) ); $redirectCode = (int)$this->_scopeConfig->getValue( 'web/url/redirect_to_base', diff --git a/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminWebsitePageActionGroup.xml b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminWebsitePageActionGroup.xml new file mode 100644 index 000000000000..1a43ae1d2bbd --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminWebsitePageActionGroup.xml @@ -0,0 +1,26 @@ +<?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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminGoCreatedWebsitePageActionGroup"> + <annotations> + <description>Filter website name in grid and go first found website page</description> + </annotations> + <arguments> + <argument name="websiteName" type="string" defaultValue="SecondWebsite"/> + </arguments> + <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/> + <click selector="{{AdminStoresGridSection.resetButton}}" stepKey="resetSearchFilter"/> + <fillField userInput="{{websiteName}}" selector="{{AdminStoresGridSection.websiteFilterTextField}}" stepKey="fillSearchWebsiteField"/> + <click selector="{{AdminStoresGridSection.searchButton}}" stepKey="clickSearchButton"/> + <see userInput="{{websiteName}}" selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" stepKey="verifyThatCorrectWebsiteFound"/> + <click selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" stepKey="clickEditExistingStoreRow"/> + <waitForPageLoad stepKey="waitForStoreToLoad"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontDisplayAllCharactersOnTextSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontDisplayAllCharactersOnTextSwatchTest.xml index 470421776cf8..1bcdd6fcf9a3 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontDisplayAllCharactersOnTextSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontDisplayAllCharactersOnTextSwatchTest.xml @@ -29,6 +29,9 @@ <fillField selector="{{AdminManageSwatchSection.swatchTextByIndex('3')}}" userInput="123456789012345678901" stepKey="fillSwatch3" after="clickAddSwatch3"/> <fillField selector="{{AdminManageSwatchSection.swatchAdminDescriptionByIndex('3')}}" userInput="123456789012345678901BrownD" stepKey="fillDescription3" after="fillSwatch3"/> + <!--Run re-index task--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <see selector="{{StorefrontCategorySidebarSection.attributeNthOption(ProductAttributeFrontendLabel.label, '3')}}" userInput="123456789012345678901" stepKey="seeGreen" after="seeBlue"/> <see selector="{{StorefrontCategorySidebarSection.attributeNthOption(ProductAttributeFrontendLabel.label, '4')}}" userInput="123456789012345678901" stepKey="seeBrown" after="seeGreen"/> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml index 824817a32213..c9602ddcd127 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml @@ -103,6 +103,9 @@ <argument name="image" value="TestImageAdobe"/> </actionGroup> + <!-- Run re-index task--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!-- Go to the category page --> <amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage"/> <waitForPageLoad stepKey="waitForCategoryPage"/> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml index f150c6697bb9..7bf63d25417e 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml @@ -82,6 +82,9 @@ <argument name="attributeCode" value="{{ProductAttributeFrontendLabel.label}}"/> </actionGroup> + <!--Run re-index task--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!-- Go to the category page --> <amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage"/> <waitForPageLoad stepKey="waitForCategoryPage"/> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml index 623fd7456830..fd38c4891941 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml @@ -94,6 +94,9 @@ <argument name="attributeCode" value="{{ProductAttributeFrontendLabel.label}}"/> </actionGroup> + <!-- Run re-index task--> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <!-- Go to the category page --> <amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage"/> <waitForPageLoad stepKey="waitForCategoryPage"/> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml index 033778635ddb..292801166286 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml @@ -67,6 +67,11 @@ <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton"/> <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnGenerateProductsButton"/> <actionGroup ref="saveProductForm" stepKey="saveProductForm"/> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <!--Select any option in the Layered navigation and verify product image--> <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="navigateToCategoryPage"/> <actionGroup ref="SelectStorefrontSideBarAttributeOption" stepKey="selectStorefrontProductAttributeOption"> diff --git a/app/code/Magento/Ui/Component/Control/SplitButton.php b/app/code/Magento/Ui/Component/Control/SplitButton.php index ef57268566ba..5c9d09565fc6 100644 --- a/app/code/Magento/Ui/Component/Control/SplitButton.php +++ b/app/code/Magento/Ui/Component/Control/SplitButton.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Ui\Component\Control; /** @@ -22,7 +23,7 @@ class SplitButton extends Button { /** - * {@inheritdoc} + * @inheritdoc */ protected function getTemplatePath() { @@ -83,12 +84,12 @@ public function getButtonAttributesHtml() 'style' => $this->getStyle(), ]; - if (($idHard = $this->getIdHard())) { + if ($idHard = $this->getIdHard()) { $attributes['id'] = $idHard; } //TODO perhaps we need to skip data-mage-init when disabled="disabled" - if (($dataAttribute = $this->getDataAttribute())) { + if ($dataAttribute = $this->getDataAttribute()) { $this->getDataAttributes($dataAttribute, $attributes); } @@ -112,7 +113,7 @@ public function getToggleAttributesHtml() $title = $this->getLabel(); } - if (($currentClass = $this->getClass())) { + if ($currentClass = $this->getClass()) { $classes[] = $currentClass; } @@ -201,12 +202,11 @@ public function hasSplit() { return $this->hasData('has_split') ? (bool)$this->getData('has_split') : true; } - /** * Add data attributes to $attributes array * * @param array $data - * @param array &$attributes + * @param array $attributes * @return void */ protected function getDataAttributes($data, &$attributes) diff --git a/app/code/Magento/Ui/Component/Form/Element/Wysiwyg.php b/app/code/Magento/Ui/Component/Form/Element/Wysiwyg.php index d39d2dc3cd93..040c27d4939e 100644 --- a/app/code/Magento/Ui/Component/Form/Element/Wysiwyg.php +++ b/app/code/Magento/Ui/Component/Form/Element/Wysiwyg.php @@ -3,12 +3,12 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Ui\Component\Form\Element; use Magento\Framework\Data\Form\Element\Editor; use Magento\Framework\Data\Form; use Magento\Framework\Data\FormFactory; -use Magento\Framework\DataObject; use Magento\Framework\View\Element\UiComponent\ContextInterface; use Magento\Ui\Component\Wysiwyg\ConfigInterface; @@ -51,6 +51,7 @@ public function __construct( array $config = [] ) { $wysiwygConfigData = isset($config['wysiwygConfigData']) ? $config['wysiwygConfigData'] : []; + $this->form = $formFactory->create(); $wysiwygId = $context->getNamespace() . '_' . $data['name']; $this->editor = $this->form->addField( diff --git a/app/code/Magento/Ui/view/base/web/js/form/components/insert-listing.js b/app/code/Magento/Ui/view/base/web/js/form/components/insert-listing.js index b33f0b5c7239..53580fc069c4 100644 --- a/app/code/Magento/Ui/view/base/web/js/form/components/insert-listing.js +++ b/app/code/Magento/Ui/view/base/web/js/form/components/insert-listing.js @@ -155,7 +155,7 @@ define([ updateExternalValueByEditableData: function () { var updatedExtValue; - if (!this.behaviourType === 'edit' || _.isEmpty(this.editableData) || _.isEmpty(this.externalValue())) { + if (!(this.behaviourType === 'edit') || _.isEmpty(this.editableData) || _.isEmpty(this.externalValue())) { return; } diff --git a/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js b/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js index 3402d1d1df03..08f67955976c 100644 --- a/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js +++ b/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js @@ -1067,6 +1067,16 @@ define([ return new RegExp(param).test(value); }, $.mage.__('This link is not allowed.') + ], + 'validate-dob': [ + function (value) { + if (value === '') { + return true; + } + + return moment(value).isBefore(moment()); + }, + $.mage.__('The Date of Birth should not be greater than today.') ] }, function (data) { return { diff --git a/app/code/Magento/Wishlist/Setup/Patch/Schema/AddProductIdConstraint.php b/app/code/Magento/Wishlist/Setup/Patch/Schema/AddProductIdConstraint.php deleted file mode 100644 index 5c65fce10ccd..000000000000 --- a/app/code/Magento/Wishlist/Setup/Patch/Schema/AddProductIdConstraint.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Wishlist\Setup\Patch\Schema; - -use Magento\Framework\DB\Adapter\AdapterInterface; -use Magento\Framework\Setup\Patch\SchemaPatchInterface; -use Magento\Framework\Setup\SchemaSetupInterface; - -/** - * Class AddProductIdConstraint - */ -class AddProductIdConstraint implements SchemaPatchInterface -{ - /** - * @var SchemaSetupInterface - */ - private $schemaSetup; - - /** - * @param SchemaSetupInterface $schemaSetup - */ - public function __construct( - SchemaSetupInterface $schemaSetup - ) { - $this->schemaSetup = $schemaSetup; - } - - /** - * Run code inside patch. - * - * @return void - */ - public function apply() - { - $this->schemaSetup->startSetup(); - - $this->schemaSetup->getConnection()->addForeignKey( - $this->schemaSetup->getConnection()->getForeignKeyName( - $this->schemaSetup->getTable('wishlist_item_option'), - 'product_id', - $this->schemaSetup->getTable('catalog_product_entity'), - 'entity_id' - ), - $this->schemaSetup->getTable('wishlist_item_option'), - 'product_id', - $this->schemaSetup->getTable('catalog_product_entity'), - 'entity_id', - AdapterInterface::FK_ACTION_CASCADE, - true - ); - - $this->schemaSetup->endSetup(); - } - - /** - * Get array of patches that have to be executed prior to this. - * - * @return string[] - */ - public static function getDependencies() - { - return []; - } - - /** - * Get aliases (previous names) for the patch. - * - * @return string[] - */ - public function getAliases() - { - return []; - } -} diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductsFromWishlistUsingSidebarTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductsFromWishlistUsingSidebarTest.xml index e3382dc41d27..6c73cb6708ae 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductsFromWishlistUsingSidebarTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductsFromWishlistUsingSidebarTest.xml @@ -34,6 +34,11 @@ <deleteData createDataKey="categorySecond" stepKey="deleteCategorySecond"/> <deleteData createDataKey="customer" stepKey="deleteCustomer"/> </after> + + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <!-- Sign in as customer --> <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> <argument name="Customer" value="$$customer$$"/> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontUpdateWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontUpdateWishlistTest.xml index e482449f623f..b8a84a327b58 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontUpdateWishlistTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontUpdateWishlistTest.xml @@ -26,6 +26,10 @@ <createData entity="Simple_US_Customer" stepKey="customer"/> </before> + <!-- Perform reindex and flush cache --> + <magentoCLI command="indexer:reindex" stepKey="reindex"/> + <magentoCLI command="cache:flush" stepKey="flushCache"/> + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> <argument name="Customer" value="$$customer$$"/> </actionGroup> diff --git a/app/code/Magento/Wishlist/etc/db_schema.xml b/app/code/Magento/Wishlist/etc/db_schema.xml index e3f3024df45f..e430a1ee40ea 100644 --- a/app/code/Magento/Wishlist/etc/db_schema.xml +++ b/app/code/Magento/Wishlist/etc/db_schema.xml @@ -77,5 +77,9 @@ <constraint xsi:type="foreign" referenceId="FK_A014B30B04B72DD0EAB3EECD779728D6" table="wishlist_item_option" column="wishlist_item_id" referenceTable="wishlist_item" referenceColumn="wishlist_item_id" onDelete="CASCADE"/> + <constraint xsi:type="foreign" referenceId="WISHLIST_ITEM_OPTION_PRODUCT_ID_CATALOG_PRODUCT_ENTITY_ENTITY_ID" + table="wishlist_item_option" + column="product_id" referenceTable="catalog_product_entity" referenceColumn="entity_id" + onDelete="CASCADE"/> </table> </schema> diff --git a/app/design/adminhtml/Magento/backend/Magento_Banner/web/css/source/_module.less b/app/design/adminhtml/Magento/backend/Magento_Banner/web/css/source/_module.less index d9e2cfdd66bf..dd67220db12d 100644 --- a/app/design/adminhtml/Magento/backend/Magento_Banner/web/css/source/_module.less +++ b/app/design/adminhtml/Magento/backend/Magento_Banner/web/css/source/_module.less @@ -24,6 +24,7 @@ input[type='checkbox'].banner-content-checkbox { } .adminhtml-widget_instance-edit, +.adminhtml-cms_page-edit, .adminhtml-banner-edit { .admin__fieldset { .admin__field-control { diff --git a/app/design/adminhtml/Magento/backend/Magento_ConfigurableProduct/web/css/source/module/components/_currency-addon.less b/app/design/adminhtml/Magento/backend/Magento_ConfigurableProduct/web/css/source/module/components/_currency-addon.less index 659b1fa811db..fa158589feb9 100644 --- a/app/design/adminhtml/Magento/backend/Magento_ConfigurableProduct/web/css/source/module/components/_currency-addon.less +++ b/app/design/adminhtml/Magento/backend/Magento_ConfigurableProduct/web/css/source/module/components/_currency-addon.less @@ -22,10 +22,10 @@ position: relative; display: -webkit-inline-flex; display: -ms-inline-flexbox; + display: inline-flex; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; - display: inline-flex; flex-flow: row nowrap; width: 100%; diff --git a/app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/_order.less b/app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/_order.less index ffa5ee963952..a33c1fac083f 100644 --- a/app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/_order.less +++ b/app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/_order.less @@ -308,4 +308,23 @@ } } +// +// Create Order - Add Product Grid +// --------------------------------------------- + +#sales_order_create_search_grid { + .col-in_products { + .data-grid-checkbox-cell-inner { + position: relative; + } + .checkbox { + width: 1.6rem; + height: 1.6rem; + left: 0; + right: 0; + margin: auto; + } + } +} + // ToDo: MAGETWO-32299 UI: review the collapsible block diff --git a/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less b/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less index 525c61e8267a..ddc6aa42c23e 100644 --- a/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less +++ b/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less @@ -361,6 +361,11 @@ cursor: inherit; opacity: 1; outline: inherit; + .admin__action-multiselect-wrap { + .admin__action-multiselect { + .__form-control-pattern__disabled(); + } + } } &._hidden { diff --git a/app/design/adminhtml/Magento/backend/web/css/styles-old.less b/app/design/adminhtml/Magento/backend/web/css/styles-old.less index 44fca79c31be..b2afde435a62 100644 --- a/app/design/adminhtml/Magento/backend/web/css/styles-old.less +++ b/app/design/adminhtml/Magento/backend/web/css/styles-old.less @@ -4070,6 +4070,21 @@ } } +.adminhtml-email_template-preview { + .cms-revision-preview { + padding-top: 56.25%; + position: relative; + + #preview_iframe { + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; + } + } +} + .admin__scope-old { .buttons-set { margin: 0 0 15px; diff --git a/dev/tests/acceptance/tests/_data/tablerates.csv b/dev/tests/acceptance/tests/_data/tablerates.csv new file mode 100644 index 000000000000..ddc591798e3c --- /dev/null +++ b/dev/tests/acceptance/tests/_data/tablerates.csv @@ -0,0 +1,21 @@ +Country,Region/State,Zip/Postal Code,Weight (and above),Shipping Price +ASM,*,*,0,9.95 +FSM,*,*,0,9.95 +GUM,*,*,0,9.95 +MHL,*,*,0,9.95 +MNP,*,*,0,9.95 +PLW,*,*,0,9.95 +USA,AA,*,0,9.95 +USA,AE,*,0,9.95 +USA,AK,*,0,9.95 +USA,AP,*,0,9.95 +USA,AS,*,0,9.95 +USA,FM,*,0,9.95 +USA,GU,*,0,9.95 +USA,HI,*,0,9.95 +USA,MH,*,0,9.95 +USA,MP,*,0,9.95 +USA,PR,*,0,9.95 +USA,PW,*,0,9.95 +USA,VI,*,0,9.95 +VIR,*,*,0,9.95 \ No newline at end of file diff --git a/dev/tests/acceptance/tests/_data/usa_tablerates.csv b/dev/tests/acceptance/tests/_data/usa_tablerates.csv new file mode 100644 index 000000000000..d5a59ae6bccf --- /dev/null +++ b/dev/tests/acceptance/tests/_data/usa_tablerates.csv @@ -0,0 +1,13 @@ +Country,Region/State,"Zip/Postal Code","Order Subtotal (and above)","Shipping Price" +USA,*,*,0.0000,7.9900 +USA,*,*,7.0000,6.9900 +USA,*,*,13.0000,5.9900 +USA,*,*,25.9900,4.9900 +USA,AK,*,0.0000,8.9900 +USA,AK,*,7.0000,7.9900 +USA,AK,*,13.0000,6.9900 +USA,AK,*,25.9900,5.9900 +USA,HI,*,0.0000,8.9900 +USA,HI,*,7.0000,7.9900 +USA,HI,*,13.0000,6.9900 +USA,HI,*,25.9900,5.9900 diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProductCatalogSearch/Test/EndToEndB2CGuestUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProductCatalogSearch/Test/EndToEndB2CGuestUserTest.xml index f0bfec543f28..cac9d0c3cb55 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProductCatalogSearch/Test/EndToEndB2CGuestUserTest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProductCatalogSearch/Test/EndToEndB2CGuestUserTest.xml @@ -27,4 +27,23 @@ <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="searchGrabConfigProductPageImageSrc" after="searchAssertConfigProductPage"/> <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$searchGrabConfigProductPageImageSrc" stepKey="searchAssertConfigProductPageImageNotDefault" after="searchGrabConfigProductPageImageSrc"/> </test> + <test name="EndToEndB2CGuestUserMysqlTest"> + <!-- Search configurable product --> + <comment userInput="Search configurable product" stepKey="commentSearchConfigurableProduct" after="searchAssertSimpleProduct2ImageNotDefault" /> + <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="searchAssertFilterCategoryConfigProduct" after="commentSearchConfigurableProduct"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByName($$createConfigProduct.name$$)}}" userInput="src" stepKey="searchGrabConfigProductImageSrc" after="searchAssertFilterCategoryConfigProduct"/> + <assertNotRegExp expected="'/placeholder\/small_image\.jpg/'" actual="$searchGrabConfigProductImageSrc" stepKey="searchAssertConfigProductImageNotDefault" after="searchGrabConfigProductImageSrc"/> + <click selector="{{StorefrontCategoryProductSection.ProductTitleByName($$createConfigProduct.name$$)}}" stepKey="searchClickConfigProductView" after="searchAssertConfigProductImageNotDefault"/> + <actionGroup ref="StorefrontCheckConfigurableProduct" stepKey="searchAssertConfigProductPage" after="searchClickConfigProductView"> + <argument name="product" value="$$createConfigProduct$$"/> + <argument name="optionProduct" value="$$createConfigChildProduct1$$"/> + </actionGroup> + <!-- @TODO: Move Image check to action group after MQE-697 is fixed --> + <grabAttributeFrom selector="{{StorefrontProductInfoMainSection.productImage}}" userInput="src" stepKey="searchGrabConfigProductPageImageSrc" after="searchAssertConfigProductPage"/> + <assertNotRegExp expected="'/placeholder\/image\.jpg/'" actual="$searchGrabConfigProductPageImageSrc" stepKey="searchAssertConfigProductPageImageNotDefault" after="searchGrabConfigProductPageImageSrc"/> + </test> </tests> diff --git a/dev/tests/api-functional/_files/Magento/TestModuleCatalogSearch/etc/module.xml b/dev/tests/api-functional/_files/Magento/TestModuleCatalogSearch/etc/module.xml new file mode 100644 index 000000000000..bae0739d237e --- /dev/null +++ b/dev/tests/api-functional/_files/Magento/TestModuleCatalogSearch/etc/module.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> + <module name="Magento_TestModuleCatalogSearch"> + <sequence> + <module name="Magento_CatalogSearch"/> + </sequence> + </module> +</config> diff --git a/dev/tests/api-functional/_files/Magento/TestModuleCatalogSearch/registration.php b/dev/tests/api-functional/_files/Magento/TestModuleCatalogSearch/registration.php new file mode 100644 index 000000000000..78fb97a9e113 --- /dev/null +++ b/dev/tests/api-functional/_files/Magento/TestModuleCatalogSearch/registration.php @@ -0,0 +1,12 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +use Magento\Framework\Component\ComponentRegistrar; + +$registrar = new ComponentRegistrar(); +if ($registrar->getPath(ComponentRegistrar::MODULE, 'Magento_TestModuleCatalogSearch') === null) { + ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModuleCatalogSearch', __DIR__); +} diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php b/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php index a5be49303283..8061cb138660 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/Annotation/ApiConfigFixture.php @@ -10,6 +10,7 @@ use Magento\Config\Model\Config; use Magento\Config\Model\ResourceModel\Config as ConfigResource; use Magento\Config\Model\ResourceModel\Config\Data\CollectionFactory; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\TestFramework\Helper\Bootstrap; use Magento\Store\Model\StoreManagerInterface; use PHPUnit\Framework\TestCase; @@ -156,4 +157,31 @@ private function getStoreIdByCode(string $storeCode): int $store = $storeManager->getStore($storeCode); return (int)$store->getId(); } + + /** + * @inheritDoc + */ + protected function _setConfigValue($configPath, $value, $storeCode = false) + { + $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + if ($storeCode === false) { + $objectManager->get( + \Magento\TestFramework\App\ApiMutableScopeConfig::class + )->setValue( + $configPath, + $value, + ScopeConfigInterface::SCOPE_TYPE_DEFAULT + ); + + return; + } + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + \Magento\TestFramework\App\ApiMutableScopeConfig::class + )->setValue( + $configPath, + $value, + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + $storeCode + ); + } } diff --git a/dev/tests/api-functional/framework/Magento/TestFramework/App/MutableScopeConfig.php b/dev/tests/api-functional/framework/Magento/TestFramework/App/ApiMutableScopeConfig.php similarity index 86% rename from dev/tests/api-functional/framework/Magento/TestFramework/App/MutableScopeConfig.php rename to dev/tests/api-functional/framework/Magento/TestFramework/App/ApiMutableScopeConfig.php index efcb5be34e59..fa0cebece9a9 100644 --- a/dev/tests/api-functional/framework/Magento/TestFramework/App/MutableScopeConfig.php +++ b/dev/tests/api-functional/framework/Magento/TestFramework/App/ApiMutableScopeConfig.php @@ -17,7 +17,7 @@ /** * @inheritdoc */ -class MutableScopeConfig implements MutableScopeConfigInterface +class ApiMutableScopeConfig implements MutableScopeConfigInterface { /** * @var Config @@ -56,7 +56,6 @@ public function setValue( /** * Clean app config cache * - * @param string|null $type * @return void */ public function clean() @@ -89,19 +88,13 @@ private function getTestAppConfig() private function persistConfig($path, $value, $scopeType, $scopeCode): void { $pathParts = explode('/', $path); - $store = ''; - if ($scopeType === \Magento\Store\Model\ScopeInterface::SCOPE_STORE) { - if ($scopeCode !== null) { - $store = ObjectManager::getInstance() + $store = 0; + if ($scopeType === \Magento\Store\Model\ScopeInterface::SCOPE_STORE + && $scopeCode !== null) { + $store = ObjectManager::getInstance() ->get(\Magento\Store\Api\StoreRepositoryInterface::class) ->get($scopeCode) ->getId(); - } else { - $store = ObjectManager::getInstance() - ->get(\Magento\Store\Model\StoreManagerInterface::class) - ->getStore() - ->getId(); - } } $configData = [ 'section' => $pathParts[0], diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeMediaGalleryManagementInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeMediaGalleryManagementInterfaceTest.php index 9a6520a3ab45..1cd299149507 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeMediaGalleryManagementInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductAttributeMediaGalleryManagementInterfaceTest.php @@ -4,16 +4,23 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Catalog\Api; use Magento\Framework\Api\Data\ImageContentInterface; use Magento\TestFramework\Helper\Bootstrap; +use Magento\Catalog\Model\ProductFactory; +use Magento\TestFramework\ObjectManager; +use Magento\Catalog\Model\Product\Attribute\Backend\Media\ImageEntryConverter; +use Magento\Catalog\Model\ProductRepository; +use Magento\Framework\Webapi\Rest\Request; +use Magento\TestFramework\TestCase\WebapiAbstract; /** * Class ProductAttributeMediaGalleryManagementInterfaceTest */ -class ProductAttributeMediaGalleryManagementInterfaceTest extends \Magento\TestFramework\TestCase\WebapiAbstract +class ProductAttributeMediaGalleryManagementInterfaceTest extends WebapiAbstract { /** * Default create service request information (product with SKU 'simple' is used) @@ -41,12 +48,15 @@ class ProductAttributeMediaGalleryManagementInterfaceTest extends \Magento\TestF */ protected $testImagePath; + /** + * @inheritDoc + */ protected function setUp() { $this->createServiceInfo = [ 'rest' => [ 'resourcePath' => '/V1/products/simple/media', - 'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_POST, + 'httpMethod' => Request::HTTP_METHOD_POST, ], 'soap' => [ 'service' => 'catalogProductAttributeMediaGalleryManagementV1', @@ -58,7 +68,7 @@ protected function setUp() $this->updateServiceInfo = [ 'rest' => [ 'resourcePath' => '/V1/products/simple/media', - 'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_PUT, + 'httpMethod' => Request::HTTP_METHOD_PUT, ], 'soap' => [ 'service' => 'catalogProductAttributeMediaGalleryManagementV1', @@ -66,9 +76,10 @@ protected function setUp() 'operation' => 'catalogProductAttributeMediaGalleryManagementV1Update', ], ]; + $this->deleteServiceInfo = [ 'rest' => [ - 'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_DELETE, + 'httpMethod' => Request::HTTP_METHOD_DELETE, ], 'soap' => [ 'service' => 'catalogProductAttributeMediaGalleryManagementV1', @@ -76,6 +87,7 @@ protected function setUp() 'operation' => 'catalogProductAttributeMediaGalleryManagementV1Remove', ], ]; + $this->testImagePath = __DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'test_image.jpg'; } @@ -87,7 +99,8 @@ protected function setUp() protected function getTargetSimpleProduct() { $objectManager = Bootstrap::getObjectManager(); - return $objectManager->get(\Magento\Catalog\Model\ProductFactory::class)->create()->load(1); + + return $objectManager->get(ProductFactory::class)->create()->load(1); } /** @@ -101,17 +114,20 @@ protected function getTargetGalleryEntryId() { $mediaGallery = $this->getTargetSimpleProduct()->getData('media_gallery'); $image = array_shift($mediaGallery['images']); + return (int)$image['value_id']; } /** + * Test create() method + * * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php */ public function testCreate() { $requestData = [ 'id' => null, - 'media_type' => \Magento\Catalog\Model\Product\Attribute\Backend\Media\ImageEntryConverter::MEDIA_TYPE_CODE, + 'media_type' => ImageEntryConverter::MEDIA_TYPE_CODE, 'label' => 'Image Text', 'position' => 1, 'types' => ['image'], @@ -138,13 +154,15 @@ public function testCreate() } /** + * Test create() method without file + * * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php */ public function testCreateWithoutFileExtension() { $requestData = [ 'id' => null, - 'media_type' => \Magento\Catalog\Model\Product\Attribute\Backend\Media\ImageEntryConverter::MEDIA_TYPE_CODE, + 'media_type' => ImageEntryConverter::MEDIA_TYPE_CODE, 'label' => 'Image Text', 'position' => 1, 'types' => ['image'], @@ -171,13 +189,15 @@ public function testCreateWithoutFileExtension() } /** + * Test create() method with not default store id + * * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php */ public function testCreateWithNotDefaultStoreId() { $requestData = [ 'id' => null, - 'media_type' => \Magento\Catalog\Model\Product\Attribute\Backend\Media\ImageEntryConverter::MEDIA_TYPE_CODE, + 'media_type' => ImageEntryConverter::MEDIA_TYPE_CODE, 'label' => 'Image Text', 'position' => 1, 'types' => ['image'], @@ -215,6 +235,8 @@ public function testCreateWithNotDefaultStoreId() } /** + * Test update() method + * * @magentoApiDataFixture Magento/Catalog/_files/product_with_image.php */ public function testUpdate() @@ -253,6 +275,8 @@ public function testUpdate() } /** + * Test update() method with not default store id + * * @magentoApiDataFixture Magento/Catalog/_files/product_with_image.php */ public function testUpdateWithNotDefaultStoreId() @@ -291,7 +315,9 @@ public function testUpdateWithNotDefaultStoreId() } /** - * @magentoApiDataFixture Magento/Catalog/_files/product_with_image.php + * Test delete() method + * + * @magentoApiDataFixture Magento/Catalog/_files/product_with_image_without_types.php */ public function testDelete() { @@ -309,6 +335,8 @@ public function testDelete() } /** + * Test create() method if provided content is not base64 encoded + * * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php * @expectedException \Exception * @expectedExceptionMessage The image content must be valid base64 encoded data. @@ -334,6 +362,8 @@ public function testCreateThrowsExceptionIfProvidedContentIsNotBase64Encoded() } /** + * Test create() method if provided content is not an image + * * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php * @expectedException \Exception * @expectedExceptionMessage The image content must be valid base64 encoded data. @@ -359,6 +389,8 @@ public function testCreateThrowsExceptionIfProvidedContentIsNotAnImage() } /** + * Test create() method if provided image has wrong MIME type + * * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php * @expectedException \Exception * @expectedExceptionMessage The image MIME type is not valid or not supported. @@ -384,6 +416,8 @@ public function testCreateThrowsExceptionIfProvidedImageHasWrongMimeType() } /** + * Test create method if target product does not exist + * * @expectedException \Exception * @expectedExceptionMessage The product that was requested doesn't exist. Verify the product and try again. */ @@ -409,6 +443,8 @@ public function testCreateThrowsExceptionIfTargetProductDoesNotExist() } /** + * Test create() method if provided image name contains forbidden characters + * * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php * @expectedException \Exception * @expectedExceptionMessage Provided image name contains forbidden characters. @@ -433,6 +469,8 @@ public function testCreateThrowsExceptionIfProvidedImageNameContainsForbiddenCha } /** + * Test update() method if target product does not exist + * * @expectedException \Exception * @expectedExceptionMessage The product that was requested doesn't exist. Verify the product and try again. */ @@ -456,6 +494,8 @@ public function testUpdateThrowsExceptionIfTargetProductDoesNotExist() } /** + * Test update() method if there is no image with given id + * * @magentoApiDataFixture Magento/Catalog/_files/product_with_image.php * @expectedException \Exception * @expectedExceptionMessage No image with the provided ID was found. Verify the ID and try again. @@ -481,6 +521,8 @@ public function testUpdateThrowsExceptionIfThereIsNoImageWithGivenId() } /** + * Test delete() method if target product does not exist + * * @expectedException \Exception * @expectedExceptionMessage The product that was requested doesn't exist. Verify the product and try again. */ @@ -496,6 +538,8 @@ public function testDeleteThrowsExceptionIfTargetProductDoesNotExist() } /** + * Test delete() method if there is no image with given id + * * @magentoApiDataFixture Magento/Catalog/_files/product_with_image.php * @expectedException \Exception * @expectedExceptionMessage No image with the provided ID was found. Verify the ID and try again. @@ -512,15 +556,17 @@ public function testDeleteThrowsExceptionIfThereIsNoImageWithGivenId() } /** + * Test get() method + * * @magentoApiDataFixture Magento/Catalog/_files/product_with_image.php */ public function testGet() { $productSku = 'simple'; - $objectManager = \Magento\TestFramework\ObjectManager::getInstance(); - /** @var \Magento\Catalog\Model\ProductRepository $repository */ - $repository = $objectManager->create(\Magento\Catalog\Model\ProductRepository::class); + $objectManager = ObjectManager::getInstance(); + /** @var ProductRepository $repository */ + $repository = $objectManager->create(ProductRepository::class); $product = $repository->get($productSku); $image = current($product->getMediaGallery('images')); $imageId = $image['value_id']; @@ -537,7 +583,7 @@ public function testGet() $serviceInfo = [ 'rest' => [ 'resourcePath' => '/V1/products/' . $productSku . '/media/' . $imageId, - 'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_GET, + 'httpMethod' => Request::HTTP_METHOD_GET, ], 'soap' => [ 'service' => 'catalogProductAttributeMediaGalleryManagementV1', @@ -560,6 +606,8 @@ public function testGet() } /** + * Test getList() method + * * @magentoApiDataFixture Magento/Catalog/_files/product_with_image.php */ public function testGetList() @@ -568,7 +616,7 @@ public function testGetList() $serviceInfo = [ 'rest' => [ 'resourcePath' => '/V1/products/' . urlencode($productSku) . '/media', - 'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_GET, + 'httpMethod' => Request::HTTP_METHOD_GET, ], 'soap' => [ 'service' => 'catalogProductAttributeMediaGalleryManagementV1', @@ -591,13 +639,16 @@ public function testGetList() $this->assertContains('thumbnail', $imageTypes); } + /** + * Test getList() method for absent sku + */ public function testGetListForAbsentSku() { $productSku = 'absent_sku_' . time(); $serviceInfo = [ 'rest' => [ 'resourcePath' => '/V1/products/' . urlencode($productSku) . '/media', - 'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_GET, + 'httpMethod' => Request::HTTP_METHOD_GET, ], 'soap' => [ 'service' => 'catalogProductAttributeMediaGalleryManagementV1', @@ -622,6 +673,8 @@ public function testGetListForAbsentSku() } /** + * Test addProductVideo() method + * * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php */ public function testAddProductVideo() diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryInterfaceTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryInterfaceTest.php index 3e935e1d7ae9..5eaa8f68611b 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryInterfaceTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryInterfaceTest.php @@ -24,6 +24,8 @@ use Magento\Framework\Webapi\Exception as HTTPExceptionCodes; /** + * Test for \Magento\Catalog\Api\ProductRepositoryInterface + * * @magentoAppIsolation enabled * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ @@ -56,6 +58,8 @@ class ProductRepositoryInterfaceTest extends WebapiAbstract ]; /** + * Test get() method + * * @magentoApiDataFixture Magento/Catalog/_files/products_related.php */ public function testGet() @@ -69,6 +73,8 @@ public function testGet() } /** + * Get product + * * @param string $sku * @param string|null $storeCode * @return array|bool|float|int|string @@ -86,11 +92,14 @@ protected function getProduct($sku, $storeCode = null) 'operation' => self::SERVICE_NAME . 'Get', ], ]; - $response = $this->_webApiCall($serviceInfo, ['sku' => $sku], null, $storeCode); + return $response; } + /** + * Test get() method with invalid sku + */ public function testGetNoSuchEntityException() { $invalidSku = '(nonExistingSku)'; @@ -125,6 +134,8 @@ public function testGetNoSuchEntityException() } /** + * Product creation provider + * * @return array */ public function productCreationProvider() @@ -135,6 +146,7 @@ public function productCreationProvider() $data ); }; + return [ [$productBuilder([ProductInterface::TYPE_ID => 'simple', ProductInterface::SKU => 'psku-test-1'])], [$productBuilder([ProductInterface::TYPE_ID => 'virtual', ProductInterface::SKU => 'psku-test-2'])], @@ -161,6 +173,7 @@ private function loadWebsiteByCode($websiteCode) /** * Test removing association between product and website 1 + * * @magentoApiDataFixture Magento/Catalog/_files/product_with_two_websites.php */ public function testUpdateWithDeleteWebsites() @@ -184,6 +197,7 @@ public function testUpdateWithDeleteWebsites() /** * Test removing all website associations + * * @magentoApiDataFixture Magento/Catalog/_files/product_with_two_websites.php */ public function testDeleteAllWebsiteAssociations() @@ -202,6 +216,8 @@ public function testDeleteAllWebsiteAssociations() } /** + * Test create() method with multiple websites + * * @magentoApiDataFixture Magento/Catalog/_files/second_website.php */ public function testCreateWithMultipleWebsites() @@ -305,6 +321,8 @@ public function testUpdateWithoutWebsiteIds() } /** + * Test create() method + * * @dataProvider productCreationProvider */ public function testCreate($product) @@ -372,6 +390,9 @@ public function testCreateAllStoreCodeForSingleWebsite($fixtureProduct) $this->deleteProduct($fixtureProduct[ProductInterface::SKU]); } + /** + * Test create() method with invalid price format + */ public function testCreateInvalidPriceFormat() { $this->_markTestAsRestOnly("In case of SOAP type casting is handled by PHP SoapServer, no need to test it"); @@ -408,6 +429,9 @@ public function testDeleteAllStoreCode($fixtureProduct) $this->getProduct($sku); } + /** + * Test product links + */ public function testProductLinks() { // Create simple product @@ -441,7 +465,6 @@ public function testProductLinks() ProductInterface::TYPE_ID => 'simple', ProductInterface::PRICE => 100, ProductInterface::STATUS => 1, - ProductInterface::TYPE_ID => 'simple', ProductInterface::ATTRIBUTE_SET_ID => 4, "product_links" => [$productLinkData] ]; @@ -504,6 +527,8 @@ public function testProductLinks() } /** + * Get options data + * * @param string $productSku * @return array */ @@ -543,6 +568,9 @@ protected function getOptionsData($productSku) ]; } + /** + * Test product options + */ public function testProductOptions() { //Create product with options @@ -604,6 +632,9 @@ public function testProductOptions() $this->deleteProduct($productData[ProductInterface::SKU]); } + /** + * Test product with media gallery + */ public function testProductWithMediaGallery() { $testImagePath = __DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'test_image.jpg'; @@ -635,7 +666,7 @@ public function testProductWithMediaGallery() 'position' => 2, 'media_type' => 'image', 'disabled' => false, - 'types' => ['image', 'small_image'], + 'types' => [], 'file' => '/t/i/' . $filename2, ], ]; @@ -648,7 +679,7 @@ public function testProductWithMediaGallery() 'label' => 'tiny1_new_label', 'position' => 1, 'disabled' => false, - 'types' => ['image', 'small_image'], + 'types' => [], 'file' => '/t/i/' . $filename1, ], ]; @@ -662,7 +693,7 @@ public function testProductWithMediaGallery() 'media_type' => 'image', 'position' => 1, 'disabled' => false, - 'types' => ['image', 'small_image'], + 'types' => [], 'file' => '/t/i/' . $filename1, ] ]; @@ -682,6 +713,8 @@ public function testProductWithMediaGallery() } /** + * Test update() method + * * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php */ public function testUpdate() @@ -725,13 +758,16 @@ public function testUpdateWithExtensionAttributes(): void } /** + * Update product + * * @param array $product * @return array|bool|float|int|string */ protected function updateProduct($product) { if (isset($product['custom_attributes'])) { - for ($i=0; $i<sizeof($product['custom_attributes']); $i++) { + $countOfProductCustomAttributes = sizeof($product['custom_attributes']); + for ($i = 0; $i < $countOfProductCustomAttributes; $i++) { if ($product['custom_attributes'][$i]['attribute_code'] == 'category_ids' && !is_array($product['custom_attributes'][$i]['value']) ) { @@ -761,6 +797,8 @@ protected function updateProduct($product) } /** + * Test delete() method + * * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php */ public function testDelete() @@ -770,6 +808,8 @@ public function testDelete() } /** + * Test getList() method + * * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php */ public function testGetList() @@ -832,6 +872,8 @@ public function testGetList() } /** + * Test getList() method with additional params + * * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php */ public function testGetListWithAdditionalParams() @@ -871,6 +913,8 @@ public function testGetListWithAdditionalParams() } /** + * Test getList() method with filtering by website + * * @magentoApiDataFixture Magento/Catalog/_files/products_with_websites_and_stores.php * @return void */ @@ -958,6 +1002,11 @@ public function testGetListWithFilteringByStore(array $searchCriteria, array $sk } } + /** + * Test getList() method with filtering by store data provider + * + * @return array + */ public function testGetListWithFilteringByStoreDataProvider() { return [ @@ -997,6 +1046,8 @@ public function testGetListWithFilteringByStoreDataProvider() } /** + * Test getList() method with multiple filter groups and sorting and pagination + * * @magentoApiDataFixture Magento/Catalog/_files/products_for_search.php */ public function testGetListWithMultipleFilterGroupsAndSortingAndPagination() @@ -1066,6 +1117,8 @@ public function testGetListWithMultipleFilterGroupsAndSortingAndPagination() } /** + * Convert custom attributes to associative array + * * @param $customAttributes * @return array */ @@ -1075,10 +1128,13 @@ protected function convertCustomAttributesToAssociativeArray($customAttributes) foreach ($customAttributes as $customAttribute) { $converted[$customAttribute['attribute_code']] = $customAttribute['value']; } + return $converted; } /** + * Convert associative array to custom attributes + * * @param $data * @return array */ @@ -1088,10 +1144,13 @@ protected function convertAssociativeArrayToCustomAttributes($data) foreach ($data as $attributeCode => $attributeValue) { $customAttributes[] = ['attribute_code' => $attributeCode, 'value' => $attributeValue]; } + return $customAttributes; } /** + * Test eav attributes + * * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php */ public function testEavAttributes() @@ -1135,7 +1194,6 @@ protected function getSimpleProductData($productData = []) ProductInterface::TYPE_ID => 'simple', ProductInterface::PRICE => 3.62, ProductInterface::STATUS => 1, - ProductInterface::TYPE_ID => 'simple', ProductInterface::ATTRIBUTE_SET_ID => 4, 'custom_attributes' => [ ['attribute_code' => 'cost', 'value' => ''], @@ -1145,6 +1203,8 @@ protected function getSimpleProductData($productData = []) } /** + * Save Product + * * @param $product * @param string|null $storeCode * @return mixed @@ -1152,7 +1212,8 @@ protected function getSimpleProductData($productData = []) protected function saveProduct($product, $storeCode = null) { if (isset($product['custom_attributes'])) { - for ($i=0; $i<sizeof($product['custom_attributes']); $i++) { + $countOfProductCustomAttributes = sizeof($product['custom_attributes']); + for ($i = 0; $i < $countOfProductCustomAttributes; $i++) { if ($product['custom_attributes'][$i]['attribute_code'] == 'category_ids' && !is_array($product['custom_attributes'][$i]['value']) ) { @@ -1172,6 +1233,7 @@ protected function saveProduct($product, $storeCode = null) ], ]; $requestData = ['product' => $product]; + return $this->_webApiCall($serviceInfo, $requestData, null, $storeCode); } @@ -1199,6 +1261,9 @@ protected function deleteProduct($sku) $this->_webApiCall($serviceInfo, ['sku' => $sku]) : $this->_webApiCall($serviceInfo); } + /** + * Test tier prices + */ public function testTierPrices() { // create a product with tier prices @@ -1283,6 +1348,8 @@ public function testTierPrices() } /** + * Get stock item data + * * @return array */ private function getStockItemData() @@ -1315,6 +1382,8 @@ private function getStockItemData() } /** + * Test product category links + * * @magentoApiDataFixture Magento/Catalog/_files/category_product.php */ public function testProductCategoryLinks() @@ -1337,6 +1406,8 @@ public function testProductCategoryLinks() } /** + * Test update product category without categories + * * @magentoApiDataFixture Magento/Catalog/_files/category_product.php */ public function testUpdateProductCategoryLinksNullOrNotExists() @@ -1358,6 +1429,8 @@ public function testUpdateProductCategoryLinksNullOrNotExists() } /** + * Test update product category links position + * * @magentoApiDataFixture Magento/Catalog/_files/category_product.php */ public function testUpdateProductCategoryLinksPosistion() @@ -1375,6 +1448,8 @@ public function testUpdateProductCategoryLinksPosistion() } /** + * Test update product category links unassing + * * @magentoApiDataFixture Magento/Catalog/_files/category_product.php */ public function testUpdateProductCategoryLinksUnassign() @@ -1387,6 +1462,8 @@ public function testUpdateProductCategoryLinksUnassign() } /** + * Get media gallery data + * * @param $filename1 * @param $encodedImage * @param $filename2 @@ -1412,7 +1489,7 @@ private function getMediaGalleryData($filename1, $encodedImage, $filename2) 'media_type' => 'image', 'disabled' => false, 'label' => 'tiny2', - 'types' => ['image', 'small_image'], + 'types' => [], 'content' => [ 'type' => 'image/jpeg', 'name' => $filename2, @@ -1422,6 +1499,9 @@ private function getMediaGalleryData($filename1, $encodedImage, $filename2) ]; } + /** + * Test special price + */ public function testSpecialPrice() { $productData = $this->getSimpleProductData(); @@ -1471,6 +1551,9 @@ public function testResetSpecialPrice() $this->assertFalse(array_key_exists(self::KEY_SPECIAL_PRICE, $customAttributes)); } + /** + * Test update status + */ public function testUpdateStatus() { // Create simple product @@ -1543,6 +1626,8 @@ public function testUpdateMultiselectAttributes() } /** + * Get attribute options + * * @param string $attributeCode * @return array|bool|float|int|string */ @@ -1564,6 +1649,8 @@ private function getAttributeOptions($attributeCode) } /** + * Assert multiselect value + * * @param string $productSku * @param string $multiselectAttributeCode * @param string $expectedMultiselectValue diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/CreateBraintreeClientTokenTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/CreateBraintreeClientTokenTest.php index 1564d00fa599..7d69c49ae6aa 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/CreateBraintreeClientTokenTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/CreateBraintreeClientTokenTest.php @@ -20,6 +20,7 @@ class CreateBraintreeClientTokenTest extends GraphQlAbstract * @magentoConfigFixture default_store payment/braintree/active 1 * @magentoConfigFixture default_store payment/braintree/environment sandbox * @magentoConfigFixture default_store payment/braintree/merchant_id def_merchant_id + * @magentoConfigFixture default_store payment/braintree/merchant_account_id def_merchant_id * @magentoConfigFixture default_store payment/braintree/public_key def_public_key * @magentoConfigFixture default_store payment/braintree/private_key def_private_key */ diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/Customer/SetPaymentMethodTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/Customer/SetPaymentMethodTest.php index 269442368795..ad756dfdd2e4 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/Customer/SetPaymentMethodTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Braintree/Customer/SetPaymentMethodTest.php @@ -8,6 +8,7 @@ namespace Magento\GraphQl\Braintree\Customer; use Magento\Braintree\Gateway\Command\GetPaymentNonceCommand; +use Magento\Framework\Exception\AuthenticationException; use Magento\Framework\Registry; use Magento\GraphQl\Quote\GetMaskedQuoteIdByReservedOrderId; use Magento\Integration\Api\CustomerTokenServiceInterface; @@ -261,6 +262,34 @@ public function testSetPaymentMethodInvalidMethodInput(string $methodCode) $this->graphQlMutation($setPaymentQuery, [], '', $this->getHeaderMap()); } + /** + * @magentoConfigFixture default_store carriers/flatrate/active 1 + * @magentoConfigFixture default_store payment/braintree/active 1 + * @magentoConfigFixture default_store payment/braintree_cc_vault/active 1 + * @magentoConfigFixture default_store payment/braintree/environment sandbox + * @magentoConfigFixture default_store payment/braintree/merchant_id def_merchant_id + * @magentoConfigFixture default_store payment/braintree/public_key def_public_key + * @magentoConfigFixture default_store payment/braintree/private_key def_private_key + * @magentoApiDataFixture Magento/Customer/_files/customer.php + * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php + * @dataProvider dataProviderTestSetPaymentMethodInvalidInput + * @expectedException \Exception + */ + public function testSetPaymentMethodWithoutRequiredPaymentMethodInput() + { + $reservedOrderId = 'test_quote'; + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute($reservedOrderId); + + $setPaymentQuery = $this->getSetPaymentBraintreeQueryInvalidPaymentMethodInput($maskedQuoteId); + $this->expectExceptionMessage("for \"braintree\" is missing."); + $this->graphQlMutation($setPaymentQuery, [], '', $this->getHeaderMap()); + } + public function dataProviderTestSetPaymentMethodInvalidInput(): array { return [ @@ -371,6 +400,33 @@ private function getSetPaymentBraintreeQueryInvalidInput(string $maskedQuoteId, QUERY; } + /** + * @param string $maskedQuoteId + * @return string + */ + private function getSetPaymentBraintreeQueryInvalidPaymentMethodInput(string $maskedQuoteId): string + { + return <<<QUERY +mutation { + setPaymentMethodOnCart(input:{ + cart_id:"{$maskedQuoteId}" + payment_method:{ + code:"braintree" + braintree:{ + payment_method_nonce:"fake-valid-nonce" + } + } + }) { + cart { + selected_payment_method { + code + } + } + } +} +QUERY; + } + /** * @param string $maskedQuoteId * @param string $methodCode @@ -437,7 +493,7 @@ private function getPaymentTokenQuery(): string * @param string $username * @param string $password * @return array - * @throws \Magento\Framework\Exception\AuthenticationException + * @throws AuthenticationException */ private function getHeaderMap(string $username = 'customer@example.com', string $password = 'password'): array { diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/StoreConfigTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/StoreConfigTest.php index 7a30023c89f7..0982007daaa4 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/StoreConfigTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/StoreConfigTest.php @@ -59,4 +59,50 @@ public function testGetStoreConfig() $this->assertEquals('asc', $response['storeConfig']['catalog_default_sort_by']); $this->assertEquals(2, $response['storeConfig']['root_category_id']); } + + /** + * @magentoApiDataFixture Magento/Store/_files/store.php + * @magentoConfigFixture catalog/seo/product_url_suffix global_test_product_suffix + * @magentoConfigFixture catalog/seo/category_url_suffix global_test_category_suffix + * @magentoConfigFixture catalog/seo/title_separator __ + * @magentoConfigFixture catalog/frontend/list_mode 3 + * @magentoConfigFixture catalog/frontend/grid_per_page_values 16 + * @magentoConfigFixture catalog/frontend/list_per_page_values 8 + * @magentoConfigFixture catalog/frontend/grid_per_page 16 + * @magentoConfigFixture catalog/frontend/list_per_page 8 + * @magentoConfigFixture catalog/frontend/default_sort_by asc + */ + public function testGetStoreConfigGlobal() + { + $query + = <<<QUERY +{ + storeConfig{ + product_url_suffix, + category_url_suffix, + title_separator, + list_mode, + grid_per_page_values, + list_per_page_values, + grid_per_page, + list_per_page, + catalog_default_sort_by, + root_category_id + } +} +QUERY; + $response = $this->graphQlQuery($query); + $this->assertArrayHasKey('storeConfig', $response); + + $this->assertEquals('global_test_product_suffix', $response['storeConfig']['product_url_suffix']); + $this->assertEquals('global_test_category_suffix', $response['storeConfig']['category_url_suffix']); + $this->assertEquals('__', $response['storeConfig']['title_separator']); + $this->assertEquals('3', $response['storeConfig']['list_mode']); + $this->assertEquals('16', $response['storeConfig']['grid_per_page_values']); + $this->assertEquals(16, $response['storeConfig']['grid_per_page']); + $this->assertEquals('8', $response['storeConfig']['list_per_page_values']); + $this->assertEquals(8, $response['storeConfig']['list_per_page']); + $this->assertEquals('asc', $response['storeConfig']['catalog_default_sort_by']); + $this->assertEquals(2, $response['storeConfig']['root_category_id']); + } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/CustomerDownloadableProduct/CustomerDownloadableProductTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/CustomerDownloadableProduct/CustomerDownloadableProductTest.php index 6b8aad83edac..d0ad772e9bb2 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/CustomerDownloadableProduct/CustomerDownloadableProductTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/CustomerDownloadableProduct/CustomerDownloadableProductTest.php @@ -63,6 +63,18 @@ public function testGuestCannotAccessDownloadableProducts() { $this->graphQlQuery($this->getQuery()); } + /** + * @magentoApiDataFixture Magento/Customer/_files/customer.php + * @magentoApiDataFixture Magento/Downloadable/_files/product_downloadable_with_download_limit.php + * @magentoApiDataFixture Magento/Downloadable/_files/customer_order_with_downloadable_product.php + */ + public function testRemainingDownloads() + { + $query = $this->getQuery(); + $response = $this->graphQlQuery($query, [], '', $this->getHeaderMap()); + self::assertArrayHasKey('remaining_downloads', $response['customerDownloadableProducts']['items'][0]); + self::assertEquals(100, $response['customerDownloadableProducts']['items'][0]['remaining_downloads']); + } /** * @magentoApiDataFixture Magento/Customer/_files/customer.php */ diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/CheckoutEndToEndTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/CheckoutEndToEndTest.php index 273799446a8e..ddf94fbcc1ed 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/CheckoutEndToEndTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/CheckoutEndToEndTest.php @@ -259,7 +259,6 @@ private function setBillingAddress(string $cartId): void telephone: "88776655" region: "TX" country_code: "US" - save_in_address_book: false } } } @@ -298,7 +297,6 @@ private function setShippingAddress(string $cartId): array postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } ] diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php index 16f6510dbfa2..771ce8391ec0 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php @@ -7,6 +7,9 @@ namespace Magento\GraphQl\Quote\Customer; +use Magento\Customer\Api\AddressRepositoryInterface; +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\GraphQl\Quote\GetMaskedQuoteIdByReservedOrderId; use Magento\Integration\Api\CustomerTokenServiceInterface; use Magento\Quote\Model\QuoteFactory; @@ -45,6 +48,19 @@ class SetBillingAddressOnCartTest extends GraphQlAbstract */ private $customerTokenService; + /** + * @var AddressRepositoryInterface + */ + private $customerAddressRepository; + /** + * @var SearchCriteriaBuilder + */ + private $searchCriteriaBuilder; + /** + * @var CustomerRepositoryInterface + */ + private $customerRepository; + protected function setUp() { $objectManager = Bootstrap::getObjectManager(); @@ -53,6 +69,9 @@ protected function setUp() $this->quoteFactory = $objectManager->get(QuoteFactory::class); $this->quoteIdToMaskedId = $objectManager->get(QuoteIdToMaskedQuoteIdInterface::class); $this->customerTokenService = $objectManager->get(CustomerTokenServiceInterface::class); + $this->customerAddressRepository = $objectManager->get(AddressRepositoryInterface::class); + $this->searchCriteriaBuilder = $objectManager->get(SearchCriteriaBuilder::class); + $this->customerRepository = $objectManager->get(CustomerRepositoryInterface::class); } /** @@ -81,7 +100,6 @@ public function testSetNewBillingAddress() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } } @@ -140,7 +158,6 @@ public function testSetNewBillingAddressWithUseForShippingParameter() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } use_for_shipping: true } @@ -239,6 +256,42 @@ public function testSetBillingAddressFromAddressBook() $this->assertSavedBillingAddressFields($billingAddressResponse); } + /** + * @magentoApiDataFixture Magento/Customer/_files/customer.php + * @magentoApiDataFixture Magento/Customer/_files/customer_two_addresses.php + * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + */ + public function testVerifyBillingAddressType() + { + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); + + $query = <<<QUERY +mutation { + setBillingAddressOnCart( + input: { + cart_id: "$maskedQuoteId" + billing_address: { + customer_address_id: 1 + } + } + ) { + cart { + billing_address { + __typename + } + } + } +} +QUERY; + + $response = $this->graphQlMutation($query, [], '', $this->getHeaderMap()); + $billingAddress = $response['setBillingAddressOnCart']['cart']['billing_address']; + self::assertArrayHasKey('__typename', $billingAddress); + self::assertEquals('BillingCartAddress', $billingAddress['__typename']); + } + /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php @@ -301,7 +354,6 @@ public function testSetNewBillingAddressAndFromAddressBookAtSameTime() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } } @@ -383,7 +435,6 @@ public function testSetNewBillingAddressWithUseForShippingAndMultishipping() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } use_for_shipping: true } @@ -620,7 +671,6 @@ public function testSetNewBillingAddressWithRedundantStreetLine() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } } @@ -663,7 +713,6 @@ public function testSetBillingAddressWithLowerCaseCountry() postcode: "887766" country_code: "us" telephone: "88776655" - save_in_address_book: false } } } @@ -696,6 +745,140 @@ public function testSetBillingAddressWithLowerCaseCountry() $this->assertNewAddressFields($billingAddressResponse); } + /** + * @magentoApiDataFixture Magento/Customer/_files/customer.php + * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + */ + public function testSetNewBillingAddressWithSaveInAddressBook() + { + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); + $query = <<<QUERY +mutation { + setBillingAddressOnCart( + input: { + cart_id: "$maskedQuoteId" + billing_address: { + address: { + firstname: "test firstname" + lastname: "test lastname" + company: "test company" + street: ["test street 1", "test street 2"] + city: "test city" + region: "test region" + postcode: "887766" + country_code: "US" + telephone: "88776655" + save_in_address_book: true + } + } + } + ) { + cart { + billing_address { + firstname + lastname + company + street + city + postcode + telephone + country { + code + label + } + __typename + } + } + } +} +QUERY; + $response = $this->graphQlMutation($query, [], '', $this->getHeaderMap()); + $customer = $this->customerRepository->get('customer@example.com'); + $searchCriteria = $this->searchCriteriaBuilder->addFilter('parent_id', $customer->getId())->create(); + $addresses = $this->customerAddressRepository->getList($searchCriteria)->getItems(); + + self::assertCount(1, $addresses); + self::assertArrayHasKey('cart', $response['setBillingAddressOnCart']); + + $cartResponse = $response['setBillingAddressOnCart']['cart']; + self::assertArrayHasKey('billing_address', $cartResponse); + $billingAddressResponse = $cartResponse['billing_address']; + $this->assertNewAddressFields($billingAddressResponse); + + foreach ($addresses as $address) { + $this->customerAddressRepository->delete($address); + } + } + + /** + * @magentoApiDataFixture Magento/Customer/_files/customer.php + * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + */ + public function testSetNewBillingAddressWithNotSaveInAddressBook() + { + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); + $query = <<<QUERY +mutation { + setBillingAddressOnCart( + input: { + cart_id: "$maskedQuoteId" + billing_address: { + address: { + firstname: "test firstname" + lastname: "test lastname" + company: "test company" + street: ["test street 1", "test street 2"] + city: "test city" + region: "test region" + postcode: "887766" + country_code: "US" + telephone: "88776655" + save_in_address_book: false + } + } + } + ) { + cart { + billing_address { + firstname + lastname + company + street + city + postcode + telephone + country { + code + label + } + __typename + } + } + } +} +QUERY; + $response = $this->graphQlMutation($query, [], '', $this->getHeaderMap()); + $customer = $this->customerRepository->get('customer@example.com'); + $searchCriteria = $this->searchCriteriaBuilder->addFilter('parent_id', $customer->getId())->create(); + $addresses = $this->customerAddressRepository->getList($searchCriteria)->getItems(); + + self::assertCount(0, $addresses); + self::assertArrayHasKey('cart', $response['setBillingAddressOnCart']); + + $cartResponse = $response['setBillingAddressOnCart']['cart']; + self::assertArrayHasKey('billing_address', $cartResponse); + $billingAddressResponse = $cartResponse['billing_address']; + $this->assertNewAddressFields($billingAddressResponse); + + foreach ($addresses as $address) { + $this->customerAddressRepository->delete($address); + } + } + /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetPaymentMethodAndPlaceOrderTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetPaymentMethodAndPlaceOrderTest.php index 981b2af6a9a0..aff124c52230 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetPaymentMethodAndPlaceOrderTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetPaymentMethodAndPlaceOrderTest.php @@ -88,6 +88,70 @@ public function testSetPaymentOnCartWithSimpleProduct() self::assertArrayHasKey('order_number', $response['placeOrder']['order']); } + /** + * @magentoApiDataFixture Magento/Customer/_files/customer.php + * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_shipping_address.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_flatrate_shipping_method.php + * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/set_simple_product_out_of_stock.php + * + * @dataProvider dataProviderSetPaymentOnCartWithException + * @param string $input + * @param string $message + * @throws \Exception + */ + public function testSetPaymentOnCartWithException(string $input, string $message) + { + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); + $input = str_replace('cart_id_value', $maskedQuoteId, $input); + + $query = <<<QUERY +mutation { + setPaymentMethodAndPlaceOrder( + input: { + {$input} + } + ) { + order { + order_number + } + } +} +QUERY; + + $this->expectExceptionMessage($message); + $this->graphQlMutation($query, [], '', $this->getHeaderMap()); + } + + /** + * @return array + */ + public function dataProviderSetPaymentOnCartWithException(): array + { + return [ + 'missed_cart_id' => [ + 'payment_method: { + code: "' . Checkmo::PAYMENT_METHOD_CHECKMO_CODE . '" + }', + 'Required parameter "cart_id" is missing', + ], + 'missed_payment_method' => [ + 'cart_id: "cart_id_value"', + 'Required parameter "code" for "payment_method" is missing.', + ], + 'place_order_with_out_of_stock_products' => [ + 'cart_id: "cart_id_value" + payment_method: { + code: "' . Checkmo::PAYMENT_METHOD_CHECKMO_CODE . '" + }', + 'Unable to place order: Some of the products are out of stock.', + ], + ]; + } + /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingAddressOnCartTest.php index e24de031b4a8..f5f9d57ea96f 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingAddressOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingAddressOnCartTest.php @@ -7,6 +7,9 @@ namespace Magento\GraphQl\Quote\Customer; +use Magento\Customer\Api\AddressRepositoryInterface; +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\GraphQl\Quote\GetMaskedQuoteIdByReservedOrderId; use Magento\Integration\Api\CustomerTokenServiceInterface; use Magento\Quote\Model\QuoteFactory; @@ -45,6 +48,21 @@ class SetShippingAddressOnCartTest extends GraphQlAbstract */ private $customerTokenService; + /** + * @var AddressRepositoryInterface + */ + private $customerAddressRepository; + + /** + * @var SearchCriteriaBuilder + */ + private $searchCriteriaBuilder; + + /** + * @var CustomerRepositoryInterface + */ + private $customerRepository; + protected function setUp() { $objectManager = Bootstrap::getObjectManager(); @@ -53,6 +71,9 @@ protected function setUp() $this->quoteIdToMaskedId = $objectManager->get(QuoteIdToMaskedQuoteIdInterface::class); $this->getMaskedQuoteIdByReservedOrderId = $objectManager->get(GetMaskedQuoteIdByReservedOrderId::class); $this->customerTokenService = $objectManager->get(CustomerTokenServiceInterface::class); + $this->customerAddressRepository = $objectManager->get(AddressRepositoryInterface::class); + $this->searchCriteriaBuilder = $objectManager->get(SearchCriteriaBuilder::class); + $this->customerRepository = $objectManager->get(CustomerRepositoryInterface::class); } /** @@ -82,7 +103,6 @@ public function testSetNewShippingAddressOnCartWithSimpleProduct() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } customer_notes: "Test note" } @@ -148,7 +168,6 @@ public function testSetNewShippingAddressOnCartWithVirtualProduct() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } ] @@ -211,6 +230,43 @@ public function testSetShippingAddressFromAddressBook() $this->assertSavedShippingAddressFields($shippingAddressResponse); } + /** + * @magentoApiDataFixture Magento/Customer/_files/customer.php + * @magentoApiDataFixture Magento/Customer/_files/customer_two_addresses.php + * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + */ + public function testVerifyShippingAddressType() + { + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); + + $query = <<<QUERY +mutation { + setShippingAddressesOnCart( + input: { + cart_id: "$maskedQuoteId" + shipping_addresses: [ + { + customer_address_id: 1 + } + ] + } + ) { + cart { + shipping_addresses { + __typename + } + } + } +} +QUERY; + $response = $this->graphQlMutation($query, [], '', $this->getHeaderMap()); + $shippingAddresses = current($response['setShippingAddressesOnCart']['cart']['shipping_addresses']); + self::assertArrayHasKey('__typename', $shippingAddresses); + self::assertEquals('ShippingCartAddress', $shippingAddresses['__typename']); + } + /** * @magentoApiDataFixture Magento/Customer/_files/customer.php * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php @@ -276,7 +332,6 @@ public function testSetNewShippingAddressAndFromAddressBookAtSameTime() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } ] @@ -458,7 +513,6 @@ public function testSetMultipleNewShippingAddresses() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } }, { @@ -472,7 +526,6 @@ public function testSetMultipleNewShippingAddresses() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } ] @@ -516,7 +569,6 @@ public function testSetNewShippingAddressOnCartWithRedundantStreetLine() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } ] @@ -700,6 +752,149 @@ public function testWithInvalidShippingAddressesInput() $this->graphQlMutation($query, [], '', $this->getHeaderMap()); } + /** + * @magentoApiDataFixture Magento/Customer/_files/customer.php + * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + */ + public function testSetNewShippingAddressWithSaveInAddressBook() + { + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); + $query = <<<QUERY +mutation { + setShippingAddressesOnCart( + input: { + cart_id: "$maskedQuoteId" + shipping_addresses: [ + { + address: { + firstname: "test firstname" + lastname: "test lastname" + company: "test company" + street: ["test street 1", "test street 2"] + city: "test city" + region: "test region" + postcode: "887766" + country_code: "US" + telephone: "88776655" + save_in_address_book: true + } + customer_notes: "Test note" + } + ] + } + ) { + cart { + shipping_addresses { + firstname + lastname + company + street + city + postcode + telephone + country { + code + label + } + __typename + customer_notes + } + } + } +} +QUERY; + $response = $this->graphQlMutation($query, [], '', $this->getHeaderMap()); + $customer = $this->customerRepository->get('customer@example.com'); + $searchCriteria = $this->searchCriteriaBuilder->addFilter('parent_id', $customer->getId())->create(); + $addresses = $this->customerAddressRepository->getList($searchCriteria)->getItems(); + + self::assertCount(1, $addresses); + self::assertArrayHasKey('cart', $response['setShippingAddressesOnCart']); + + $cartResponse = $response['setShippingAddressesOnCart']['cart']; + self::assertArrayHasKey('shipping_addresses', $cartResponse); + $shippingAddressResponse = current($cartResponse['shipping_addresses']); + $this->assertNewShippingAddressFields($shippingAddressResponse); + + foreach ($addresses as $address) { + $this->customerAddressRepository->delete($address); + } + } + + /** + * @magentoApiDataFixture Magento/Customer/_files/customer.php + * @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php + * @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php + */ + public function testSetNewShippingAddressWithNotSaveInAddressBook() + { + $maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote'); + $query = <<<QUERY +mutation { + setShippingAddressesOnCart( + input: { + cart_id: "$maskedQuoteId" + shipping_addresses: [ + { + address: { + firstname: "test firstname" + lastname: "test lastname" + company: "test company" + street: ["test street 1", "test street 2"] + city: "test city" + region: "test region" + postcode: "887766" + country_code: "US" + telephone: "88776655" + save_in_address_book: false + } + customer_notes: "Test note" + } + ] + } + ) { + cart { + shipping_addresses { + firstname + lastname + company + street + city + postcode + telephone + country { + code + label + } + __typename + customer_notes + } + } + } +} +QUERY; + $response = $this->graphQlMutation($query, [], '', $this->getHeaderMap()); + $customer = $this->customerRepository->get('customer@example.com'); + $searchCriteria = $this->searchCriteriaBuilder->addFilter('parent_id', $customer->getId())->create(); + $addresses = $this->customerAddressRepository->getList($searchCriteria)->getItems(); + + self::assertCount(0, $addresses); + self::assertArrayHasKey('cart', $response['setShippingAddressesOnCart']); + + $cartResponse = $response['setShippingAddressesOnCart']['cart']; + self::assertArrayHasKey('shipping_addresses', $cartResponse); + $shippingAddressResponse = current($cartResponse['shipping_addresses']); + $this->assertNewShippingAddressFields($shippingAddressResponse); + + foreach ($addresses as $address) { + $this->customerAddressRepository->delete($address); + } + } + + /** * Verify the all the whitelisted fields for a New Address Object * diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AllowGuestCheckoutOptionTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AllowGuestCheckoutOptionTest.php index bb9fc77d0a71..90ebec763b22 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AllowGuestCheckoutOptionTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/AllowGuestCheckoutOptionTest.php @@ -108,7 +108,6 @@ public function testSetBillingAddressToGuestCustomerCart() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } } @@ -221,7 +220,6 @@ public function testSetNewShippingAddressOnCartWithGuestCheckoutDisabled() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } ] diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CheckoutEndToEndTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CheckoutEndToEndTest.php index 6fbff7659c63..315c04614850 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CheckoutEndToEndTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CheckoutEndToEndTest.php @@ -219,7 +219,6 @@ private function setBillingAddress(string $cartId): void telephone: "88776655" region: "TX" country_code: "US" - save_in_address_book: false } } } @@ -258,7 +257,6 @@ private function setShippingAddress(string $cartId): array postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } ] diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php index 730e65b4ba8a..5a3d45005c91 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetBillingAddressOnCartTest.php @@ -52,7 +52,6 @@ public function testSetNewBillingAddress() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } } @@ -110,7 +109,6 @@ public function testSetNewBillingAddressWithUseForShippingParameter() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } use_for_shipping: true } @@ -186,7 +184,6 @@ public function testSetBillingAddressToCustomerCart() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } } @@ -263,7 +260,6 @@ public function testSetBillingAddressOnNonExistentCart() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } } @@ -391,7 +387,6 @@ public function testSetNewBillingAddressWithUseForShippingAndMultishipping() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } use_for_shipping: true } @@ -437,7 +432,6 @@ public function testSetNewBillingAddressRedundantStreetLine() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } } @@ -480,7 +474,6 @@ public function testSetBillingAddressWithLowerCaseCountry() postcode: "887766" country_code: "us" telephone: "88776655" - save_in_address_book: false } } } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetShippingAddressOnCartTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetShippingAddressOnCartTest.php index 0351a4f58a8e..2e98773ad918 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetShippingAddressOnCartTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/SetShippingAddressOnCartTest.php @@ -53,7 +53,6 @@ public function testSetNewShippingAddressOnCartWithSimpleProduct() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } customer_notes: "Test note" } @@ -118,7 +117,6 @@ public function testSetNewShippingAddressOnCartWithVirtualProduct() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } ] @@ -270,7 +268,6 @@ public function testSetNewShippingAddressOnCartWithRedundantStreetLine() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } ] @@ -339,7 +336,6 @@ public function testSetMultipleNewShippingAddresses() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } }, { @@ -353,7 +349,6 @@ public function testSetMultipleNewShippingAddresses() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } ] @@ -393,7 +388,6 @@ public function testSetShippingAddressOnNonExistentCart() postcode: "887766" country_code: "US" telephone: "88776655" - save_in_address_book: false } } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/TaxClass.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/TaxClass.php index 23e0236fe7ba..70d2730868db 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/TaxClass.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/TaxClass.php @@ -52,7 +52,7 @@ class TaxClass extends DataSource public function __construct(FixtureFactory $fixtureFactory, array $params, $data = []) { $this->params = $params; - if ((!isset($data['dataset']) && !isset($data['tax_product_class']))) { + if (!isset($data['dataset']) && !isset($data['tax_product_class'])) { $this->data = $data; return; } diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit/PromoForm.xml b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit/PromoForm.xml index 0ff402daca07..4f74b7ff554d 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit/PromoForm.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit/PromoForm.xml @@ -12,7 +12,7 @@ <strategy>css selector</strategy> <fields> <is_active> - <input>select</input> + <input>switcher</input> </is_active> <website_ids> <selector>[name='website_ids']</selector> diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleInGrid.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleInGrid.php index 8ac13d407e43..695323990063 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleInGrid.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleInGrid.php @@ -19,7 +19,7 @@ class AssertCatalogPriceRuleInGrid extends AbstractConstraint * Fields used to filter rows in the grid. * @var array */ - protected $fieldsToFilter = ['name', 'is_active']; + protected $fieldsToFilter = ['name']; /** * Assert that data in grid on Catalog Price Rules page according to fixture diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogPriceRuleEntityTest.xml b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogPriceRuleEntityTest.xml index 49bf36b0325b..1f16e28c067d 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogPriceRuleEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogPriceRuleEntityTest.xml @@ -10,7 +10,7 @@ <variation name="CatalogRule_Create_Active_AdminOnly"> <data name="catalogPriceRule/data/name" xsi:type="string">CatalogPriceRule %isolation%</data> <data name="catalogPriceRule/data/description" xsi:type="string">Catalog Price Rule Description</data> - <data name="catalogPriceRule/data/is_active" xsi:type="string">Active</data> + <data name="catalogPriceRule/data/is_active" xsi:type="string">Yes</data> <data name="catalogPriceRule/data/website_ids/option_0" xsi:type="string">Main Website</data> <data name="catalogPriceRule/data/customer_group_ids/option_0" xsi:type="string">Wholesale</data> <data name="catalogPriceRule/data/simple_action" xsi:type="string">Apply as percentage of original</data> @@ -24,7 +24,7 @@ <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="catalogPriceRule/data/name" xsi:type="string">CatalogPriceRule %isolation%</data> <data name="catalogPriceRule/data/description" xsi:type="string">Catalog Price Rule Description</data> - <data name="catalogPriceRule/data/is_active" xsi:type="string">Inactive</data> + <data name="catalogPriceRule/data/is_active" xsi:type="string">No</data> <data name="catalogPriceRule/data/website_ids/option_0" xsi:type="string">Main Website</data> <data name="catalogPriceRule/data/customer_group_ids/option_0" xsi:type="string">General</data> <data name="catalogPriceRule/data/condition" xsi:type="string">-</data> @@ -39,7 +39,7 @@ <variation name="CatalogRule_Create_ForGuestUsers_AdjustPriceToPercentage"> <data name="product" xsi:type="string">MAGETWO-23036</data> <data name="catalogPriceRule/data/name" xsi:type="string">rule_name%isolation%</data> - <data name="catalogPriceRule/data/is_active" xsi:type="string">Active</data> + <data name="catalogPriceRule/data/is_active" xsi:type="string">Yes</data> <data name="catalogPriceRule/data/website_ids/option_0" xsi:type="string">Main Website</data> <data name="catalogPriceRule/data/customer_group_ids/option_0" xsi:type="string">NOT LOGGED IN</data> <data name="conditionEntity" xsi:type="string">category</data> @@ -54,7 +54,7 @@ <data name="customer/dataset" xsi:type="string">customer_with_new_customer_group</data> <data name="product" xsi:type="string">simple_10_dollar</data> <data name="catalogPriceRule/data/name" xsi:type="string">rule_name%isolation%</data> - <data name="catalogPriceRule/data/is_active" xsi:type="string">Active</data> + <data name="catalogPriceRule/data/is_active" xsi:type="string">Yes</data> <data name="catalogPriceRule/data/website_ids/option_0" xsi:type="string">Main Website</data> <data name="conditionEntity" xsi:type="string">category</data> <data name="catalogPriceRule/data/conditions" xsi:type="string">[Category|is|%category_id%]</data> @@ -68,7 +68,7 @@ <data name="tag" xsi:type="string">test_type:extended_acceptance_test</data> <data name="product" xsi:type="string">product_with_custom_color_attribute</data> <data name="catalogPriceRule/data/name" xsi:type="string">Catalog Price Rule %isolation%</data> - <data name="catalogPriceRule/data/is_active" xsi:type="string">Active</data> + <data name="catalogPriceRule/data/is_active" xsi:type="string">Yes</data> <data name="catalogPriceRule/data/website_ids/option_0" xsi:type="string">Main Website</data> <data name="catalogPriceRule/data/customer_group_ids/option_0" xsi:type="string">NOT LOGGED IN</data> <data name="conditionEntity" xsi:type="string">attribute</data> diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.xml b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.xml index 6c8e86b24ae6..e2916432c8eb 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.xml @@ -10,7 +10,7 @@ <variation name="CatalogRule_Update_Name_Status"> <data name="catalogPriceRuleOriginal/dataset" xsi:type="string">active_catalog_price_rule_with_conditions</data> <data name="catalogPriceRule/data/name" xsi:type="string">New Catalog Price Rule Name %isolation%</data> - <data name="catalogPriceRule/data/is_active" xsi:type="string">Inactive</data> + <data name="catalogPriceRule/data/is_active" xsi:type="string">No</data> <data name="saveAction" xsi:type="string">save</data> <constraint name="Magento\CatalogRule\Test\Constraint\AssertCatalogPriceRuleSuccessSaveMessage" /> <constraint name="Magento\CatalogRule\Test\Constraint\AssertCatalogPriceRuleNoticeMessage" /> @@ -24,7 +24,7 @@ <data name="catalogPriceRuleOriginal/dataset" xsi:type="string">active_catalog_price_rule_with_conditions</data> <data name="catalogPriceRule/data/name" xsi:type="string">New Catalog Price Rule Name %isolation%</data> <data name="catalogPriceRule/data/description" xsi:type="string">New Catalog Price Rule Description %isolation%</data> - <data name="catalogPriceRule/data/is_active" xsi:type="string">Active</data> + <data name="catalogPriceRule/data/is_active" xsi:type="string">Yes</data> <data name="catalogPriceRule/data/conditions" xsi:type="string">[Category|is|%category_1%]</data> <data name="catalogPriceRule/data/simple_action" xsi:type="string">Apply as fixed amount</data> <data name="catalogPriceRule/data/discount_amount" xsi:type="string">35</data> diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.xml b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.xml index 4744fa7756c4..9a26386c82cb 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.xml @@ -8,7 +8,7 @@ <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd"> <testCase name="Magento\CatalogSearch\Test\TestCase\AdvancedSearchEntityTest" summary="Use Advanced Search" ticketId="MAGETWO-24729"> <variation name="AdvancedSearchEntityTestVariation1" summary="Use Advanced Search to Find the Product" ticketId="MAGETWO-12421"> - <data name="tag" xsi:type="string">test_type:acceptance_test, test_type:extended_acceptance_test</data> + <data name="tag" xsi:type="string">test_type:acceptance_test, test_type:extended_acceptance_test, mftf_migrated:yes</data> <data name="products/simple_1" xsi:type="string">Yes</data> <data name="products/simple_2" xsi:type="string">-</data> <data name="productSearch/data/name" xsi:type="string">abc_dfj</data> @@ -16,6 +16,7 @@ <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchProductsResult" /> </variation> <variation name="AdvancedSearchEntityTestVariation2"> + <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="description" xsi:type="string">Search product in advanced search by name</data> <data name="products/simple_1" xsi:type="string">-</data> <data name="products/simple_2" xsi:type="string">Yes</data> @@ -23,6 +24,7 @@ <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchProductsResult" /> </variation> <variation name="AdvancedSearchEntityTestVariation3"> + <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="description" xsi:type="string">Search product in advanced search by partial name</data> <data name="products/simple_1" xsi:type="string">Yes</data> <data name="products/simple_2" xsi:type="string">-</data> @@ -30,6 +32,7 @@ <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchProductsResult" /> </variation> <variation name="AdvancedSearchEntityTestVariation4"> + <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="description" xsi:type="string">Search product in advanced search by sku</data> <data name="products/simple_1" xsi:type="string">Yes</data> <data name="products/simple_2" xsi:type="string">-</data> @@ -37,6 +40,7 @@ <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchProductsResult" /> </variation> <variation name="AdvancedSearchEntityTestVariation5"> + <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="description" xsi:type="string">Search product in advanced search by partial sku</data> <data name="products/simple_1" xsi:type="string">Yes</data> <data name="products/simple_2" xsi:type="string">-</data> @@ -44,6 +48,7 @@ <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchProductsResult" /> </variation> <variation name="AdvancedSearchEntityTestVariation6"> + <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="description" xsi:type="string">Search product in advanced search by partial sku and description</data> <data name="products/simple_1" xsi:type="string">Yes</data> <data name="products/simple_2" xsi:type="string">-</data> @@ -52,6 +57,7 @@ <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchProductsResult" /> </variation> <variation name="AdvancedSearchEntityTestVariation7"> + <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="description" xsi:type="string">Search product in advanced search by description</data> <data name="products/simple_1" xsi:type="string">-</data> <data name="products/simple_2" xsi:type="string">Yes</data> @@ -59,6 +65,7 @@ <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchProductsResult" /> </variation> <variation name="AdvancedSearchEntityTestVariation8"> + <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="description" xsi:type="string">Search product in advanced search by short description</data> <data name="products/simple_1" xsi:type="string">-</data> <data name="products/simple_2" xsi:type="string">-</data> @@ -66,6 +73,7 @@ <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchProductsResult" /> </variation> <variation name="AdvancedSearchEntityTestVariation9"> + <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="description" xsi:type="string">Search product in advanced search by partial short description</data> <data name="products/simple_1" xsi:type="string">Yes</data> <data name="products/simple_2" xsi:type="string">-</data> @@ -73,6 +81,7 @@ <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchProductsResult" /> </variation> <variation name="AdvancedSearchEntityTestVariation10"> + <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="description" xsi:type="string">Search product in advanced search by price to</data> <data name="products/simple_1" xsi:type="string">Yes</data> <data name="products/simple_2" xsi:type="string">Yes</data> @@ -80,6 +89,7 @@ <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchProductsResult" /> </variation> <variation name="AdvancedSearchEntityTestVariation11"> + <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="description" xsi:type="string">Search product in advanced search by price from and price to</data> <data name="products/simple_1" xsi:type="string">Yes</data> <data name="products/simple_2" xsi:type="string">-</data> @@ -88,6 +98,7 @@ <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchProductsResult" /> </variation> <variation name="AdvancedSearchEntityTestVariation12"> + <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="description" xsi:type="string">Search product in advanced search by name, sku, description, short description, price from and price to</data> <data name="products/simple_1" xsi:type="string">Yes</data> <data name="products/simple_2" xsi:type="string">-</data> @@ -100,6 +111,7 @@ <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchProductsResult" /> </variation> <variation name="AdvancedSearchEntityTestVariation13"> + <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="description" xsi:type="string">Search product in advanced search by name, sku, description, short description, price from and price to</data> <data name="products/simple_1" xsi:type="string">Yes</data> <data name="products/simple_2" xsi:type="string">-</data> @@ -112,11 +124,13 @@ <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchProductsResult" /> </variation> <variation name="AdvancedSearchEntityTestVariation14"> + <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="description" xsi:type="string">Negative product search</data> <data name="productSearch/data/name" xsi:type="string">Negative_product_search</data> <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchNoResult" /> </variation> <variation name="AdvancedSearchEntityTestVariation15" summary="Do Advanced Search without entering data" ticketId="MAGETWO-14859"> + <data name="tag" xsi:type="string">mftf_migrated:yes</data> <data name="issue" xsi:type="string">MAGETWO-18537: "Enter a search term and try again." error message is missed in Advanced Search</data> <data name="productSearch/data/name" xsi:type="string" /> <constraint name="Magento\CatalogSearch\Test\Constraint\AssertAdvancedSearchEmptyTerm" /> diff --git a/dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/TestCase/FilterProductListTest.xml b/dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/TestCase/FilterProductListTest.xml index 9c9c917f8a66..48129ef28749 100644 --- a/dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/TestCase/FilterProductListTest.xml +++ b/dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/TestCase/FilterProductListTest.xml @@ -94,7 +94,9 @@ <constraint name="Magento\LayeredNavigation\Test\Constraint\AssertFilterProductList" /> </variation> <variation name="FilterProductListTestVariation4" summary="Use sorting category filter when layered navigation is applied" ticketId="MAGETWO-42701"> + <data name="tag" xsi:type="string">test_type:mysql_search</data> <data name="configData" xsi:type="string">layered_navigation_manual_range_10</data> + <data name="runReindex" xsi:type="boolean">true</data> <data name="category/dataset" xsi:type="string">default_anchor_subcategory</data> <data name="category/data/category_products/dataset" xsi:type="string">catalogProductSimple::product_10_dollar, catalogProductSimple::product_20_dollar, configurableProduct::filterable_two_options_with_zero_price</data> <data name="layeredNavigation" xsi:type="array"> diff --git a/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/elastic_search.xml b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/elastic_search.xml new file mode 100644 index 000000000000..614115151833 --- /dev/null +++ b/dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/elastic_search.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd"> + <rule scope="testcase"> + <deny> + <tag group="stable" value="no" /> + <tag group="to_maintain" value="yes" /> + <tag group="mftf_migrated" value="yes" /> + </deny> + </rule> + <rule scope="testsuite"> + <deny> + <module value="Magento_Setup" strict="1" /> + <module value="Magento_SampleData" strict="1" /> + </deny> + </rule> + <rule scope="variation"> + <deny> + <tag group="test_type" value="3rd_party_test, 3rd_party_test_single_flow, mysql_search" /> + <tag group="stable" value="no" /> + <tag group="mftf_migrated" value="yes" /> + <tag group="to_maintain" value="yes" /> + </deny> + </rule> +</config> diff --git a/dev/tests/integration/_files/Magento/TestModuleCatalogSearch/etc/module.xml b/dev/tests/integration/_files/Magento/TestModuleCatalogSearch/etc/module.xml new file mode 100644 index 000000000000..bae0739d237e --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleCatalogSearch/etc/module.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> + <module name="Magento_TestModuleCatalogSearch"> + <sequence> + <module name="Magento_CatalogSearch"/> + </sequence> + </module> +</config> diff --git a/dev/tests/integration/_files/Magento/TestModuleCatalogSearch/registration.php b/dev/tests/integration/_files/Magento/TestModuleCatalogSearch/registration.php new file mode 100644 index 000000000000..78fb97a9e113 --- /dev/null +++ b/dev/tests/integration/_files/Magento/TestModuleCatalogSearch/registration.php @@ -0,0 +1,12 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +use Magento\Framework\Component\ComponentRegistrar; + +$registrar = new ComponentRegistrar(); +if ($registrar->getPath(ComponentRegistrar::MODULE, 'Magento_TestModuleCatalogSearch') === null) { + ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModuleCatalogSearch', __DIR__); +} diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Locale/ResolverTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Locale/ResolverTest.php index 88662a65c742..a930244238ef 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/Locale/ResolverTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Locale/ResolverTest.php @@ -20,6 +20,9 @@ class ResolverTest extends \PHPUnit\Framework\TestCase */ protected $_model; + /** + * {@inheritDoc} + */ protected function setUp() { parent::setUp(); @@ -29,7 +32,7 @@ protected function setUp() } /** - * @covers \Magento\Backend\Model\Locale\Resolver::setLocale + * Tests setLocale() with default locale */ public function testSetLocaleWithDefaultLocale() { @@ -37,7 +40,7 @@ public function testSetLocaleWithDefaultLocale() } /** - * @covers \Magento\Backend\Model\Locale\Resolver::setLocale + * Tests setLocale() with interface locale */ public function testSetLocaleWithBaseInterfaceLocale() { @@ -55,7 +58,7 @@ public function testSetLocaleWithBaseInterfaceLocale() } /** - * @covers \Magento\Backend\Model\Locale\Resolver::setLocale + * Tests setLocale() with session locale */ public function testSetLocaleWithSessionLocale() { @@ -68,7 +71,7 @@ public function testSetLocaleWithSessionLocale() } /** - * @covers \Magento\Backend\Model\Locale\Resolver::setLocale + * Tests setLocale() with post parameter */ public function testSetLocaleWithRequestLocale() { @@ -78,13 +81,45 @@ public function testSetLocaleWithRequestLocale() $this->_checkSetLocale('de_DE'); } + /** + * Tests setLocale() with parameter + * + * @param string|null $localeParam + * @param string|null $localeRequestParam + * @param string $localeExpected + * @dataProvider setLocaleWithParameterDataProvider + */ + public function testSetLocaleWithParameter( + ?string $localeParam, + ?string $localeRequestParam, + string $localeExpected + ) { + $request = Bootstrap::getObjectManager() + ->get(\Magento\Framework\App\RequestInterface::class); + $request->setPostValue(['locale' => $localeRequestParam]); + $this->_model->setLocale($localeParam); + $this->assertEquals($localeExpected, $this->_model->getLocale()); + } + + /** + * @return array + */ + public function setLocaleWithParameterDataProvider(): array + { + return [ + ['ko_KR', 'ja_JP', 'ja_JP'], + ['ko_KR', null, 'ko_KR'], + [null, 'ja_JP', 'ja_JP'], + ]; + } + /** * Check set locale * * @param string $localeCodeToCheck * @return void */ - protected function _checkSetLocale($localeCodeToCheck) + private function _checkSetLocale($localeCodeToCheck) { $this->_model->setLocale(); $localeCode = $this->_model->getLocale(); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/FullTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/FullTest.php index 677135092526..095fa864ccb4 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/FullTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/FullTest.php @@ -11,6 +11,8 @@ use Magento\Catalog\Model\Indexer\Product\Flat\Processor; use Magento\Catalog\Model\Indexer\Product\Flat\State; use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory as ProductCollectionFactory; +use Magento\CatalogSearch\Model\Indexer\Fulltext; +use Magento\Framework\Indexer\IndexerRegistry; use Magento\Store\Model\StoreManagerInterface; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\ObjectManager; @@ -35,6 +37,22 @@ class FullTest extends \Magento\TestFramework\Indexer\TestCase */ private $objectManager; + /** + * @inheritdoc + */ + public static function setUpBeforeClass() + { + /* + * Due to insufficient search engine isolation for Elasticsearch, this class must explicitly perform + * a fulltext reindex prior to running its tests. + * + * This should be removed upon completing MC-19455. + */ + $indexRegistry = Bootstrap::getObjectManager()->get(IndexerRegistry::class); + $fulltextIndexer = $indexRegistry->get(Fulltext::INDEXER_ID); + $fulltextIndexer->reindexAll(); + } + /** * @inheritdoc */ diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_with_image_without_types.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_with_image_without_types.php new file mode 100644 index 000000000000..4176e14209ed --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_with_image_without_types.php @@ -0,0 +1,30 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\TestFramework\Helper\Bootstrap; +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Catalog\Model\Product; + +require __DIR__ . '/product_image.php'; +require __DIR__ . '/product_simple.php'; + +$objectManager = Bootstrap::getObjectManager(); +$productRepository = $objectManager->create(ProductRepositoryInterface::class); +$product = $productRepository->get('simple'); +$imageData = [ + 'file' => '/m/a/magento_image.jpg', + 'position' => 1, + 'label' => 'Image Alt Text', + 'disabled' => 0, + 'media_type' => 'image' +]; + +/** @var $product Product */ +$product->setStoreId(0) + ->setData('media_gallery', ['images' => [$imageData]]) + ->setCanSaveCustomOptions(true) + ->save(); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_with_image_without_types_rollback.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_with_image_without_types_rollback.php new file mode 100644 index 000000000000..2033f092b397 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_with_image_without_types_rollback.php @@ -0,0 +1,9 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +require __DIR__ . '/product_simple_rollback.php'; +require __DIR__ . '/product_image_rollback.php'; diff --git a/dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProviderTest.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProviderTest.php index c2c316ecf45c..d503c9678dfd 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProviderTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProviderTest.php @@ -7,38 +7,71 @@ namespace Magento\CatalogSearch\Model\Indexer\Fulltext\Action; +use Magento\Catalog\Model\Product; +use Magento\Catalog\Model\ProductRepository as ProductRepository; +use Magento\CatalogSearch\Model\Indexer\Fulltext; +use Magento\Framework\Api\Search\Document as SearchDocument; +use Magento\Framework\Indexer\IndexerRegistry; +use Magento\Framework\Search\AdapterInterface as AdapterInterface; +use Magento\Framework\Search\Request\Builder as SearchRequestBuilder; +use Magento\Framework\Search\Request\Config as SearchRequestConfig; +use Magento\Search\Model\AdapterFactory as AdapterFactory; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\ObjectManager; + class DataProviderTest extends \PHPUnit\Framework\TestCase { + /** + * @inheritdoc + */ + public static function setUpBeforeClass() + { + /* + * Due to insufficient search engine isolation for Elasticsearch, this class must explicitly perform + * a fulltext reindex prior to running its tests. + * + * This should be removed upon completing MC-19455. + */ + $indexRegistry = Bootstrap::getObjectManager()->get(IndexerRegistry::class); + $fulltextIndexer = $indexRegistry->get(Fulltext::INDEXER_ID); + $fulltextIndexer->reindexAll(); + } + /** * @magentoDataFixture Magento/CatalogSearch/_files/product_for_search.php * @magentoDbIsolation disabled */ public function testSearchProductByAttribute() { - /** @var $objectManager \Magento\TestFramework\ObjectManager */ - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + /** @var ObjectManager $objectManager */ + $objectManager = Bootstrap::getObjectManager(); + + /** @var SearchRequestConfig $config */ + $config = $objectManager->create(SearchRequestConfig::class); - $config = $objectManager->create(\Magento\Framework\Search\Request\Config::class); - /** @var \Magento\Framework\Search\Request\Builder $requestBuilder */ + /** @var SearchRequestBuilder $requestBuilder */ $requestBuilder = $objectManager->create( - \Magento\Framework\Search\Request\Builder::class, + SearchRequestBuilder::class, ['config' => $config] ); + $requestBuilder->bind('search_term', 'VALUE1'); $requestBuilder->setRequestName('quick_search_container'); $queryRequest = $requestBuilder->create(); - /** @var \Magento\Framework\Search\Adapter\Mysql\Adapter $adapter */ - $adapterFactory = $objectManager->create(\Magento\Search\Model\AdapterFactory::class); + + /** @var AdapterInterface $adapter */ + $adapterFactory = $objectManager->create(AdapterFactory::class); $adapter = $adapterFactory->create(); $queryResponse = $adapter->query($queryRequest); $actualIds = []; + foreach ($queryResponse as $document) { - /** @var \Magento\Framework\Api\Search\Document $document */ + /** @var SearchDocument $document */ $actualIds[] = $document->getId(); } - /** @var \Magento\Catalog\Model\Product $product */ - $product = $objectManager->create(\Magento\Catalog\Model\ProductRepository::class)->get('simple'); + /** @var Product $product */ + $product = $objectManager->create(ProductRepository::class)->get('simple'); $this->assertContains($product->getId(), $actualIds, 'Product not found by searchable attribute.'); } } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php index 566dfbadedd2..7116953d682b 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php @@ -769,9 +769,21 @@ public function testConfirmationEmailWithSpecialCharacters(): void $message = $this->transportBuilderMock->getSentMessage(); $rawMessage = $message->getRawMessage(); - $this->assertContains('To: John Smith <' . $email . '>', $rawMessage); + /** @var \Zend\Mime\Part $messageBodyPart */ + $messageBodyParts = $message->getBody()->getParts(); + $messageBodyPart = reset($messageBodyParts); + $messageEncoding = $messageBodyPart->getCharset(); + $name = 'John Smith'; + + if (strtoupper($messageEncoding) !== 'ASCII') { + $name = \Zend\Mail\Header\HeaderWrap::mimeEncodeValue($name, $messageEncoding); + } + + $nameEmail = sprintf('%s <%s>', $name, $email); + + $this->assertContains('To: ' . $nameEmail, $rawMessage); - $content = $message->getBody()->getParts()[0]->getRawContent(); + $content = $messageBodyPart->getRawContent(); $confirmationUrl = $this->getConfirmationUrlFromMessageContent($content); $this->setRequestInfo($confirmationUrl, 'confirm'); $this->clearCookieMessagesList(); diff --git a/dev/tests/integration/testsuite/Magento/Downloadable/_files/product_downloadable_with_download_limit.php b/dev/tests/integration/testsuite/Magento/Downloadable/_files/product_downloadable_with_download_limit.php new file mode 100644 index 000000000000..7f1701d4ca6a --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Downloadable/_files/product_downloadable_with_download_limit.php @@ -0,0 +1,67 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\Catalog\Api\Data\ProductInterface; +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Catalog\Model\Product\Attribute\Source\Status; +use Magento\Catalog\Model\Product\Visibility; +use Magento\Downloadable\Api\Data\LinkInterface; +use Magento\Downloadable\Api\LinkRepositoryInterface; +use Magento\Downloadable\Helper\Download; +use Magento\Downloadable\Model\Link; +use Magento\Downloadable\Model\Product\Type; +use Magento\TestFramework\Helper\Bootstrap; + +/** @var ProductRepositoryInterface $productRepository */ +$productRepository = Bootstrap::getObjectManager() + ->get(ProductRepositoryInterface::class); +/** @var LinkRepositoryInterface $linkRepository */ +$linkRepository = Bootstrap::getObjectManager() + ->create(LinkRepositoryInterface::class); +/** @var ProductInterface $product */ +$product = Bootstrap::getObjectManager() + ->create(ProductInterface::class); +/** @var LinkInterface $downloadableProductLink */ +$downloadableProductLink = Bootstrap::getObjectManager() + ->create(LinkInterface::class); + +$downloadableProductLink +// ->setId(null) + ->setLinkType(Download::LINK_TYPE_URL) + ->setTitle('Downloadable Product Link') + ->setIsShareable(Link::LINK_SHAREABLE_CONFIG) + ->setLinkUrl('http://example.com/downloadable.txt') + ->setNumberOfDownloads(100) + ->setSortOrder(1) + ->setPrice(0); + +$downloadableProductLinks[] = $downloadableProductLink; + +$product + ->setId(1) + ->setTypeId(Type::TYPE_DOWNLOADABLE) + ->setExtensionAttributes( + $product->getExtensionAttributes() + ->setDownloadableProductLinks($downloadableProductLinks) + ) + ->setSku('downloadable-product') + ->setAttributeSetId(4) + ->setWebsiteIds([1]) + ->setName('Downloadable Product Limited') + ->setPrice(10) + ->setVisibility(Visibility::VISIBILITY_BOTH) + ->setStatus(Status::STATUS_ENABLED) + ->setLinksPurchasedSeparately(true) + ->setStockData( + [ + 'qty' => 100, + 'is_in_stock' => 1, + 'manage_stock' => 1, + ] + ); + +$productRepository->save($product); diff --git a/dev/tests/integration/testsuite/Magento/Downloadable/_files/product_downloadable_with_download_limit_rollback.php b/dev/tests/integration/testsuite/Magento/Downloadable/_files/product_downloadable_with_download_limit_rollback.php new file mode 100644 index 000000000000..d88f6f180343 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Downloadable/_files/product_downloadable_with_download_limit_rollback.php @@ -0,0 +1,8 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +require __DIR__ . '/product_downloadable_rollback.php'; diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/static/expected/styles.magento.min.css b/dev/tests/integration/testsuite/Magento/Framework/View/_files/static/expected/styles.magento.min.css index 7bb283e0b351..bb901988c5b8 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/static/expected/styles.magento.min.css +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/static/expected/styles.magento.min.css @@ -1 +1 @@ -table>caption{margin-bottom:5px}table thead{background:#676056;color:#f7f3eb}table thead .headings{background:#807a6e}table thead a{color:#f7f3eb;display:block}table thead a label{color:#f7f3eb;cursor:pointer;display:block}table thead a:hover,table thead a:focus{color:#dac7a2;text-decoration:none}table tfoot{background:#f2ebde;color:#676056}table tfoot tr th,table tfoot tr td{text-align:left}table th{background:0 0;border:solid #cac3b4;border-width:0 1px;font-size:14px;padding:6px 10px;text-align:center}table td{border:solid #cac3b4;border-width:0 1px;padding:6px 10px 7px;vertical-align:top}table tbody tr td{background:#fff;color:#676056;padding-top:12px}table tbody tr td:first-child{border-left:0}table tbody tr td:first-child input[type=checkbox]{margin:0}table tbody tr td:last-child{border-right:0}table tbody tr:last-child th,table tbody tr:last-child td{border-bottom-width:1px}table tbody tr:nth-child(odd) td,table tbody tr:nth-child(odd) th{background-color:#f7f3eb}table tbody.even tr td{background:#fff}table tbody.odd tr td{background:#f7f3eb}table .dropdown-menu li{padding:7px 15px;line-height:14px;cursor:pointer}table .col-draggable .draggable-handle{float:left;position:relative;top:0}.not-sort{padding-right:10px}.sort-arrow-asc,.sort-arrow-desc{padding-right:10px;position:relative}.sort-arrow-asc:after,.sort-arrow-desc:after{right:-11px;top:-1px;position:absolute;width:23px}.sort-arrow-asc:hover:after,.sort-arrow-desc:hover:after{color:#dac7a2}.sort-arrow-asc{display:inline-block;text-decoration:none}.sort-arrow-asc:after{font-family:'icons-blank-theme';content:'\e626';font-size:13px;line-height:inherit;color:#f7f3eb;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.sort-arrow-asc:hover:after{color:#dac7a2}.sort-arrow-desc{display:inline-block;text-decoration:none}.sort-arrow-desc:after{font-family:'icons-blank-theme';content:'\e623';font-size:13px;line-height:inherit;color:#f7f3eb;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.sort-arrow-desc:hover:after{color:#dac7a2}.grid-actions .input-text,.pager .input-text,.massaction .input-text,.filter .input-text,.grid-actions select,.pager select,.massaction select,.filter select,.grid-actions .select,.pager .select,.massaction .select,.filter .select{border-color:#989287;box-shadow:none;border-radius:1px;height:28px;margin:0 10px 0 0}.filter th{border:0 solid #676056;padding:6px 3px;vertical-align:top}.filter .ui-datepicker-trigger{cursor:pointer;margin-top:2px}.filter .input-text{padding:0 5px}.filter .range-line:not(:last-child){margin-bottom:5px}.filter .date{padding-right:28px;position:relative;display:inline-block;text-decoration:none}.filter .date .hasDatepicker{vertical-align:top;width:99%}.filter .date img{cursor:pointer;height:25px;width:25px;right:0;position:absolute;vertical-align:middle;z-index:2;opacity:0}.filter .date:before{font-family:'icons-blank-theme';content:'\e612';font-size:42px;line-height:30px;color:#f7f3eb;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.filter .date:hover:before{color:#dac7a2}.filter .date:before{height:29px;margin-left:5px;position:absolute;right:-3px;top:-3px;width:35px}.filter select{border-color:#cac3b4;margin:0;padding:0;width:99%}.filter input.input-text{border-color:#cac3b4;margin:0;width:99%}.filter input.input-text::-webkit-input-placeholder{color:#989287 !important;text-transform:lowercase}.filter input.input-text::-moz-placeholder{color:#989287 !important;text-transform:lowercase}.filter input.input-text:-moz-placeholder{color:#989287 !important;text-transform:lowercase}.filter input.input-text:-ms-input-placeholder{color:#989287 !important;text-transform:lowercase}.grid{background:#fff;color:#676056;font-size:13px;font-weight:400;padding:15px}.grid table{width:100%}.grid tbody tr.selected th,.grid tbody tr.selected td,.grid tbody tr:hover th,.grid tbody tr:hover td,.grid tbody tr:nth-child(odd):hover th,.grid tbody tr:nth-child(odd):hover td{background-color:#f2ebde;cursor:pointer}.grid tbody tr.selected th.empty-text,.grid tbody tr.selected td.empty-text,.grid tbody tr:hover th.empty-text,.grid tbody tr:hover td.empty-text,.grid tbody tr:nth-child(odd):hover th.empty-text,.grid tbody tr:nth-child(odd):hover td.empty-text{background-color:#f7f3eb;cursor:default}.grid .empty-text{font:400 20px/1.2 'Open Sans',sans-serif;text-align:center;white-space:nowrap}.grid .col-sku{max-width:100px;width:100px}.grid .col-select,.grid .col-massaction{text-align:center}.grid .editable .input-text{width:65px}.grid .col-actions .action-select{background:#fff;border-color:#989287;height:28px;margin:0;padding:4px 4px 5px;width:80px}.grid .col-position.editable{white-space:nowrap}.grid .col-position.editable .input-text{margin:-7px 5px 0;width:70%}.eq-ie9 .hor-scroll{display:inline-block;min-height:0;overflow-y:hidden;overflow-x:auto;width:100%}.data-table{border-collapse:separate;width:100%}.data-table thead,.data-table tfoot,.data-table th,.accordion .config .data-table thead th,.accordion .config .data-table tfoot td,.accordion .config .accordion .config .data-table tfoot td th{background:#fff;color:#676056;font-size:13px;font-weight:600}.data-table th{text-align:left}.data-table thead th,.accordion .config .data-table thead th th,.accordion .config .data-table tfoot td th,.accordion .config .accordion .config .data-table tfoot td th th{border:solid #c9c2b8;border-width:0 0 1px;padding:7px}.data-table td,.data-table tbody tr th,.data-table tbody tr td,.accordion .config .data-table td{background:#fff;border-width:0;padding:5px 7px;vertical-align:middle}.data-table tbody tr:nth-child(odd) th,.data-table tbody tr:nth-child(odd) td,.accordion .config .data-table tbody tr:nth-child(odd) td{background:#fbfaf6}.data-table tbody.odd tr th,.data-table tbody.odd tr td{background:#fbfaf6}.data-table tbody.even tr th,.data-table tbody.even tr td{background:#fff}.data-table tfoot tr:last-child th,.data-table tfoot tr:last-child td,.data-table .accordion .config .data-table tfoot tr:last-child td{border:0}.data-table.order-tables tbody td{vertical-align:top}.data-table.order-tables tbody:hover tr th,.data-table.order-tables tbody:hover tr td{background:#f7f3eb}.data-table.order-tables tfoot td{background:#f2ebde;color:#676056;font-size:13px;font-weight:600}.data-table input[type=text]{width:98%;padding-left:1%;padding-right:1%}.data-table select{margin:0;box-sizing:border-box}.data-table .col-actions .actions-split{margin-top:4px}.data-table .col-actions .actions-split [class^=action-]{background:0 0;border:1px solid #c8c3b5;padding:3px 5px;color:#bbb3a6;font-size:12px}.data-table .col-actions .actions-split [class^=action-]:first-child{border-right:0}.data-table .col-actions .actions-split .dropdown-menu{margin-top:-1px}.data-table .col-actions .actions-split .dropdown-menu a{display:block;color:#333;text-decoration:none}.data-table .col-actions .actions-split.active .action-toggle{position:relative;border-bottom-right-radius:0;box-shadow:none;background:#fff}.data-table .col-actions .actions-split.active .action-toggle:after{position:absolute;top:100%;left:0;right:0;height:2px;margin-top:-1px;background:#fff;content:'';z-index:2}.data-table .col-actions .actions-split.active .action-toggle .dropdown-menu{border-top-right-radius:0}.data-table .col-default{white-space:nowrap;text-align:center;vertical-align:middle}.data-table .col-delete{text-align:center;width:32px}.data-table .col-file{white-space:nowrap}.data-table .col-file input,.data-table .col-file .input-text{margin:0 5px;width:40%}.data-table .col-file input:first-child,.data-table .col-file .input-text:first-child{margin-left:0}.data-table .col-actions-add{padding:10px 0}.grid-actions{background:#fff;font-size:13px;line-height:28px;padding:10px 15px;position:relative}.grid-actions+.grid{padding-top:5px}.grid-actions .export,.grid-actions .filter-actions{float:right;margin-left:10px;vertical-align:top}.grid-actions .import{display:block;vertical-align:top}.grid-actions .action-reset{background:0 0;border:0;display:inline;line-height:1.42857143;margin:0;padding:0;color:#1979c3;text-decoration:none;margin:6px 10px 0 0;vertical-align:top}.grid-actions .action-reset:visited{color:purple;text-decoration:none}.grid-actions .action-reset:hover{color:#006bb4;text-decoration:underline}.grid-actions .action-reset:active{color:#ff5501;text-decoration:underline}.grid-actions .action-reset:hover{color:#006bb4}.grid-actions .action-reset:hover,.grid-actions .action-reset:active,.grid-actions .action-reset:focus{background:0 0;border:0}.grid-actions .action-reset.disabled,.grid-actions .action-reset[disabled],fieldset[disabled] .grid-actions .action-reset{color:#1979c3;text-decoration:underline;cursor:default;pointer-events:none;opacity:.5}.grid-actions .import .label,.grid-actions .export .label,.massaction>.entry-edit .label{margin:0 14px 0 0;vertical-align:inherit}.grid-actions .import .action-,.grid-actions .export .action-,.grid-actions .filter-actions .action-,.massaction>.entry-edit .action-{vertical-align:inherit}.grid-actions .filter .date{float:left;margin:0 15px 0 0;position:relative}.grid-actions .filter .date:before{color:#676056;top:1px}.grid-actions .filter .date:hover:before{color:#31302b}.grid-actions .filter .label{margin:0}.grid-actions .filter .hasDatepicker{margin:0 5px;width:80px}.grid-actions .filter .show-by .select{margin-left:5px;padding:4px 4px 5px;vertical-align:top;width:auto}.grid-actions .filter.required:after{content:''}.grid-actions img{vertical-align:middle;height:22px;width:22px}.grid-actions .validation-advice{background:#f9d4d4;border:1px solid #e22626;border-radius:3px;color:#e22626;margin:5px 0 0;padding:3px 7px;position:absolute;white-space:nowrap;z-index:5}.grid-actions .validation-advice:before{width:0;height:0;border:5px solid transparent;border-bottom-color:#e22626;content:'';left:50%;margin-left:-5px;position:absolute;top:-11px}.grid-actions input[type=text].validation-failed{border-color:#e22626;box-shadow:0 0 8px rgba(226,38,38,.6)}.grid-actions .link-feed{white-space:nowrap}.pager{font-size:13px}.grid .pager{margin:15px 0 0;position:relative;text-align:center}.pager .pages-total-found{margin-right:25px}.pager .view-pages .select{margin:0 5px}.pager .link-feed{font-size:12px;margin:7px 15px 0 0;position:absolute;right:0;top:0}.pager .action-previous,.pager .action-next{background:0 0;border:0;display:inline;line-height:1.42857143;margin:0;padding:0;color:#1979c3;text-decoration:none;line-height:.6;overflow:hidden;width:20px}.pager .action-previous:visited,.pager .action-next:visited{color:purple;text-decoration:none}.pager .action-previous:hover,.pager .action-next:hover{color:#006bb4;text-decoration:underline}.pager .action-previous:active,.pager .action-next:active{color:#ff5501;text-decoration:underline}.pager .action-previous:hover,.pager .action-next:hover{color:#006bb4}.pager .action-previous:hover,.pager .action-next:hover,.pager .action-previous:active,.pager .action-next:active,.pager .action-previous:focus,.pager .action-next:focus{background:0 0;border:0}.pager .action-previous.disabled,.pager .action-next.disabled,.pager .action-previous[disabled],.pager .action-next[disabled],fieldset[disabled] .pager .action-previous,fieldset[disabled] .pager .action-next{color:#1979c3;text-decoration:underline;cursor:default;pointer-events:none;opacity:.5}.pager .action-previous:before,.pager .action-next:before{margin-left:-10px}.pager .action-previous.disabled,.pager .action-next.disabled{opacity:.3}.pager .action-previous{display:inline-block;text-decoration:none}.pager .action-previous>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.pager .action-previous>span.focusable:active,.pager .action-previous>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.pager .action-previous>span.focusable:active,.pager .action-previous>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.pager .action-previous:before{font-family:'icons-blank-theme';content:'\e617';font-size:40px;line-height:inherit;color:#026294;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.pager .action-previous:hover:before{color:#007dbd}.pager .action-next{display:inline-block;text-decoration:none}.pager .action-next>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.pager .action-next>span.focusable:active,.pager .action-next>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.pager .action-next>span.focusable:active,.pager .action-next>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.pager .action-next:before{font-family:'icons-blank-theme';content:'\e608';font-size:40px;line-height:inherit;color:#026294;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.pager .action-next:hover:before{color:#007dbd}.pager .input-text{height:25px;line-height:16px;margin-right:5px;text-align:center;width:25px;vertical-align:top}.pager .pages-total{line-height:25px;vertical-align:top}.massaction{background:#fff;border-top:1px solid #f2ebde;font-size:13px;line-height:28px;padding:15px 15px 0}.massaction>.entry-edit{float:right}.massaction>.entry-edit .field-row{display:inline-block;vertical-align:top}.massaction>.entry-edit .validation-advice{display:none !important}.massaction>.entry-edit .form-inline{display:inline-block}.massaction>.entry-edit .label{padding:0;width:auto}.massaction>.entry-edit .action-{vertical-align:top}.massaction .select.validation-failed{border:1px dashed #e22626;background:#f9d4d4}.grid-severity-critical,.grid-severity-major,.grid-severity-notice,.grid-severity-minor{background:#feeee1;border:1px solid #ed4f2e;color:#ed4f2e;display:block;padding:0 3px;font-weight:700;line-height:17px;text-transform:uppercase;text-align:center}.grid-severity-critical,.grid-severity-major{border-color:#e22626;background:#f9d4d4;color:#e22626}.grid-severity-notice{border-color:#5b8116;background:#d0e5a9;color:#185b00}.grid tbody td input[type=text],.data-table tbody td input[type=text],.grid tbody th input[type=text],.data-table tbody th input[type=text],.grid tbody td .input-text,.data-table tbody td .input-text,.grid tbody th .input-text,.data-table tbody th .input-text,.grid tbody td select,.data-table tbody td select,.grid tbody th select,.data-table tbody th select,.grid tbody td .select,.data-table tbody td .select,.grid tbody th .select,.data-table tbody th .select{width:99%}.ui-tabs-panel .grid .col-sku{max-width:150px;width:150px}.col-indexer_status,.col-indexer_mode{width:160px}.fieldset-wrapper .grid-actions+.grid{padding-top:15px}.fieldset-wrapper .grid-actions{padding:10px 0 0}.fieldset-wrapper .grid{padding:0}.fieldset-wrapper .massaction{padding:0;border-top:none;margin-bottom:15px}.accordion .grid{padding:0}.ui-dialog-content .grid-actions,.ui-dialog-content .grid{padding-left:0;padding-right:0}.qty-table td{border:0;padding:0 5px 3px}.sales-order-create-index .sales-order-create-index .grid table .action-configure{float:right}.sales-order-create-index .data-table .border td{padding-bottom:15px}.sales-order-create-index .actions.update{margin:10px 0}.adminhtml-order-shipment-new .grid .col-product{max-width:770px;width:770px}.customer-index-index .grid .col-name{max-width:90px;width:90px}.customer-index-index .grid .col-billing_region{width:70px}.adminhtml-cms-hierarchy-index .col-title,.adminhtml-cms-hierarchy-index .col-identifier{max-width:410px;width:410px}.adminhtml-widget-instance-edit .grid-chooser .control{margin-top:-19px;width:80%}.eq-ie9 .adminhtml-widget-instance-edit .grid-chooser .control{margin-top:-18px}.adminhtml-widget-instance-edit .grid-chooser .control .grid-actions{padding:0 0 15px}.adminhtml-widget-instance-edit .grid-chooser .control .grid{padding:0}.adminhtml-widget-instance-edit .grid-chooser .control .addon input:last-child,.adminhtml-widget-instance-edit .grid-chooser .control .addon select:last-child{border-radius:0}.reports-report-product-sold .grid .col-name{max-width:720px;width:720px}.adminhtml-system-store-index .grid td{max-width:310px}.adminhtml-system-currency-index .grid{padding-top:0}.adminhtml-system-currency-index .col-currency-edit-rate{min-width:40px}.adminhtml-system-currency-index .col-base-currency{font-weight:700}.adminhtml-system-currency-index .old-rate{display:block;margin-top:3px;text-align:center}.adminhtml-system-currency-index .hor-scroll{overflow-x:auto;min-width:970px}.adminhtml-system-currencysymbol-index .col-currency{width:35%}.adminhtml-system-currencysymbol-index .grid .input-text{margin:0 10px 0 0;width:50%}.catalog-product-set-index .col-set_name{max-width:930px;width:930px}.adminhtml-export-index .grid td{vertical-align:middle}.adminhtml-export-index .grid .input-text-range{margin:0 10px 0 5px;width:37%}.adminhtml-export-index .grid .input-text-range-date{margin:0 5px;width:32%}.adminhtml-export-index .ui-datepicker-trigger{display:inline-block;margin:-3px 10px 0 0;vertical-align:middle}.adminhtml-notification-index .grid .col-select,.adminhtml-cache-index .grid .col-select,.adminhtml-process-list .grid .col-select,.indexer-indexer-list .grid .col-select{width:10px}@font-face{font-family:'icons-blank-theme';src:url('../fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff2') format('woff2'),url('../fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff') format('woff');font-weight:400;font-style:normal}@font-face{font-family:'icons-blank-theme';src:url('../fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff2') format('woff2'),url('../fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff') format('woff');font-weight:400;font-style:normal}.navigation{background-color:#676056;position:relative;z-index:5}.navigation .level-0.reverse>.submenu{right:1px}.navigation>ul{position:relative;text-align:right}.navigation .level-0>.submenu{display:none;position:absolute;top:100%;padding:19px 13px}.navigation .level-0>.submenu a{display:block;color:#676056;font-size:13px;font-weight:400;line-height:1.385;padding:3px 12px 3px;text-decoration:none}.navigation .level-0>.submenu a:focus,.navigation .level-0>.submenu a:hover{text-decoration:underline}.navigation .level-0>.submenu a:hover{color:#fff;background:#989287;text-decoration:none}.navigation .level-0>.submenu li{margin-bottom:1px}.navigation .level-0>.submenu a[href="#"]{cursor:default;display:block;color:#676056;font-size:14px;font-weight:700;line-height:1;margin:7px 0 6px;padding:0 12px}.navigation .level-0>.submenu a[href="#"]:focus,.navigation .level-0>.submenu a[href="#"]:hover{color:#676056;font-size:14px;font-weight:700;background:0 0;text-decoration:none}.navigation .level-0{display:inline-block;float:left;text-align:left;transition:display .15s ease-out}.navigation .level-0>a{background:0 0;display:block;padding:12px 13px 0;color:#f2ebde;font-size:13px;font-weight:600;text-transform:uppercase;text-decoration:none;transition:background .15s ease-out}.navigation .level-0>a:after{content:"";display:block;margin-top:10px;height:3px;font-size:0}.navigation .level-0.active>a{font-weight:700}.navigation .level-0.active>a:after{background:#ef672f}.navigation .level-0.hover.recent>a{background:#fff;color:#676056;font-size:13px;font-weight:600}.navigation .level-0.hover.recent>a:after{background:0 0}.navigation .level-0.hover.recent.active>a{font-weight:700}.navigation .level-0>.submenu{opacity:0;visibility:hidden}.navigation .level-0.recent.hover>.submenu{opacity:1;visibility:visible}.no-js .navigation .level-0:hover>.submenu,.no-js .navigation .level-0.hover>.submenu,.no-js .navigation .level-0>a:focus+.submenu{display:block}.navigation .level-0>.submenu{background:#fff;box-shadow:0 3px 3px rgba(50,50,50,.15)}.navigation .level-0>.submenu li{max-width:200px}.navigation .level-0>.submenu>ul{white-space:nowrap}.navigation .level-0>.submenu .column{display:inline-block;margin-left:40px;vertical-align:top}.navigation .level-0>.submenu .column:first-child{margin-left:0}.navigation .level-0 .submenu .level-1{white-space:normal}.navigation .level-0.parent .submenu .level-1.parent{margin:17px 0 25px}.navigation .level-0.parent .level-1.parent:first-child{margin-top:0}.navigation .level-2 .submenu{margin-left:7px}.navigation .level-0>.submenu .level-2>a[href="#"]{font-size:13px;margin-top:10px;margin-left:7px}.navigation .level-2>.submenu a{font-size:12px;line-height:1.231}.navigation .level-0>.submenu .level-3>a[href="#"],.navigation .level-3 .submenu{margin-left:15px}.navigation .level-0.item-system,.navigation .level-0.item-stores{float:none}.navigation .level-0.item-system>.submenu,.navigation .level-0.item-stores>.submenu{left:auto;right:1px}.adminhtml-dashboard-index .col-1-layout{max-width:1300px;border:none;border-radius:0;padding:0;background:#f7f3eb}.dashboard-inner{padding-top:35px}.dashboard-inner:before,.dashboard-inner:after{content:"";display:table}.dashboard-inner:after{clear:both}.dashboard-inner:before,.dashboard-inner:after{content:"";display:table}.dashboard-inner:after{clear:both}.dashboard-secondary{float:left;width:32%;margin:0 1.5%}.dashboard-main{float:right;width:65%}.dashboard-diagram-chart{max-width:100%;height:auto}.dashboard-diagram-nodata,.dashboard-diagram-switcher{padding:20px 0}.dashboard-diagram-image{background:#fff url(../mui/images/ajax-loader-small.gif) no-repeat 50% 50%}.dashboard-container .ui-tabs-panel{background-color:#fff;min-height:40px;padding:15px}.dashboard-store-stats{margin-top:35px}.dashboard-store-stats .ui-tabs-panel{background:#fff url(../mui/images/ajax-loader-small.gif) no-repeat 50% 50%}.dashboard-item{margin-bottom:30px}.dashboard-item-header{margin-left:5px}.dashboard-item.dashboard-item-primary{margin-bottom:35px}.dashboard-item.dashboard-item-primary .title{font-size:22px;margin-bottom:5px}.dashboard-item.dashboard-item-primary .dashboard-sales-value{display:block;text-align:right;font-weight:600;font-size:30px;margin-right:12px;padding-bottom:5px}.dashboard-item.dashboard-item-primary:first-child{color:#ef672f}.dashboard-item.dashboard-item-primary:first-child .title{color:#ef672f}.dashboard-totals{background:#fff;padding:50px 15px 25px}.dashboard-totals-list{margin:0;padding:0;list-style:none none}.dashboard-totals-list:before,.dashboard-totals-list:after{content:"";display:table}.dashboard-totals-list:after{clear:both}.dashboard-totals-list:before,.dashboard-totals-list:after{content:"";display:table}.dashboard-totals-list:after{clear:both}.dashboard-totals-item{float:left;width:18%;margin-left:7%;padding-top:15px;border-top:2px solid #cac3b4}.dashboard-totals-item:first-child{margin-left:0}.dashboard-totals-label{display:block;font-size:16px;font-weight:600;padding-bottom:2px}.dashboard-totals-value{color:#ef672f;font-size:20px}.dashboard-data{width:100%}.dashboard-data thead{background:0 0}.dashboard-data thead tr{background:0 0}.dashboard-data th,.dashboard-data td{border:none;padding:10px 12px;text-align:right}.dashboard-data th:first-child,.dashboard-data td:first-child{text-align:left}.dashboard-data th{color:#676056;font-weight:600}.dashboard-data td{background-color:transparent}.dashboard-data tbody tr:hover td{background-color:transparent}.dashboard-data tbody tr:nth-child(odd) td,.dashboard-data tbody tr:nth-child(odd):hover td,.dashboard-data tbody tr:nth-child(odd) th,.dashboard-data tbody tr:nth-child(odd):hover th{background-color:#e1dbcf}.ui-tabs-panel .dashboard-data tbody tr:nth-child(odd) td,.ui-tabs-panel .dashboard-data tbody tr:nth-child(odd):hover td,.ui-tabs-panel .dashboard-data tbody tr:nth-child(odd) th,.ui-tabs-panel .dashboard-data tbody tr:nth-child(odd):hover th{background-color:#f7f3eb}.dashboard-data td.empty-text{text-align:center}.ui-tabs-panel .dashboard-data{background-color:#fff}.mage-dropdown-dialog.ui-dialog .ui-dialog-content{overflow:visible}.mage-dropdown-dialog.ui-dialog .ui-dialog-buttonpane{padding:0}.message-system-inner{background:#f7f3eb;border:1px solid #c0bbaf;border-top:0;border-radius:0 0 5px 5px;float:right;overflow:hidden}.message-system-unread .message-system-inner{float:none}.message-system-list{margin:0;padding:0;list-style:none;float:left}.message-system .message-system-list{width:75%}.message-system-list li{padding:5px 13px 7px 36px;position:relative}.message-system-short{padding:5px 13px 7px;float:right}.message-system-short span{display:inline-block;margin-left:7px;border-left:1px #d1ccc3 solid}.message-system-short span:first-child{border:0;margin-left:0}.message-system-short a{padding-left:27px;position:relative;height:16px}.message-system .message-system-short a:before,.message-system-list li:before{font-family:'MUI-Icons';font-style:normal;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;height:16px;width:16px;font-size:16px;line-height:16px;text-align:center;position:absolute;left:7px;top:2px}.message-system-list li:before{top:5px;left:13px}.message-system .message-system-short .warning a:before,.message-system-list li.warning:before{content:"\e006";color:#f2a825}.message-system .message-system-short .error a:before,.message-system-list li.error:before{content:"\e086";font-family:'MUI-Icons';color:#c00815}.ui-dialog .message-system-list{margin-bottom:25px}.sales-order-create-index .order-errors .notice{color:#ed4f2e;font-size:11px;margin:5px 0 0}.order-errors .fieldset-wrapper-title .title{box-sizing:border-box;background:#fffbf0;border:1px solid #d87e34;border-radius:5px;color:#676056;font-size:14px;margin:20px 0;padding:10px 26px 10px 35px;position:relative}.order-errors .fieldset-wrapper-title .title:before{position:absolute;left:11px;top:50%;margin-top:-11px;width:auto;height:auto;font-family:'MUI-Icons';font-style:normal;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;font-size:16px;line-height:inherit;content:'\e046';color:#d87e34}.search-global.miniform{position:relative;z-index:1000;display:inline-block;vertical-align:top;margin:6px 10px 0}.search-global.miniform .mage-suggest{border:0;border-radius:0}.search-global-actions{display:none}.search-global-field{margin:0}.search-global-field .label{position:absolute;right:4px;z-index:2;cursor:pointer;display:inline-block;text-decoration:none}.search-global-field .label>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.search-global-field .label>span.focusable:active,.search-global-field .label>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.search-global-field .label>span.focusable:active,.search-global-field .label>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.search-global-field .label:before{font-family:'MUI-Icons';content:"\e01f";font-size:18px;line-height:29px;color:#cac3b4;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.search-global-field .control{width:48px;overflow:hidden;opacity:0;transition:all .3s ease}.search-global-field .control input[type=text]{background:0 0;border:none;width:100%}.search-global-field.active{z-index:2}.search-global-field.active .label:before{display:none}.search-global-field.active .control{overflow:visible;opacity:1;transition:all .3s ease;width:300px}.search-global-menu{box-sizing:border-box;display:block;width:100%}.notifications-summary{display:inline-block;text-align:left;position:relative;z-index:1}.notifications-summary.active{z-index:999}.notifications-action{color:#f2ebde;padding:12px 22px 11px;text-transform:capitalize;display:inline-block;text-decoration:none}.notifications-action:before{font-family:"MUI-Icons";content:"\e06e";font-size:18px;line-height:18px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.notifications-action:visited,.notifications-action:focus,.notifications-action:active,.notifications-action:hover{color:#f2ebde;text-decoration:none}.notifications-action.active{background-color:#fff;color:#676056}.notifications-action .text{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.notifications-action .text.focusable:active,.notifications-action .text.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.notifications-action .text.focusable:active,.notifications-action .text.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.notifications-action .qty.counter{display:inline-block;background:#ed4f2e;color:#f2ebde;font-size:12px;line-height:12px;font-weight:700;padding:1px 3px;position:absolute;top:6px;left:50%;border-radius:4px}.notifications-list{width:300px;padding:0;margin:0}.notifications-list .last{padding:10px;text-align:center;font-size:12px}.notifications-summary .notifications-entry{padding:15px;color:#676056;font-size:11px;font-weight:400}.notifications-entry{position:relative;z-index:1}.notifications-entry:hover .action{display:block}.notifications-entry-title{padding-right:15px;color:#ed4f2e;font-size:12px;font-weight:600;display:block;margin-bottom:10px}.notifications-entry-description{line-height:1.3;display:block;max-height:3.9em;overflow:hidden;margin-bottom:10px;text-overflow:ellipsis}.notifications-close.action{position:absolute;z-index:1;top:12px;right:12px;display:inline-block;background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;display:none}.notifications-close.action>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.notifications-close.action>span.focusable:active,.notifications-close.action>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.notifications-close.action>span.focusable:active,.notifications-close.action>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.notifications-close.action:before{font-family:'MUI-Icons';content:"\e07f";font-size:16px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.notifications-close.action:focus,.notifications-close.action:active{background:0 0;border:none}.notifications-close.action:hover{background:0 0;border:none}.notifications-close.action.disabled,.notifications-close.action[disabled],fieldset[disabled] .notifications-close.action{cursor:not-allowed;pointer-events:none;opacity:.5}.notifications-dialog-content{display:none}.notifications-critical .notifications-entry-title{padding-left:25px;display:inline-block;text-decoration:none}.notifications-critical .notifications-entry-title:before{font-family:'MUI-Icons';content:"\e086";font-size:18px;line-height:18px;color:#c00815;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.notifications-critical .notifications-entry-title:before{position:absolute;margin-left:-25px}.notifications-dialog-content .notifications-entry-time{color:#8c867e;font-size:13px;font-family:Helvetica,Arial,sans-serif;position:absolute;right:17px;bottom:27px;text-align:right}.notifications-url{display:inline-block;text-decoration:none}.notifications-url>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.notifications-url>span.focusable:active,.notifications-url>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.notifications-url>span.focusable:active,.notifications-url>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.notifications-url:after{font-family:'MUI-Icons';content:"\e084";font-size:16px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center;margin:-2px 0 0 10px}.notifications-dialog-content .notifications-entry-title{font-size:15px}.locale-switcher-field{white-space:nowrap;float:left}.locale-switcher-field .control,.locale-switcher-field .label{vertical-align:middle;margin:0 10px 0 0;display:inline-block}.locale-switcher-select{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;border:1px solid #ada89e;max-width:200px;height:31px;background:url("../images/select-bg.svg") no-repeat 100% 50%;background-size:30px 60px;padding-right:29px;text-indent:.01px;text-overflow:''}.locale-switcher-select::-ms-expand{display:none}.lt-ie10 .locale-switcher-select{background-image:none;padding-right:4px}@-moz-document url-prefix(){.locale-switcher-select{background-image:none}}@-moz-document url-prefix(){.locale-switcher-select{background-image:none}}.mage-suggest{text-align:left;box-sizing:border-box;position:relative;display:inline-block;vertical-align:top;width:100%;background-color:#fff;border:1px solid #ada89e;border-radius:2px}.mage-suggest:after{position:absolute;top:3px;right:3px;bottom:0;width:22px;text-align:center;font-family:'MUI-Icons';font-style:normal;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;content:'\e01f';font-size:18px;color:#b2b2b2}.mage-suggest input[type=search],.mage-suggest input.search{width:100%;border:none;background:0 0;padding-right:30px}.mage-suggest.category-select input[type=search],.mage-suggest.category-select input.search{height:26px}.mage-suggest-dropdown{position:absolute;left:0;right:0;top:100%;margin:1px -1px 0;border:1px solid #cac2b5;background:#fff;box-shadow:0 2px 4px rgba(0,0,0,.2);z-index:990}.mage-suggest-dropdown ul{margin:0;padding:0;list-style:none}.mage-suggest-dropdown li{border-bottom:1px solid #e5e5e5;padding:0}.mage-suggest-dropdown li a{display:block}.mage-suggest-dropdown li a.ui-state-focus{background:#f5f5f5}.mage-suggest-dropdown li a,.mage-suggest-dropdown .jstree li a:hover,.mage-suggest-dropdown .jstree .jstree-hovered,.mage-suggest-dropdown .jstree .jstree-clicked{padding:6px 12px 5px;text-decoration:none;color:#333}.mage-suggest-dropdown .jstree li a:hover,.mage-suggest-dropdown .jstree .jstree-hovered,.mage-suggest-dropdown .jstree .jstree-clicked{border:none}.mage-suggest-dropdown .jstree li{border-bottom:0}.mage-suggest-dropdown .jstree li a{display:inline-block}.mage-suggest-dropdown .jstree .mage-suggest-selected>a{color:#000;background:#f1ffeb}.field-category_ids .mage-suggest-dropdown,.field-new_category_parent .mage-suggest-dropdown{max-height:200px;overflow:auto}.mage-suggest-dropdown .jstree .mage-suggest-selected>a:hover,.mage-suggest-dropdown .jstree .mage-suggest-selected>.jstree-hovered,.mage-suggest-dropdown .jstree .mage-suggest-selected>.jstree-clicked,.mage-suggest-dropdown .jstree .mage-suggest-selected.mage-suggest-not-active>.jstree-hovered,.mage-suggest-dropdown .jstree .mage-suggest-selected.mage-suggest-not-active>.jstree-clicked{background:#e5ffd9}.mage-suggest-dropdown .jstree .mage-suggest-not-active>a{color:#d4d4d4}.mage-suggest-dropdown .jstree .mage-suggest-not-active>a:hover,.mage-suggest-dropdown .jstree .mage-suggest-not-active>.jstree-hovered,.mage-suggest-dropdown .jstree .mage-suggest-not-active>.jstree-clicked{background:#f5f5f5}.mage-suggest-dropdown .category-path{font-size:11px;margin-left:10px;color:#9ba8b5}.suggest-expandable .action-dropdown .action-toggle{display:inline-block;max-width:500px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:none;box-shadow:none;color:#676056;font-size:12px;padding:5px 4px;filter:none}.suggest-expandable .action-dropdown .action-toggle span{display:inline}.suggest-expandable .action-dropdown .action-toggle:before{display:inline-block;float:right;margin-left:4px;font-size:13px;color:#b2b0ad}.suggest-expandable .action-dropdown .action-toggle:hover:before{color:#7e7e7e}.suggest-expandable .dropdown-menu{margin:1px 0 0;left:0;right:auto;width:245px;z-index:4}.suggest-expandable .mage-suggest{border:none;border-radius:3px 3px 0 0}.suggest-expandable .mage-suggest:after{top:10px;right:8px}.suggest-expandable .mage-suggest-inner .title{margin:0;padding:0 10px 4px;text-transform:uppercase;color:#a6a098;font-size:12px;border-bottom:1px solid #e5e5e5}.suggest-expandable .mage-suggest-inner>input[type=search],.suggest-expandable .mage-suggest-inner>input.search{position:relative;margin:6px 5px 5px;padding-right:20px;border:1px solid #ada89e;width:236px;z-index:1}.suggest-expandable .mage-suggest-inner>input.ui-autocomplete-loading,.suggest-expandable .mage-suggest-inner>input.mage-suggest-state-loading{background:#fff url("../mui/images/ajax-loader-small.gif") no-repeat 190px 50%}.suggest-expandable .mage-suggest-dropdown{margin-top:0;border-top:0;border-radius:0 0 3px 3px;max-height:300px;overflow:auto;width:100%;float:left}.suggest-expandable .mage-suggest-dropdown ul{margin:0;padding:0;list-style:none}.suggest-expandable .action-show-all:hover,.suggest-expandable .action-show-all:active,.suggest-expandable .action-show-all:focus,.suggest-expandable .action-show-all[disabled]{border-top:1px solid #e5e5e5;display:block;width:100%;padding:8px 10px 10px;text-align:left;font:12px/1.333 Arial,Verdana,sans-serif;color:#676056}.product-actions .suggest-expandable{max-width:500px;float:left;margin-top:1px}.page-actions.fixed #product-template-suggest-container{display:none}.catalog-category-edit .col-2-left-layout:before{display:none}.category-content .ui-tabs-panel .fieldset{padding-top:40px}.category-content .ui-tabs-panel .fieldset .legend{display:none}.attributes-edit-form .field:not(.field-weight) .addon{display:block;position:relative}.attributes-edit-form .field:not(.field-weight) .addon input[type=text]{border-width:1px}.attributes-edit-form .field:not(.field-weight) .addon .addafter{display:block;border:0;height:auto;width:auto}.attributes-edit-form .field:not(.field-weight) .addon input:focus~.addafter{box-shadow:none}.attributes-edit-form .with-addon .textarea{margin:0}.attributes-edit-form .attribute-change-checkbox{display:block;margin-top:5px}.attributes-edit-form .attribute-change-checkbox .label{float:none;padding:0;width:auto}.attributes-edit-form .attribute-change-checkbox .checkbox{margin-right:5px;width:auto}.attributes-edit-form .field-price .addon>input,.attributes-edit-form .field-special_price .addon>input,.attributes-edit-form .field-gift_wrapping_price .addon>input,.attributes-edit-form .field-msrp .addon>input,.attributes-edit-form .field-gift_wrapping_price .addon>input{padding-left:23px}.attributes-edit-form .field-price .addafter>strong,.attributes-edit-form .field-special_price .addafter>strong,.attributes-edit-form .field-gift_wrapping_price .addafter>strong,.attributes-edit-form .field-msrp .addafter>strong,.attributes-edit-form .field-gift_wrapping_price .addafter>strong{left:5px;position:absolute;top:3px}.attributes-edit-form .field.type-price input:focus+label,.attributes-edit-form .field-price input:focus+label,.attributes-edit-form .field-special_price input:focus+label,.attributes-edit-form .field-msrp input:focus+label,.attributes-edit-form .field-weight input:focus+label{box-shadow:none}.attributes-edit-form .field-special_from_date>.control .input-text,.attributes-edit-form .field-special_to_date>.control .input-text,.attributes-edit-form .field-news_from_date>.control .input-text,.attributes-edit-form .field-news_to_date>.control .input-text,.attributes-edit-form .field-custom_design_from>.control .input-text,.attributes-edit-form .field-custom_design_to>.control .input-text{border-width:1px;width:130px}.attributes-edit-form .field-weight .fields-group-2 .control{padding-right:27px}.attributes-edit-form .field-weight .fields-group-2 .control .addafter+.addafter{border-width:1px 1px 1px 0;border-style:solid;height:28px;right:0;position:absolute;top:0}.attributes-edit-form .field-weight .fields-group-2 .control .addafter strong{line-height:28px}.attributes-edit-form .field-weight .fields-group-2 .control>input:focus+.addafter+.addafter{box-shadow:0 0 8px rgba(82,168,236,.6)}.attributes-edit-form .field-gift_message_available .addon>input[type=checkbox],.attributes-edit-form .field-gift_wrapping_available .addon>input[type=checkbox]{width:auto;margin-right:5px}.attributes-edit-form .fieldset>.addafter{display:none}.advanced-inventory-edit .field.choice{display:block;margin:3px 0 0}.advanced-inventory-edit .field.choice .label{padding-top:1px}.product-actions:before,.product-actions:after{content:"";display:table}.product-actions:after{clear:both}.product-actions:before,.product-actions:after{content:"";display:table}.product-actions:after{clear:both}.product-actions .switcher{float:right}#configurable-attributes-container .actions-select{display:inline-block;position:relative}#configurable-attributes-container .actions-select:before,#configurable-attributes-container .actions-select:after{content:"";display:table}#configurable-attributes-container .actions-select:after{clear:both}#configurable-attributes-container .actions-select:before,#configurable-attributes-container .actions-select:after{content:"";display:table}#configurable-attributes-container .actions-select:after{clear:both}#configurable-attributes-container .actions-select .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}#configurable-attributes-container .actions-select .action.toggle:after{font-family:'icons-blank-theme';content:'\e607';font-size:22px;line-height:22px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}#configurable-attributes-container .actions-select .action.toggle:hover:after{color:inherit}#configurable-attributes-container .actions-select .action.toggle:active:after{color:inherit}#configurable-attributes-container .actions-select .action.toggle.active{display:inline-block;text-decoration:none}#configurable-attributes-container .actions-select .action.toggle.active:after{font-family:'icons-blank-theme';content:'\e618';font-size:22px;line-height:22px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}#configurable-attributes-container .actions-select .action.toggle.active:hover:after{color:inherit}#configurable-attributes-container .actions-select .action.toggle.active:active:after{color:inherit}#configurable-attributes-container .actions-select ul.dropdown{margin:0;padding:0;list-style:none none;box-sizing:border-box;background:#fff;border:1px solid #bbb;position:absolute;z-index:100;top:100%;min-width:100%;margin-top:4px;display:none;box-shadow:0 3px 3px rgba(0,0,0,.15)}#configurable-attributes-container .actions-select ul.dropdown li{margin:0;padding:3px 5px}#configurable-attributes-container .actions-select ul.dropdown li:hover{background:#e8e8e8;cursor:pointer}#configurable-attributes-container .actions-select.active{overflow:visible}#configurable-attributes-container .actions-select.active ul.dropdown{display:block}#configurable-attributes-container .actions-select .action.toggle{padding:1px 8px;border:1px solid #ada89e;background:#fff;border-radius:0 2px 2px 0}#configurable-attributes-container .actions-select .action.toggle:after{width:14px;text-indent:-2px}#configurable-attributes-container .actions-select ul.dropdown li:hover{background:#eef8fc}#configurable-attributes-container .actions-select ul.dropdown a{color:#333;text-decoration:none}#product-variations-matrix .actions-image-uploader{display:inline-block;position:relative;display:block;width:50px}#product-variations-matrix .actions-image-uploader:before,#product-variations-matrix .actions-image-uploader:after{content:"";display:table}#product-variations-matrix .actions-image-uploader:after{clear:both}#product-variations-matrix .actions-image-uploader:before,#product-variations-matrix .actions-image-uploader:after{content:"";display:table}#product-variations-matrix .actions-image-uploader:after{clear:both}#product-variations-matrix .actions-image-uploader .action.split{float:left;margin:0}#product-variations-matrix .actions-image-uploader .action.toggle{float:right;margin:0}#product-variations-matrix .actions-image-uploader .action.toggle{padding:6px 5px;display:inline-block;text-decoration:none}#product-variations-matrix .actions-image-uploader .action.toggle>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#product-variations-matrix .actions-image-uploader .action.toggle>span.focusable:active,#product-variations-matrix .actions-image-uploader .action.toggle>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}#product-variations-matrix .actions-image-uploader .action.toggle>span.focusable:active,#product-variations-matrix .actions-image-uploader .action.toggle>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}#product-variations-matrix .actions-image-uploader .action.toggle:after{font-family:'icons-blank-theme';content:'\e607';font-size:22px;line-height:14px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}#product-variations-matrix .actions-image-uploader .action.toggle:hover:after{color:inherit}#product-variations-matrix .actions-image-uploader .action.toggle:active:after{color:inherit}#product-variations-matrix .actions-image-uploader .action.toggle.active{display:inline-block;text-decoration:none}#product-variations-matrix .actions-image-uploader .action.toggle.active>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#product-variations-matrix .actions-image-uploader .action.toggle.active>span.focusable:active,#product-variations-matrix .actions-image-uploader .action.toggle.active>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}#product-variations-matrix .actions-image-uploader .action.toggle.active>span.focusable:active,#product-variations-matrix .actions-image-uploader .action.toggle.active>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}#product-variations-matrix .actions-image-uploader .action.toggle.active:after{font-family:'icons-blank-theme';content:'\e618';font-size:22px;line-height:14px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}#product-variations-matrix .actions-image-uploader .action.toggle.active:hover:after{color:inherit}#product-variations-matrix .actions-image-uploader .action.toggle.active:active:after{color:inherit}#product-variations-matrix .actions-image-uploader ul.dropdown{margin:0;padding:0;list-style:none none;box-sizing:border-box;background:#fff;border:1px solid #bbb;position:absolute;z-index:100;top:100%;min-width:100%;margin-top:4px;display:none;box-shadow:0 3px 3px rgba(0,0,0,.15)}#product-variations-matrix .actions-image-uploader ul.dropdown li{margin:0;padding:3px 5px}#product-variations-matrix .actions-image-uploader ul.dropdown li:hover{background:#e8e8e8;cursor:pointer}#product-variations-matrix .actions-image-uploader.active{overflow:visible}#product-variations-matrix .actions-image-uploader.active ul.dropdown{display:block}#product-variations-matrix .actions-image-uploader .action.toggle{padding:0 2px;border:1px solid #b7b2a7;background:#fff;border-radius:0 4px 4px 0;border-left:none;height:33px}#product-variations-matrix .actions-image-uploader .action.toggle.no-display{display:none}#product-variations-matrix .actions-image-uploader .action.toggle:after{width:12px;text-indent:-5px}#product-variations-matrix .actions-image-uploader ul.dropdown{left:0;margin-left:0;width:100px}#product-variations-matrix .actions-image-uploader ul.dropdown li:hover{background:#eef8fc}#product-variations-matrix .actions-image-uploader ul.dropdown a{color:#333;text-decoration:none}.debugging-hints .page-actions{position:relative;z-index:1}.debugging-hints .page-actions .debugging-hint-template-file{left:auto !important;right:0 !important}.filter-segments{list-style:none;padding:0}.adminhtml-report-customer-test-detail .col-id{width:35px}.adminhtml-report-customer-test-detail .col-period{white-space:nowrap;width:70px}.adminhtml-report-customer-test-detail .col-zip{width:50px}.adminhtml-report-customer-test-segment .col-id{width:35px}.adminhtml-report-customer-test-segment .col-status{width:65px}.adminhtml-report-customer-test-segment .col-qty{width:145px}.adminhtml-report-customer-test-segment .col-segment,.adminhtml-report-customer-test-segment .col-website{width:35%}.adminhtml-report-customer-test-segment .col-select{width:45px}.test-custom-attributes{margin-bottom:20px}.adminhtml-test-index th.col-id{text-align:left}.adminhtml-test-index .col-price{text-align:right;width:50px}.adminhtml-test-index .col-actions{width:50px}.adminhtml-test-index .col-select{width:60px}.adminhtml-test-edit .field-image .control{line-height:28px}.adminhtml-test-edit .field-image a{display:inline-block;margin:0 5px 0 0}.adminhtml-test-edit .field-image img{vertical-align:middle}.adminhtml-test-new .field-image .input-file,.adminhtml-test-edit .field-image .input-file{display:inline-block;margin:0 15px 0 0;width:auto}.adminhtml-test-new .field-image .addafter,.adminhtml-test-edit .field-image .addafter{border:0;box-shadow:none;display:inline-block;margin:0 15px 0 0;height:auto;width:auto}.adminhtml-test-new .field-image .delete-image,.adminhtml-test-edit .field-image .delete-image{display:inline-block;white-space:nowrap}.adminhtml-test-edit .field-image .delete-image input{margin:-3px 5px 0 0;width:auto;display:inline-block}.adminhtml-test-edit .field-image .addon .delete-image input:focus+label{border:0;box-shadow:none}.adminhtml-test-index .col-id{width:35px}.adminhtml-test-index .col-status{white-space:normal;width:75px}.adminhtml-test-index .col-websites{white-space:nowrap;width:200px}.adminhtml-test-index .col-price .label{display:inline-block;min-width:60px;white-space:nowrap}.adminhtml-test-index .col-price .price-excl-tax .price,.adminhtml-test-index .col-price .price-incl-tax .price{font-weight:700}.invitee_information,.inviter_information{width:48.9362%}.invitee_information{float:left}.inviter_information{float:right}.test_information .data-table th,.invitee_information .data-table th,.inviter_information .data-table th{width:20%;white-space:nowrap}.test_information .data-table textarea,.test_information .data-table input{width:100%}.tests-history ul{margin:0;padding-left:25px}.tests-history ul .status:before{display:inline-block;content:"|";margin:0 10px}.adminhtml-report-test-order .col-period{white-space:nowrap;width:70px}.adminhtml-report-test-order .col-inv-sent,.adminhtml-report-test-order .col-inv-acc,.adminhtml-report-test-order .col-acc,.adminhtml-report-test-order .col-rate{text-align:right;width:23%}.adminhtml-report-test-customer .col-id{width:35px}.adminhtml-report-test-customer .col-period{white-space:nowrap;width:70px}.adminhtml-report-test-customer .col-inv-sent,.adminhtml-report-test-customer .col-inv-acc{text-align:right;width:120px}.adminhtml-report-test-index .col-period{white-space:nowrap}.adminhtml-report-test-index .col-inv-sent,.adminhtml-report-test-index .col-inv-acc,.adminhtml-report-test-index .col-inv-disc,.adminhtml-report-test-index .col-inv-acc-rate,.adminhtml-report-test-index .col-inv-disc-rate{text-align:right;width:19%}.test_information .data-table,.invitee_information .data-table,.inviter_information .data-table{width:100%}.test_information .data-table tbody tr th,.invitee_information .data-table tbody tr th,.inviter_information .data-table tbody tr th{font-weight:700}.test_information .data-table tbody tr td,.test_information .data-table tbody tr th,.invitee_information .data-table tbody tr td,.invitee_information .data-table tbody tr th,.inviter_information .data-table tbody tr td,.inviter_information .data-table tbody tr th{background-color:#fff;border:0;padding:9px 10px 10px;color:#666;vertical-align:top}.test_information .data-table tbody tr:nth-child(2n+1) td,.test_information .data-table tbody tr:nth-child(2n+1) th,.invitee_information .data-table tbody tr:nth-child(2n+1) td,.invitee_information .data-table tbody tr:nth-child(2n+1) th,.inviter_information .data-table tbody tr:nth-child(2n+1) td,.inviter_information .data-table tbody tr:nth-child(2n+1) th{background-color:#fbfaf6}[class^=" adminhtml-test-"] .fieldset-wrapper-content .data-table .col-sort-order{width:80px}[class^=" adminhtml-test-"] .fieldset-wrapper-content .data-table td,[class^=" adminhtml-test-"] .fieldset-wrapper-content .accordion .config .data-table td{vertical-align:top}[class^=" adminhtml-test-"] .fieldset-wrapper-content .data-table td select,[class^=" adminhtml-test-"] .fieldset-wrapper-content .accordion .config .data-table td select{display:block;width:100%}[class^=" adminhtml-test-"] .fieldset-wrapper-content .data-table td .input-radio.global-scope,[class^=" adminhtml-test-"] .fieldset-wrapper-content .accordion .config .data-table td .input-radio.global-scope{margin-top:9px}.sales-order-create-index .ui-dialog .content>.test .field.text .input-text{width:100%}.sales-order-create-index .ui-dialog .content>.test .note .price{font-weight:600}.sales-order-create-index .ui-dialog .content>.test .note .price:before{content:": "}.sales-order-create-index .ui-dialog .content>.test .fixed.amount .label:after{content:": "}.sales-order-create-index .ui-dialog .content>.test .fixed.amount .control{display:inline-block;font-weight:600}.sales-order-create-index .ui-dialog .content>.test .fixed.amount .control .control-value{margin:-2px 0 0;padding:0}.eq-ie9 [class^=" adminhtml-test-"] .custom-options .data-table{word-wrap:normal;table-layout:auto}.rma-items .col-actions a.disabled,.newRma .col-actions a.disabled{cursor:default;opacity:.5}.rma-items .col-actions a.disabled:hover,.newRma .col-actions a.disabled:hover{text-decoration:none}.block.mselect-list .mselect-input{width:100%}.block.mselect-list .mselect-input-container .mselect-save{top:4px}.block.mselect-list .mselect-input-container .mselect-cancel{top:4px}html{font-size:62.5%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size-adjust:100%}body,html{height:100%;min-height:100%}body{color:#676056;font-family:'Open Sans',sans-serif;line-height:1.33;font-weight:400;font-size:1.4rem;background:#f2ebde;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}body>*{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-basis:auto;flex-basis:auto}.page-wrapper{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;min-height:100%;width:100%;max-width:100%;min-width:990px}.page-wrapper>*{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-basis:auto;flex-basis:auto}.page-header{text-align:right}.page-header-wrapper{background-color:#31302b}.page-header:after{content:"";display:table;clear:both}.page-header .logo{margin-top:5px;float:left;text-decoration:none;display:inline-block}.page-header .logo:before{content:"";display:inline-block;vertical-align:middle;width:109px;height:35px;background-image:url("../images/logo.svg");background-size:109px 70px;background-repeat:no-repeat}.page-header .logo:after{display:inline-block;vertical-align:middle;margin-left:10px;content:attr(data-edition);font-weight:600;font-size:16px;color:#ef672f;margin-top:-2px}.page-header .logo span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.page-header .logo span.focusable:active,.page-header .logo span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.page-header .logo span.focusable:active,.page-header .logo span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.page-header .dropdown-menu{border:0}.admin-user{display:inline-block;vertical-align:top;position:relative;text-align:left}.admin-user-account{text-decoration:none;display:inline-block;padding:12px 14px;color:#f2ebde}.admin-user-account:after{font-family:"MUI-Icons";content:"\e02c";font-size:13px;line-height:13px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center;margin:-3px 0 0}.admin-user-account:link,.admin-user-account:visited{color:#f2ebde}.admin-user-account:focus,.admin-user-account:active,.admin-user-account:hover{color:#f2ebde;text-decoration:none}.active .admin-user-account{background-color:#fff;color:#676056}.admin-user-menu{padding:15px;white-space:nowrap;margin-top:0}.admin-user-menu li{border:0;padding:0}.admin-user-menu li:hover{background:0 0}.admin-user-menu a{display:block;color:#676056;font-size:13px;font-weight:400;line-height:1.385;padding:3px 12px 3px;text-decoration:none}.admin-user-menu a:focus,.admin-user-menu a:hover{text-decoration:underline}.admin-user-menu a:hover{color:#fff;background:#989287;text-decoration:none}.admin-user-menu a span:before{content:"("}.admin-user-menu a span:after{content:")"}.page-actions.fixed .page-actions-buttons{padding-right:15px}.page-main-actions{background:#e0dace;color:#645d53;padding:15px;margin-left:auto;margin-right:auto;box-sizing:border-box}.page-main-actions:before,.page-main-actions:after{content:"";display:table}.page-main-actions:after{clear:both}.page-main-actions:before,.page-main-actions:after{content:"";display:table}.page-main-actions:after{clear:both}.page-main-actions .page-actions{float:right}.page-main-actions .page-actions .page-actions-buttons{float:right;display:-webkit-flex;display:-ms-flexbox;display:flex;justify-content:flex-end}.page-main-actions .page-actions button,.page-main-actions .page-actions .action-add.mselect-button-add{margin-left:13px}.page-main-actions .page-actions button.primary,.page-main-actions .page-actions .action-add.mselect-button-add.primary{float:right;-ms-flex-order:2;-webkit-order:2;order:2}.page-main-actions .page-actions button.save:not(.primary),.page-main-actions .page-actions .action-add.mselect-button-add.save:not(.primary){float:right;-ms-flex-order:1;-webkit-order:1;order:1}.page-main-actions .page-actions button.back,.page-main-actions .page-actions button.action-back,.page-main-actions .page-actions button.delete,.page-main-actions .page-actions .action-add.mselect-button-add.back,.page-main-actions .page-actions .action-add.mselect-button-add.action-back,.page-main-actions .page-actions .action-add.mselect-button-add.delete{background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;margin:0 13px}.page-main-actions .page-actions button.back:focus,.page-main-actions .page-actions button.action-back:focus,.page-main-actions .page-actions button.delete:focus,.page-main-actions .page-actions button.back:active,.page-main-actions .page-actions button.action-back:active,.page-main-actions .page-actions button.delete:active,.page-main-actions .page-actions .action-add.mselect-button-add.back:focus,.page-main-actions .page-actions .action-add.mselect-button-add.action-back:focus,.page-main-actions .page-actions .action-add.mselect-button-add.delete:focus,.page-main-actions .page-actions .action-add.mselect-button-add.back:active,.page-main-actions .page-actions .action-add.mselect-button-add.action-back:active,.page-main-actions .page-actions .action-add.mselect-button-add.delete:active{background:0 0;border:none}.page-main-actions .page-actions button.back:hover,.page-main-actions .page-actions button.action-back:hover,.page-main-actions .page-actions button.delete:hover,.page-main-actions .page-actions .action-add.mselect-button-add.back:hover,.page-main-actions .page-actions .action-add.mselect-button-add.action-back:hover,.page-main-actions .page-actions .action-add.mselect-button-add.delete:hover{background:0 0;border:none}.page-main-actions .page-actions button.back.disabled,.page-main-actions .page-actions button.action-back.disabled,.page-main-actions .page-actions button.delete.disabled,.page-main-actions .page-actions button.back[disabled],.page-main-actions .page-actions button.action-back[disabled],.page-main-actions .page-actions button.delete[disabled],fieldset[disabled] .page-main-actions .page-actions button.back,fieldset[disabled] .page-main-actions .page-actions button.action-back,fieldset[disabled] .page-main-actions .page-actions button.delete,.page-main-actions .page-actions .action-add.mselect-button-add.back.disabled,.page-main-actions .page-actions .action-add.mselect-button-add.action-back.disabled,.page-main-actions .page-actions .action-add.mselect-button-add.delete.disabled,.page-main-actions .page-actions .action-add.mselect-button-add.back[disabled],.page-main-actions .page-actions .action-add.mselect-button-add.action-back[disabled],.page-main-actions .page-actions .action-add.mselect-button-add.delete[disabled],fieldset[disabled] .page-main-actions .page-actions .action-add.mselect-button-add.back,fieldset[disabled] .page-main-actions .page-actions .action-add.mselect-button-add.action-back,fieldset[disabled] .page-main-actions .page-actions .action-add.mselect-button-add.delete{cursor:not-allowed;pointer-events:none;opacity:.5}.ie .page-main-actions .page-actions button.back,.ie .page-main-actions .page-actions button.action-back,.ie .page-main-actions .page-actions button.delete,.ie .page-main-actions .page-actions .action-add.mselect-button-add.back,.ie .page-main-actions .page-actions .action-add.mselect-button-add.action-back,.ie .page-main-actions .page-actions .action-add.mselect-button-add.delete{margin-top:6px}.page-main-actions .page-actions button.delete,.page-main-actions .page-actions .action-add.mselect-button-add.delete{color:#e22626;float:left;-ms-flex-order:-1;-webkit-order:-1;order:-1}.page-main-actions .page-actions button.back,.page-main-actions .page-actions button.action-back,.page-main-actions .page-actions .action-add.mselect-button-add.back,.page-main-actions .page-actions .action-add.mselect-button-add.action-back{float:left;-ms-flex-order:-1;-webkit-order:-1;order:-1;display:inline-block;text-decoration:none}.page-main-actions .page-actions button.back:before,.page-main-actions .page-actions button.action-back:before,.page-main-actions .page-actions .action-add.mselect-button-add.back:before,.page-main-actions .page-actions .action-add.mselect-button-add.action-back:before{font-family:'icons-blank-theme';content:'\e625';font-size:inherit;line-height:normal;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center;margin:0 2px 0 0}.page-main-actions .page-actions .actions-split{margin-left:13px;float:right;-ms-flex-order:2;-webkit-order:2;order:2}.page-main-actions .page-actions .actions-split button.primary,.page-main-actions .page-actions .actions-split .action-add.mselect-button-add.primary{float:left}.page-main-actions .page-actions .actions-split .dropdown-menu{text-align:left}.page-main-actions .page-actions .actions-split .dropdown-menu .item{display:block}.page-main-actions .page-actions.fixed{position:fixed;top:0;left:0;right:0;z-index:10;padding:0;background:-webkit-linear-gradient(top,#f5f2ed 0%,#f5f2ed 56%,rgba(245,242,237,0) 100%);background:-ms-linear-gradient(top,#f5f2ed 0%,#f5f2ed 56%,rgba(245,242,237,0) 100%);background:linear-gradient(to bottom,#f5f2ed 0%,#f5f2ed 56%,rgba(245,242,237,0) 100%);background:#e0dace}.page-main-actions .page-actions.fixed .page-actions-inner{position:relative;padding-top:15px;padding-bottom:15px;min-height:36px;text-align:right;box-sizing:border-box}.page-main-actions .page-actions.fixed .page-actions-inner:before,.page-main-actions .page-actions.fixed .page-actions-inner:after{content:"";display:table}.page-main-actions .page-actions.fixed .page-actions-inner:after{clear:both}.page-main-actions .page-actions.fixed .page-actions-inner:before,.page-main-actions .page-actions.fixed .page-actions-inner:after{content:"";display:table}.page-main-actions .page-actions.fixed .page-actions-inner:after{clear:both}.page-main-actions .page-actions.fixed .page-actions-inner:before{text-align:left;content:attr(data-title);float:left;font-size:20px;max-width:50%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lt-ie10 .page-main-actions .page-actions.fixed .page-actions-inner{background:#f5f2ed}.page-main-actions .store-switcher{margin-top:5px}.store-switcher{display:inline-block;font-size:13px}.store-switcher .label{margin-right:5px}.store-switcher .actions.dropdown{display:inline-block;position:relative}.store-switcher .actions.dropdown:before,.store-switcher .actions.dropdown:after{content:"";display:table}.store-switcher .actions.dropdown:after{clear:both}.store-switcher .actions.dropdown:before,.store-switcher .actions.dropdown:after{content:"";display:table}.store-switcher .actions.dropdown:after{clear:both}.store-switcher .actions.dropdown .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}.store-switcher .actions.dropdown .action.toggle:after{font-family:'icons-blank-theme';content:'\e607';font-size:22px;line-height:20px;color:#645d53;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.store-switcher .actions.dropdown .action.toggle:hover:after{color:#645d53}.store-switcher .actions.dropdown .action.toggle:active:after{color:#645d53}.store-switcher .actions.dropdown .action.toggle.active{display:inline-block;text-decoration:none}.store-switcher .actions.dropdown .action.toggle.active:after{font-family:'icons-blank-theme';content:'\e618';font-size:22px;line-height:20px;color:#645d53;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.store-switcher .actions.dropdown .action.toggle.active:hover:after{color:#645d53}.store-switcher .actions.dropdown .action.toggle.active:active:after{color:#645d53}.store-switcher .actions.dropdown .dropdown-menu{margin:0;padding:0;list-style:none none;box-sizing:border-box;background:#fff;border:1px #ada89e solid;position:absolute;z-index:100;top:100%;min-width:195px;margin-top:4px;display:none;box-shadow:0 3px 3px rgba(0,0,0,.15)}.store-switcher .actions.dropdown .dropdown-menu li{margin:0;padding:0}.store-switcher .actions.dropdown .dropdown-menu li:hover{background:0 0;cursor:pointer}.store-switcher .actions.dropdown.active{overflow:visible}.store-switcher .actions.dropdown.active .dropdown-menu{display:block}.store-switcher .actions.dropdown .action.toggle{background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;color:#026294;line-height:normal;margin-top:2px;vertical-align:middle}.store-switcher .actions.dropdown .action.toggle:focus,.store-switcher .actions.dropdown .action.toggle:active{background:0 0;border:none}.store-switcher .actions.dropdown .action.toggle:hover{background:0 0;border:none}.store-switcher .actions.dropdown .action.toggle.disabled,.store-switcher .actions.dropdown .action.toggle[disabled],fieldset[disabled] .store-switcher .actions.dropdown .action.toggle{cursor:not-allowed;pointer-events:none;opacity:.5}.store-switcher .actions.dropdown ul.dropdown-menu{margin-top:4px;padding-top:5px;left:0}.store-switcher .actions.dropdown ul.dropdown-menu li{border:0;cursor:default}.store-switcher .actions.dropdown ul.dropdown-menu li:hover{cursor:default}.store-switcher .actions.dropdown ul.dropdown-menu li a,.store-switcher .actions.dropdown ul.dropdown-menu li span{padding:5px 13px;display:block;color:#645d53}.store-switcher .actions.dropdown ul.dropdown-menu li a{text-decoration:none}.store-switcher .actions.dropdown ul.dropdown-menu li a:hover{background:#edf9fb}.store-switcher .actions.dropdown ul.dropdown-menu li span{color:#ababab;cursor:default}.store-switcher .actions.dropdown ul.dropdown-menu li.current span{color:#645d53;background:#eee}.store-switcher .actions.dropdown ul.dropdown-menu .store-switcher-store a,.store-switcher .actions.dropdown ul.dropdown-menu .store-switcher-store span{padding-left:26px}.store-switcher .actions.dropdown ul.dropdown-menu .store-switcher-store-view a,.store-switcher .actions.dropdown ul.dropdown-menu .store-switcher-store-view span{padding-left:39px}.store-switcher .actions.dropdown ul.dropdown-menu .dropdown-toolbar{border-top:1px #ededed solid;margin-top:10px}.store-switcher .actions.dropdown ul.dropdown-menu .dropdown-toolbar a{display:inline-block;text-decoration:none;display:block}.store-switcher .actions.dropdown ul.dropdown-menu .dropdown-toolbar a:before{font-family:'icons-blank-theme';content:'\e606';font-size:20px;line-height:normal;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:text-top;text-align:center;margin:0 3px 0 -4px}.tooltip{display:inline-block;margin-left:5px}.tooltip .help span,.tooltip .help a{width:16px;height:16px;text-align:center;background:rgba(194,186,169,.5);cursor:pointer;border-radius:10px;vertical-align:middle;display:inline-block;text-decoration:none}.tooltip .help span:hover,.tooltip .help a:hover{background:#c2baa9}.tooltip .help span>span,.tooltip .help a>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.tooltip .help span>span.focusable:active,.tooltip .help a>span.focusable:active,.tooltip .help span>span.focusable:focus,.tooltip .help a>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.tooltip .help span>span.focusable:active,.tooltip .help a>span.focusable:active,.tooltip .help span>span.focusable:focus,.tooltip .help a>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.tooltip .help span:before,.tooltip .help a:before{font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;content:'?';font-size:13px;line-height:16px;color:#5a534a;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.tooltip .help span:before,.tooltip .help a:before{font-weight:700}.tooltip .tooltip-content{display:none;position:absolute;max-width:200px;margin-top:10px;margin-left:-19px;padding:4px 8px;border-radius:3px;background:#000;background:rgba(49,48,43,.8);color:#fff;text-shadow:none;z-index:20}.tooltip .tooltip-content:before{content:'';position:absolute;width:0;height:0;top:-5px;left:20px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000;opacity:.8}.tooltip .tooltip-content.loading{position:absolute}.tooltip .tooltip-content.loading:before{border-bottom-color:rgba(0,0,0,.3)}.tooltip:hover>.tooltip-content{display:block}button,.action-add.mselect-button-add{border-radius:2px;background-image:none;background:#f2ebde;padding:6px 13px;color:#645d53;border:1px solid #ada89e;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.3rem;font-weight:500;line-height:1.4rem;box-sizing:border-box;margin:0;vertical-align:middle}button:focus,button:active,.action-add.mselect-button-add:focus,.action-add.mselect-button-add:active{background:#cac3b4;border:1px solid #989287}button:hover,.action-add.mselect-button-add:hover{background:#cac3b4}button.disabled,button[disabled],fieldset[disabled] button,.action-add.mselect-button-add.disabled,.action-add.mselect-button-add[disabled],fieldset[disabled] .action-add.mselect-button-add{cursor:default;pointer-events:none;opacity:.5}button.primary,.action-add.mselect-button-add.primary{background-image:none;background:#007dbd;padding:6px 13px;color:#fff;border:1px solid #0a6c9f;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.3rem;font-weight:500;box-sizing:border-box;vertical-align:middle}button.primary:focus,button.primary:active,.action-add.mselect-button-add.primary:focus,.action-add.mselect-button-add.primary:active{background:#026294;border:1px solid #004c74;color:#fff}button.primary:hover,.action-add.mselect-button-add.primary:hover{background:#026294;border:1px solid #026294}button.primary.disabled,button.primary[disabled],fieldset[disabled] button.primary,.action-add.mselect-button-add.primary.disabled,.action-add.mselect-button-add.primary[disabled],fieldset[disabled] .action-add.mselect-button-add.primary{cursor:default;pointer-events:none;opacity:.5}.actions-split{display:inline-block;position:relative;vertical-align:middle}.actions-split button,.actions-split .action-add.mselect-button-add{margin-left:0!important}.actions-split:before,.actions-split:after{content:"";display:table}.actions-split:after{clear:both}.actions-split:before,.actions-split:after{content:"";display:table}.actions-split:after{clear:both}.actions-split .action-default{float:left;margin:0}.actions-split .action-toggle{float:right;margin:0}.actions-split button.action-default,.actions-split .action-add.mselect-button-add.action-default{border-top-right-radius:0;border-bottom-right-radius:0}.actions-split button+.action-toggle,.actions-split .action-add.mselect-button-add+.action-toggle{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.actions-split .action-toggle{padding:6px 5px;display:inline-block;text-decoration:none}.actions-split .action-toggle>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.actions-split .action-toggle>span.focusable:active,.actions-split .action-toggle>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.actions-split .action-toggle>span.focusable:active,.actions-split .action-toggle>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.actions-split .action-toggle:after{font-family:'icons-blank-theme';content:'\e607';font-size:22px;line-height:14px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.actions-split .action-toggle:hover:after{color:inherit}.actions-split .action-toggle:active:after{color:inherit}.actions-split .action-toggle.active{display:inline-block;text-decoration:none}.actions-split .action-toggle.active>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.actions-split .action-toggle.active>span.focusable:active,.actions-split .action-toggle.active>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.actions-split .action-toggle.active>span.focusable:active,.actions-split .action-toggle.active>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.actions-split .action-toggle.active:after{font-family:'icons-blank-theme';content:'\e618';font-size:22px;line-height:14px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.actions-split .action-toggle.active:hover:after{color:inherit}.actions-split .action-toggle.active:active:after{color:inherit}.actions-split .dropdown-menu{margin:0;padding:0;list-style:none none;box-sizing:border-box;background:#fff;border:1px solid #bbb;position:absolute;z-index:100;top:100%;min-width:175px;margin-top:4px;display:none;box-shadow:0 3px 3px rgba(0,0,0,.15)}.actions-split .dropdown-menu li{margin:0;padding:3px 5px}.actions-split .dropdown-menu li:hover{background:#e8e8e8;cursor:pointer}.actions-split .dropdown-menu:before,.actions-split .dropdown-menu:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.actions-split .dropdown-menu:before{z-index:99;border:solid 6px;border-color:transparent transparent #fff}.actions-split .dropdown-menu:after{z-index:98;border:solid 7px;border-color:transparent transparent #bbb}.actions-split .dropdown-menu:before{top:-12px;right:10px}.actions-split .dropdown-menu:after{top:-14px;right:9px}.actions-split.active{overflow:visible}.actions-split.active .dropdown-menu{display:block}.actions-split .action-toggle:after{height:13px}.page-content:after{content:"";display:table;clear:both}.page-wrapper>.page-content{margin-bottom:20px}.page-footer{padding:15px 0}.page-footer-wrapper{background-color:#e0dacf;margin-top:auto}.page-footer:after{content:"";display:table;clear:both}.footer-legal{float:right;width:550px}.footer-legal .link-report,.footer-legal .magento-version,.footer-legal .copyright{font-size:13px}.footer-legal:before{content:"";display:inline-block;vertical-align:middle;position:absolute;z-index:1;margin-top:2px;margin-left:-35px;width:30px;height:35px;background-size:109px 70px;background:url("../images/logo.svg") no-repeat 0 -21px}.icon-error{margin-left:15px;color:#c00815;font-size:11px}.icon-error:before{font-family:'MUI-Icons';content:"\e086";font-size:13px;line-height:13px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center;margin:-1px 5px 0 0}.ui-widget-overlay{position:fixed}.control .nested{padding:0}.control *:first-child{margin-bottom:0}.field-tooltip{display:inline-block;vertical-align:top;margin-top:5px;position:relative;z-index:1;width:0;overflow:visible}.field-choice .field-tooltip{margin-top:10px}.field-tooltip:hover{z-index:99}.field-tooltip-action{position:relative;z-index:2;margin-left:18px;width:22px;height:22px;display:inline-block;cursor:pointer}.field-tooltip-action:before{content:"?";font-weight:500;font-size:18px;display:inline-block;overflow:hidden;height:22px;border-radius:11px;line-height:22px;width:22px;text-align:center;color:#fff;background-color:#514943}.field-tooltip-action span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.field-tooltip-action span.focusable:active,.field-tooltip-action span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.field-tooltip-action span.focusable:active,.field-tooltip-action span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.control-text:focus+.field-tooltip-content,.field-tooltip:hover .field-tooltip-content{display:block}.field-tooltip-content{display:none;position:absolute;z-index:1;width:320px;background:#fff8d7;padding:15px 25px;right:-66px;border:1px solid #adadad;border-radius:1px;bottom:42px;box-shadow:0 2px 8px 0 rgba(0,0,0,.3)}.field-tooltip-content:after,.field-tooltip-content:before{content:"";display:block;width:0;height:0;border:16px solid transparent;border-top-color:#adadad;position:absolute;right:20px;top:100%;z-index:3}.field-tooltip-content:after{border-top-color:#fff8d7;margin-top:-1px;z-index:4}.form__field.field-error .control [class*=control-]{border-color:#e22626}.form__field.field-error .control [class*=control-]:before{border-color:#e22626}.form__field .mage-error{border:1px solid #e22626;display:block;margin:2px 0 0;padding:6px 10px 10px;background:#fff8d6;color:#555;font-size:12px;font-weight:500;box-sizing:border-box;max-width:380px}.no-flexbox.no-flexboxlegacy .form__field .control-addon+.mage-error{display:inline-block;width:100%}.form__field{position:relative;z-index:1}.form__field:hover{z-index:2}.control .form__field{position:static}.form__field[data-config-scope]:before{content:attr(data-config-scope);display:inline-block;position:absolute;color:gray;right:0;top:6px}.control .form__field[data-config-scope]:nth-child(n+2):before{content:""}.form__field.field-disabled>.label{color:#999}.form__field.field-disabled.field .control [class*=control-][disabled]{background-color:#e9e9e9;opacity:.5;color:#303030;border-color:#adadad}.control-fields .label~.control{width:100%}.form__field{border:0;padding:0}.form__field .note{color:#303030;padding:0;margin:10px 0 0;max-width:380px}.form__field .note:before{display:none}.form__field.form__field{margin-bottom:0}.form__field.form__field+.form__field.form__field{margin-top:15px}.form__field.form__field:not(.choice)~.choice{margin-left:20px;margin-top:5px}.form__field.form__field.choice~.choice{margin-top:9px}.form__field.form__field~.choice:last-child{margin-bottom:8px}.fieldset>.form__field{margin-bottom:30px}.form__field .label{color:#303030}.form__field:not(.choice)>.label{font-size:14px;font-weight:600;width:30%;padding-right:30px;padding-top:0;line-height:33px;white-space:nowrap}.form__field:not(.choice)>.label:before{content:".";visibility:hidden;width:0;margin-left:-7px;overflow:hidden}.form__field:not(.choice)>.label span{white-space:normal;display:inline-block;vertical-align:middle;line-height:1.2}.form__field.required>.label:after{content:"";margin-left:0}.form__field.required>.label span:after{content:"*";color:#eb5202;display:inline;font-weight:500;font-size:16px;margin-top:2px;position:absolute;z-index:1;margin-left:10px}.form__field .control-file{margin-top:6px}.form__field .control-select{line-height:33px}.form__field .control-select:not([multiple]),.form__field .control-text{height:33px;max-width:380px}.form__field .control-addon{max-width:380px}.form__field .control-textarea,.form__field .control-select,.form__field .control-text{border:1px solid #adadad;border-radius:1px;padding:0 10px;color:#303030;background-color:#fff;font-weight:500;font-size:15px;min-width:11em}.form__field .control-textarea:focus,.form__field .control-select:focus,.form__field .control-text:focus{outline:0;border-color:#007bdb;box-shadow:none}.form__field .control-text{line-height:auto}.form__field .control-textarea{padding-top:6px;padding-bottom:6px;line-height:1.18em}.form__field .control-select[multiple],.form__field .control-textarea{width:100%;height:calc(6*1.2em + 14px)}.form__field .control-value{display:inline-block;padding:6px 10px}.form__field .control-fields .form__field:nth-child(n+2):not(.choice)>.label{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.form__field .control-fields .form__field:nth-child(n+2):not(.choice)>.label.focusable:active,.form__field .control-fields .form__field:nth-child(n+2):not(.choice)>.label.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.form__field .control-fields .form__field:nth-child(n+2):not(.choice)>.label.focusable:active,.form__field .control-fields .form__field:nth-child(n+2):not(.choice)>.label.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.form__field .control-select{padding:0}.form__field .control-select option{box-sizing:border-box;padding:4px 10px;display:block}.form__field .control-select optgroup{font-weight:600;display:block;padding:4px 10px;line-height:33px;list-style:inside;font-style:normal}.form__field .control-range>.form__field:nth-child(2):before{content:"\2014";content:":";display:inline-block;margin-left:-25px;float:left;width:20px;line-height:33px;text-align:center}.form__field.choice{position:relative;z-index:1;padding-top:8px;padding-left:26px;padding-right:0}.form__field.choice .label{font-weight:500;padding:0;display:inline;float:none;line-height:18px}.form__field.choice input{position:absolute;top:8px;margin-top:3px!important}.form__field.choice input[disabled]+.label{opacity:.5;cursor:not-allowed}.control>.form__field.choice{max-width:380px}.control>.form__field.choice:nth-child(1):nth-last-child(2),.control>.form__field.choice:nth-child(2):nth-last-child(1){display:inline-block}.control>.form__field.choice:nth-child(1):nth-last-child(2)+.choice,.control>.form__field.choice:nth-child(2):nth-last-child(1)+.choice{margin-left:41px;margin-top:0}.control>.form__field.choice:nth-child(1):nth-last-child(2)+.choice:before,.control>.form__field.choice:nth-child(2):nth-last-child(1)+.choice:before{content:"";position:absolute;display:inline-block;height:20px;top:8px;left:-20px;width:1px;background:#ccc}.form__field.choice .label{cursor:pointer}.form__field.choice .label:before{content:"";position:absolute;z-index:1;border:1px solid #adadad;width:14px;height:14px;top:10px;left:0;border-radius:2px;background:url("../Magento_Ui/images/choice_bkg.png") no-repeat -100% -100%}.form__field.choice input:focus+.label:before{outline:0;border-color:#007bdb}.form__field.choice .control-radio+.label:before{border-radius:8px}.form__field.choice .control-radio:checked+.label:before{background-position:-26px -1px}.form__field.choice .control-checkbox:checked+.label:before{background-position:-1px -1px}.form__field.choice input{opacity:0}.fieldset>.form__field.choice{margin-left:30%}.form__field .control-after,.form__field .control-before{border:0;color:#858585;font-weight:300;font-size:15px;line-height:33px;display:inline-block;height:33px;box-sizing:border-box;padding:0 3px}.no-flexbox.no-flexboxlegacy .form__field .control-before,.no-flexbox.no-flexboxlegacy .form__field .control-addon{float:left;white-space:nowrap}.form__field .control-addon{display:inline-flex;max-width:380px;width:100%;flex-flow:row nowrap;position:relative;z-index:1}.form__field .control-addon>*{position:relative;z-index:1}.form__field .control-addon .control-text[disabled][type],.form__field .control-addon .control-select[disabled][type],.form__field .control-addon .control-select,.form__field .control-addon .control-text{background:transparent!important;border:0;width:auto;vertical-align:top;order:1;flex:1}.form__field .control-addon .control-text[disabled][type]:focus,.form__field .control-addon .control-select[disabled][type]:focus,.form__field .control-addon .control-select:focus,.form__field .control-addon .control-text:focus{box-shadow:none}.form__field .control-addon .control-text[disabled][type]:focus+label:before,.form__field .control-addon .control-select[disabled][type]:focus+label:before,.form__field .control-addon .control-select:focus+label:before,.form__field .control-addon .control-text:focus+label:before{outline:0;border-color:#007bdb}.form__field .control-addon .control-text[disabled][type]+label,.form__field .control-addon .control-select[disabled][type]+label,.form__field .control-addon .control-select+label,.form__field .control-addon .control-text+label{padding-left:10px;position:static!important;z-index:0}.form__field .control-addon .control-text[disabled][type]+label>*,.form__field .control-addon .control-select[disabled][type]+label>*,.form__field .control-addon .control-select+label>*,.form__field .control-addon .control-text+label>*{vertical-align:top;position:relative;z-index:2}.form__field .control-addon .control-text[disabled][type]+label:before,.form__field .control-addon .control-select[disabled][type]+label:before,.form__field .control-addon .control-select+label:before,.form__field .control-addon .control-text+label:before{box-sizing:border-box;border-radius:1px;border:1px solid #adadad;content:"";display:block;position:absolute;top:0;left:0;width:100%;height:100%;z-index:0;background:#fff}.form__field .control-addon .control-text[disabled][type][disabled]+label:before,.form__field .control-addon .control-select[disabled][type][disabled]+label:before,.form__field .control-addon .control-select[disabled]+label:before,.form__field .control-addon .control-text[disabled]+label:before{opacity:.5;background:#e9e9e9}.form__field .control-after{order:3}.form__field .control-after:last-child{padding-right:10px}.form__field .control-before{order:0}.form__field .control-some{display:flex}.form__field [class*=control-grouped]{display:table;width:100%;table-layout:fixed;box-sizing:border-box}.form__field [class*=control-grouped]>.form__field{display:table-cell;width:50%;vertical-align:top}.form__field [class*=control-grouped]>.form__field>.control{width:100%;float:none}.form__field [class*=control-grouped]>.form__field:nth-child(n+2){padding-left:20px}.form__field [class*=control-grouped]>.form__field:nth-child(n+2):not(.choice) .label{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.form__field [class*=control-grouped]>.form__field:nth-child(n+2):not(.choice) .label.focusable:active,.form__field [class*=control-grouped]>.form__field:nth-child(n+2):not(.choice) .label.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.form__field [class*=control-grouped]>.form__field:nth-child(n+2):not(.choice) .label.focusable:active,.form__field [class*=control-grouped]>.form__field:nth-child(n+2):not(.choice) .label.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.form__field [required]{box-shadow:none}fieldset.form__field{position:relative}fieldset.form__field [class*=control-grouped]>.form__field:first-child>.label,fieldset.form__field .control-fields>.form__field:first-child>.label{position:absolute;left:0;top:0;opacity:0;cursor:pointer;width:30%}.control-text+.ui-datepicker-trigger{background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;line-height:inherit;font-weight:400;text-decoration:none;margin-left:-40px;display:inline-block}.control-text+.ui-datepicker-trigger img{display:none}.control-text+.ui-datepicker-trigger:focus,.control-text+.ui-datepicker-trigger:active{background:0 0;border:none}.control-text+.ui-datepicker-trigger:hover{background:0 0;border:none}.control-text+.ui-datepicker-trigger.disabled,.control-text+.ui-datepicker-trigger[disabled],fieldset[disabled] .control-text+.ui-datepicker-trigger{cursor:not-allowed;pointer-events:none;opacity:.5}.control-text+.ui-datepicker-trigger>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.control-text+.ui-datepicker-trigger>span.focusable:active,.control-text+.ui-datepicker-trigger>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.control-text+.ui-datepicker-trigger>span.focusable:active,.control-text+.ui-datepicker-trigger>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.control-text+.ui-datepicker-trigger:after{font-family:'icons-blank-theme';content:'\e612';font-size:38px;line-height:33px;color:#514943;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}[class*=tab-nav-item]:not(ul):active,[class*=tab-nav-item]:not(ul):focus{box-shadow:none;outline:none}.customer-index-edit .col-2-left-layout,.customer-index-edit .col-1-layout{background:#fff}.customer-index-edit{background:#fff}.customer-index-edit .col-2-left-layout{background:#fff}.customer-index-edit .main-col{padding-left:40px}.customer-index-edit .page-main-actions{background:0 0}.tab-nav.block{margin-bottom:40px}.tab-nav.block:first-child{margin-top:16px}.tab-nav.block .block-title{padding:7px 20px}.tab-nav-items{padding:0;border:1px solid #d3d3d3;box-shadow:0 0 4px rgba(50,50,50,.35);margin:0 0 40px;background:#f7f7f7}.tab-nav-item{padding:0;list-style-type:none;border-bottom:1px solid #e0e0e0;position:relative;margin:0 15px;z-index:1}.tab-nav-item:last-child{border-bottom:0}.tab-nav-item.ui-state-active{z-index:2;background:#fff;padding:1px 14px;border:2px solid #eb5202;margin:-1px}.tab-nav-item.ui-state-active .tab-nav-item-link{padding:13px 15px 13px;color:#eb5202}.tab-nav-item.ui-tabs-loading{position:relative;z-index:1}.tab-nav-item.ui-tabs-loading:before{content:"";display:block;position:absolute;z-index:2;background:url("../images/loader-2.gif") no-repeat 50% 50%;background-size:120px;width:20px;height:20px;top:13px;left:-10px}.tab-nav-item.ui-tabs-loading.ui-state-active:before{top:12px;left:4px}.tab-nav-item-link{display:block;padding:15px;color:#666;line-height:1}.tab-nav-item-link:focus,.tab-nav-item-link:active,.tab-nav-item-link:hover{outline:0;color:#eb5202;text-decoration:none}.ui-state-active .tab-nav-item-link{color:#666;font-weight:600}.tab-nav-item-link.changed{font-style:italic}.listing-tiles{overflow:hidden;margin-top:-10px;margin-left:-10px}.listing-tiles .listing-tile{background-color:#f2ebde;display:block;width:238px;height:200px;float:left;border:1px solid #676056;margin-top:10px;margin-left:10px;border-radius:4px;text-align:center}.listing-tiles .listing-tile.disabled{border-color:red}.listing-tiles .listing-tile.enabled{border-color:green}.listing .disabled{color:red}.listing .enabled{color:green}.pager{text-align:left;padding-bottom:10px}.pager:before,.pager:after{content:"";display:table}.pager:after{clear:both}.pager:before,.pager:after{content:"";display:table}.pager:after{clear:both}.pager [data-part=left]{display:inline-block;width:45%;float:left;text-align:left}.pager [data-part=right]{display:inline-block;width:45%;text-align:right;float:right;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.pager .action-next{cursor:pointer}.pager .action-previous{cursor:pointer}.pager{text-align:left}.pager [data-part=left]{display:inline-block;width:45%;text-align:left}.pager [data-part=right]{display:inline-block;width:45%;text-align:right;float:right}.grid .col-title{min-width:90px;text-align:center}.grid-actions [data-part=search]{display:inline-block;margin:0 30px}.grid-actions [data-part=search] input[type=text]{vertical-align:bottom;width:460px}.grid .actions-split .dropdown-menu{right:auto;left:auto;text-align:left;color:#676056;font-weight:400}.grid .actions-split .dropdown-menu:after{right:auto;left:9px}.grid .actions-split .dropdown-menu:before{right:auto;left:10px}.grid .grid-actions{padding:10px 0}.grid .hor-scroll{padding-top:10px}.grid .select-box{display:inline-block;vertical-align:top;margin:-12px -10px -7px;padding:12px 10px 7px;width:100%}.filters-toggle{background:#f2ebde;padding:6px 13px;color:#645d53;border:1px solid #ada89e;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.3rem;font-weight:500;line-height:1.4rem;box-sizing:border-box;margin:3px;vertical-align:middle;display:inline-block;background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.filters-toggle:after{font-family:'icons-blank-theme';content:'\e607';font-size:30px;line-height:15px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.filters-toggle:hover:after{color:inherit}.filters-toggle:active:after{color:inherit}.filters-toggle:focus,.filters-toggle:active{background:#cac3b4;border:1px solid #989287}.filters-toggle:hover{background:#cac3b4}.filters-toggle.disabled,.filters-toggle[disabled],fieldset[disabled] .filters-toggle{cursor:default;pointer-events:none;opacity:.5}.filters-toggle:focus,.filters-toggle:active{background:0 0;border:none}.filters-toggle:hover{background:0 0;border:none}.filters-toggle.disabled,.filters-toggle[disabled],fieldset[disabled] .filters-toggle{cursor:not-allowed;pointer-events:none;opacity:.5}.filters-toggle:after{margin-top:2px;margin-left:-3px}.filters-toggle.active:after{content:'\e618'}.filters-current{padding:10px 0;display:none}.filters-current.active{display:block}.filters-items{margin:0;padding:0;list-style:none none;display:inline}.filters-item{display:inline-block;margin:0 5px 5px 0;padding:2px 2px 2px 4px;border-radius:3px;background:#f7f3eb}.filters-item .item-label{font-weight:600}.filters-item .item-label:after{content:": "}.filters-item .action-remove{background-image:none;background:#f2ebde;padding:6px 13px;color:#645d53;border:1px solid #ada89e;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.3rem;font-weight:500;line-height:1.4rem;box-sizing:border-box;margin:3px;vertical-align:middle;display:inline-block;text-decoration:none;padding:0}.filters-item .action-remove>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.filters-item .action-remove>span.focusable:active,.filters-item .action-remove>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.filters-item .action-remove>span.focusable:active,.filters-item .action-remove>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.filters-item .action-remove:before{font-family:'icons-blank-theme';content:'\e616';font-size:16px;line-height:16px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.filters-item .action-remove:hover:before{color:inherit}.filters-item .action-remove:active:before{color:inherit}.filters-item .action-remove:focus,.filters-item .action-remove:active{background:#cac3b4;border:1px solid #989287}.filters-item .action-remove:hover{background:#cac3b4}.filters-item .action-remove.disabled,.filters-item .action-remove[disabled],fieldset[disabled] .filters-item .action-remove{cursor:default;pointer-events:none;opacity:.5}.filters-form{position:relative;z-index:1;margin:14px 0;background:#fff;border:1px solid #bbb;box-shadow:0 3px 3px rgba(0,0,0,.15)}.filters-form .action-close{position:absolute;top:3px;right:7px;background:#f2ebde;padding:6px 13px;color:#645d53;border:1px solid #ada89e;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.3rem;font-weight:500;line-height:1.4rem;box-sizing:border-box;margin:3px;vertical-align:middle;display:inline-block;background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.filters-form .action-close>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.filters-form .action-close>span.focusable:active,.filters-form .action-close>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.filters-form .action-close>span.focusable:active,.filters-form .action-close>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.filters-form .action-close:before{font-family:'icons-blank-theme';content:'\e616';font-size:42px;line-height:42px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.filters-form .action-close:hover:before{color:inherit}.filters-form .action-close:active:before{color:inherit}.filters-form .action-close:focus,.filters-form .action-close:active{background:#cac3b4;border:1px solid #989287}.filters-form .action-close:hover{background:#cac3b4}.filters-form .action-close.disabled,.filters-form .action-close[disabled],fieldset[disabled] .filters-form .action-close{cursor:default;pointer-events:none;opacity:.5}.filters-form .action-close:focus,.filters-form .action-close:active{background:0 0;border:none}.filters-form .action-close:hover{background:0 0;border:none}.filters-form .action-close.disabled,.filters-form .action-close[disabled],fieldset[disabled] .filters-form .action-close{cursor:not-allowed;pointer-events:none;opacity:.5}.filters-actions{margin:18px;text-align:right}.filters-fieldset{padding-bottom:0}.filters-fieldset .field{border:0;margin:0 0 20px;box-sizing:border-box;display:inline-block;padding:0 12px 0 0;width:33.33333333%;vertical-align:top}.filters-fieldset .field:before,.filters-fieldset .field:after{content:"";display:table}.filters-fieldset .field:after{clear:both}.filters-fieldset .field:before,.filters-fieldset .field:after{content:"";display:table}.filters-fieldset .field:after{clear:both}.filters-fieldset .field.choice:before,.filters-fieldset .field.no-label:before{box-sizing:border-box;content:" ";height:1px;float:left;padding:6px 15px 0 0;width:35%}.filters-fieldset .field .description{box-sizing:border-box;float:left;padding:6px 15px 0 0;text-align:right;width:35%}.filters-fieldset .field:not(.choice)>.label{box-sizing:border-box;float:left;padding:6px 15px 0 0;text-align:right;width:35%}.filters-fieldset .field:not(.choice)>.control{float:left;width:65%}.filters-fieldset .field:last-child{margin-bottom:0}.filters-fieldset .field+.fieldset{clear:both}.filters-fieldset .field>.label{font-weight:700}.filters-fieldset .field>.label+br{display:none}.filters-fieldset .field .choice input{vertical-align:top}.filters-fieldset .field .fields.group:before,.filters-fieldset .field .fields.group:after{content:"";display:table}.filters-fieldset .field .fields.group:after{clear:both}.filters-fieldset .field .fields.group:before,.filters-fieldset .field .fields.group:after{content:"";display:table}.filters-fieldset .field .fields.group:after{clear:both}.filters-fieldset .field .fields.group .field{box-sizing:border-box;float:left}.filters-fieldset .field .fields.group.group-2 .field{width:50% !important}.filters-fieldset .field .fields.group.group-3 .field{width:33.3% !important}.filters-fieldset .field .fields.group.group-4 .field{width:25% !important}.filters-fieldset .field .fields.group.group-5 .field{width:20% !important}.filters-fieldset .field .addon{display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;padding:0;width:100%}.filters-fieldset .field .addon textarea,.filters-fieldset .field .addon select,.filters-fieldset .field .addon input{-ms-flex-order:2;-webkit-order:2;order:2;-webkit-flex-basis:100%;flex-basis:100%;box-shadow:none;display:inline-block;margin:0;width:auto}.filters-fieldset .field .addon .addbefore,.filters-fieldset .field .addon .addafter{-ms-flex-order:3;-webkit-order:3;order:3;display:inline-block;box-sizing:border-box;background:#fff;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 9px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;line-height:1.428571429;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.filters-fieldset .field .addon .addbefore:disabled,.filters-fieldset .field .addon .addafter:disabled{opacity:.5}.filters-fieldset .field .addon .addbefore::-moz-placeholder,.filters-fieldset .field .addon .addafter::-moz-placeholder{color:#c2c2c2}.filters-fieldset .field .addon .addbefore::-webkit-input-placeholder,.filters-fieldset .field .addon .addafter::-webkit-input-placeholder{color:#c2c2c2}.filters-fieldset .field .addon .addbefore:-ms-input-placeholder,.filters-fieldset .field .addon .addafter:-ms-input-placeholder{color:#c2c2c2}.filters-fieldset .field .addon .addbefore{float:left;-ms-flex-order:1;-webkit-order:1;order:1}.filters-fieldset .field .additional{margin-top:10px}.filters-fieldset .field.required>.label:after{content:'*';font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.filters-fieldset .field .note{font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.filters-fieldset .field .note:before{font-family:'icons-blank-theme';content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.filters-fieldset .field .label{color:#676056;font-size:13px;font-weight:600;margin:0}.filters .field-date .group .hasDatepicker{width:100%;padding-right:30px}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger{background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;line-height:inherit;font-weight:400;text-decoration:none;margin-left:-33px;display:inline-block;width:30px}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger img{display:none}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger:focus,.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger:active{background:0 0;border:none}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger:hover{background:0 0;border:none}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger.disabled,.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger[disabled],fieldset[disabled] .filters .field-date .group .hasDatepicker+.ui-datepicker-trigger{cursor:not-allowed;pointer-events:none;opacity:.5}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger>span.focusable:active,.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger>span.focusable:active,.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger:after{font-family:'icons-blank-theme';content:'\e612';font-size:35px;line-height:30px;color:#514943;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.filters .field-range .group .field{margin-bottom:0}.filters .field-range .group .control{width:100%;box-sizing:border-box;padding-right:0;position:relative;z-index:1}.mass-select{position:relative;margin:-6px -10px;padding:6px 2px 6px 10px;z-index:1;white-space:nowrap}.mass-select.active{background:rgba(0,0,0,.2)}.mass-select-toggle{background:#f2ebde;padding:6px 13px;color:#645d53;border:1px solid #ada89e;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.3rem;font-weight:500;line-height:1.4rem;box-sizing:border-box;margin:3px;vertical-align:middle;display:inline-block;background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.mass-select-toggle>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.mass-select-toggle>span.focusable:active,.mass-select-toggle>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.mass-select-toggle>span.focusable:active,.mass-select-toggle>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.mass-select-toggle:before{font-family:'icons-blank-theme';content:'\e607';font-size:30px;line-height:15px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.mass-select-toggle:hover:before{color:inherit}.mass-select-toggle:active:before{color:inherit}.mass-select-toggle:focus,.mass-select-toggle:active{background:#cac3b4;border:1px solid #989287}.mass-select-toggle:hover{background:#cac3b4}.mass-select-toggle.disabled,.mass-select-toggle[disabled],fieldset[disabled] .mass-select-toggle{cursor:default;pointer-events:none;opacity:.5}.mass-select-toggle:focus,.mass-select-toggle:active{background:0 0;border:none}.mass-select-toggle:hover{background:0 0;border:none}.mass-select-toggle.disabled,.mass-select-toggle[disabled],fieldset[disabled] .mass-select-toggle{cursor:not-allowed;pointer-events:none;opacity:.5}.mass-select-toggle:before{margin-top:-2px;text-indent:-5px;color:#fff}.mass-select-toggle:hover:before{color:#fff}.mass-select-toggle:active:before,.mass-select-toggle.active:before{content:'\e618'}.mass-select-field{display:inline}.mass-select-menu{display:none;position:absolute;top:100%;left:0;text-align:left;margin:0;padding:0;list-style:none none;background:#fff;border:1px solid #bbb;min-width:175px;box-shadow:0 3px 3px rgba(0,0,0,.15)}.mass-select-menu li{margin:0;padding:4px 15px;border-bottom:1px solid #e5e5e5}.mass-select-menu li:hover{background:#e8e8e8;cursor:pointer}.mass-select-menu span{font-weight:400;font-size:13px;color:#645d53}.mass-select-menu.active{display:block}.grid-loading-mask{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(255,255,255,.5);z-index:100}.grid-loading-mask .grid-loader{position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;width:218px;height:149px;background:url('../images/loader-2.gif') 50% 50% no-repeat}.addon input{border-width:1px 0 1px 1px}.addon input~.addafter strong{display:inline-block;background:#fff;line-height:24px;margin:0 3px 0 -2px;padding-left:4px;padding-right:4px;position:relative;font-size:12px;top:0}.addon input:focus~.addafter{border-color:#75b9f0;box-shadow:0 0 8px rgba(82,168,236,.6)}.addon input:focus~.addafter strong{margin-top:0}.addon .addafter{background:0 0;color:#a6a6a6;border-width:1px 1px 1px 0;border-radius:2px 2px 0 0;padding:0;border-color:#ada89e}.addon .pager input{border-width:1px}.field .control input[type=text][disabled],.field .control input[type=text][disabled]~.addafter,.field .control select[disabled],.field .control select[disabled]~.addafter{background-color:#fff;border-color:#eee;box-shadow:none;color:#999}.field .control input[type=text][disabled]~.addafter strong,.field .control select[disabled]~.addafter strong{background-color:#fff}.field-price.addon{direction:rtl}.field-price.addon>*{direction:ltr}.field-price.addon .addafter{border-width:1px 0 1px 1px;border-radius:2px 0 0 2px}.field-price.addon input:first-child{border-radius:0 2px 2px 0}.field-price input{border-width:1px 1px 1px 0}.field-price input:focus{box-shadow:0 0 8px rgba(82,168,236,.6)}.field-price input:focus~label.addafter{box-shadow:0 0 8px rgba(82,168,236,.6)}.field-price input~label.addafter strong{margin-left:2px;margin-right:-2px}.field-price.addon>input{width:99px;float:left}.field-price .control{position:relative}.field-price label.mage-error{position:absolute;left:0;top:30px}.version-fieldset .grid-actions{border-bottom:1px solid #f2ebde;margin:0 0 15px;padding:0 0 15px}.navigation>ul,.message-system,.page-header,.page-actions.fixed .page-actions-inner,.page-content,.page-footer{width:auto;min-width:960px;max-width:1300px;margin:0 auto;padding-left:15px;padding-right:15px;box-sizing:border-box;width:100%}.pager label.page,.filters .field-range .group .label,.mass-select-field .label{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visually-hidden.focusable:active,.visually-hidden.focusable:focus,.pager label.page.focusable:active,.pager label.page.focusable:focus,.filters .field-range .group .label.focusable:active,.filters .field-range .group .label.focusable:focus,.mass-select-field .label.focusable:active,.mass-select-field .label.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}table th.required:after,.data-table th.required-entry:after,.data-table td.required-entry:after,.grid-actions .filter.required .label span:after,.grid-actions .required:after,.accordion .config .data-table td.required-entry:after{content:'*';color:#e22626;font-weight:400;margin-left:3px}.grid th.required:after,.grid th .required:after{content:'*';color:#f9d4d4;font-weight:400;margin-left:3px}.grid td.col-period,.grid td.col-date,.grid td.col-date_to,.grid td.col-date_from,.grid td.col-ended_at,.grid td.col-created_at,.grid td.col-updated_at,.grid td.col-customer_since,.grid td.col-session_start_time,.grid td.col-last_activity,.grid td.col-email,.grid td.col-name,.grid td.col-sku,.grid td.col-firstname,.grid td.col-lastname,.grid td.col-title,.grid td.col-label,.grid td.col-product,.grid td.col-set_name,.grid td.col-websites,.grid td.col-time,.grid td.col-billing_name,.grid td.col-shipping_name,.grid td.col-phone,.grid td.col-type,.product-options .grouped-items-table .col-name,.product-options .grouped-items-table .col-sku,.sales-order-create-index .data-table .col-product,[class^=' adminhtml-rma-'] .fieldset-wrapper .data-table td,[class^=' adminhtml-rma-'] .grid .col-product_sku,[class^=' adminhtml-rma-'] .grid .col-product_name,.col-grid_segment_name,.adminhtml-catalog-event-index .col-category,[class^=' catalog-search'] .col-search_query,[class^=' catalog-search'] .col-synonym_for,[class^=' catalog-search'] .col-redirect,.adminhtml-urlrewrite-index .col-request_path,.adminhtml-cms-page-index .col-title,.adminhtml-cms-page-index .col-identifier,.adminhtml-cms-hierarchy-index .col-title,.adminhtml-cms-hierarchy-index .col-identifier,.col-banner_name,.adminhtml-widget-instance-index .col-title,.reports-index-search .col-query_text,.adminhtml-rma-item-attribute-index .grid .col-attr-code,.adminhtml-system-store-index .grid td,.catalog-product-attribute-index .col-attr-code,.catalog-product-attribute-index .col-label,.adminhtml-export-index .col-code,.adminhtml-logging-index .grid .col-fullaction,.adminhtml-system-variable-index .grid .col-code,.adminhtml-logging-index .grid .col-info,.dashboard-secondary .dashboard-item tr>td:first-child,.ui-tabs-panel .dashboard-data .col-name,.data-table-td-max .data-table td,[class^=' adminhtml-rma-'] .fieldset-wrapper .accordion .config .data-table td,.data-table-td-max .accordion .config .data-table td,.order-account-information .data-table td,[class^=' adminhtml-rma-'] .rma-request-details .data-table td{overflow:hidden;text-overflow:ellipsis}td.col-period,td.col-date,td.col-date_to,td.col-date_from,td.col-ended_at,td.col-created_at,td.col-updated_at,td.col-customer_since,td.col-session_start_time,td.col-time,td.col-sku,td.col-type,[class^=' adminhtml-rma-'] #rma_items_grid_table .headings th,.adminhtml-process-list .col-action a,.adminhtml-process-list .col-mode{white-space:nowrap}table thead tr th:first-child,table tfoot tr th:first-child,table tfoot tr td:first-child{border-left:0}table thead tr th:last-child,table tfoot tr th:last-child,table tfoot tr td:last-child{border-right:0}.form-inline .grid-actions .label,.form-inline .massaction .label{padding:0;width:auto}.grid .col-action,.grid .col-actions,.grid .col-qty,.grid .col-purchases,.catalog-product-edit .ui-tabs-panel .grid .col-price,.catalog-product-edit .ui-tabs-panel .grid .col-position{width:50px}.grid .col-order-number,.grid .col-real_order_id,.grid .col-invoice-number,.grid .col-increment_id,.grid .col-transaction-id,.grid .col-parent-transaction-id,.grid .col-reference_id,.grid .col-status,.grid .col-price,.grid .col-position,.grid .col-base_grand_total,.grid .col-grand_total,.grid .col-sort_order,.grid .col-carts,.grid .col-priority,.grid .col-severity,.sales-order-create-index .col-in_products,[class^=' reports-'] [class^=col-total],[class^=' reports-'] [class^=col-average],[class^=' reports-'] [class^=col-ref-],[class^=' reports-'] [class^=col-rate],[class^=' reports-'] [class^=col-tax-amount],[class^=' adminhtml-customer-'] .col-required,.adminhtml-rma-item-attribute-index .col-required,[class^=' adminhtml-customer-'] .col-system,.adminhtml-rma-item-attribute-index .col-system,[class^=' adminhtml-customer-'] .col-is_visible,.adminhtml-rma-item-attribute-index .col-is_visible,[class^=' adminhtml-customer-'] .col-sort_order,.adminhtml-rma-item-attribute-index .col-sort_order,.catalog-product-attribute-index [class^=' col-is_'],.catalog-product-attribute-index .col-required,.catalog-product-attribute-index .col-system,.adminhtml-test-index .col-is_listed,[class^=' tests-report-test'] [class^=col-inv-]{width:70px}.grid .col-phone,.sales-order-view .grid .col-period,.sales-order-create-index .col-phone,[class^=' adminhtml-rma-'] .grid .col-product_sku,.adminhtml-rma-edit .col-product,.adminhtml-rma-edit .col-sku,.catalog-product-edit .ui-tabs-panel .grid .col-name,.catalog-product-edit .ui-tabs-panel .grid .col-type,.catalog-product-edit .ui-tabs-panel .grid .col-sku,.customer-index-index .grid .col-customer_since,.customer-index-index .grid .col-billing_country_id,[class^=' customer-index-'] .fieldset-wrapper .grid .col-created_at,[class^=' customer-index-'] .accordion .grid .col-created_at{max-width:70px;width:70px}.sales-order-view .grid .col-name,.sales-order-create-index .data-table .col-product,[class^=' adminhtml-rma-'] .grid .col-name,[class^=' adminhtml-rma-'] .grid .col-product,[class^=' catalog-search'] .col-search_query,[class^=' catalog-search'] .col-synonym_for,[class^=' catalog-search'] .col-redirect,.adminhtml-urlrewrite-index .col-request_path,.reports-report-shopcart-abandoned .grid .col-name,.tax-rule-index .grid .col-title,.adminhtml-rma-item-attribute-index .grid .col-attr-code,.dashboard-secondary .dashboard-item tr>td:first-child{max-width:150px;width:150px}[class^=' sales-order-'] .grid .col-name,.catalog-category-edit .grid .col-name,.adminhtml-catalog-event-index .col-category,.adminhtml-banner-edit .grid .col-name,.reports-report-product-lowstock .grid .col-sku,.newsletter-problem-index .grid .col-name,.newsletter-problem-index .grid .col-subject,.newsletter-problem-index .grid .col-product,.adminhtml-rma-item-attribute-index .grid .col-label,.adminhtml-export-index .col-label,.adminhtml-export-index .col-code,.adminhtml-scheduled-operation-index .grid .col-name,.adminhtml-logging-index .grid .col-fullaction,.test-report-customer-wishlist-wishlist .grid .col-name,.test-report-customer-wishlist-wishlist .grid .col-subject,.test-report-customer-wishlist-wishlist .grid .col-product{max-width:220px;width:220px}.grid .col-period,.grid .col-date,.grid .col-date_to,.grid .col-date_from,.grid .col-ended_at,.grid .col-created_at,.grid .col-updated_at,.grid .col-customer_since,.grid .col-session_start_time,.grid .col-last_activity,.grid .col-email,.grid .col-items_total,.grid .col-firstname,.grid .col-lastname,.grid .col-status-default,.grid .col-websites,.grid .col-time,.grid .col-billing_name,.grid .col-shipping_name,.sales-order-index .grid .col-name,.product-options .grouped-items-table .col-name,.product-options .grouped-items-table .col-sku,[class^=' sales-order-view'] .grid .col-customer_name,[class^=' adminhtml-rma-'] .grid .col-product_name,.catalog-product-index .grid .col-name,.catalog-product-review-index .grid .col-name,.catalog-product-review-index .grid .col-title,.customer-index-edit .ui-tabs-panel .grid .col-name,.review-product-index .grid .col-name,.adminhtml-cms-page-index .col-title,.adminhtml-cms-page-index .col-identifier,.catalog-product-attribute-index .col-attr-code,.catalog-product-attribute-index .col-label,.adminhtml-logging-index .grid .col-info{max-width:110px;width:110px}.grid .col-name,.grid .col-product,.col-banner_name,.adminhtml-widget-instance-index .col-title,[class^=' adminhtml-customer-'] .col-label,.adminhtml-rma-item-attribute-index .col-label,.adminhtml-system-variable-index .grid .col-code,.ui-tabs-panel .dashboard-data .col-name,.adminhtml-test-index .col-label{max-width:370px;width:370px}.col-grid_segment_name,.reports-index-search .col-query_text{max-width:570px;width:570px}[class^=' adminhtml-rma-'] .fieldset-wrapper .data-table td,.reports-report-product-lowstock .grid .col-name,.reports-report-shopcart-product .grid .col-name,.reports-report-review-customer .grid .col-name,[class^=' adminhtml-rma-'] .fieldset-wrapper .accordion .config .data-table td{max-width:670px;width:670px}.reports-report-sales-invoiced .grid .col-period,.reports-report-sales-refunde .grid .col-period,[class^=' tests-report-test'] .grid .col-period{width:auto}.grid .col-select,.grid .col-id,.grid .col-number{width:40px}.sales-order-create-index .grid,.sales-order-create-index .grid-actions,.adminhtml-export-index .grid-actions,.adminhtml-export-index .grid{padding-left:0;padding-right:0}[class^=' adminhtml-rma-'] .col-actions a,[class^=' customer-index-'] .col-action a,.adminhtml-notification-index .col-actions a{display:block;margin:0 0 3px;white-space:nowrap}.data-table-td-max .accordion .config .data-table td,.order-account-information .data-table td,[class^=' adminhtml-rma-'] .rma-request-details .data-table td{max-width:250px;width:250px}.catalog-product-edit .ui-tabs-panel .grid .hor-scroll,.catalog-product-index .grid .hor-scroll,.review-product-index .grid .hor-scroll,.adminhtml-rma-edit .hor-scroll{overflow-x:auto}.add-clearer:after,.massaction:after,.navigation>ul:after{content:"";display:table;clear:both}.test-content{width:calc(20px + 100*0.2)}.test-content:before{content:'.test {\A ' attr(data-attribute) ': 0.2em;' '\A content:\'';white-space:pre}.test-content:after{content:' Test\';\A}' "\A" '\A.test + .test._other ~ ul > li' " {\A height: @var;\A content: ' + ';\A}";white-space:pre}.test-content-calc{width:calc((100%/12*2) - 10px)}.test-svg-xml-image{background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" viewBox="0 0 38 40"><style>.st0{fill:none;stroke:%23ffffff;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}</style><circle cx="14.7" cy="14.7" r="13.7" class="st0"/><path d="M23.9 24.7L37 39" class="st0"/></svg>') no-repeat left center} \ No newline at end of file +table>caption{margin-bottom:5px}table thead{background:#676056;color:#f7f3eb}table thead .headings{background:#807a6e}table thead a{color:#f7f3eb;display:block}table thead a label{color:#f7f3eb;cursor:pointer;display:block}table thead a:hover,table thead a:focus{color:#dac7a2;text-decoration:none}table tfoot{background:#f2ebde;color:#676056}table tfoot tr th,table tfoot tr td{text-align:left}table th{background:0 0;border:solid #cac3b4;border-width:0 1px;font-size:14px;padding:6px 10px;text-align:center}table td{border:solid #cac3b4;border-width:0 1px;padding:6px 10px 7px;vertical-align:top}table tbody tr td{background:#fff;color:#676056;padding-top:12px}table tbody tr td:first-child{border-left:0}table tbody tr td:first-child input[type=checkbox]{margin:0}table tbody tr td:last-child{border-right:0}table tbody tr:last-child th,table tbody tr:last-child td{border-bottom-width:1px}table tbody tr:nth-child(odd) td,table tbody tr:nth-child(odd) th{background-color:#f7f3eb}table tbody.even tr td{background:#fff}table tbody.odd tr td{background:#f7f3eb}table .dropdown-menu li{padding:7px 15px;line-height:14px;cursor:pointer}table .col-draggable .draggable-handle{float:left;position:relative;top:0}.not-sort{padding-right:10px}.sort-arrow-asc,.sort-arrow-desc{padding-right:10px;position:relative}.sort-arrow-asc:after,.sort-arrow-desc:after{right:-11px;top:-1px;position:absolute;width:23px}.sort-arrow-asc:hover:after,.sort-arrow-desc:hover:after{color:#dac7a2}.sort-arrow-asc{display:inline-block;text-decoration:none}.sort-arrow-asc:after{font-family:'icons-blank-theme';content:'\e626';font-size:13px;line-height:inherit;color:#f7f3eb;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.sort-arrow-asc:hover:after{color:#dac7a2}.sort-arrow-desc{display:inline-block;text-decoration:none}.sort-arrow-desc:after{font-family:'icons-blank-theme';content:'\e623';font-size:13px;line-height:inherit;color:#f7f3eb;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.sort-arrow-desc:hover:after{color:#dac7a2}.grid-actions .input-text,.pager .input-text,.massaction .input-text,.filter .input-text,.grid-actions select,.pager select,.massaction select,.filter select,.grid-actions .select,.pager .select,.massaction .select,.filter .select{border-color:#989287;box-shadow:none;border-radius:1px;height:28px;margin:0 10px 0 0}.filter th{border:0 solid #676056;padding:6px 3px;vertical-align:top}.filter .ui-datepicker-trigger{cursor:pointer;margin-top:2px}.filter .input-text{padding:0 5px}.filter .range-line:not(:last-child){margin-bottom:5px}.filter .date{padding-right:28px;position:relative;display:inline-block;text-decoration:none}.filter .date .hasDatepicker{vertical-align:top;width:99%}.filter .date img{cursor:pointer;height:25px;width:25px;right:0;position:absolute;vertical-align:middle;z-index:2;opacity:0}.filter .date:before{font-family:'icons-blank-theme';content:'\e612';font-size:42px;line-height:30px;color:#f7f3eb;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.filter .date:hover:before{color:#dac7a2}.filter .date:before{height:29px;margin-left:5px;position:absolute;right:-3px;top:-3px;width:35px}.filter select{border-color:#cac3b4;margin:0;padding:0;width:99%}.filter input.input-text{border-color:#cac3b4;margin:0;width:99%}.filter input.input-text::-webkit-input-placeholder{color:#989287 !important;text-transform:lowercase}.filter input.input-text::-moz-placeholder{color:#989287 !important;text-transform:lowercase}.filter input.input-text:-moz-placeholder{color:#989287 !important;text-transform:lowercase}.filter input.input-text:-ms-input-placeholder{color:#989287 !important;text-transform:lowercase}.grid{background:#fff;color:#676056;font-size:13px;font-weight:400;padding:15px}.grid table{width:100%}.grid tbody tr.selected th,.grid tbody tr.selected td,.grid tbody tr:hover th,.grid tbody tr:hover td,.grid tbody tr:nth-child(odd):hover th,.grid tbody tr:nth-child(odd):hover td{background-color:#f2ebde;cursor:pointer}.grid tbody tr.selected th.empty-text,.grid tbody tr.selected td.empty-text,.grid tbody tr:hover th.empty-text,.grid tbody tr:hover td.empty-text,.grid tbody tr:nth-child(odd):hover th.empty-text,.grid tbody tr:nth-child(odd):hover td.empty-text{background-color:#f7f3eb;cursor:default}.grid .empty-text{font:400 20px/1.2 'Open Sans',sans-serif;text-align:center;white-space:nowrap}.grid .col-sku{max-width:100px;width:100px}.grid .col-select,.grid .col-massaction{text-align:center}.grid .editable .input-text{width:65px}.grid .col-actions .action-select{background:#fff;border-color:#989287;height:28px;margin:0;padding:4px 4px 5px;width:80px}.grid .col-position.editable{white-space:nowrap}.grid .col-position.editable .input-text{margin:-7px 5px 0;width:70%}.eq-ie9 .hor-scroll{display:inline-block;min-height:0;overflow-y:hidden;overflow-x:auto;width:100%}.data-table{border-collapse:separate;width:100%}.data-table thead,.data-table tfoot,.data-table th,.accordion .config .data-table thead th,.accordion .config .data-table tfoot td,.accordion .config .accordion .config .data-table tfoot td th{background:#fff;color:#676056;font-size:13px;font-weight:600}.data-table th{text-align:left}.data-table thead th,.accordion .config .data-table thead th th,.accordion .config .data-table tfoot td th,.accordion .config .accordion .config .data-table tfoot td th th{border:solid #c9c2b8;border-width:0 0 1px;padding:7px}.data-table td,.data-table tbody tr th,.data-table tbody tr td,.accordion .config .data-table td{background:#fff;border-width:0;padding:5px 7px;vertical-align:middle}.data-table tbody tr:nth-child(odd) th,.data-table tbody tr:nth-child(odd) td,.accordion .config .data-table tbody tr:nth-child(odd) td{background:#fbfaf6}.data-table tbody.odd tr th,.data-table tbody.odd tr td{background:#fbfaf6}.data-table tbody.even tr th,.data-table tbody.even tr td{background:#fff}.data-table tfoot tr:last-child th,.data-table tfoot tr:last-child td,.data-table .accordion .config .data-table tfoot tr:last-child td{border:0}.data-table.order-tables tbody td{vertical-align:top}.data-table.order-tables tbody:hover tr th,.data-table.order-tables tbody:hover tr td{background:#f7f3eb}.data-table.order-tables tfoot td{background:#f2ebde;color:#676056;font-size:13px;font-weight:600}.data-table input[type=text]{width:98%;padding-left:1%;padding-right:1%}.data-table select{margin:0;box-sizing:border-box}.data-table .col-actions .actions-split{margin-top:4px}.data-table .col-actions .actions-split [class^=action-]{background:0 0;border:1px solid #c8c3b5;padding:3px 5px;color:#bbb3a6;font-size:12px}.data-table .col-actions .actions-split [class^=action-]:first-child{border-right:0}.data-table .col-actions .actions-split .dropdown-menu{margin-top:-1px}.data-table .col-actions .actions-split .dropdown-menu a{display:block;color:#333;text-decoration:none}.data-table .col-actions .actions-split.active .action-toggle{position:relative;border-bottom-right-radius:0;box-shadow:none;background:#fff}.data-table .col-actions .actions-split.active .action-toggle:after{position:absolute;top:100%;left:0;right:0;height:2px;margin-top:-1px;background:#fff;content:'';z-index:2}.data-table .col-actions .actions-split.active .action-toggle .dropdown-menu{border-top-right-radius:0}.data-table .col-default{white-space:nowrap;text-align:center;vertical-align:middle}.data-table .col-delete{text-align:center;width:32px}.data-table .col-file{white-space:nowrap}.data-table .col-file input,.data-table .col-file .input-text{margin:0 5px;width:40%}.data-table .col-file input:first-child,.data-table .col-file .input-text:first-child{margin-left:0}.data-table .col-actions-add{padding:10px 0}.grid-actions{background:#fff;font-size:13px;line-height:28px;padding:10px 15px;position:relative}.grid-actions+.grid{padding-top:5px}.grid-actions .export,.grid-actions .filter-actions{float:right;margin-left:10px;vertical-align:top}.grid-actions .import{display:block;vertical-align:top}.grid-actions .action-reset{background:0 0;border:0;display:inline;line-height:1.42857143;padding:0;color:#1979c3;text-decoration:none;margin:6px 10px 0 0;vertical-align:top}.grid-actions .action-reset:visited{color:purple;text-decoration:none}.grid-actions .action-reset:hover{color:#006bb4;text-decoration:underline}.grid-actions .action-reset:active{color:#ff5501;text-decoration:underline}.grid-actions .action-reset:hover{color:#006bb4}.grid-actions .action-reset:hover,.grid-actions .action-reset:active,.grid-actions .action-reset:focus{background:0 0;border:0}.grid-actions .action-reset.disabled,.grid-actions .action-reset[disabled],fieldset[disabled] .grid-actions .action-reset{color:#1979c3;text-decoration:underline;cursor:default;pointer-events:none;opacity:.5}.grid-actions .import .label,.grid-actions .export .label,.massaction>.entry-edit .label{margin:0 14px 0 0;vertical-align:inherit}.grid-actions .import .action-,.grid-actions .export .action-,.grid-actions .filter-actions .action-,.massaction>.entry-edit .action-{vertical-align:inherit}.grid-actions .filter .date{float:left;margin:0 15px 0 0;position:relative}.grid-actions .filter .date:before{color:#676056;top:1px}.grid-actions .filter .date:hover:before{color:#31302b}.grid-actions .filter .label{margin:0}.grid-actions .filter .hasDatepicker{margin:0 5px;width:80px}.grid-actions .filter .show-by .select{margin-left:5px;padding:4px 4px 5px;vertical-align:top;width:auto}.grid-actions .filter.required:after{content:''}.grid-actions img{vertical-align:middle;height:22px;width:22px}.grid-actions .validation-advice{background:#f9d4d4;border:1px solid #e22626;border-radius:3px;color:#e22626;margin:5px 0 0;padding:3px 7px;position:absolute;white-space:nowrap;z-index:5}.grid-actions .validation-advice:before{width:0;height:0;border:5px solid transparent;border-bottom-color:#e22626;content:'';left:50%;margin-left:-5px;position:absolute;top:-11px}.grid-actions input[type=text].validation-failed{border-color:#e22626;box-shadow:0 0 8px rgba(226,38,38,.6)}.grid-actions .link-feed{white-space:nowrap}.pager{font-size:13px}.grid .pager{margin:15px 0 0;position:relative;text-align:center}.pager .pages-total-found{margin-right:25px}.pager .view-pages .select{margin:0 5px}.pager .link-feed{font-size:12px;margin:7px 15px 0 0;position:absolute;right:0;top:0}.pager .action-previous,.pager .action-next{background:0 0;border:0;display:inline;margin:0;padding:0;color:#1979c3;text-decoration:none;line-height:.6;overflow:hidden;width:20px}.pager .action-previous:visited,.pager .action-next:visited{color:purple;text-decoration:none}.pager .action-previous:hover,.pager .action-next:hover{color:#006bb4;text-decoration:underline}.pager .action-previous:active,.pager .action-next:active{color:#ff5501;text-decoration:underline}.pager .action-previous:hover,.pager .action-next:hover{color:#006bb4}.pager .action-previous:hover,.pager .action-next:hover,.pager .action-previous:active,.pager .action-next:active,.pager .action-previous:focus,.pager .action-next:focus{background:0 0;border:0}.pager .action-previous.disabled,.pager .action-next.disabled,.pager .action-previous[disabled],.pager .action-next[disabled],fieldset[disabled] .pager .action-previous,fieldset[disabled] .pager .action-next{color:#1979c3;text-decoration:underline;cursor:default;pointer-events:none;opacity:.5}.pager .action-previous:before,.pager .action-next:before{margin-left:-10px}.pager .action-previous.disabled,.pager .action-next.disabled{opacity:.3}.pager .action-previous{display:inline-block;text-decoration:none}.pager .action-previous>span{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.pager .action-previous>span.focusable:active,.pager .action-previous>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.pager .action-previous>span.focusable:active,.pager .action-previous>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.pager .action-previous:before{font-family:'icons-blank-theme';content:'\e617';font-size:40px;line-height:inherit;color:#026294;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.pager .action-previous:hover:before{color:#007dbd}.pager .action-next{display:inline-block;text-decoration:none}.pager .action-next>span{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.pager .action-next>span.focusable:active,.pager .action-next>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.pager .action-next>span.focusable:active,.pager .action-next>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.pager .action-next:before{font-family:'icons-blank-theme';content:'\e608';font-size:40px;line-height:inherit;color:#026294;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.pager .action-next:hover:before{color:#007dbd}.pager .input-text{height:25px;line-height:16px;margin-right:5px;text-align:center;width:25px;vertical-align:top}.pager .pages-total{line-height:25px;vertical-align:top}.massaction{background:#fff;border-top:1px solid #f2ebde;font-size:13px;line-height:28px;padding:15px 15px 0}.massaction>.entry-edit{float:right}.massaction>.entry-edit .field-row{display:inline-block;vertical-align:top}.massaction>.entry-edit .validation-advice{display:none !important}.massaction>.entry-edit .form-inline{display:inline-block}.massaction>.entry-edit .label{padding:0;width:auto}.massaction>.entry-edit .action-{vertical-align:top}.massaction .select.validation-failed{border:1px dashed #e22626;background:#f9d4d4}.grid-severity-critical,.grid-severity-major,.grid-severity-notice,.grid-severity-minor{background:#feeee1;border:1px solid #ed4f2e;color:#ed4f2e;display:block;padding:0 3px;font-weight:700;line-height:17px;text-transform:uppercase;text-align:center}.grid-severity-critical,.grid-severity-major{border-color:#e22626;background:#f9d4d4;color:#e22626}.grid-severity-notice{border-color:#5b8116;background:#d0e5a9;color:#185b00}.grid tbody td input[type=text],.data-table tbody td input[type=text],.grid tbody th input[type=text],.data-table tbody th input[type=text],.grid tbody td .input-text,.data-table tbody td .input-text,.grid tbody th .input-text,.data-table tbody th .input-text,.grid tbody td select,.data-table tbody td select,.grid tbody th select,.data-table tbody th select,.grid tbody td .select,.data-table tbody td .select,.grid tbody th .select,.data-table tbody th .select{width:99%}.ui-tabs-panel .grid .col-sku{max-width:150px;width:150px}.col-indexer_status,.col-indexer_mode{width:160px}.fieldset-wrapper .grid-actions+.grid{padding-top:15px}.fieldset-wrapper .grid-actions{padding:10px 0 0}.fieldset-wrapper .grid{padding:0}.fieldset-wrapper .massaction{padding:0;border-top:none;margin-bottom:15px}.accordion .grid{padding:0}.ui-dialog-content .grid-actions,.ui-dialog-content .grid{padding-left:0;padding-right:0}.qty-table td{border:0;padding:0 5px 3px}.sales-order-create-index .sales-order-create-index .grid table .action-configure{float:right}.sales-order-create-index .data-table .border td{padding-bottom:15px}.sales-order-create-index .actions.update{margin:10px 0}.adminhtml-order-shipment-new .grid .col-product{max-width:770px;width:770px}.customer-index-index .grid .col-name{max-width:90px;width:90px}.customer-index-index .grid .col-billing_region{width:70px}.adminhtml-cms-hierarchy-index .col-title,.adminhtml-cms-hierarchy-index .col-identifier{max-width:410px;width:410px}.adminhtml-widget-instance-edit .grid-chooser .control{margin-top:-19px;width:80%}.eq-ie9 .adminhtml-widget-instance-edit .grid-chooser .control{margin-top:-18px}.adminhtml-widget-instance-edit .grid-chooser .control .grid-actions{padding:0 0 15px}.adminhtml-widget-instance-edit .grid-chooser .control .grid{padding:0}.adminhtml-widget-instance-edit .grid-chooser .control .addon input:last-child,.adminhtml-widget-instance-edit .grid-chooser .control .addon select:last-child{border-radius:0}.reports-report-product-sold .grid .col-name{max-width:720px;width:720px}.adminhtml-system-store-index .grid td{max-width:310px}.adminhtml-system-currency-index .grid{padding-top:0}.adminhtml-system-currency-index .col-currency-edit-rate{min-width:40px}.adminhtml-system-currency-index .col-base-currency{font-weight:700}.adminhtml-system-currency-index .old-rate{display:block;margin-top:3px;text-align:center}.adminhtml-system-currency-index .hor-scroll{overflow-x:auto;min-width:970px}.adminhtml-system-currencysymbol-index .col-currency{width:35%}.adminhtml-system-currencysymbol-index .grid .input-text{margin:0 10px 0 0;width:50%}.catalog-product-set-index .col-set_name{max-width:930px;width:930px}.adminhtml-export-index .grid td{vertical-align:middle}.adminhtml-export-index .grid .input-text-range{margin:0 10px 0 5px;width:37%}.adminhtml-export-index .grid .input-text-range-date{margin:0 5px;width:32%}.adminhtml-export-index .ui-datepicker-trigger{display:inline-block;margin:-3px 10px 0 0;vertical-align:middle}.adminhtml-notification-index .grid .col-select,.adminhtml-cache-index .grid .col-select,.adminhtml-process-list .grid .col-select,.indexer-indexer-list .grid .col-select{width:10px}@font-face{font-family:'icons-blank-theme';src:url('../fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff2') format('woff2'),url('../fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff') format('woff');font-weight:400;font-style:normal}@font-face{font-family:'icons-blank-theme';src:url('../fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff2') format('woff2'),url('../fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff') format('woff');font-weight:400;font-style:normal}.navigation{background-color:#676056;position:relative;z-index:5}.navigation .level-0.reverse>.submenu{right:1px}.navigation>ul{position:relative;text-align:right}.navigation .level-0>.submenu{display:none;position:absolute;top:100%;padding:19px 13px}.navigation .level-0>.submenu a{display:block;color:#676056;font-size:13px;font-weight:400;line-height:1.385;padding:3px 12px 3px;text-decoration:none}.navigation .level-0>.submenu a:focus,.navigation .level-0>.submenu a:hover{text-decoration:underline}.navigation .level-0>.submenu a:hover{color:#fff;background:#989287;text-decoration:none}.navigation .level-0>.submenu li{margin-bottom:1px}.navigation .level-0>.submenu a[href="#"]{cursor:default;display:block;color:#676056;font-size:14px;font-weight:700;line-height:1;margin:7px 0 6px;padding:0 12px}.navigation .level-0>.submenu a[href="#"]:focus,.navigation .level-0>.submenu a[href="#"]:hover{color:#676056;font-size:14px;font-weight:700;background:0 0;text-decoration:none}.navigation .level-0{display:inline-block;float:left;text-align:left;transition:display .15s ease-out}.navigation .level-0>a{background:0 0;display:block;padding:12px 13px 0;color:#f2ebde;font-size:13px;font-weight:600;text-transform:uppercase;text-decoration:none;transition:background .15s ease-out}.navigation .level-0>a:after{content:"";display:block;margin-top:10px;height:3px;font-size:0}.navigation .level-0.active>a{font-weight:700}.navigation .level-0.active>a:after{background:#ef672f}.navigation .level-0.hover.recent>a{background:#fff;color:#676056;font-size:13px;font-weight:600}.navigation .level-0.hover.recent>a:after{background:0 0}.navigation .level-0.hover.recent.active>a{font-weight:700}.navigation .level-0>.submenu{opacity:0;visibility:hidden}.navigation .level-0.recent.hover>.submenu{opacity:1;visibility:visible}.no-js .navigation .level-0:hover>.submenu,.no-js .navigation .level-0.hover>.submenu,.no-js .navigation .level-0>a:focus+.submenu{display:block}.navigation .level-0>.submenu{background:#fff;box-shadow:0 3px 3px rgba(50,50,50,.15)}.navigation .level-0>.submenu li{max-width:200px}.navigation .level-0>.submenu>ul{white-space:nowrap}.navigation .level-0>.submenu .column{display:inline-block;margin-left:40px;vertical-align:top}.navigation .level-0>.submenu .column:first-child{margin-left:0}.navigation .level-0 .submenu .level-1{white-space:normal}.navigation .level-0.parent .submenu .level-1.parent{margin:17px 0 25px}.navigation .level-0.parent .level-1.parent:first-child{margin-top:0}.navigation .level-2 .submenu{margin-left:7px}.navigation .level-0>.submenu .level-2>a[href="#"]{font-size:13px;margin-top:10px;margin-left:7px}.navigation .level-2>.submenu a{font-size:12px;line-height:1.231}.navigation .level-0>.submenu .level-3>a[href="#"],.navigation .level-3 .submenu{margin-left:15px}.navigation .level-0.item-system,.navigation .level-0.item-stores{float:none}.navigation .level-0.item-system>.submenu,.navigation .level-0.item-stores>.submenu{left:auto;right:1px}.adminhtml-dashboard-index .col-1-layout{max-width:1300px;border:none;border-radius:0;padding:0;background:#f7f3eb}.dashboard-inner{padding-top:35px}.dashboard-inner:before,.dashboard-inner:after{content:"";display:table}.dashboard-inner:after{clear:both}.dashboard-inner:before,.dashboard-inner:after{content:"";display:table}.dashboard-inner:after{clear:both}.dashboard-secondary{float:left;width:32%;margin:0 1.5%}.dashboard-main{float:right;width:65%}.dashboard-diagram-chart{max-width:100%;height:auto}.dashboard-diagram-nodata,.dashboard-diagram-switcher{padding:20px 0}.dashboard-diagram-image{background:#fff url(../mui/images/ajax-loader-small.gif) no-repeat 50% 50%}.dashboard-container .ui-tabs-panel{background-color:#fff;min-height:40px;padding:15px}.dashboard-store-stats{margin-top:35px}.dashboard-store-stats .ui-tabs-panel{background:#fff url(../mui/images/ajax-loader-small.gif) no-repeat 50% 50%}.dashboard-item{margin-bottom:30px}.dashboard-item-header{margin-left:5px}.dashboard-item.dashboard-item-primary{margin-bottom:35px}.dashboard-item.dashboard-item-primary .title{font-size:22px;margin-bottom:5px}.dashboard-item.dashboard-item-primary .dashboard-sales-value{display:block;text-align:right;font-weight:600;font-size:30px;margin-right:12px;padding-bottom:5px}.dashboard-item.dashboard-item-primary:first-child{color:#ef672f}.dashboard-item.dashboard-item-primary:first-child .title{color:#ef672f}.dashboard-totals{background:#fff;padding:50px 15px 25px}.dashboard-totals-list{margin:0;padding:0;list-style:none none}.dashboard-totals-list:before,.dashboard-totals-list:after{content:"";display:table}.dashboard-totals-list:after{clear:both}.dashboard-totals-list:before,.dashboard-totals-list:after{content:"";display:table}.dashboard-totals-list:after{clear:both}.dashboard-totals-item{float:left;width:18%;margin-left:7%;padding-top:15px;border-top:2px solid #cac3b4}.dashboard-totals-item:first-child{margin-left:0}.dashboard-totals-label{display:block;font-size:16px;font-weight:600;padding-bottom:2px}.dashboard-totals-value{color:#ef672f;font-size:20px}.dashboard-data{width:100%}.dashboard-data thead{background:0 0}.dashboard-data thead tr{background:0 0}.dashboard-data th,.dashboard-data td{border:none;padding:10px 12px;text-align:right}.dashboard-data th:first-child,.dashboard-data td:first-child{text-align:left}.dashboard-data th{color:#676056;font-weight:600}.dashboard-data td{background-color:transparent}.dashboard-data tbody tr:hover td{background-color:transparent}.dashboard-data tbody tr:nth-child(odd) td,.dashboard-data tbody tr:nth-child(odd):hover td,.dashboard-data tbody tr:nth-child(odd) th,.dashboard-data tbody tr:nth-child(odd):hover th{background-color:#e1dbcf}.ui-tabs-panel .dashboard-data tbody tr:nth-child(odd) td,.ui-tabs-panel .dashboard-data tbody tr:nth-child(odd):hover td,.ui-tabs-panel .dashboard-data tbody tr:nth-child(odd) th,.ui-tabs-panel .dashboard-data tbody tr:nth-child(odd):hover th{background-color:#f7f3eb}.dashboard-data td.empty-text{text-align:center}.ui-tabs-panel .dashboard-data{background-color:#fff}.mage-dropdown-dialog.ui-dialog .ui-dialog-content{overflow:visible}.mage-dropdown-dialog.ui-dialog .ui-dialog-buttonpane{padding:0}.message-system-inner{background:#f7f3eb;border:1px solid #c0bbaf;border-top:0;border-radius:0 0 5px 5px;float:right;overflow:hidden}.message-system-unread .message-system-inner{float:none}.message-system-list{margin:0;padding:0;list-style:none;float:left}.message-system .message-system-list{width:75%}.message-system-list li{padding:5px 13px 7px 36px;position:relative}.message-system-short{padding:5px 13px 7px;float:right}.message-system-short span{display:inline-block;margin-left:7px;border-left:1px #d1ccc3 solid}.message-system-short span:first-child{border:0;margin-left:0}.message-system-short a{padding-left:27px;position:relative;height:16px}.message-system .message-system-short a:before,.message-system-list li:before{font-family:'MUI-Icons';font-style:normal;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;height:16px;width:16px;font-size:16px;line-height:16px;text-align:center;position:absolute;left:7px;top:2px}.message-system-list li:before{top:5px;left:13px}.message-system .message-system-short .warning a:before,.message-system-list li.warning:before{content:"\e006";color:#f2a825}.message-system .message-system-short .error a:before,.message-system-list li.error:before{content:"\e086";font-family:'MUI-Icons';color:#c00815}.ui-dialog .message-system-list{margin-bottom:25px}.sales-order-create-index .order-errors .notice{color:#ed4f2e;font-size:11px;margin:5px 0 0}.order-errors .fieldset-wrapper-title .title{box-sizing:border-box;background:#fffbf0;border:1px solid #d87e34;border-radius:5px;color:#676056;font-size:14px;margin:20px 0;padding:10px 26px 10px 35px;position:relative}.order-errors .fieldset-wrapper-title .title:before{position:absolute;left:11px;top:50%;margin-top:-11px;width:auto;height:auto;font-family:'MUI-Icons';font-style:normal;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;font-size:16px;line-height:inherit;content:'\e046';color:#d87e34}.search-global.miniform{position:relative;z-index:1000;display:inline-block;vertical-align:top;margin:6px 10px 0}.search-global.miniform .mage-suggest{border:0;border-radius:0}.search-global-actions{display:none}.search-global-field{margin:0}.search-global-field .label{position:absolute;right:4px;z-index:2;cursor:pointer;display:inline-block;text-decoration:none}.search-global-field .label>span{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.search-global-field .label>span.focusable:active,.search-global-field .label>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.search-global-field .label>span.focusable:active,.search-global-field .label>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.search-global-field .label:before{font-family:'MUI-Icons';content:"\e01f";font-size:18px;line-height:29px;color:#cac3b4;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.search-global-field .control{width:48px;overflow:hidden;opacity:0;transition:all .3s ease}.search-global-field .control input[type=text]{background:0 0;border:none;width:100%}.search-global-field.active{z-index:2}.search-global-field.active .label:before{display:none}.search-global-field.active .control{overflow:visible;opacity:1;transition:all .3s ease;width:300px}.search-global-menu{box-sizing:border-box;display:block;width:100%}.notifications-summary{display:inline-block;text-align:left;position:relative;z-index:1}.notifications-summary.active{z-index:999}.notifications-action{color:#f2ebde;padding:12px 22px 11px;text-transform:capitalize;display:inline-block;text-decoration:none}.notifications-action:before{font-family:"MUI-Icons";content:"\e06e";font-size:18px;line-height:18px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.notifications-action:visited,.notifications-action:focus,.notifications-action:active,.notifications-action:hover{color:#f2ebde;text-decoration:none}.notifications-action.active{background-color:#fff;color:#676056}.notifications-action .text{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.notifications-action .text.focusable:active,.notifications-action .text.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.notifications-action .text.focusable:active,.notifications-action .text.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.notifications-action .qty.counter{display:inline-block;background:#ed4f2e;color:#f2ebde;font-size:12px;line-height:12px;font-weight:700;padding:1px 3px;position:absolute;top:6px;left:50%;border-radius:4px}.notifications-list{width:300px;padding:0;margin:0}.notifications-list .last{padding:10px;text-align:center;font-size:12px}.notifications-summary .notifications-entry{padding:15px;color:#676056;font-size:11px;font-weight:400}.notifications-entry{position:relative;z-index:1}.notifications-entry:hover .action{display:block}.notifications-entry-title{padding-right:15px;color:#ed4f2e;font-size:12px;font-weight:600;display:block;margin-bottom:10px}.notifications-entry-description{line-height:1.3;display:block;max-height:3.9em;overflow:hidden;margin-bottom:10px;text-overflow:ellipsis}.notifications-close.action{position:absolute;z-index:1;top:12px;right:12px;background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;display:none}.notifications-close.action>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.notifications-close.action>span.focusable:active,.notifications-close.action>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.notifications-close.action>span.focusable:active,.notifications-close.action>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.notifications-close.action:before{font-family:'MUI-Icons';content:"\e07f";font-size:16px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.notifications-close.action:focus,.notifications-close.action:active{background:0 0;border:none}.notifications-close.action:hover{background:0 0;border:none}.notifications-close.action.disabled,.notifications-close.action[disabled],fieldset[disabled] .notifications-close.action{cursor:not-allowed;pointer-events:none;opacity:.5}.notifications-dialog-content{display:none}.notifications-critical .notifications-entry-title{padding-left:25px;display:inline-block;text-decoration:none}.notifications-critical .notifications-entry-title:before{font-family:'MUI-Icons';content:"\e086";font-size:18px;line-height:18px;color:#c00815;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.notifications-critical .notifications-entry-title:before{position:absolute;margin-left:-25px}.notifications-dialog-content .notifications-entry-time{color:#8c867e;font-size:13px;font-family:Helvetica,Arial,sans-serif;position:absolute;right:17px;bottom:27px;text-align:right}.notifications-url{display:inline-block;text-decoration:none}.notifications-url>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.notifications-url>span.focusable:active,.notifications-url>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.notifications-url>span.focusable:active,.notifications-url>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.notifications-url:after{font-family:'MUI-Icons';content:"\e084";font-size:16px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center;margin:-2px 0 0 10px}.notifications-dialog-content .notifications-entry-title{font-size:15px}.locale-switcher-field{white-space:nowrap;float:left}.locale-switcher-field .control,.locale-switcher-field .label{vertical-align:middle;margin:0 10px 0 0;display:inline-block}.locale-switcher-select{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;border:1px solid #ada89e;max-width:200px;height:31px;background:url("../images/select-bg.svg") no-repeat 100% 50%;background-size:30px 60px;padding-right:29px;text-indent:.01px;text-overflow:''}.locale-switcher-select::-ms-expand{display:none}.lt-ie10 .locale-switcher-select{background-image:none;padding-right:4px}@-moz-document url-prefix(){.locale-switcher-select{background-image:none}}@-moz-document url-prefix(){.locale-switcher-select{background-image:none}}.mage-suggest{text-align:left;box-sizing:border-box;position:relative;display:inline-block;vertical-align:top;width:100%;background-color:#fff;border:1px solid #ada89e;border-radius:2px}.mage-suggest:after{position:absolute;top:3px;right:3px;bottom:0;width:22px;text-align:center;font-family:'MUI-Icons';font-style:normal;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;content:'\e01f';font-size:18px;color:#b2b2b2}.mage-suggest input[type=search],.mage-suggest input.search{width:100%;border:none;background:0 0;padding-right:30px}.mage-suggest.category-select input[type=search],.mage-suggest.category-select input.search{height:26px}.mage-suggest-dropdown{position:absolute;left:0;right:0;top:100%;margin:1px -1px 0;border:1px solid #cac2b5;background:#fff;box-shadow:0 2px 4px rgba(0,0,0,.2);z-index:990}.mage-suggest-dropdown ul{margin:0;padding:0;list-style:none}.mage-suggest-dropdown li{border-bottom:1px solid #e5e5e5;padding:0}.mage-suggest-dropdown li a{display:block}.mage-suggest-dropdown li a.ui-state-focus{background:#f5f5f5}.mage-suggest-dropdown li a,.mage-suggest-dropdown .jstree li a:hover,.mage-suggest-dropdown .jstree .jstree-hovered,.mage-suggest-dropdown .jstree .jstree-clicked{padding:6px 12px 5px;text-decoration:none;color:#333}.mage-suggest-dropdown .jstree li a:hover,.mage-suggest-dropdown .jstree .jstree-hovered,.mage-suggest-dropdown .jstree .jstree-clicked{border:none}.mage-suggest-dropdown .jstree li{border-bottom:0}.mage-suggest-dropdown .jstree li a{display:inline-block}.mage-suggest-dropdown .jstree .mage-suggest-selected>a{color:#000;background:#f1ffeb}.field-category_ids .mage-suggest-dropdown,.field-new_category_parent .mage-suggest-dropdown{max-height:200px;overflow:auto}.mage-suggest-dropdown .jstree .mage-suggest-selected>a:hover,.mage-suggest-dropdown .jstree .mage-suggest-selected>.jstree-hovered,.mage-suggest-dropdown .jstree .mage-suggest-selected>.jstree-clicked,.mage-suggest-dropdown .jstree .mage-suggest-selected.mage-suggest-not-active>.jstree-hovered,.mage-suggest-dropdown .jstree .mage-suggest-selected.mage-suggest-not-active>.jstree-clicked{background:#e5ffd9}.mage-suggest-dropdown .jstree .mage-suggest-not-active>a{color:#d4d4d4}.mage-suggest-dropdown .jstree .mage-suggest-not-active>a:hover,.mage-suggest-dropdown .jstree .mage-suggest-not-active>.jstree-hovered,.mage-suggest-dropdown .jstree .mage-suggest-not-active>.jstree-clicked{background:#f5f5f5}.mage-suggest-dropdown .category-path{font-size:11px;margin-left:10px;color:#9ba8b5}.suggest-expandable .action-dropdown .action-toggle{display:inline-block;max-width:500px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:none;box-shadow:none;color:#676056;font-size:12px;padding:5px 4px;filter:none}.suggest-expandable .action-dropdown .action-toggle span{display:inline}.suggest-expandable .action-dropdown .action-toggle:before{display:inline-block;float:right;margin-left:4px;font-size:13px;color:#b2b0ad}.suggest-expandable .action-dropdown .action-toggle:hover:before{color:#7e7e7e}.suggest-expandable .dropdown-menu{margin:1px 0 0;left:0;right:auto;width:245px;z-index:4}.suggest-expandable .mage-suggest{border:none;border-radius:3px 3px 0 0}.suggest-expandable .mage-suggest:after{top:10px;right:8px}.suggest-expandable .mage-suggest-inner .title{margin:0;padding:0 10px 4px;text-transform:uppercase;color:#a6a098;font-size:12px;border-bottom:1px solid #e5e5e5}.suggest-expandable .mage-suggest-inner>input[type=search],.suggest-expandable .mage-suggest-inner>input.search{position:relative;margin:6px 5px 5px;padding-right:20px;border:1px solid #ada89e;width:236px;z-index:1}.suggest-expandable .mage-suggest-inner>input.ui-autocomplete-loading,.suggest-expandable .mage-suggest-inner>input.mage-suggest-state-loading{background:#fff url("../mui/images/ajax-loader-small.gif") no-repeat 190px 50%}.suggest-expandable .mage-suggest-dropdown{margin-top:0;border-top:0;border-radius:0 0 3px 3px;max-height:300px;overflow:auto;width:100%;float:left}.suggest-expandable .mage-suggest-dropdown ul{margin:0;padding:0;list-style:none}.suggest-expandable .action-show-all:hover,.suggest-expandable .action-show-all:active,.suggest-expandable .action-show-all:focus,.suggest-expandable .action-show-all[disabled]{border-top:1px solid #e5e5e5;display:block;width:100%;padding:8px 10px 10px;text-align:left;font:12px/1.333 Arial,Verdana,sans-serif;color:#676056}.product-actions .suggest-expandable{max-width:500px;float:left;margin-top:1px}.page-actions.fixed #product-template-suggest-container{display:none}.catalog-category-edit .col-2-left-layout:before{display:none}.category-content .ui-tabs-panel .fieldset{padding-top:40px}.category-content .ui-tabs-panel .fieldset .legend{display:none}.attributes-edit-form .field:not(.field-weight) .addon{display:block;position:relative}.attributes-edit-form .field:not(.field-weight) .addon input[type=text]{border-width:1px}.attributes-edit-form .field:not(.field-weight) .addon .addafter{display:block;border:0;height:auto;width:auto}.attributes-edit-form .field:not(.field-weight) .addon input:focus~.addafter{box-shadow:none}.attributes-edit-form .with-addon .textarea{margin:0}.attributes-edit-form .attribute-change-checkbox{display:block;margin-top:5px}.attributes-edit-form .attribute-change-checkbox .label{float:none;padding:0;width:auto}.attributes-edit-form .attribute-change-checkbox .checkbox{margin-right:5px;width:auto}.attributes-edit-form .field-price .addon>input,.attributes-edit-form .field-special_price .addon>input,.attributes-edit-form .field-gift_wrapping_price .addon>input,.attributes-edit-form .field-msrp .addon>input,.attributes-edit-form .field-gift_wrapping_price .addon>input{padding-left:23px}.attributes-edit-form .field-price .addafter>strong,.attributes-edit-form .field-special_price .addafter>strong,.attributes-edit-form .field-gift_wrapping_price .addafter>strong,.attributes-edit-form .field-msrp .addafter>strong,.attributes-edit-form .field-gift_wrapping_price .addafter>strong{left:5px;position:absolute;top:3px}.attributes-edit-form .field.type-price input:focus+label,.attributes-edit-form .field-price input:focus+label,.attributes-edit-form .field-special_price input:focus+label,.attributes-edit-form .field-msrp input:focus+label,.attributes-edit-form .field-weight input:focus+label{box-shadow:none}.attributes-edit-form .field-special_from_date>.control .input-text,.attributes-edit-form .field-special_to_date>.control .input-text,.attributes-edit-form .field-news_from_date>.control .input-text,.attributes-edit-form .field-news_to_date>.control .input-text,.attributes-edit-form .field-custom_design_from>.control .input-text,.attributes-edit-form .field-custom_design_to>.control .input-text{border-width:1px;width:130px}.attributes-edit-form .field-weight .fields-group-2 .control{padding-right:27px}.attributes-edit-form .field-weight .fields-group-2 .control .addafter+.addafter{border-width:1px 1px 1px 0;border-style:solid;height:28px;right:0;position:absolute;top:0}.attributes-edit-form .field-weight .fields-group-2 .control .addafter strong{line-height:28px}.attributes-edit-form .field-weight .fields-group-2 .control>input:focus+.addafter+.addafter{box-shadow:0 0 8px rgba(82,168,236,.6)}.attributes-edit-form .field-gift_message_available .addon>input[type=checkbox],.attributes-edit-form .field-gift_wrapping_available .addon>input[type=checkbox]{width:auto;margin-right:5px}.attributes-edit-form .fieldset>.addafter{display:none}.advanced-inventory-edit .field.choice{display:block;margin:3px 0 0}.advanced-inventory-edit .field.choice .label{padding-top:1px}.product-actions:before,.product-actions:after{content:"";display:table}.product-actions:after{clear:both}.product-actions:before,.product-actions:after{content:"";display:table}.product-actions:after{clear:both}.product-actions .switcher{float:right}#configurable-attributes-container .actions-select{display:inline-block;position:relative}#configurable-attributes-container .actions-select:before,#configurable-attributes-container .actions-select:after{content:"";display:table}#configurable-attributes-container .actions-select:after{clear:both}#configurable-attributes-container .actions-select:before,#configurable-attributes-container .actions-select:after{content:"";display:table}#configurable-attributes-container .actions-select:after{clear:both}#configurable-attributes-container .actions-select .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}#configurable-attributes-container .actions-select .action.toggle:after{font-family:'icons-blank-theme';content:'\e607';font-size:22px;line-height:22px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}#configurable-attributes-container .actions-select .action.toggle:hover:after{color:inherit}#configurable-attributes-container .actions-select .action.toggle:active:after{color:inherit}#configurable-attributes-container .actions-select .action.toggle.active{display:inline-block;text-decoration:none}#configurable-attributes-container .actions-select .action.toggle.active:after{font-family:'icons-blank-theme';content:'\e618';font-size:22px;line-height:22px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}#configurable-attributes-container .actions-select .action.toggle.active:hover:after{color:inherit}#configurable-attributes-container .actions-select .action.toggle.active:active:after{color:inherit}#configurable-attributes-container .actions-select ul.dropdown{margin:0;padding:0;list-style:none none;box-sizing:border-box;background:#fff;border:1px solid #bbb;position:absolute;z-index:100;top:100%;min-width:100%;margin-top:4px;display:none;box-shadow:0 3px 3px rgba(0,0,0,.15)}#configurable-attributes-container .actions-select ul.dropdown li{margin:0;padding:3px 5px}#configurable-attributes-container .actions-select ul.dropdown li:hover{background:#e8e8e8;cursor:pointer}#configurable-attributes-container .actions-select.active{overflow:visible}#configurable-attributes-container .actions-select.active ul.dropdown{display:block}#configurable-attributes-container .actions-select .action.toggle{padding:1px 8px;border:1px solid #ada89e;background:#fff;border-radius:0 2px 2px 0}#configurable-attributes-container .actions-select .action.toggle:after{width:14px;text-indent:-2px}#configurable-attributes-container .actions-select ul.dropdown li:hover{background:#eef8fc}#configurable-attributes-container .actions-select ul.dropdown a{color:#333;text-decoration:none}#product-variations-matrix .actions-image-uploader{position:relative;display:block;width:50px}#product-variations-matrix .actions-image-uploader:before,#product-variations-matrix .actions-image-uploader:after{content:"";display:table}#product-variations-matrix .actions-image-uploader:after{clear:both}#product-variations-matrix .actions-image-uploader:before,#product-variations-matrix .actions-image-uploader:after{content:"";display:table}#product-variations-matrix .actions-image-uploader:after{clear:both}#product-variations-matrix .actions-image-uploader .action.split{float:left;margin:0}#product-variations-matrix .actions-image-uploader .action.toggle{float:right;margin:0}#product-variations-matrix .actions-image-uploader .action.toggle{padding:6px 5px;display:inline-block;text-decoration:none}#product-variations-matrix .actions-image-uploader .action.toggle>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#product-variations-matrix .actions-image-uploader .action.toggle>span.focusable:active,#product-variations-matrix .actions-image-uploader .action.toggle>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}#product-variations-matrix .actions-image-uploader .action.toggle>span.focusable:active,#product-variations-matrix .actions-image-uploader .action.toggle>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}#product-variations-matrix .actions-image-uploader .action.toggle:after{font-family:'icons-blank-theme';content:'\e607';font-size:22px;line-height:14px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}#product-variations-matrix .actions-image-uploader .action.toggle:hover:after{color:inherit}#product-variations-matrix .actions-image-uploader .action.toggle:active:after{color:inherit}#product-variations-matrix .actions-image-uploader .action.toggle.active{display:inline-block;text-decoration:none}#product-variations-matrix .actions-image-uploader .action.toggle.active>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#product-variations-matrix .actions-image-uploader .action.toggle.active>span.focusable:active,#product-variations-matrix .actions-image-uploader .action.toggle.active>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}#product-variations-matrix .actions-image-uploader .action.toggle.active>span.focusable:active,#product-variations-matrix .actions-image-uploader .action.toggle.active>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}#product-variations-matrix .actions-image-uploader .action.toggle.active:after{font-family:'icons-blank-theme';content:'\e618';font-size:22px;line-height:14px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}#product-variations-matrix .actions-image-uploader .action.toggle.active:hover:after{color:inherit}#product-variations-matrix .actions-image-uploader .action.toggle.active:active:after{color:inherit}#product-variations-matrix .actions-image-uploader ul.dropdown{margin:0;padding:0;list-style:none none;box-sizing:border-box;background:#fff;border:1px solid #bbb;position:absolute;z-index:100;top:100%;min-width:100%;margin-top:4px;display:none;box-shadow:0 3px 3px rgba(0,0,0,.15)}#product-variations-matrix .actions-image-uploader ul.dropdown li{margin:0;padding:3px 5px}#product-variations-matrix .actions-image-uploader ul.dropdown li:hover{background:#e8e8e8;cursor:pointer}#product-variations-matrix .actions-image-uploader.active{overflow:visible}#product-variations-matrix .actions-image-uploader.active ul.dropdown{display:block}#product-variations-matrix .actions-image-uploader .action.toggle{padding:0 2px;border:1px solid #b7b2a7;background:#fff;border-radius:0 4px 4px 0;border-left:none;height:33px}#product-variations-matrix .actions-image-uploader .action.toggle.no-display{display:none}#product-variations-matrix .actions-image-uploader .action.toggle:after{width:12px;text-indent:-5px}#product-variations-matrix .actions-image-uploader ul.dropdown{left:0;margin-left:0;width:100px}#product-variations-matrix .actions-image-uploader ul.dropdown li:hover{background:#eef8fc}#product-variations-matrix .actions-image-uploader ul.dropdown a{color:#333;text-decoration:none}.debugging-hints .page-actions{position:relative;z-index:1}.debugging-hints .page-actions .debugging-hint-template-file{left:auto !important;right:0 !important}.filter-segments{list-style:none;padding:0}.adminhtml-report-customer-test-detail .col-id{width:35px}.adminhtml-report-customer-test-detail .col-period{white-space:nowrap;width:70px}.adminhtml-report-customer-test-detail .col-zip{width:50px}.adminhtml-report-customer-test-segment .col-id{width:35px}.adminhtml-report-customer-test-segment .col-status{width:65px}.adminhtml-report-customer-test-segment .col-qty{width:145px}.adminhtml-report-customer-test-segment .col-segment,.adminhtml-report-customer-test-segment .col-website{width:35%}.adminhtml-report-customer-test-segment .col-select{width:45px}.test-custom-attributes{margin-bottom:20px}.adminhtml-test-index th.col-id{text-align:left}.adminhtml-test-index .col-price{text-align:right;width:50px}.adminhtml-test-index .col-actions{width:50px}.adminhtml-test-index .col-select{width:60px}.adminhtml-test-edit .field-image .control{line-height:28px}.adminhtml-test-edit .field-image a{display:inline-block;margin:0 5px 0 0}.adminhtml-test-edit .field-image img{vertical-align:middle}.adminhtml-test-new .field-image .input-file,.adminhtml-test-edit .field-image .input-file{display:inline-block;margin:0 15px 0 0;width:auto}.adminhtml-test-new .field-image .addafter,.adminhtml-test-edit .field-image .addafter{border:0;box-shadow:none;display:inline-block;margin:0 15px 0 0;height:auto;width:auto}.adminhtml-test-new .field-image .delete-image,.adminhtml-test-edit .field-image .delete-image{display:inline-block;white-space:nowrap}.adminhtml-test-edit .field-image .delete-image input{margin:-3px 5px 0 0;width:auto;display:inline-block}.adminhtml-test-edit .field-image .addon .delete-image input:focus+label{border:0;box-shadow:none}.adminhtml-test-index .col-id{width:35px}.adminhtml-test-index .col-status{white-space:normal;width:75px}.adminhtml-test-index .col-websites{white-space:nowrap;width:200px}.adminhtml-test-index .col-price .label{display:inline-block;min-width:60px;white-space:nowrap}.adminhtml-test-index .col-price .price-excl-tax .price,.adminhtml-test-index .col-price .price-incl-tax .price{font-weight:700}.invitee_information,.inviter_information{width:48.9362%}.invitee_information{float:left}.inviter_information{float:right}.test_information .data-table th,.invitee_information .data-table th,.inviter_information .data-table th{width:20%;white-space:nowrap}.test_information .data-table textarea,.test_information .data-table input{width:100%}.tests-history ul{margin:0;padding-left:25px}.tests-history ul .status:before{display:inline-block;content:"|";margin:0 10px}.adminhtml-report-test-order .col-period{white-space:nowrap;width:70px}.adminhtml-report-test-order .col-inv-sent,.adminhtml-report-test-order .col-inv-acc,.adminhtml-report-test-order .col-acc,.adminhtml-report-test-order .col-rate{text-align:right;width:23%}.adminhtml-report-test-customer .col-id{width:35px}.adminhtml-report-test-customer .col-period{white-space:nowrap;width:70px}.adminhtml-report-test-customer .col-inv-sent,.adminhtml-report-test-customer .col-inv-acc{text-align:right;width:120px}.adminhtml-report-test-index .col-period{white-space:nowrap}.adminhtml-report-test-index .col-inv-sent,.adminhtml-report-test-index .col-inv-acc,.adminhtml-report-test-index .col-inv-disc,.adminhtml-report-test-index .col-inv-acc-rate,.adminhtml-report-test-index .col-inv-disc-rate{text-align:right;width:19%}.test_information .data-table,.invitee_information .data-table,.inviter_information .data-table{width:100%}.test_information .data-table tbody tr th,.invitee_information .data-table tbody tr th,.inviter_information .data-table tbody tr th{font-weight:700}.test_information .data-table tbody tr td,.test_information .data-table tbody tr th,.invitee_information .data-table tbody tr td,.invitee_information .data-table tbody tr th,.inviter_information .data-table tbody tr td,.inviter_information .data-table tbody tr th{background-color:#fff;border:0;padding:9px 10px 10px;color:#666;vertical-align:top}.test_information .data-table tbody tr:nth-child(2n+1) td,.test_information .data-table tbody tr:nth-child(2n+1) th,.invitee_information .data-table tbody tr:nth-child(2n+1) td,.invitee_information .data-table tbody tr:nth-child(2n+1) th,.inviter_information .data-table tbody tr:nth-child(2n+1) td,.inviter_information .data-table tbody tr:nth-child(2n+1) th{background-color:#fbfaf6}[class^=" adminhtml-test-"] .fieldset-wrapper-content .data-table .col-sort-order{width:80px}[class^=" adminhtml-test-"] .fieldset-wrapper-content .data-table td,[class^=" adminhtml-test-"] .fieldset-wrapper-content .accordion .config .data-table td{vertical-align:top}[class^=" adminhtml-test-"] .fieldset-wrapper-content .data-table td select,[class^=" adminhtml-test-"] .fieldset-wrapper-content .accordion .config .data-table td select{display:block;width:100%}[class^=" adminhtml-test-"] .fieldset-wrapper-content .data-table td .input-radio.global-scope,[class^=" adminhtml-test-"] .fieldset-wrapper-content .accordion .config .data-table td .input-radio.global-scope{margin-top:9px}.sales-order-create-index .ui-dialog .content>.test .field.text .input-text{width:100%}.sales-order-create-index .ui-dialog .content>.test .note .price{font-weight:600}.sales-order-create-index .ui-dialog .content>.test .note .price:before{content:": "}.sales-order-create-index .ui-dialog .content>.test .fixed.amount .label:after{content:": "}.sales-order-create-index .ui-dialog .content>.test .fixed.amount .control{display:inline-block;font-weight:600}.sales-order-create-index .ui-dialog .content>.test .fixed.amount .control .control-value{margin:-2px 0 0;padding:0}.eq-ie9 [class^=" adminhtml-test-"] .custom-options .data-table{word-wrap:normal;table-layout:auto}.rma-items .col-actions a.disabled,.newRma .col-actions a.disabled{cursor:default;opacity:.5}.rma-items .col-actions a.disabled:hover,.newRma .col-actions a.disabled:hover{text-decoration:none}.block.mselect-list .mselect-input{width:100%}.block.mselect-list .mselect-input-container .mselect-save{top:4px}.block.mselect-list .mselect-input-container .mselect-cancel{top:4px}html{font-size:62.5%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size-adjust:100%}body,html{height:100%;min-height:100%}body{color:#676056;font-family:'Open Sans',sans-serif;line-height:1.33;font-weight:400;font-size:1.4rem;background:#f2ebde;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}body>*{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-basis:auto;flex-basis:auto}.page-wrapper{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;min-height:100%;width:100%;max-width:100%;min-width:990px}.page-wrapper>*{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-basis:auto;flex-basis:auto}.page-header{text-align:right}.page-header-wrapper{background-color:#31302b}.page-header:after{content:"";display:table;clear:both}.page-header .logo{margin-top:5px;float:left;text-decoration:none;display:inline-block}.page-header .logo:before{content:"";display:inline-block;vertical-align:middle;width:109px;height:35px;background-image:url("../images/logo.svg");background-size:109px 70px;background-repeat:no-repeat}.page-header .logo:after{display:inline-block;vertical-align:middle;margin-left:10px;content:attr(data-edition);font-weight:600;font-size:16px;color:#ef672f;margin-top:-2px}.page-header .logo span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.page-header .logo span.focusable:active,.page-header .logo span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.page-header .logo span.focusable:active,.page-header .logo span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.page-header .dropdown-menu{border:0}.admin-user{display:inline-block;vertical-align:top;position:relative;text-align:left}.admin-user-account{text-decoration:none;display:inline-block;padding:12px 14px;color:#f2ebde}.admin-user-account:after{font-family:"MUI-Icons";content:"\e02c";font-size:13px;line-height:13px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center;margin:-3px 0 0}.admin-user-account:link,.admin-user-account:visited{color:#f2ebde}.admin-user-account:focus,.admin-user-account:active,.admin-user-account:hover{color:#f2ebde;text-decoration:none}.active .admin-user-account{background-color:#fff;color:#676056}.admin-user-menu{padding:15px;white-space:nowrap;margin-top:0}.admin-user-menu li{border:0;padding:0}.admin-user-menu li:hover{background:0 0}.admin-user-menu a{display:block;color:#676056;font-size:13px;font-weight:400;line-height:1.385;padding:3px 12px 3px;text-decoration:none}.admin-user-menu a:focus,.admin-user-menu a:hover{text-decoration:underline}.admin-user-menu a:hover{color:#fff;background:#989287;text-decoration:none}.admin-user-menu a span:before{content:"("}.admin-user-menu a span:after{content:")"}.page-actions.fixed .page-actions-buttons{padding-right:15px}.page-main-actions{background:#e0dace;color:#645d53;padding:15px;margin-left:auto;margin-right:auto;box-sizing:border-box}.page-main-actions:before,.page-main-actions:after{content:"";display:table}.page-main-actions:after{clear:both}.page-main-actions:before,.page-main-actions:after{content:"";display:table}.page-main-actions:after{clear:both}.page-main-actions .page-actions{float:right}.page-main-actions .page-actions .page-actions-buttons{float:right;display:-webkit-flex;display:-ms-flexbox;display:flex;justify-content:flex-end}.page-main-actions .page-actions button,.page-main-actions .page-actions .action-add.mselect-button-add{margin-left:13px}.page-main-actions .page-actions button.primary,.page-main-actions .page-actions .action-add.mselect-button-add.primary{float:right;-ms-flex-order:2;-webkit-order:2;order:2}.page-main-actions .page-actions button.save:not(.primary),.page-main-actions .page-actions .action-add.mselect-button-add.save:not(.primary){float:right;-ms-flex-order:1;-webkit-order:1;order:1}.page-main-actions .page-actions button.back,.page-main-actions .page-actions button.action-back,.page-main-actions .page-actions button.delete,.page-main-actions .page-actions .action-add.mselect-button-add.back,.page-main-actions .page-actions .action-add.mselect-button-add.action-back,.page-main-actions .page-actions .action-add.mselect-button-add.delete{background-image:none;background:0 0;border:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;margin:0 13px}.page-main-actions .page-actions button.back:focus,.page-main-actions .page-actions button.action-back:focus,.page-main-actions .page-actions button.delete:focus,.page-main-actions .page-actions button.back:active,.page-main-actions .page-actions button.action-back:active,.page-main-actions .page-actions button.delete:active,.page-main-actions .page-actions .action-add.mselect-button-add.back:focus,.page-main-actions .page-actions .action-add.mselect-button-add.action-back:focus,.page-main-actions .page-actions .action-add.mselect-button-add.delete:focus,.page-main-actions .page-actions .action-add.mselect-button-add.back:active,.page-main-actions .page-actions .action-add.mselect-button-add.action-back:active,.page-main-actions .page-actions .action-add.mselect-button-add.delete:active{background:0 0;border:none}.page-main-actions .page-actions button.back:hover,.page-main-actions .page-actions button.action-back:hover,.page-main-actions .page-actions button.delete:hover,.page-main-actions .page-actions .action-add.mselect-button-add.back:hover,.page-main-actions .page-actions .action-add.mselect-button-add.action-back:hover,.page-main-actions .page-actions .action-add.mselect-button-add.delete:hover{background:0 0;border:none}.page-main-actions .page-actions button.back.disabled,.page-main-actions .page-actions button.action-back.disabled,.page-main-actions .page-actions button.delete.disabled,.page-main-actions .page-actions button.back[disabled],.page-main-actions .page-actions button.action-back[disabled],.page-main-actions .page-actions button.delete[disabled],fieldset[disabled] .page-main-actions .page-actions button.back,fieldset[disabled] .page-main-actions .page-actions button.action-back,fieldset[disabled] .page-main-actions .page-actions button.delete,.page-main-actions .page-actions .action-add.mselect-button-add.back.disabled,.page-main-actions .page-actions .action-add.mselect-button-add.action-back.disabled,.page-main-actions .page-actions .action-add.mselect-button-add.delete.disabled,.page-main-actions .page-actions .action-add.mselect-button-add.back[disabled],.page-main-actions .page-actions .action-add.mselect-button-add.action-back[disabled],.page-main-actions .page-actions .action-add.mselect-button-add.delete[disabled],fieldset[disabled] .page-main-actions .page-actions .action-add.mselect-button-add.back,fieldset[disabled] .page-main-actions .page-actions .action-add.mselect-button-add.action-back,fieldset[disabled] .page-main-actions .page-actions .action-add.mselect-button-add.delete{cursor:not-allowed;pointer-events:none;opacity:.5}.ie .page-main-actions .page-actions button.back,.ie .page-main-actions .page-actions button.action-back,.ie .page-main-actions .page-actions button.delete,.ie .page-main-actions .page-actions .action-add.mselect-button-add.back,.ie .page-main-actions .page-actions .action-add.mselect-button-add.action-back,.ie .page-main-actions .page-actions .action-add.mselect-button-add.delete{margin-top:6px}.page-main-actions .page-actions button.delete,.page-main-actions .page-actions .action-add.mselect-button-add.delete{color:#e22626;float:left;-ms-flex-order:-1;-webkit-order:-1;order:-1}.page-main-actions .page-actions button.back,.page-main-actions .page-actions button.action-back,.page-main-actions .page-actions .action-add.mselect-button-add.back,.page-main-actions .page-actions .action-add.mselect-button-add.action-back{float:left;-ms-flex-order:-1;-webkit-order:-1;order:-1;display:inline-block;text-decoration:none}.page-main-actions .page-actions button.back:before,.page-main-actions .page-actions button.action-back:before,.page-main-actions .page-actions .action-add.mselect-button-add.back:before,.page-main-actions .page-actions .action-add.mselect-button-add.action-back:before{font-family:'icons-blank-theme';content:'\e625';font-size:inherit;line-height:normal;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center;margin:0 2px 0 0}.page-main-actions .page-actions .actions-split{margin-left:13px;float:right;-ms-flex-order:2;-webkit-order:2;order:2}.page-main-actions .page-actions .actions-split button.primary,.page-main-actions .page-actions .actions-split .action-add.mselect-button-add.primary{float:left}.page-main-actions .page-actions .actions-split .dropdown-menu{text-align:left}.page-main-actions .page-actions .actions-split .dropdown-menu .item{display:block}.page-main-actions .page-actions.fixed{position:fixed;top:0;left:0;right:0;z-index:10;padding:0;background:-webkit-linear-gradient(top,#f5f2ed 0%,#f5f2ed 56%,rgba(245,242,237,0) 100%);background:-ms-linear-gradient(top,#f5f2ed 0%,#f5f2ed 56%,rgba(245,242,237,0) 100%);background:linear-gradient(to bottom,#f5f2ed 0%,#f5f2ed 56%,rgba(245,242,237,0) 100%);background:#e0dace}.page-main-actions .page-actions.fixed .page-actions-inner{position:relative;padding-top:15px;padding-bottom:15px;min-height:36px;text-align:right;box-sizing:border-box}.page-main-actions .page-actions.fixed .page-actions-inner:before,.page-main-actions .page-actions.fixed .page-actions-inner:after{content:"";display:table}.page-main-actions .page-actions.fixed .page-actions-inner:after{clear:both}.page-main-actions .page-actions.fixed .page-actions-inner:before,.page-main-actions .page-actions.fixed .page-actions-inner:after{content:"";display:table}.page-main-actions .page-actions.fixed .page-actions-inner:after{clear:both}.page-main-actions .page-actions.fixed .page-actions-inner:before{text-align:left;content:attr(data-title);float:left;font-size:20px;max-width:50%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lt-ie10 .page-main-actions .page-actions.fixed .page-actions-inner{background:#f5f2ed}.page-main-actions .store-switcher{margin-top:5px}.store-switcher{display:inline-block;font-size:13px}.store-switcher .label{margin-right:5px}.store-switcher .actions.dropdown{display:inline-block;position:relative}.store-switcher .actions.dropdown:before,.store-switcher .actions.dropdown:after{content:"";display:table}.store-switcher .actions.dropdown:after{clear:both}.store-switcher .actions.dropdown:before,.store-switcher .actions.dropdown:after{content:"";display:table}.store-switcher .actions.dropdown:after{clear:both}.store-switcher .actions.dropdown .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}.store-switcher .actions.dropdown .action.toggle:after{font-family:'icons-blank-theme';content:'\e607';font-size:22px;line-height:20px;color:#645d53;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.store-switcher .actions.dropdown .action.toggle:hover:after{color:#645d53}.store-switcher .actions.dropdown .action.toggle:active:after{color:#645d53}.store-switcher .actions.dropdown .action.toggle.active{display:inline-block;text-decoration:none}.store-switcher .actions.dropdown .action.toggle.active:after{font-family:'icons-blank-theme';content:'\e618';font-size:22px;line-height:20px;color:#645d53;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.store-switcher .actions.dropdown .action.toggle.active:hover:after{color:#645d53}.store-switcher .actions.dropdown .action.toggle.active:active:after{color:#645d53}.store-switcher .actions.dropdown .dropdown-menu{margin:0;padding:0;list-style:none none;box-sizing:border-box;background:#fff;border:1px #ada89e solid;position:absolute;z-index:100;top:100%;min-width:195px;margin-top:4px;display:none;box-shadow:0 3px 3px rgba(0,0,0,.15)}.store-switcher .actions.dropdown .dropdown-menu li{margin:0;padding:0}.store-switcher .actions.dropdown .dropdown-menu li:hover{background:0 0;cursor:pointer}.store-switcher .actions.dropdown.active{overflow:visible}.store-switcher .actions.dropdown.active .dropdown-menu{display:block}.store-switcher .actions.dropdown .action.toggle{background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;font-weight:400;color:#026294;line-height:normal;margin-top:2px;vertical-align:middle}.store-switcher .actions.dropdown .action.toggle:focus,.store-switcher .actions.dropdown .action.toggle:active{background:0 0;border:none}.store-switcher .actions.dropdown .action.toggle:hover{background:0 0;border:none}.store-switcher .actions.dropdown .action.toggle.disabled,.store-switcher .actions.dropdown .action.toggle[disabled],fieldset[disabled] .store-switcher .actions.dropdown .action.toggle{cursor:not-allowed;pointer-events:none;opacity:.5}.store-switcher .actions.dropdown ul.dropdown-menu{margin-top:4px;padding-top:5px;left:0}.store-switcher .actions.dropdown ul.dropdown-menu li{border:0;cursor:default}.store-switcher .actions.dropdown ul.dropdown-menu li:hover{cursor:default}.store-switcher .actions.dropdown ul.dropdown-menu li a,.store-switcher .actions.dropdown ul.dropdown-menu li span{padding:5px 13px;display:block;color:#645d53}.store-switcher .actions.dropdown ul.dropdown-menu li a{text-decoration:none}.store-switcher .actions.dropdown ul.dropdown-menu li a:hover{background:#edf9fb}.store-switcher .actions.dropdown ul.dropdown-menu li span{color:#ababab;cursor:default}.store-switcher .actions.dropdown ul.dropdown-menu li.current span{color:#645d53;background:#eee}.store-switcher .actions.dropdown ul.dropdown-menu .store-switcher-store a,.store-switcher .actions.dropdown ul.dropdown-menu .store-switcher-store span{padding-left:26px}.store-switcher .actions.dropdown ul.dropdown-menu .store-switcher-store-view a,.store-switcher .actions.dropdown ul.dropdown-menu .store-switcher-store-view span{padding-left:39px}.store-switcher .actions.dropdown ul.dropdown-menu .dropdown-toolbar{border-top:1px #ededed solid;margin-top:10px}.store-switcher .actions.dropdown ul.dropdown-menu .dropdown-toolbar a{text-decoration:none;display:block}.store-switcher .actions.dropdown ul.dropdown-menu .dropdown-toolbar a:before{font-family:'icons-blank-theme';content:'\e606';font-size:20px;line-height:normal;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:text-top;text-align:center;margin:0 3px 0 -4px}.tooltip{display:inline-block;margin-left:5px}.tooltip .help span,.tooltip .help a{width:16px;height:16px;text-align:center;background:rgba(194,186,169,.5);cursor:pointer;border-radius:10px;vertical-align:middle;display:inline-block;text-decoration:none}.tooltip .help span:hover,.tooltip .help a:hover{background:#c2baa9}.tooltip .help span>span,.tooltip .help a>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.tooltip .help span>span.focusable:active,.tooltip .help a>span.focusable:active,.tooltip .help span>span.focusable:focus,.tooltip .help a>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.tooltip .help span>span.focusable:active,.tooltip .help a>span.focusable:active,.tooltip .help span>span.focusable:focus,.tooltip .help a>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.tooltip .help span:before,.tooltip .help a:before{font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;content:'?';font-size:13px;line-height:16px;color:#5a534a;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.tooltip .help span:before,.tooltip .help a:before{font-weight:700}.tooltip .tooltip-content{display:none;position:absolute;max-width:200px;margin-top:10px;margin-left:-19px;padding:4px 8px;border-radius:3px;background:#000;background:rgba(49,48,43,.8);color:#fff;text-shadow:none;z-index:20}.tooltip .tooltip-content:before{content:'';position:absolute;width:0;height:0;top:-5px;left:20px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000;opacity:.8}.tooltip .tooltip-content.loading{position:absolute}.tooltip .tooltip-content.loading:before{border-bottom-color:rgba(0,0,0,.3)}.tooltip:hover>.tooltip-content{display:block}button,.action-add.mselect-button-add{border-radius:2px;background-image:none;background:#f2ebde;padding:6px 13px;color:#645d53;border:1px solid #ada89e;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.3rem;font-weight:500;line-height:1.4rem;box-sizing:border-box;margin:0;vertical-align:middle}button:focus,button:active,.action-add.mselect-button-add:focus,.action-add.mselect-button-add:active{background:#cac3b4;border:1px solid #989287}button:hover,.action-add.mselect-button-add:hover{background:#cac3b4}button.disabled,button[disabled],fieldset[disabled] button,.action-add.mselect-button-add.disabled,.action-add.mselect-button-add[disabled],fieldset[disabled] .action-add.mselect-button-add{cursor:default;pointer-events:none;opacity:.5}button.primary,.action-add.mselect-button-add.primary{background-image:none;background:#007dbd;padding:6px 13px;color:#fff;border:1px solid #0a6c9f;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.3rem;font-weight:500;box-sizing:border-box;vertical-align:middle}button.primary:focus,button.primary:active,.action-add.mselect-button-add.primary:focus,.action-add.mselect-button-add.primary:active{background:#026294;border:1px solid #004c74;color:#fff}button.primary:hover,.action-add.mselect-button-add.primary:hover{background:#026294;border:1px solid #026294}button.primary.disabled,button.primary[disabled],fieldset[disabled] button.primary,.action-add.mselect-button-add.primary.disabled,.action-add.mselect-button-add.primary[disabled],fieldset[disabled] .action-add.mselect-button-add.primary{cursor:default;pointer-events:none;opacity:.5}.actions-split{display:inline-block;position:relative;vertical-align:middle}.actions-split button,.actions-split .action-add.mselect-button-add{margin-left:0!important}.actions-split:before,.actions-split:after{content:"";display:table}.actions-split:after{clear:both}.actions-split:before,.actions-split:after{content:"";display:table}.actions-split:after{clear:both}.actions-split .action-default{float:left;margin:0}.actions-split .action-toggle{float:right;margin:0}.actions-split button.action-default,.actions-split .action-add.mselect-button-add.action-default{border-top-right-radius:0;border-bottom-right-radius:0}.actions-split button+.action-toggle,.actions-split .action-add.mselect-button-add+.action-toggle{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.actions-split .action-toggle{padding:6px 5px;display:inline-block;text-decoration:none}.actions-split .action-toggle>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.actions-split .action-toggle>span.focusable:active,.actions-split .action-toggle>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.actions-split .action-toggle>span.focusable:active,.actions-split .action-toggle>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.actions-split .action-toggle:after{font-family:'icons-blank-theme';content:'\e607';font-size:22px;line-height:14px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.actions-split .action-toggle:hover:after{color:inherit}.actions-split .action-toggle:active:after{color:inherit}.actions-split .action-toggle.active{display:inline-block;text-decoration:none}.actions-split .action-toggle.active>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.actions-split .action-toggle.active>span.focusable:active,.actions-split .action-toggle.active>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.actions-split .action-toggle.active>span.focusable:active,.actions-split .action-toggle.active>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.actions-split .action-toggle.active:after{font-family:'icons-blank-theme';content:'\e618';font-size:22px;line-height:14px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.actions-split .action-toggle.active:hover:after{color:inherit}.actions-split .action-toggle.active:active:after{color:inherit}.actions-split .dropdown-menu{margin:0;padding:0;list-style:none none;box-sizing:border-box;background:#fff;border:1px solid #bbb;position:absolute;z-index:100;top:100%;min-width:175px;margin-top:4px;display:none;box-shadow:0 3px 3px rgba(0,0,0,.15)}.actions-split .dropdown-menu li{margin:0;padding:3px 5px}.actions-split .dropdown-menu li:hover{background:#e8e8e8;cursor:pointer}.actions-split .dropdown-menu:before,.actions-split .dropdown-menu:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.actions-split .dropdown-menu:before{z-index:99;border:solid 6px;border-color:transparent transparent #fff}.actions-split .dropdown-menu:after{z-index:98;border:solid 7px;border-color:transparent transparent #bbb}.actions-split .dropdown-menu:before{top:-12px;right:10px}.actions-split .dropdown-menu:after{top:-14px;right:9px}.actions-split.active{overflow:visible}.actions-split.active .dropdown-menu{display:block}.actions-split .action-toggle:after{height:13px}.page-content:after{content:"";display:table;clear:both}.page-wrapper>.page-content{margin-bottom:20px}.page-footer{padding:15px 0}.page-footer-wrapper{background-color:#e0dacf;margin-top:auto}.page-footer:after{content:"";display:table;clear:both}.footer-legal{float:right;width:550px}.footer-legal .link-report,.footer-legal .magento-version,.footer-legal .copyright{font-size:13px}.footer-legal:before{content:"";display:inline-block;vertical-align:middle;position:absolute;z-index:1;margin-top:2px;margin-left:-35px;width:30px;height:35px;background-size:109px 70px;background:url("../images/logo.svg") no-repeat 0 -21px}.icon-error{margin-left:15px;color:#c00815;font-size:11px}.icon-error:before{font-family:'MUI-Icons';content:"\e086";font-size:13px;line-height:13px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center;margin:-1px 5px 0 0}.ui-widget-overlay{position:fixed}.control .nested{padding:0}.control *:first-child{margin-bottom:0}.field-tooltip{display:inline-block;vertical-align:top;margin-top:5px;position:relative;z-index:1;width:0;overflow:visible}.field-choice .field-tooltip{margin-top:10px}.field-tooltip:hover{z-index:99}.field-tooltip-action{position:relative;z-index:2;margin-left:18px;width:22px;height:22px;display:inline-block;cursor:pointer}.field-tooltip-action:before{content:"?";font-weight:500;font-size:18px;display:inline-block;overflow:hidden;height:22px;border-radius:11px;line-height:22px;width:22px;text-align:center;color:#fff;background-color:#514943}.field-tooltip-action span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.field-tooltip-action span.focusable:active,.field-tooltip-action span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.field-tooltip-action span.focusable:active,.field-tooltip-action span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.control-text:focus+.field-tooltip-content,.field-tooltip:hover .field-tooltip-content{display:block}.field-tooltip-content{display:none;position:absolute;z-index:1;width:320px;background:#fff8d7;padding:15px 25px;right:-66px;border:1px solid #adadad;border-radius:1px;bottom:42px;box-shadow:0 2px 8px 0 rgba(0,0,0,.3)}.field-tooltip-content:after,.field-tooltip-content:before{content:"";display:block;width:0;height:0;border:16px solid transparent;border-top-color:#adadad;position:absolute;right:20px;top:100%;z-index:3}.field-tooltip-content:after{border-top-color:#fff8d7;margin-top:-1px;z-index:4}.form__field.field-error .control [class*=control-]{border-color:#e22626}.form__field.field-error .control [class*=control-]:before{border-color:#e22626}.form__field .mage-error{border:1px solid #e22626;display:block;margin:2px 0 0;padding:6px 10px 10px;background:#fff8d6;color:#555;font-size:12px;font-weight:500;box-sizing:border-box;max-width:380px}.no-flexbox.no-flexboxlegacy .form__field .control-addon+.mage-error{display:inline-block;width:100%}.form__field{position:relative;z-index:1}.form__field:hover{z-index:2}.control .form__field{position:static}.form__field[data-config-scope]:before{content:attr(data-config-scope);display:inline-block;position:absolute;color:gray;right:0;top:6px}.control .form__field[data-config-scope]:nth-child(n+2):before{content:""}.form__field.field-disabled>.label{color:#999}.form__field.field-disabled.field .control [class*=control-][disabled]{background-color:#e9e9e9;opacity:.5;color:#303030;border-color:#adadad}.control-fields .label~.control{width:100%}.form__field{border:0;padding:0}.form__field .note{color:#303030;padding:0;margin:10px 0 0;max-width:380px}.form__field .note:before{display:none}.form__field.form__field{margin-bottom:0}.form__field.form__field+.form__field.form__field{margin-top:15px}.form__field.form__field:not(.choice)~.choice{margin-left:20px;margin-top:5px}.form__field.form__field.choice~.choice{margin-top:9px}.form__field.form__field~.choice:last-child{margin-bottom:8px}.fieldset>.form__field{margin-bottom:30px}.form__field .label{color:#303030}.form__field:not(.choice)>.label{font-size:14px;font-weight:600;width:30%;padding-right:30px;padding-top:0;line-height:33px;white-space:nowrap}.form__field:not(.choice)>.label:before{content:".";visibility:hidden;width:0;margin-left:-7px;overflow:hidden}.form__field:not(.choice)>.label span{white-space:normal;display:inline-block;vertical-align:middle;line-height:1.2}.form__field.required>.label:after{content:"";margin-left:0}.form__field.required>.label span:after{content:"*";color:#eb5202;display:inline;font-weight:500;font-size:16px;margin-top:2px;position:absolute;z-index:1;margin-left:10px}.form__field .control-file{margin-top:6px}.form__field .control-select{line-height:33px}.form__field .control-select:not([multiple]),.form__field .control-text{height:33px;max-width:380px}.form__field .control-addon{max-width:380px}.form__field .control-textarea,.form__field .control-select,.form__field .control-text{border:1px solid #adadad;border-radius:1px;padding:0 10px;color:#303030;background-color:#fff;font-weight:500;font-size:15px;min-width:11em}.form__field .control-textarea:focus,.form__field .control-select:focus,.form__field .control-text:focus{outline:0;border-color:#007bdb;box-shadow:none}.form__field .control-text{line-height:auto}.form__field .control-textarea{padding-top:6px;padding-bottom:6px;line-height:1.18em}.form__field .control-select[multiple],.form__field .control-textarea{width:100%;height:calc(6*1.2em + 14px)}.form__field .control-value{display:inline-block;padding:6px 10px}.form__field .control-fields .form__field:nth-child(n+2):not(.choice)>.label{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.form__field .control-fields .form__field:nth-child(n+2):not(.choice)>.label.focusable:active,.form__field .control-fields .form__field:nth-child(n+2):not(.choice)>.label.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.form__field .control-fields .form__field:nth-child(n+2):not(.choice)>.label.focusable:active,.form__field .control-fields .form__field:nth-child(n+2):not(.choice)>.label.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.form__field .control-select{padding:0}.form__field .control-select option{box-sizing:border-box;padding:4px 10px;display:block}.form__field .control-select optgroup{font-weight:600;display:block;padding:4px 10px;line-height:33px;list-style:inside;font-style:normal}.form__field .control-range>.form__field:nth-child(2):before{content:"\2014";content:":";display:inline-block;margin-left:-25px;float:left;width:20px;line-height:33px;text-align:center}.form__field.choice{position:relative;z-index:1;padding-top:8px;padding-left:26px;padding-right:0}.form__field.choice .label{font-weight:500;padding:0;display:inline;float:none;line-height:18px}.form__field.choice input{position:absolute;top:8px;margin-top:3px!important}.form__field.choice input[disabled]+.label{opacity:.5;cursor:not-allowed}.control>.form__field.choice{max-width:380px}.control>.form__field.choice:nth-child(1):nth-last-child(2),.control>.form__field.choice:nth-child(2):nth-last-child(1){display:inline-block}.control>.form__field.choice:nth-child(1):nth-last-child(2)+.choice,.control>.form__field.choice:nth-child(2):nth-last-child(1)+.choice{margin-left:41px;margin-top:0}.control>.form__field.choice:nth-child(1):nth-last-child(2)+.choice:before,.control>.form__field.choice:nth-child(2):nth-last-child(1)+.choice:before{content:"";position:absolute;display:inline-block;height:20px;top:8px;left:-20px;width:1px;background:#ccc}.form__field.choice .label{cursor:pointer}.form__field.choice .label:before{content:"";position:absolute;z-index:1;border:1px solid #adadad;width:14px;height:14px;top:10px;left:0;border-radius:2px;background:url("../Magento_Ui/images/choice_bkg.png") no-repeat -100% -100%}.form__field.choice input:focus+.label:before{outline:0;border-color:#007bdb}.form__field.choice .control-radio+.label:before{border-radius:8px}.form__field.choice .control-radio:checked+.label:before{background-position:-26px -1px}.form__field.choice .control-checkbox:checked+.label:before{background-position:-1px -1px}.form__field.choice input{opacity:0}.fieldset>.form__field.choice{margin-left:30%}.form__field .control-after,.form__field .control-before{border:0;color:#858585;font-weight:300;font-size:15px;line-height:33px;display:inline-block;height:33px;box-sizing:border-box;padding:0 3px}.no-flexbox.no-flexboxlegacy .form__field .control-before,.no-flexbox.no-flexboxlegacy .form__field .control-addon{float:left;white-space:nowrap}.form__field .control-addon{display:inline-flex;max-width:380px;width:100%;flex-flow:row nowrap;position:relative;z-index:1}.form__field .control-addon>*{position:relative;z-index:1}.form__field .control-addon .control-text[disabled][type],.form__field .control-addon .control-select[disabled][type],.form__field .control-addon .control-select,.form__field .control-addon .control-text{background:transparent!important;border:0;width:auto;vertical-align:top;order:1;flex:1}.form__field .control-addon .control-text[disabled][type]:focus,.form__field .control-addon .control-select[disabled][type]:focus,.form__field .control-addon .control-select:focus,.form__field .control-addon .control-text:focus{box-shadow:none}.form__field .control-addon .control-text[disabled][type]:focus+label:before,.form__field .control-addon .control-select[disabled][type]:focus+label:before,.form__field .control-addon .control-select:focus+label:before,.form__field .control-addon .control-text:focus+label:before{outline:0;border-color:#007bdb}.form__field .control-addon .control-text[disabled][type]+label,.form__field .control-addon .control-select[disabled][type]+label,.form__field .control-addon .control-select+label,.form__field .control-addon .control-text+label{padding-left:10px;position:static!important;z-index:0}.form__field .control-addon .control-text[disabled][type]+label>*,.form__field .control-addon .control-select[disabled][type]+label>*,.form__field .control-addon .control-select+label>*,.form__field .control-addon .control-text+label>*{vertical-align:top;position:relative;z-index:2}.form__field .control-addon .control-text[disabled][type]+label:before,.form__field .control-addon .control-select[disabled][type]+label:before,.form__field .control-addon .control-select+label:before,.form__field .control-addon .control-text+label:before{box-sizing:border-box;border-radius:1px;border:1px solid #adadad;content:"";display:block;position:absolute;top:0;left:0;width:100%;height:100%;z-index:0;background:#fff}.form__field .control-addon .control-text[disabled][type][disabled]+label:before,.form__field .control-addon .control-select[disabled][type][disabled]+label:before,.form__field .control-addon .control-select[disabled]+label:before,.form__field .control-addon .control-text[disabled]+label:before{opacity:.5;background:#e9e9e9}.form__field .control-after{order:3}.form__field .control-after:last-child{padding-right:10px}.form__field .control-before{order:0}.form__field .control-some{display:flex}.form__field [class*=control-grouped]{display:table;width:100%;table-layout:fixed;box-sizing:border-box}.form__field [class*=control-grouped]>.form__field{display:table-cell;width:50%;vertical-align:top}.form__field [class*=control-grouped]>.form__field>.control{width:100%;float:none}.form__field [class*=control-grouped]>.form__field:nth-child(n+2){padding-left:20px}.form__field [class*=control-grouped]>.form__field:nth-child(n+2):not(.choice) .label{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.form__field [class*=control-grouped]>.form__field:nth-child(n+2):not(.choice) .label.focusable:active,.form__field [class*=control-grouped]>.form__field:nth-child(n+2):not(.choice) .label.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.form__field [class*=control-grouped]>.form__field:nth-child(n+2):not(.choice) .label.focusable:active,.form__field [class*=control-grouped]>.form__field:nth-child(n+2):not(.choice) .label.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.form__field [required]{box-shadow:none}fieldset.form__field{position:relative}fieldset.form__field [class*=control-grouped]>.form__field:first-child>.label,fieldset.form__field .control-fields>.form__field:first-child>.label{position:absolute;left:0;top:0;opacity:0;cursor:pointer;width:30%}.control-text+.ui-datepicker-trigger{background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;line-height:inherit;font-weight:400;text-decoration:none;margin-left:-40px;display:inline-block}.control-text+.ui-datepicker-trigger img{display:none}.control-text+.ui-datepicker-trigger:focus,.control-text+.ui-datepicker-trigger:active{background:0 0;border:none}.control-text+.ui-datepicker-trigger:hover{background:0 0;border:none}.control-text+.ui-datepicker-trigger.disabled,.control-text+.ui-datepicker-trigger[disabled],fieldset[disabled] .control-text+.ui-datepicker-trigger{cursor:not-allowed;pointer-events:none;opacity:.5}.control-text+.ui-datepicker-trigger>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.control-text+.ui-datepicker-trigger>span.focusable:active,.control-text+.ui-datepicker-trigger>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.control-text+.ui-datepicker-trigger>span.focusable:active,.control-text+.ui-datepicker-trigger>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.control-text+.ui-datepicker-trigger:after{font-family:'icons-blank-theme';content:'\e612';font-size:38px;line-height:33px;color:#514943;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}[class*=tab-nav-item]:not(ul):active,[class*=tab-nav-item]:not(ul):focus{box-shadow:none;outline:none}.customer-index-edit .col-2-left-layout,.customer-index-edit .col-1-layout{background:#fff}.customer-index-edit{background:#fff}.customer-index-edit .col-2-left-layout{background:#fff}.customer-index-edit .main-col{padding-left:40px}.customer-index-edit .page-main-actions{background:0 0}.tab-nav.block{margin-bottom:40px}.tab-nav.block:first-child{margin-top:16px}.tab-nav.block .block-title{padding:7px 20px}.tab-nav-items{padding:0;border:1px solid #d3d3d3;box-shadow:0 0 4px rgba(50,50,50,.35);margin:0 0 40px;background:#f7f7f7}.tab-nav-item{padding:0;list-style-type:none;border-bottom:1px solid #e0e0e0;position:relative;margin:0 15px;z-index:1}.tab-nav-item:last-child{border-bottom:0}.tab-nav-item.ui-state-active{z-index:2;background:#fff;padding:1px 14px;border:2px solid #eb5202;margin:-1px}.tab-nav-item.ui-state-active .tab-nav-item-link{padding:13px 15px 13px;color:#eb5202}.tab-nav-item.ui-tabs-loading{position:relative;z-index:1}.tab-nav-item.ui-tabs-loading:before{content:"";display:block;position:absolute;z-index:2;background:url("../images/loader-2.gif") no-repeat 50% 50%;background-size:120px;width:20px;height:20px;top:13px;left:-10px}.tab-nav-item.ui-tabs-loading.ui-state-active:before{top:12px;left:4px}.tab-nav-item-link{display:block;padding:15px;color:#666;line-height:1}.tab-nav-item-link:focus,.tab-nav-item-link:active,.tab-nav-item-link:hover{outline:0;color:#eb5202;text-decoration:none}.ui-state-active .tab-nav-item-link{color:#666;font-weight:600}.tab-nav-item-link.changed{font-style:italic}.listing-tiles{overflow:hidden;margin-top:-10px;margin-left:-10px}.listing-tiles .listing-tile{background-color:#f2ebde;display:block;width:238px;height:200px;float:left;border:1px solid #676056;margin-top:10px;margin-left:10px;border-radius:4px;text-align:center}.listing-tiles .listing-tile.disabled{border-color:red}.listing-tiles .listing-tile.enabled{border-color:green}.listing .disabled{color:red}.listing .enabled{color:green}.pager{text-align:left;padding-bottom:10px}.pager:before,.pager:after{content:"";display:table}.pager:after{clear:both}.pager:before,.pager:after{content:"";display:table}.pager:after{clear:both}.pager [data-part=left]{display:inline-block;width:45%;float:left;text-align:left}.pager [data-part=right]{display:inline-block;width:45%;text-align:right;float:right;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.pager .action-next{cursor:pointer}.pager .action-previous{cursor:pointer}.pager{text-align:left}.pager [data-part=left]{display:inline-block;width:45%;text-align:left}.pager [data-part=right]{display:inline-block;width:45%;text-align:right;float:right}.grid .col-title{min-width:90px;text-align:center}.grid-actions [data-part=search]{display:inline-block;margin:0 30px}.grid-actions [data-part=search] input[type=text]{vertical-align:bottom;width:460px}.grid .actions-split .dropdown-menu{right:auto;left:auto;text-align:left;color:#676056;font-weight:400}.grid .actions-split .dropdown-menu:after{right:auto;left:9px}.grid .actions-split .dropdown-menu:before{right:auto;left:10px}.grid .grid-actions{padding:10px 0}.grid .hor-scroll{padding-top:10px}.grid .select-box{display:inline-block;vertical-align:top;margin:-12px -10px -7px;padding:12px 10px 7px;width:100%}.filters-toggle{color:#645d53;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.3rem;box-sizing:border-box;vertical-align:middle;display:inline-block;background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.filters-toggle:after{font-family:'icons-blank-theme';content:'\e607';font-size:30px;line-height:15px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.filters-toggle:hover:after{color:inherit}.filters-toggle:active:after{color:inherit}.filters-toggle:focus,.filters-toggle:active{background:#cac3b4;border:1px solid #989287}.filters-toggle:hover{background:#cac3b4}.filters-toggle.disabled,.filters-toggle[disabled],fieldset[disabled] .filters-toggle{cursor:default;pointer-events:none;opacity:.5}.filters-toggle:focus,.filters-toggle:active{background:0 0;border:none}.filters-toggle:hover{background:0 0;border:none}.filters-toggle.disabled,.filters-toggle[disabled],fieldset[disabled] .filters-toggle{cursor:not-allowed;pointer-events:none;opacity:.5}.filters-toggle:after{margin-top:2px;margin-left:-3px}.filters-toggle.active:after{content:'\e618'}.filters-current{padding:10px 0;display:none}.filters-current.active{display:block}.filters-items{margin:0;padding:0;list-style:none none;display:inline}.filters-item{display:inline-block;margin:0 5px 5px 0;padding:2px 2px 2px 4px;border-radius:3px;background:#f7f3eb}.filters-item .item-label{font-weight:600}.filters-item .item-label:after{content:": "}.filters-item .action-remove{background-image:none;background:#f2ebde;color:#645d53;border:1px solid #ada89e;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.3rem;font-weight:500;line-height:1.4rem;box-sizing:border-box;margin:3px;vertical-align:middle;display:inline-block;text-decoration:none;padding:0}.filters-item .action-remove>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.filters-item .action-remove>span.focusable:active,.filters-item .action-remove>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.filters-item .action-remove>span.focusable:active,.filters-item .action-remove>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.filters-item .action-remove:before{font-family:'icons-blank-theme';content:'\e616';font-size:16px;line-height:16px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.filters-item .action-remove:hover:before{color:inherit}.filters-item .action-remove:active:before{color:inherit}.filters-item .action-remove:focus,.filters-item .action-remove:active{background:#cac3b4;border:1px solid #989287}.filters-item .action-remove:hover{background:#cac3b4}.filters-item .action-remove.disabled,.filters-item .action-remove[disabled],fieldset[disabled] .filters-item .action-remove{cursor:default;pointer-events:none;opacity:.5}.filters-form{position:relative;z-index:1;margin:14px 0;background:#fff;border:1px solid #bbb;box-shadow:0 3px 3px rgba(0,0,0,.15)}.filters-form .action-close{position:absolute;top:3px;right:7px;color:#645d53;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.3rem;box-sizing:border-box;vertical-align:middle;display:inline-block;background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.filters-form .action-close>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.filters-form .action-close>span.focusable:active,.filters-form .action-close>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.filters-form .action-close>span.focusable:active,.filters-form .action-close>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.filters-form .action-close:before{font-family:'icons-blank-theme';content:'\e616';font-size:42px;line-height:42px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.filters-form .action-close:hover:before{color:inherit}.filters-form .action-close:active:before{color:inherit}.filters-form .action-close:focus,.filters-form .action-close:active{background:#cac3b4;border:1px solid #989287}.filters-form .action-close:hover{background:#cac3b4}.filters-form .action-close.disabled,.filters-form .action-close[disabled],fieldset[disabled] .filters-form .action-close{cursor:default;pointer-events:none;opacity:.5}.filters-form .action-close:focus,.filters-form .action-close:active{background:0 0;border:none}.filters-form .action-close:hover{background:0 0;border:none}.filters-form .action-close.disabled,.filters-form .action-close[disabled],fieldset[disabled] .filters-form .action-close{cursor:not-allowed;pointer-events:none;opacity:.5}.filters-actions{margin:18px;text-align:right}.filters-fieldset{padding-bottom:0}.filters-fieldset .field{border:0;margin:0 0 20px;box-sizing:border-box;display:inline-block;padding:0 12px 0 0;width:33.33333333%;vertical-align:top}.filters-fieldset .field:before,.filters-fieldset .field:after{content:"";display:table}.filters-fieldset .field:after{clear:both}.filters-fieldset .field:before,.filters-fieldset .field:after{content:"";display:table}.filters-fieldset .field:after{clear:both}.filters-fieldset .field.choice:before,.filters-fieldset .field.no-label:before{box-sizing:border-box;content:" ";height:1px;float:left;padding:6px 15px 0 0;width:35%}.filters-fieldset .field .description{box-sizing:border-box;float:left;padding:6px 15px 0 0;text-align:right;width:35%}.filters-fieldset .field:not(.choice)>.label{box-sizing:border-box;float:left;padding:6px 15px 0 0;text-align:right;width:35%}.filters-fieldset .field:not(.choice)>.control{float:left;width:65%}.filters-fieldset .field:last-child{margin-bottom:0}.filters-fieldset .field+.fieldset{clear:both}.filters-fieldset .field>.label{font-weight:700}.filters-fieldset .field>.label+br{display:none}.filters-fieldset .field .choice input{vertical-align:top}.filters-fieldset .field .fields.group:before,.filters-fieldset .field .fields.group:after{content:"";display:table}.filters-fieldset .field .fields.group:after{clear:both}.filters-fieldset .field .fields.group:before,.filters-fieldset .field .fields.group:after{content:"";display:table}.filters-fieldset .field .fields.group:after{clear:both}.filters-fieldset .field .fields.group .field{box-sizing:border-box;float:left}.filters-fieldset .field .fields.group.group-2 .field{width:50% !important}.filters-fieldset .field .fields.group.group-3 .field{width:33.3% !important}.filters-fieldset .field .fields.group.group-4 .field{width:25% !important}.filters-fieldset .field .fields.group.group-5 .field{width:20% !important}.filters-fieldset .field .addon{display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;padding:0;width:100%}.filters-fieldset .field .addon textarea,.filters-fieldset .field .addon select,.filters-fieldset .field .addon input{-ms-flex-order:2;-webkit-order:2;order:2;-webkit-flex-basis:100%;flex-basis:100%;box-shadow:none;display:inline-block;margin:0;width:auto}.filters-fieldset .field .addon .addbefore,.filters-fieldset .field .addon .addafter{-ms-flex-order:3;-webkit-order:3;order:3;display:inline-block;box-sizing:border-box;background:#fff;border:1px solid #c2c2c2;border-radius:1px;height:32px;padding:0 9px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;line-height:1.428571429;background-clip:padding-box;width:auto;white-space:nowrap;vertical-align:middle}.filters-fieldset .field .addon .addbefore:disabled,.filters-fieldset .field .addon .addafter:disabled{opacity:.5}.filters-fieldset .field .addon .addbefore::-moz-placeholder,.filters-fieldset .field .addon .addafter::-moz-placeholder{color:#c2c2c2}.filters-fieldset .field .addon .addbefore::-webkit-input-placeholder,.filters-fieldset .field .addon .addafter::-webkit-input-placeholder{color:#c2c2c2}.filters-fieldset .field .addon .addbefore:-ms-input-placeholder,.filters-fieldset .field .addon .addafter:-ms-input-placeholder{color:#c2c2c2}.filters-fieldset .field .addon .addbefore{float:left;-ms-flex-order:1;-webkit-order:1;order:1}.filters-fieldset .field .additional{margin-top:10px}.filters-fieldset .field.required>.label:after{content:'*';font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.filters-fieldset .field .note{font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.filters-fieldset .field .note:before{font-family:'icons-blank-theme';content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.filters-fieldset .field .label{color:#676056;font-size:13px;font-weight:600;margin:0}.filters .field-date .group .hasDatepicker{width:100%;padding-right:30px}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger{background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;line-height:inherit;font-weight:400;text-decoration:none;margin-left:-33px;display:inline-block;width:30px}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger img{display:none}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger:focus,.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger:active{background:0 0;border:none}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger:hover{background:0 0;border:none}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger.disabled,.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger[disabled],fieldset[disabled] .filters .field-date .group .hasDatepicker+.ui-datepicker-trigger{cursor:not-allowed;pointer-events:none;opacity:.5}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger>span.focusable:active,.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger>span.focusable:active,.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.filters .field-date .group .hasDatepicker+.ui-datepicker-trigger:after{font-family:'icons-blank-theme';content:'\e612';font-size:35px;line-height:30px;color:#514943;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.filters .field-range .group .field{margin-bottom:0}.filters .field-range .group .control{width:100%;box-sizing:border-box;padding-right:0;position:relative;z-index:1}.mass-select{position:relative;margin:-6px -10px;padding:6px 2px 6px 10px;z-index:1;white-space:nowrap}.mass-select.active{background:rgba(0,0,0,.2)}.mass-select-toggle{color:#645d53;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1.3rem;box-sizing:border-box;vertical-align:middle;display:inline-block;background-image:none;background:0 0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.mass-select-toggle>span{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.mass-select-toggle>span.focusable:active,.mass-select-toggle>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.mass-select-toggle>span.focusable:active,.mass-select-toggle>span.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.mass-select-toggle:before{font-family:'icons-blank-theme';content:'\e607';font-size:30px;line-height:15px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.mass-select-toggle:hover:before{color:inherit}.mass-select-toggle:active:before{color:inherit}.mass-select-toggle:focus,.mass-select-toggle:active{background:#cac3b4;border:1px solid #989287}.mass-select-toggle:hover{background:#cac3b4}.mass-select-toggle.disabled,.mass-select-toggle[disabled],fieldset[disabled] .mass-select-toggle{cursor:default;pointer-events:none;opacity:.5}.mass-select-toggle:focus,.mass-select-toggle:active{background:0 0;border:none}.mass-select-toggle:hover{background:0 0;border:none}.mass-select-toggle.disabled,.mass-select-toggle[disabled],fieldset[disabled] .mass-select-toggle{cursor:not-allowed;pointer-events:none;opacity:.5}.mass-select-toggle:before{margin-top:-2px;text-indent:-5px;color:#fff}.mass-select-toggle:hover:before{color:#fff}.mass-select-toggle:active:before,.mass-select-toggle.active:before{content:'\e618'}.mass-select-field{display:inline}.mass-select-menu{display:none;position:absolute;top:100%;left:0;text-align:left;margin:0;padding:0;list-style:none none;background:#fff;border:1px solid #bbb;min-width:175px;box-shadow:0 3px 3px rgba(0,0,0,.15)}.mass-select-menu li{margin:0;padding:4px 15px;border-bottom:1px solid #e5e5e5}.mass-select-menu li:hover{background:#e8e8e8;cursor:pointer}.mass-select-menu span{font-weight:400;font-size:13px;color:#645d53}.mass-select-menu.active{display:block}.grid-loading-mask{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(255,255,255,.5);z-index:100}.grid-loading-mask .grid-loader{position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;width:218px;height:149px;background:url('../images/loader-2.gif') 50% 50% no-repeat}.addon input{border-width:1px 0 1px 1px}.addon input~.addafter strong{display:inline-block;background:#fff;line-height:24px;margin:0 3px 0 -2px;padding-left:4px;padding-right:4px;position:relative;font-size:12px;top:0}.addon input:focus~.addafter{border-color:#75b9f0;box-shadow:0 0 8px rgba(82,168,236,.6)}.addon input:focus~.addafter strong{margin-top:0}.addon .addafter{background:0 0;color:#a6a6a6;border-width:1px 1px 1px 0;border-radius:2px 2px 0 0;padding:0;border-color:#ada89e}.addon .pager input{border-width:1px}.field .control input[type=text][disabled],.field .control input[type=text][disabled]~.addafter,.field .control select[disabled],.field .control select[disabled]~.addafter{background-color:#fff;border-color:#eee;box-shadow:none;color:#999}.field .control input[type=text][disabled]~.addafter strong,.field .control select[disabled]~.addafter strong{background-color:#fff}.field-price.addon{direction:rtl}.field-price.addon>*{direction:ltr}.field-price.addon .addafter{border-width:1px 0 1px 1px;border-radius:2px 0 0 2px}.field-price.addon input:first-child{border-radius:0 2px 2px 0}.field-price input{border-width:1px 1px 1px 0}.field-price input:focus{box-shadow:0 0 8px rgba(82,168,236,.6)}.field-price input:focus~label.addafter{box-shadow:0 0 8px rgba(82,168,236,.6)}.field-price input~label.addafter strong{margin-left:2px;margin-right:-2px}.field-price.addon>input{width:99px;float:left}.field-price .control{position:relative}.field-price label.mage-error{position:absolute;left:0;top:30px}.version-fieldset .grid-actions{border-bottom:1px solid #f2ebde;margin:0 0 15px;padding:0 0 15px}.navigation>ul,.message-system,.page-header,.page-actions.fixed .page-actions-inner,.page-content,.page-footer{min-width:960px;max-width:1300px;margin:0 auto;padding-left:15px;padding-right:15px;box-sizing:border-box;width:100%}.pager label.page,.filters .field-range .group .label,.mass-select-field .label{clip:rect(0,0,0,0);border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visually-hidden.focusable:active,.visually-hidden.focusable:focus,.pager label.page.focusable:active,.pager label.page.focusable:focus,.filters .field-range .group .label.focusable:active,.filters .field-range .group .label.focusable:focus,.mass-select-field .label.focusable:active,.mass-select-field .label.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}table th.required:after,.data-table th.required-entry:after,.data-table td.required-entry:after,.grid-actions .filter.required .label span:after,.grid-actions .required:after,.accordion .config .data-table td.required-entry:after{content:'*';color:#e22626;font-weight:400;margin-left:3px}.grid th.required:after,.grid th .required:after{content:'*';color:#f9d4d4;font-weight:400;margin-left:3px}.grid td.col-period,.grid td.col-date,.grid td.col-date_to,.grid td.col-date_from,.grid td.col-ended_at,.grid td.col-created_at,.grid td.col-updated_at,.grid td.col-customer_since,.grid td.col-session_start_time,.grid td.col-last_activity,.grid td.col-email,.grid td.col-name,.grid td.col-sku,.grid td.col-firstname,.grid td.col-lastname,.grid td.col-title,.grid td.col-label,.grid td.col-product,.grid td.col-set_name,.grid td.col-websites,.grid td.col-time,.grid td.col-billing_name,.grid td.col-shipping_name,.grid td.col-phone,.grid td.col-type,.product-options .grouped-items-table .col-name,.product-options .grouped-items-table .col-sku,.sales-order-create-index .data-table .col-product,[class^=' adminhtml-rma-'] .fieldset-wrapper .data-table td,[class^=' adminhtml-rma-'] .grid .col-product_sku,[class^=' adminhtml-rma-'] .grid .col-product_name,.col-grid_segment_name,.adminhtml-catalog-event-index .col-category,[class^=' catalog-search'] .col-search_query,[class^=' catalog-search'] .col-synonym_for,[class^=' catalog-search'] .col-redirect,.adminhtml-urlrewrite-index .col-request_path,.adminhtml-cms-page-index .col-title,.adminhtml-cms-page-index .col-identifier,.adminhtml-cms-hierarchy-index .col-title,.adminhtml-cms-hierarchy-index .col-identifier,.col-banner_name,.adminhtml-widget-instance-index .col-title,.reports-index-search .col-query_text,.adminhtml-rma-item-attribute-index .grid .col-attr-code,.adminhtml-system-store-index .grid td,.catalog-product-attribute-index .col-attr-code,.catalog-product-attribute-index .col-label,.adminhtml-export-index .col-code,.adminhtml-logging-index .grid .col-fullaction,.adminhtml-system-variable-index .grid .col-code,.adminhtml-logging-index .grid .col-info,.dashboard-secondary .dashboard-item tr>td:first-child,.ui-tabs-panel .dashboard-data .col-name,.data-table-td-max .data-table td,[class^=' adminhtml-rma-'] .fieldset-wrapper .accordion .config .data-table td,.data-table-td-max .accordion .config .data-table td,.order-account-information .data-table td,[class^=' adminhtml-rma-'] .rma-request-details .data-table td{overflow:hidden;text-overflow:ellipsis}td.col-period,td.col-date,td.col-date_to,td.col-date_from,td.col-ended_at,td.col-created_at,td.col-updated_at,td.col-customer_since,td.col-session_start_time,td.col-time,td.col-sku,td.col-type,[class^=' adminhtml-rma-'] #rma_items_grid_table .headings th,.adminhtml-process-list .col-action a,.adminhtml-process-list .col-mode{white-space:nowrap}table thead tr th:first-child,table tfoot tr th:first-child,table tfoot tr td:first-child{border-left:0}table thead tr th:last-child,table tfoot tr th:last-child,table tfoot tr td:last-child{border-right:0}.form-inline .grid-actions .label,.form-inline .massaction .label{padding:0;width:auto}.grid .col-action,.grid .col-actions,.grid .col-qty,.grid .col-purchases,.catalog-product-edit .ui-tabs-panel .grid .col-price,.catalog-product-edit .ui-tabs-panel .grid .col-position{width:50px}.grid .col-order-number,.grid .col-real_order_id,.grid .col-invoice-number,.grid .col-increment_id,.grid .col-transaction-id,.grid .col-parent-transaction-id,.grid .col-reference_id,.grid .col-status,.grid .col-price,.grid .col-position,.grid .col-base_grand_total,.grid .col-grand_total,.grid .col-sort_order,.grid .col-carts,.grid .col-priority,.grid .col-severity,.sales-order-create-index .col-in_products,[class^=' reports-'] [class^=col-total],[class^=' reports-'] [class^=col-average],[class^=' reports-'] [class^=col-ref-],[class^=' reports-'] [class^=col-rate],[class^=' reports-'] [class^=col-tax-amount],[class^=' adminhtml-customer-'] .col-required,.adminhtml-rma-item-attribute-index .col-required,[class^=' adminhtml-customer-'] .col-system,.adminhtml-rma-item-attribute-index .col-system,[class^=' adminhtml-customer-'] .col-is_visible,.adminhtml-rma-item-attribute-index .col-is_visible,[class^=' adminhtml-customer-'] .col-sort_order,.adminhtml-rma-item-attribute-index .col-sort_order,.catalog-product-attribute-index [class^=' col-is_'],.catalog-product-attribute-index .col-required,.catalog-product-attribute-index .col-system,.adminhtml-test-index .col-is_listed,[class^=' tests-report-test'] [class^=col-inv-]{width:70px}.grid .col-phone,.sales-order-view .grid .col-period,.sales-order-create-index .col-phone,[class^=' adminhtml-rma-'] .grid .col-product_sku,.adminhtml-rma-edit .col-product,.adminhtml-rma-edit .col-sku,.catalog-product-edit .ui-tabs-panel .grid .col-name,.catalog-product-edit .ui-tabs-panel .grid .col-type,.catalog-product-edit .ui-tabs-panel .grid .col-sku,.customer-index-index .grid .col-customer_since,.customer-index-index .grid .col-billing_country_id,[class^=' customer-index-'] .fieldset-wrapper .grid .col-created_at,[class^=' customer-index-'] .accordion .grid .col-created_at{max-width:70px;width:70px}.sales-order-view .grid .col-name,.sales-order-create-index .data-table .col-product,[class^=' adminhtml-rma-'] .grid .col-name,[class^=' adminhtml-rma-'] .grid .col-product,[class^=' catalog-search'] .col-search_query,[class^=' catalog-search'] .col-synonym_for,[class^=' catalog-search'] .col-redirect,.adminhtml-urlrewrite-index .col-request_path,.reports-report-shopcart-abandoned .grid .col-name,.tax-rule-index .grid .col-title,.adminhtml-rma-item-attribute-index .grid .col-attr-code,.dashboard-secondary .dashboard-item tr>td:first-child{max-width:150px;width:150px}[class^=' sales-order-'] .grid .col-name,.catalog-category-edit .grid .col-name,.adminhtml-catalog-event-index .col-category,.adminhtml-banner-edit .grid .col-name,.reports-report-product-lowstock .grid .col-sku,.newsletter-problem-index .grid .col-name,.newsletter-problem-index .grid .col-subject,.newsletter-problem-index .grid .col-product,.adminhtml-rma-item-attribute-index .grid .col-label,.adminhtml-export-index .col-label,.adminhtml-export-index .col-code,.adminhtml-scheduled-operation-index .grid .col-name,.adminhtml-logging-index .grid .col-fullaction,.test-report-customer-wishlist-wishlist .grid .col-name,.test-report-customer-wishlist-wishlist .grid .col-subject,.test-report-customer-wishlist-wishlist .grid .col-product{max-width:220px;width:220px}.grid .col-period,.grid .col-date,.grid .col-date_to,.grid .col-date_from,.grid .col-ended_at,.grid .col-created_at,.grid .col-updated_at,.grid .col-customer_since,.grid .col-session_start_time,.grid .col-last_activity,.grid .col-email,.grid .col-items_total,.grid .col-firstname,.grid .col-lastname,.grid .col-status-default,.grid .col-websites,.grid .col-time,.grid .col-billing_name,.grid .col-shipping_name,.sales-order-index .grid .col-name,.product-options .grouped-items-table .col-name,.product-options .grouped-items-table .col-sku,[class^=' sales-order-view'] .grid .col-customer_name,[class^=' adminhtml-rma-'] .grid .col-product_name,.catalog-product-index .grid .col-name,.catalog-product-review-index .grid .col-name,.catalog-product-review-index .grid .col-title,.customer-index-edit .ui-tabs-panel .grid .col-name,.review-product-index .grid .col-name,.adminhtml-cms-page-index .col-title,.adminhtml-cms-page-index .col-identifier,.catalog-product-attribute-index .col-attr-code,.catalog-product-attribute-index .col-label,.adminhtml-logging-index .grid .col-info{max-width:110px;width:110px}.grid .col-name,.grid .col-product,.col-banner_name,.adminhtml-widget-instance-index .col-title,[class^=' adminhtml-customer-'] .col-label,.adminhtml-rma-item-attribute-index .col-label,.adminhtml-system-variable-index .grid .col-code,.ui-tabs-panel .dashboard-data .col-name,.adminhtml-test-index .col-label{max-width:370px;width:370px}.col-grid_segment_name,.reports-index-search .col-query_text{max-width:570px;width:570px}[class^=' adminhtml-rma-'] .fieldset-wrapper .data-table td,.reports-report-product-lowstock .grid .col-name,.reports-report-shopcart-product .grid .col-name,.reports-report-review-customer .grid .col-name,[class^=' adminhtml-rma-'] .fieldset-wrapper .accordion .config .data-table td{max-width:670px;width:670px}.reports-report-sales-invoiced .grid .col-period,.reports-report-sales-refunde .grid .col-period,[class^=' tests-report-test'] .grid .col-period{width:auto}.grid .col-select,.grid .col-id,.grid .col-number{width:40px}.sales-order-create-index .grid,.sales-order-create-index .grid-actions,.adminhtml-export-index .grid-actions,.adminhtml-export-index .grid{padding-left:0;padding-right:0}[class^=' adminhtml-rma-'] .col-actions a,[class^=' customer-index-'] .col-action a,.adminhtml-notification-index .col-actions a{display:block;margin:0 0 3px;white-space:nowrap}.data-table-td-max .accordion .config .data-table td,.order-account-information .data-table td,[class^=' adminhtml-rma-'] .rma-request-details .data-table td{max-width:250px;width:250px}.catalog-product-edit .ui-tabs-panel .grid .hor-scroll,.catalog-product-index .grid .hor-scroll,.review-product-index .grid .hor-scroll,.adminhtml-rma-edit .hor-scroll{overflow-x:auto}.add-clearer:after,.massaction:after,.navigation>ul:after{content:"";display:table;clear:both}.test-content{width:calc(20px + 100*0.2)}.test-content:before{content:'.test {\A ' attr(data-attribute) ': 0.2em;' '\A content:\'';white-space:pre}.test-content:after{content:' Test\';\A}' "\A" '\A.test + .test._other ~ ul > li' " {\A height: @var;\A content: ' + ';\A}";white-space:pre}.test-content-calc{width:calc((100%/12*2) - 10px)}.test-svg-xml-image{background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" viewBox="0 0 38 40"><style>.st0{fill:none;stroke:%23ffffff;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}</style><circle cx="14.7" cy="14.7" r="13.7" class="st0"/><path d="M23.9 24.7L37 39" class="st0"/></svg>') no-repeat left center} \ No newline at end of file diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/static/theme/web/css/styles.css b/dev/tests/integration/testsuite/Magento/Framework/View/_files/static/theme/web/css/styles.css index 90ca42321c92..35305fb2392d 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/static/theme/web/css/styles.css +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/static/theme/web/css/styles.css @@ -484,7 +484,6 @@ table .col-draggable .draggable-handle { border: 0; display: inline; line-height: 1.42857143; - margin: 0; padding: 0; color: #1979c3; text-decoration: none; @@ -621,7 +620,6 @@ fieldset[disabled] .grid-actions .action-reset { background: none; border: 0; display: inline; - line-height: 1.42857143; margin: 0; padding: 0; color: #1979c3; @@ -683,7 +681,6 @@ fieldset[disabled] .pager .action-next { text-decoration: none; } .pager .action-previous > span { - clip: rect(0, 0, 0, 0); border: 0; clip: rect(0 0 0 0); height: 1px; @@ -733,7 +730,6 @@ fieldset[disabled] .pager .action-next { text-decoration: none; } .pager .action-next > span { - clip: rect(0, 0, 0, 0); border: 0; clip: rect(0 0 0 0); height: 1px; @@ -1510,7 +1506,6 @@ fieldset[disabled] .pager .action-next { text-decoration: none; } .search-global-field .label > span { - clip: rect(0, 0, 0, 0); border: 0; clip: rect(0 0 0 0); height: 1px; @@ -1622,7 +1617,6 @@ fieldset[disabled] .pager .action-next { color: #676056; } .notifications-action .text { - clip: rect(0, 0, 0, 0); border: 0; clip: rect(0 0 0 0); height: 1px; @@ -1707,7 +1701,6 @@ fieldset[disabled] .pager .action-next { z-index: 1; top: 12px; right: 12px; - display: inline-block; background-image: none; background: none; border: 0; @@ -2358,7 +2351,6 @@ fieldset[disabled] .notifications-close.action { text-decoration: none; } #product-variations-matrix .actions-image-uploader { - display: inline-block; position: relative; display: block; width: 50px; @@ -3109,7 +3101,6 @@ body > * { background-image: none; background: none; border: 0; - margin: 0; padding: 0; -moz-box-sizing: content-box; box-shadow: none; @@ -3396,7 +3387,6 @@ fieldset[disabled] .page-main-actions .page-actions .action-add.mselect-button-a box-shadow: none; text-shadow: none; text-decoration: none; - line-height: inherit; font-weight: 400; color: #026294; line-height: normal; @@ -3464,7 +3454,6 @@ fieldset[disabled] .store-switcher .actions.dropdown .action.toggle { margin-top: 10px; } .store-switcher .actions.dropdown ul.dropdown-menu .dropdown-toolbar a { - display: inline-block; text-decoration: none; display: block; } @@ -4833,17 +4822,11 @@ fieldset[disabled] .control-text + .ui-datepicker-trigger { width: 100%; } .filters-toggle { - background: #f2ebde; - padding: 6px 13px; color: #645d53; - border: 1px solid #ada89e; cursor: pointer; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 1.3rem; - font-weight: 500; - line-height: 1.4rem; box-sizing: border-box; - margin: 3px; vertical-align: middle; display: inline-block; background-image: none; @@ -4946,7 +4929,6 @@ fieldset[disabled] .filters-toggle { .filters-item .action-remove { background-image: none; background: #f2ebde; - padding: 6px 13px; color: #645d53; border: 1px solid #ada89e; cursor: pointer; @@ -5038,17 +5020,11 @@ fieldset[disabled] .filters-item .action-remove { position: absolute; top: 3px; right: 7px; - background: #f2ebde; - padding: 6px 13px; color: #645d53; - border: 1px solid #ada89e; cursor: pointer; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 1.3rem; - font-weight: 500; - line-height: 1.4rem; box-sizing: border-box; - margin: 3px; vertical-align: middle; display: inline-block; background-image: none; @@ -5283,13 +5259,11 @@ fieldset[disabled] .filters-form .action-close { border: 1px solid #c2c2c2; border-radius: 1px; height: 32px; - width: 100%; padding: 0 9px; font-size: 14px; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.428571429; background-clip: padding-box; - vertical-align: baseline; width: auto; white-space: nowrap; vertical-align: middle; @@ -5487,17 +5461,11 @@ fieldset[disabled] .filters .field-date .group .hasDatepicker + .ui-datepicker-t background: rgba(0, 0, 0, 0.2); } .mass-select-toggle { - background: #f2ebde; - padding: 6px 13px; color: #645d53; - border: 1px solid #ada89e; cursor: pointer; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 1.3rem; - font-weight: 500; - line-height: 1.4rem; box-sizing: border-box; - margin: 3px; vertical-align: middle; display: inline-block; background-image: none; @@ -5754,7 +5722,6 @@ fieldset[disabled] .mass-select-toggle { .page-actions.fixed .page-actions-inner, .page-content, .page-footer { - width: auto; min-width: 960px; max-width: 1300px; margin: 0 auto; diff --git a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/ObserverTest.php index 0f19edc349e8..44f37b34660b 100644 --- a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/ObserverTest.php @@ -78,8 +78,9 @@ public function testProcess() /** * Check translations for product alerts * - * @magentoDbIsolation enabled + * @magentoDbIsolation disabled * @magentoAppArea frontend + * @magentoDataFixture Magento/Catalog/_files/category.php * @magentoConfigFixture current_store catalog/productalert/allow_price 1 * @magentoDataFixture Magento/Store/_files/second_store.php * @magentoConfigFixture fixture_second_store_store general/locale/code pt_BR diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/ShipmentTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/ShipmentTest.php index 1d04a79ae3f8..11499a024b44 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/ShipmentTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/ShipmentTest.php @@ -117,9 +117,12 @@ public function testAddComment() $saved = $this->shipmentRepository->save($shipment); $comments = $saved->getComments(); - $actual = array_map(function (CommentInterface $comment) { - return $comment->getComment(); - }, $comments); + $actual = array_map( + function (CommentInterface $comment) { + return $comment->getComment(); + }, + $comments + ); self::assertEquals(2, count($actual)); self::assertEquals([$message1, $message2], $actual); } @@ -144,4 +147,59 @@ private function getOrder(string $incrementId): OrderInterface return array_pop($items); } + + /** + * Check that getTracksCollection() returns only order related tracks. + * + * @magentoDataFixture Magento/Sales/_files/two_orders_with_order_items.php + */ + public function testGetTracksCollection() + { + $order = $this->getOrder('100000001'); + $items = []; + foreach ($order->getItems() as $item) { + $items[$item->getId()] = $item->getQtyOrdered(); + } + /** @var \Magento\Sales\Model\Order\Shipment $shipment */ + $shipment = $this->objectManager->get(ShipmentFactory::class) + ->create($order, $items); + + $tracks = $shipment->getTracksCollection(); + self::assertTrue(empty($tracks->getItems())); + + /** @var ShipmentTrackInterface $track */ + $track = $this->objectManager->create(ShipmentTrackInterface::class); + $track->setNumber('Test Number') + ->setTitle('Test Title') + ->setCarrierCode('Test CODE'); + + $shipment->addTrack($track); + $this->shipmentRepository->save($shipment); + $shipmentTracksCollection = $shipment->getTracksCollection(); + + $secondOrder = $this->getOrder('100000002'); + $secondOrderItems = []; + foreach ($secondOrder->getItems() as $item) { + $secondOrderItems[$item->getId()] = $item->getQtyOrdered(); + } + /** @var \Magento\Sales\Model\Order\Shipment $secondOrderShipment */ + $secondOrderShipment = $this->objectManager->get(ShipmentFactory::class) + ->create($secondOrder, $secondOrderItems); + + /** @var ShipmentTrackInterface $secondShipmentTrack */ + $secondShipmentTrack = $this->objectManager->create(ShipmentTrackInterface::class); + $secondShipmentTrack->setNumber('Test Number2') + ->setTitle('Test Title2') + ->setCarrierCode('Test CODE2'); + + $secondOrderShipment->addTrack($secondShipmentTrack); + $this->shipmentRepository->save($secondOrderShipment); + $secondShipmentTrackCollection = $secondOrderShipment->getTracksCollection(); + + self::assertEquals($shipmentTracksCollection->getColumnValues('id'), [$track->getEntityId()]); + self::assertEquals( + $secondShipmentTrackCollection->getColumnValues('id'), + [$secondShipmentTrack->getEntityId()] + ); + } } diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/ResourceModel/OrderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/ResourceModel/OrderTest.php index d6fe86b6232d..25f759e7b1b9 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/ResourceModel/OrderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/ResourceModel/OrderTest.php @@ -3,8 +3,18 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Sales\Model\ResourceModel; +use Magento\Store\Api\StoreRepositoryInterface; +use Magento\Store\Model\StoreManagerInterface; +use Magento\Framework\Event\ManagerInterface; +use Magento\Sales\Model\ResourceModel\Order\CollectionFactory as OrderCollectionFactory; + +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class OrderTest extends \PHPUnit\Framework\TestCase { /** @@ -22,27 +32,48 @@ class OrderTest extends \PHPUnit\Framework\TestCase */ protected $objectManager; + /** + * @var StoreManagerInterface + */ + private $storeManager; + + /** + * @var StoreRepositoryInterface + */ + private $storeRepository; + + /** + * @inheritdoc + */ protected function setUp() { $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->resourceModel = $this->objectManager->create(\Magento\Sales\Model\ResourceModel\Order::class); $this->orderIncrementId = '100000001'; + $this->storeManager = $this->objectManager->get(StoreManagerInterface::class); + $this->storeRepository = $this->objectManager->get(StoreRepositoryInterface::class); } + /** + * @inheritdoc + */ protected function tearDown() { $registry = $this->objectManager->get(\Magento\Framework\Registry::class); $registry->unregister('isSecureArea'); $registry->register('isSecureArea', true); - /** @var \Magento\Sales\Model\Order $order */ - $order = $this->objectManager->create(\Magento\Sales\Model\Order::class); - $order->loadByIncrementId($this->orderIncrementId); - $order->delete(); + $orderCollection = $this->objectManager->create(OrderCollectionFactory::class)->create(); + foreach ($orderCollection as $order) { + $order->delete(); + } $registry->unregister('isSecureArea'); $registry->register('isSecureArea', false); + $defaultStore = $this->storeRepository->get('default'); + $this->storeManager->setCurrentStore($defaultStore->getId()); + parent::tearDown(); } @@ -108,4 +139,29 @@ public function testSaveOrder() $this->assertNotNull($order->getCreatedAt()); $this->assertNotNull($order->getUpdatedAt()); } + + /** + * Check that store name with length within 255 chars can be saved in table sales_order + * + * @magentoDataFixture Magento/Store/_files/store_with_long_name.php + * @magentoDbIsolation disabled + * @return void + */ + public function testSaveStoreName() + { + $store = $this->storeRepository->get('test_2'); + $this->storeManager->setCurrentStore($store->getId()); + $eventManager = $this->objectManager->get(ManagerInterface::class); + $eventManager->dispatch('store_add', ['store' => $store]); + $order = $this->objectManager->create(\Magento\Sales\Model\Order::class); + $payment = $this->objectManager->create(\Magento\Sales\Model\Order\Payment::class); + $payment->setMethod('checkmo'); + $order->setStoreId($store->getId())->setPayment($payment); + $this->resourceModel->save($order); + $orderRepository = $this->objectManager->create(\Magento\Sales\Api\OrderRepositoryInterface::class); + $order = $orderRepository->get($order->getId()); + $this->assertEquals(255, strlen($order->getStoreName())); + $this->assertContains($store->getWebsite()->getName(), $order->getStoreName()); + $this->assertContains($store->getGroup()->getName(), $order->getStoreName()); + } } diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/two_orders_with_order_items.php b/dev/tests/integration/testsuite/Magento/Sales/_files/two_orders_with_order_items.php new file mode 100644 index 000000000000..ade37aed49d5 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Sales/_files/two_orders_with_order_items.php @@ -0,0 +1,111 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +use Magento\Sales\Api\OrderRepositoryInterface; +use Magento\Sales\Model\Order; +use Magento\Sales\Model\Order\Address as OrderAddress; +use Magento\Sales\Model\Order\Item as OrderItem; +use Magento\Sales\Model\Order\Payment; +use Magento\Store\Model\StoreManagerInterface; + +require 'default_rollback.php'; +require __DIR__ . '/../../../Magento/Catalog/_files/product_simple.php'; +/** @var \Magento\Catalog\Model\Product $product */ + +$addressData = include __DIR__ . '/address_data.php'; + +$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + +$billingAddress = $objectManager->create(OrderAddress::class, ['data' => $addressData]); +$billingAddress->setAddressType('billing'); + +$shippingAddress = clone $billingAddress; +$shippingAddress->setId(null)->setAddressType('shipping'); + +/** @var Payment $payment */ +$payment = $objectManager->create(Payment::class); +$payment->setMethod('checkmo') + ->setAdditionalInformation('last_trans_id', '11122') + ->setAdditionalInformation( + 'metadata', + [ + 'type' => 'free', + 'fraudulent' => false, + ] + ); + +/** @var OrderItem $orderItem */ +$orderItem = $objectManager->create(OrderItem::class); +$orderItem->setProductId($product->getId()) + ->setQtyOrdered(2) + ->setBasePrice($product->getPrice()) + ->setPrice($product->getPrice()) + ->setRowTotal($product->getPrice()) + ->setProductType('simple') + ->setName($product->getName()) + ->setSku($product->getSku()); + +/** @var Order $order */ +$order = $objectManager->create(Order::class); +$order->setIncrementId('100000001') + ->setState(Order::STATE_PROCESSING) + ->setStatus($order->getConfig()->getStateDefaultStatus(Order::STATE_PROCESSING)) + ->setSubtotal(100) + ->setGrandTotal(100) + ->setBaseSubtotal(100) + ->setBaseGrandTotal(100) + ->setCustomerIsGuest(true) + ->setCustomerEmail('customer@null.com') + ->setBillingAddress($billingAddress) + ->setShippingAddress($shippingAddress) + ->setStoreId($objectManager->get(StoreManagerInterface::class)->getStore()->getId()) + ->addItem($orderItem) + ->setPayment($payment); + +/** @var OrderRepositoryInterface $orderRepository */ +$orderRepository = $objectManager->create(OrderRepositoryInterface::class); +$orderRepository->save($order); + +/** @var Payment $payment */ +$secondPayment = $objectManager->create(Payment::class); +$secondPayment->setMethod('checkmo') + ->setAdditionalInformation('last_trans_id', '11122') + ->setAdditionalInformation( + 'metadata', + [ + 'type' => 'free', + 'fraudulent' => false, + ] + ); + +/** @var OrderItem $orderItem */ +$secondOrderItem = $objectManager->create(OrderItem::class); +$secondOrderItem->setProductId($product->getId()) + ->setQtyOrdered(2) + ->setBasePrice($product->getPrice()) + ->setPrice($product->getPrice()) + ->setRowTotal($product->getPrice()) + ->setProductType('simple') + ->setName($product->getName()) + ->setSku($product->getSku()); + +/** @var Order $order */ +$secondOrder = $objectManager->create(Order::class); +$secondOrder->setIncrementId('100000002') + ->setState(Order::STATE_PROCESSING) + ->setStatus($secondOrder->getConfig()->getStateDefaultStatus(Order::STATE_PROCESSING)) + ->setSubtotal(100) + ->setGrandTotal(100) + ->setBaseSubtotal(100) + ->setBaseGrandTotal(100) + ->setCustomerIsGuest(true) + ->setCustomerEmail('customer@null.com') + ->setBillingAddress($billingAddress) + ->setShippingAddress($shippingAddress) + ->setStoreId($objectManager->get(StoreManagerInterface::class)->getStore()->getId()) + ->addItem($secondOrderItem) + ->setPayment($secondPayment); +$orderRepository->save($secondOrder); diff --git a/dev/tests/integration/testsuite/Magento/Store/App/FrontController/Plugin/RequestPreprocessorTest.php b/dev/tests/integration/testsuite/Magento/Store/App/FrontController/Plugin/RequestPreprocessorTest.php index 0e158821f180..a1a99ecd32b8 100644 --- a/dev/tests/integration/testsuite/Magento/Store/App/FrontController/Plugin/RequestPreprocessorTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/App/FrontController/Plugin/RequestPreprocessorTest.php @@ -14,7 +14,7 @@ use Zend\Stdlib\Parameters; /** - * Class RequestPreprocessorTest @covers \Magento\Store\App\FrontController\Plugin\RequestPreprocessor. + * Tests \Magento\Store\App\FrontController\Plugin\RequestPreprocessor. */ class RequestPreprocessorTest extends \Magento\TestFramework\TestCase\AbstractController { @@ -24,6 +24,28 @@ class RequestPreprocessorTest extends \Magento\TestFramework\TestCase\AbstractCo * @var string */ private $baseUrl; + /** + * @var array; + */ + private $config; + + /** + * @inheritDoc + */ + protected function setUp() + { + parent::setUp(); + $this->config = []; + } + + /** + * @inheritDoc + */ + protected function tearDown() + { + $this->setConfig($this->config); + parent::tearDown(); + } /** * Test non-secure POST request is redirected right away on completely secure frontend. @@ -62,6 +84,115 @@ public function testHttpsPassSecureLoginPost() $this->setFrontendCompletelySecureRollback(); } + /** + * Test auto redirect to base URL + * + * @param array $config + * @param string $requestUrl + * @param string $redirectUrl + * @dataProvider autoRedirectToBaseURLDataProvider + */ + public function testAutoRedirectToBaseURL(array $config, string $requestUrl, string $redirectUrl) + { + $request = [ + 'REQUEST_SCHEME' => parse_url($requestUrl, PHP_URL_SCHEME), + 'SERVER_NAME' => parse_url($requestUrl, PHP_URL_HOST), + 'SCRIPT_NAME' => '/index.php', + 'SCRIPT_FILENAME' => 'index.php', + 'REQUEST_URI' => parse_url($requestUrl, PHP_URL_PATH), + ]; + $this->setConfig($config); + $this->setServer($request); + $app = $this->_objectManager->create(\Magento\Framework\App\Http::class, ['_request' => $this->getRequest()]); + $this->_response = $app->launch(); + $this->assertRedirect($this->equalTo($redirectUrl)); + } + + /** + * @return array + */ + public function autoRedirectToBaseURLDataProvider(): array + { + $baseConfig = [ + 'web/unsecure/base_url' => 'http://magento.com/us/', + 'web/session/use_frontend_sid' => 0, + 'web/seo/use_rewrites' => 1, + ]; + + return [ + [ + 'config' => $baseConfig, + 'request' => 'http://magento.com/a/b/c/d/e.html', + 'redirectUrl' => 'http://magento.com/us/a/b/c/d/e.html' + ], + [ + 'config' => $baseConfig, + 'request' => 'http://magento.com/a/b/c/d.html', + 'redirectUrl' => 'http://magento.com/us/a/b/c/d.html' + ], + [ + 'config' => $baseConfig, + 'request' => 'http://magento.com/a/b/c.html', + 'redirectUrl' => 'http://magento.com/us/a/b/c.html' + ], + [ + 'config' => $baseConfig, + 'request' => 'http://magento.com/a/b.html', + 'redirectUrl' => 'http://magento.com/us/a/b.html' + ], + [ + 'config' => $baseConfig, + 'request' => 'http://magento.com/a.html', + 'redirectUrl' => 'http://magento.com/us/a.html' + ], + [ + 'config' => $baseConfig, + 'request' => 'http://magento.com/a/b/c/d/e', + 'redirectUrl' => 'http://magento.com/us/a/b/c/d/e' + ], + [ + 'config' => $baseConfig, + 'request' => 'http://magento.com/a/b/c/d', + 'redirectUrl' => 'http://magento.com/us/a/b/c/d' + ], + [ + 'config' => $baseConfig, + 'request' => 'http://magento.com/a/b/c', + 'redirectUrl' => 'http://magento.com/us/a/b/c' + ], + [ + 'config' => $baseConfig, + 'request' => 'http://magento.com/a/b', + 'redirectUrl' => 'http://magento.com/us/a/b' + ], + [ + 'config' => $baseConfig, + 'request' => 'http://magento.com/a', + 'redirectUrl' => 'http://magento.com/us/a' + ], + [ + 'config' => $baseConfig, + 'request' => 'http://magento.com/', + 'redirectUrl' => 'http://magento.com/us/' + ], + [ + 'config' => array_merge($baseConfig, ['web/seo/use_rewrites' => 0]), + 'request' => 'http://magento.com/', + 'redirectUrl' => 'http://magento.com/us/index.php/' + ], + [ + 'config' => array_merge($baseConfig, ['web/seo/use_rewrites' => 0]), + 'request' => 'http://magento.com/a/b/c/d.html', + 'redirectUrl' => 'http://magento.com/us/index.php/a/b/c/d.html' + ], + [ + 'config' => array_merge($baseConfig, ['web/seo/use_rewrites' => 0]), + 'request' => 'http://magento.com/a/b/c/d', + 'redirectUrl' => 'http://magento.com/us/index.php/a/b/c/d' + ], + ]; + } + /** * Assert response is redirect with https protocol. * @@ -83,22 +214,26 @@ private function assertResponseRedirect(Response $response, string $redirectUrl) */ private function prepareRequest(bool $isSecure = false) { - $post = new Parameters([ - 'form_key' => $this->_objectManager->get(FormKey::class)->getFormKey(), - 'login' => [ - 'username' => 'customer@example.com', - 'password' => 'password' + $post = new Parameters( + [ + 'form_key' => $this->_objectManager->get(FormKey::class)->getFormKey(), + 'login' => [ + 'username' => 'customer@example.com', + 'password' => 'password' + ] ] - ]); + ); $request = $this->getRequest(); $request->setMethod(\Magento\TestFramework\Request::METHOD_POST); $request->setRequestUri('customer/account/loginPost/'); $request->setPost($post); if ($isSecure) { - $server = new Parameters([ - 'HTTPS' => 'on', - 'SERVER_PORT' => 443 - ]); + $server = new Parameters( + [ + 'HTTPS' => 'on', + 'SERVER_PORT' => 443 + ] + ); $request->setServer($server); } @@ -151,4 +286,45 @@ private function setFrontendCompletelySecureRollback() $reinitibleConfig = $this->_objectManager->create(ReinitableConfigInterface::class); $reinitibleConfig->reinit(); } + + private function setConfig(array $config): void + { + foreach ($config as $path => $value) { + $model = $this->_objectManager->create(Value::class); + $model->load($path, 'path'); + if (!isset($this->config[$path])) { + $this->config[$path] = $model->getValue(); + } + if (!$model->getPath()) { + $model->setPath($path); + } + if ($value !== null) { + $model->setValue($value); + $model->save(); + } elseif ($model->getId()) { + $model->delete(); + } + } + $this->_objectManager->create(ReinitableConfigInterface::class)->reinit(); + } + + private function setServer(array $server) + { + $request = $this->getRequest(); + $properties = [ + 'baseUrl', + 'basePath', + 'requestUri', + 'originalPathInfo', + 'pathInfo', + ]; + $reflection = new \ReflectionClass($request); + + foreach ($properties as $name) { + $property = $reflection->getProperty($name); + $property->setAccessible(true); + $property->setValue($request, null); + } + $request->setServer(new Parameters($server)); + } } diff --git a/dev/tests/integration/testsuite/Magento/Store/_files/store_with_long_name.php b/dev/tests/integration/testsuite/Magento/Store/_files/store_with_long_name.php new file mode 100644 index 000000000000..f1beaee683b8 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Store/_files/store_with_long_name.php @@ -0,0 +1,50 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +/** @var $store \Magento\Store\Model\Store */ +$store = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Store::class); +$storeName = str_repeat('a', 255); +if (!$store->load('test', 'code')->getId()) { + $store->setData( + [ + 'code' => 'test_2', + 'website_id' => '1', + 'group_id' => '1', + 'name' => $storeName, + 'sort_order' => '10', + 'is_active' => '1', + ] + ); + $store->save(); +} else { + if ($store->getId()) { + /** @var \Magento\TestFramework\Helper\Bootstrap $registry */ + $registry = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + \Magento\Framework\Registry::class + ); + $registry->unregister('isSecureArea'); + $registry->register('isSecureArea', true); + + $store->delete(); + + $registry->unregister('isSecureArea'); + $registry->register('isSecureArea', false); + + $store = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Store::class); + $store->setData( + [ + 'code' => 'test_2', + 'website_id' => '1', + 'group_id' => '1', + 'name' => $storeName, + 'sort_order' => '10', + 'is_active' => '1', + ] + ); + $store->save(); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Store/_files/store_with_long_name_rollback.php b/dev/tests/integration/testsuite/Magento/Store/_files/store_with_long_name_rollback.php new file mode 100644 index 000000000000..5fe19e1e97df --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Store/_files/store_with_long_name_rollback.php @@ -0,0 +1,34 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\Framework\Registry; +use Magento\Store\Model\Store; +use Magento\TestFramework\Helper\Bootstrap; + +$objectManager = Bootstrap::getObjectManager(); + +/** @var Registry $registry */ +$registry = $objectManager->get(Registry::class); +$registry->unregister('isSecureArea'); +$registry->register('isSecureArea', true); + +/** @var Store $store */ +$store = $objectManager->get(Store::class); +$store->load('test_2', 'code'); +if ($store->getId()) { + $store->delete(); +} + +/** @var Store $store */ +$store = $objectManager->get(Store::class); +$store->load('test_2', 'code'); +if ($store->getId()) { + $store->delete(); +} + +$registry->unregister('isSecureArea'); +$registry->register('isSecureArea', false); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/PhtmlTemplateTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/PhtmlTemplateTest.php index 5c342614f94f..f9630fd8cc05 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/PhtmlTemplateTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/PhtmlTemplateTest.php @@ -7,6 +7,8 @@ */ namespace Magento\Test\Legacy; +use Magento\Framework\Component\ComponentRegistrar; + /** * Static test for phtml template files. */ @@ -105,4 +107,84 @@ function ($file) { \Magento\Framework\App\Utility\Files::init()->getPhtmlFiles() ); } + + public function testJsComponentsAreProperlyInitializedInDataMageInitAttribute() + { + $invoker = new \Magento\Framework\App\Utility\AggregateInvoker($this); + $invoker( + /** + * JS components in data-mage-init attributes should be initialized not in php. + * JS components should be initialized in templates for them to be properly statically analyzed for bundling. + * + * @param string $file + */ + function ($file) { + $whiteList = $this->getWhiteList(); + if (!in_array($file, $whiteList, true) + && (strpos($file, '/view/frontend/templates/') !== false + || strpos($file, '/view/base/templates/') !== false) + ) { + self::assertNotRegExp( + '/data-mage-init=(?:\'|")(?!\s*{\s*"[^"]+")/', + file_get_contents($file), + 'Please do not initialize JS component in php. Do it in template.' + ); + } + }, + \Magento\Framework\App\Utility\Files::init()->getPhtmlFiles() + ); + } + + /** + * @return array + */ + private function getWhiteList() + { + $whiteListFiles = []; + $componentRegistrar = new ComponentRegistrar(); + foreach ($this->getFilesData('data_mage_init/whitelist.php') as $fileInfo) { + $whiteListFiles[] = $componentRegistrar->getPath(ComponentRegistrar::MODULE, $fileInfo[0]) + . DIRECTORY_SEPARATOR . $fileInfo[1]; + } + return $whiteListFiles; + } + + /** + * @param string $filePattern + * @return array + */ + private function getFilesData($filePattern) + { + $result = []; + foreach (glob(__DIR__ . '/_files/initialize_javascript/' . $filePattern) as $file) { + $fileData = include $file; + $result = array_merge($result, $fileData); + } + return $result; + } + + public function testJsComponentsAreProperlyInitializedInXMagentoInitAttribute() + { + $invoker = new \Magento\Framework\App\Utility\AggregateInvoker($this); + $invoker( + /** + * JS components in x-magento-init attributes should be initialized not in php. + * JS components should be initialized in templates for them to be properly statically analyzed for bundling. + * + * @param string $file + */ + function ($file) { + if (strpos($file, '/view/frontend/templates/') !== false + || strpos($file, '/view/base/templates/') !== false + ) { + self::assertNotRegExp( + '@x-magento-init.>(?!\s*+{\s*"[^"]+"\s*:\s*{\s*"[\w/-]+")@i', + file_get_contents($file), + 'Please do not initialize JS component in php. Do it in template.' + ); + } + }, + \Magento\Framework\App\Utility\Files::init()->getPhtmlFiles() + ); + } } diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/initialize_javascript/data_mage_init/whitelist.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/initialize_javascript/data_mage_init/whitelist.php new file mode 100644 index 000000000000..a77b7b28864e --- /dev/null +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/initialize_javascript/data_mage_init/whitelist.php @@ -0,0 +1,14 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +/** + * List of templates with data-mage-init attribute where JS component is not correctly called. + * + * JS component is initialized in php here. These templates cannot be refactored easily. This list consists of + * module name and template path within module. + */ +return [ + ['Magento_Braintree', 'view/frontend/templates/paypal/button_shopping_cart.phtml'] +]; diff --git a/lib/internal/Magento/Framework/App/DeploymentConfig/Reader.php b/lib/internal/Magento/Framework/App/DeploymentConfig/Reader.php index ff7077213c5c..a53ea9423d44 100644 --- a/lib/internal/Magento/Framework/App/DeploymentConfig/Reader.php +++ b/lib/internal/Magento/Framework/App/DeploymentConfig/Reader.php @@ -16,7 +16,6 @@ /** * Deployment configuration reader. * Loads the merged configuration from config files. - * * @see FileReader The reader for specific configuration file */ class Reader @@ -107,11 +106,9 @@ public function load($fileKey = null) } } } else { - $configFiles = $this->configFilePool->getPaths(); - $allFilesData = []; - $result = []; - foreach (array_keys($configFiles) as $fileKey) { - $configFile = $path . '/' . $this->configFilePool->getPath($fileKey); + $configFiles = $this->getFiles(); + foreach ($configFiles as $file) { + $configFile = $path . '/' . $file; if ($fileDriver->isExists($configFile)) { $fileData = include $configFile; if (!is_array($fileData)) { @@ -120,7 +117,6 @@ public function load($fileKey = null) } else { continue; } - $allFilesData[$configFile] = $fileData; if ($fileData) { $result = array_replace_recursive($result, $fileData); } @@ -136,6 +132,8 @@ public function load($fileKey = null) * @param string $pathConfig The path config * @param bool $ignoreInitialConfigFiles Whether ignore custom pools * @return array + * @throws FileSystemException + * @throws RuntimeException * @deprecated 100.2.0 Magento does not support custom config file pools since 2.2.0 version * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ diff --git a/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfig/ReaderTest.php b/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfig/ReaderTest.php index 8f8399263384..8a8bebb4d2f8 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfig/ReaderTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/DeploymentConfig/ReaderTest.php @@ -43,17 +43,18 @@ protected function setUp() ->willReturn(__DIR__ . '/_files'); $this->fileDriver = $this->createMock(File::class); $this->fileDriver - ->expects($this->any()) ->method('isExists') - ->will($this->returnValueMap([ - [__DIR__ . '/_files/config.php', true], - [__DIR__ . '/_files/custom.php', true], - [__DIR__ . '/_files/duplicateConfig.php', true], - [__DIR__ . '/_files/env.php', true], - [__DIR__ . '/_files/mergeOne.php', true], - [__DIR__ . '/_files/mergeTwo.php', true], - [__DIR__ . '/_files/nonexistent.php', false] - ])); + ->willReturnMap( + [ + [__DIR__.'/_files/config.php', true], + [__DIR__.'/_files/custom.php', true], + [__DIR__.'/_files/duplicateConfig.php', true], + [__DIR__.'/_files/env.php', true], + [__DIR__.'/_files/mergeOne.php', true], + [__DIR__.'/_files/mergeTwo.php', true], + [__DIR__.'/_files/nonexistent.php', false] + ] + ); $this->driverPool = $this->createMock(DriverPool::class); $this->driverPool ->expects($this->any()) @@ -152,8 +153,9 @@ public function testLoadInvalidConfigurationFileWithFileKey() * @expectedException \Magento\Framework\Exception\RuntimeException * @expectedExceptionMessageRegExp /Invalid configuration file: \'.*\/\_files\/emptyConfig\.php\'/ * @return void + * @throws \Magento\Framework\Exception\FileSystemException */ - public function testLoadInvalidConfigurationFile() + public function testLoadInvalidConfigurationFile(): void { $fileDriver = $this->getMockBuilder(File::class) ->disableOriginalConstructor() @@ -173,7 +175,7 @@ public function testLoadInvalidConfigurationFile() $configFilePool = $this->getMockBuilder(ConfigFilePool::class) ->disableOriginalConstructor() ->getMock(); - $configFilePool->expects($this->exactly(2)) + $configFilePool->expects($this->once()) ->method('getPaths') ->willReturn( [ @@ -181,15 +183,6 @@ public function testLoadInvalidConfigurationFile() 'testConfig' => 'emptyConfig.php' ] ); - $configFilePool->expects($this->exactly(2)) - ->method('getPath') - ->withConsecutive( - [$this->identicalTo('configKeyOne')], - [$this->identicalTo('testConfig')] - )->willReturnOnConsecutiveCalls( - 'config.php', - 'emptyConfig.php' - ); $object = new Reader($this->dirList, $driverPool, $configFilePool); $object->load(); } diff --git a/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php b/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php index 4a8d6572faaf..b763130c5a2c 100644 --- a/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php +++ b/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php @@ -377,6 +377,7 @@ protected function prepareMessage() { $template = $this->getTemplate(); $content = $template->processTemplate(); + switch ($template->getType()) { case TemplateTypesInterface::TYPE_TEXT: $part['type'] = MimeInterface::TYPE_TEXT; @@ -391,7 +392,10 @@ protected function prepareMessage() new Phrase('Unknown template type') ); } + + /** @var \Magento\Framework\Mail\MimePartInterface $mimePart */ $mimePart = $this->mimePartInterfaceFactory->create(['content' => $content]); + $this->messageData['encoding'] = $mimePart->getCharset(); $this->messageData['body'] = $this->mimeMessageInterfaceFactory->create( ['parts' => [$mimePart]] ); @@ -400,6 +404,7 @@ protected function prepareMessage() (string)$template->getSubject(), ENT_QUOTES ); + $this->message = $this->emailMessageInterfaceFactory->create($this->messageData); return $this; diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/AlternativeSource.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/AlternativeSource.php index 7016bbdb08ab..b05a12deb384 100644 --- a/lib/internal/Magento/Framework/View/Asset/PreProcessor/AlternativeSource.php +++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/AlternativeSource.php @@ -6,9 +6,9 @@ namespace Magento\Framework\View\Asset\PreProcessor; use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\View\Asset\ContentProcessorInterface; use Magento\Framework\View\Asset\File\FallbackContext; use Magento\Framework\View\Asset\LockerProcessInterface; -use Magento\Framework\View\Asset\ContentProcessorInterface; use Magento\Framework\View\Asset\PreProcessor\AlternativeSource\AssetBuilder; /** @@ -139,11 +139,13 @@ private function processContent($path, $content, $module, FallbackContext $conte ->setTheme($context->getThemePath()) ->setLocale($context->getLocale()) ->setModule($module) - ->setPath(preg_replace( - '#\.' . preg_quote(pathinfo($path, PATHINFO_EXTENSION)) . '$#', - '.' . $name, - $path - ))->build(); + ->setPath( + preg_replace( + '#\.' . preg_quote(pathinfo($path, PATHINFO_EXTENSION)) . '$#', + '.' . $name, + $path + ) + )->build(); $processor = $this->objectManager->get($alternative[self::PROCESSOR_CLASS]); if (!$processor instanceof ContentProcessorInterface) { @@ -168,4 +170,15 @@ public function getAlternativesExtensionsNames() { return array_keys($this->alternatives); } + + /** + * Check if file extension supported + * + * @param string $ext + * @return bool + */ + public function isExtensionSupported($ext) + { + return isset($this->alternatives[$ext]); + } } diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/FileNameResolver.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/FileNameResolver.php index 2afb97b918ea..bae2ff53a54e 100644 --- a/lib/internal/Magento/Framework/View/Asset/PreProcessor/FileNameResolver.php +++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/FileNameResolver.php @@ -5,6 +5,11 @@ */ namespace Magento\Framework\View\Asset\PreProcessor; +/** + * Class FileNameResolver + * + * @package Magento\Framework\View\Asset\PreProcessor + */ class FileNameResolver { /** @@ -38,7 +43,7 @@ public function resolve($fileName) $compiledFile = $fileName; $extension = pathinfo($fileName, PATHINFO_EXTENSION); foreach ($this->alternativeSources as $name => $alternative) { - if (in_array($extension, $alternative->getAlternativesExtensionsNames(), true) + if ($alternative->isExtensionSupported($extension) && strpos(basename($fileName), '_') !== 0 ) { $compiledFile = substr($fileName, 0, strlen($fileName) - strlen($extension) - 1); diff --git a/lib/web/css/docs/layout.html b/lib/web/css/docs/layout.html index 77ed0597f074..b338c66ffae7 100644 --- a/lib/web/css/docs/layout.html +++ b/lib/web/css/docs/layout.html @@ -55,25 +55,25 @@ <tr> <th>@layout-class-1column</th> <td class="vars_value">page-layout-1column</td> - <td class="vars_value">'' | false | <nobr>page-layout-1column</nobr> | <nobr>page-layout-2columns-left</nobr> | <nobr>page-layout-2columns-right</nobr> | <nobr>page-layout-3columns</nobr></td> + <td class="vars_value">'' | false | <span style="white-space: nowrap">page-layout-1column</span> | <span style="white-space: nowrap">page-layout-2columns-left</span> | <span style="white-space: nowrap">page-layout-2columns-right</span> | <span style="white-space: nowrap">page-layout-3columns</span></td> <td>Class name for one column layout</td> </tr> <tr> <th>@layout-class-2columns__left</th> <td class="vars_value">page-layout-2columns-left</td> - <td class="vars_value">'' | false | <nobr>page-layout-1column</nobr> | <nobr>page-layout-2columns-left</nobr> | <nobr>page-layout-2columns-right</nobr> | <nobr>page-layout-3columns</nobr></td> + <td class="vars_value">'' | false | <span style="white-space: nowrap">page-layout-1column</span> | <span style="white-space: nowrap">page-layout-2columns-left</span> | <span style="white-space: nowrap">page-layout-2columns-right</span> | <span style="white-space: nowrap">page-layout-3columns</span></td> <td>Class name for two columns layout with left sidebar</td> </tr> <tr> <th nowrap="nowrap">@layout-class-2columns__right</th> <td class="vars_value">page-layout-2columns-right</td> - <td class="vars_value">'' | false | <nobr>page-layout-1column</nobr> | <nobr>page-layout-2columns-left</nobr> | <nobr>page-layout-2columns-right</nobr> | <nobr>page-layout-3columns</nobr></td> + <td class="vars_value">'' | false | <span style="white-space: nowrap">page-layout-1column</span> | <span style="white-space: nowrap">page-layout-2columns-left</span> | <span style="white-space: nowrap">page-layout-2columns-right</span> | <span style="white-space: nowrap">page-layout-3columns</span></td> <td>Class name for two columns layout with right sidebar</td> </tr> <tr> <th>@layout-class-3columns</th> <td class="vars_value">page-layout-3columns</td> - <td class="vars_value">'' | false | <nobr>page-layout-1column</nobr> | <nobr>page-layout-2columns-left</nobr> | <nobr>page-layout-2columns-right</nobr> | <nobr>page-layout-3columns</nobr></td> + <td class="vars_value">'' | false | <span style="white-space: nowrap">page-layout-1column</span> | <span style="white-space: nowrap">page-layout-2columns-left</span> | <span style="white-space: nowrap">page-layout-2columns-right</span> | <span style="white-space: nowrap">page-layout-3columns</span></td> <td>Class name for three columns layout with left sidebar</td> </tr> <tr> diff --git a/lib/web/css/docs/responsive.html b/lib/web/css/docs/responsive.html index 48d0bd551bd9..ebc42e698f60 100644 --- a/lib/web/css/docs/responsive.html +++ b/lib/web/css/docs/responsive.html @@ -7,7 +7,7 @@ <!DOCTYPE html><html><head><title>responsive | Magento UI Library

Responsive

-

Magento UI library provides a strong approach for working with media queries. It`s based on recursive call of .media-width() mixin defined anywhere in project but invoked in one place in lib/web/css/source/lib/_responsive.less. That's why in the resulting styles.css we have every media query only once with all the rules there, not a multiple calls for the same query.

+

Magento UI library provides a strong approach for working with media queries. It`s based on recursive call of .media-width() mixin defined anywhere in project but invoked in one place in lib/web/css/source/lib/_responsive.less. That's why in the resulting styles.css we have every media query only once with all the rules there, not a multiple calls for the same query.

To see the media queries work resize window to understand which breakpoint is applied.