From 7fe1cef01ee8c81d633f42f0e807b89cbc96ba2d Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 7 Jan 2018 13:59:44 +0530 Subject: [PATCH 001/229] Move predispatch and postdispatch events from abstract controller to action interface plugin See https://github.com/magento/community-features/issues/9 for further information. --- app/code/Magento/Store/etc/di.xml | 3 + .../Framework/App/ControllerActionTest.php | 174 ++++++++++++++++++ .../InheritanceBasedBackendAction.php | 25 +++ .../InheritanceBasedFrontendAction.php | 26 +++ .../TestStubs/InterfaceOnlyBackendAction.php | 24 +++ .../TestStubs/InterfaceOnlyFrontendAction.php | 42 +++++ .../Magento/Framework/App/Action/Action.php | 20 -- .../App/Action/Plugin/EventDispatchPlugin.php | 100 ++++++++++ .../App/Test/Unit/Action/ActionTest.php | 51 +---- 9 files changed, 402 insertions(+), 63 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedBackendAction.php create mode 100644 dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php create mode 100644 dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php create mode 100644 dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php create mode 100644 lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php diff --git a/app/code/Magento/Store/etc/di.xml b/app/code/Magento/Store/etc/di.xml index 27133de270e2f..e36a3dbe09351 100644 --- a/app/code/Magento/Store/etc/di.xml +++ b/app/code/Magento/Store/etc/di.xml @@ -59,6 +59,9 @@ + + + diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php new file mode 100644 index 0000000000000..eb2d2de77f56a --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php @@ -0,0 +1,174 @@ +create(Event\ManagerInterface::class); + $eventManagerSpy = new class($originalEventManager) implements Event\ManagerInterface + { + /** + * @var Event\ManagerInterface + */ + private $delegate; + + /** + * @var array[]; + */ + private $dispatchedEvents = []; + + public function __construct(Event\ManagerInterface $delegate) + { + $this->delegate = $delegate; + } + + public function dispatch($eventName, array $data = []) + { + $this->dispatchedEvents[$eventName][] = [$eventName, $data]; + $this->delegate->dispatch($eventName, $data); + } + + public function spyOnDispatchedEvent(string $eventName): array + { + return $this->dispatchedEvents[$eventName] ?? []; + } + }; + + $objectManager->addSharedInstance($eventManagerSpy, Event\Manager\Proxy::class); + } + + private function assertEventDispatchCount($eventName, $expectedCount): void + { + $message = sprintf('Event %s was expected to be dispatched %d time(s).', $eventName, $expectedCount); + $this->assertCount($expectedCount, $this->getEventManager()->spyOnDispatchedEvent($eventName), $message); + } + + /** + * @return \Magento\Framework\App\Request\Http + */ + private function getRequest(): RequestInterface + { + return ObjectManager::getInstance()->get(\Magento\Framework\App\Request\Http::class); + } + + private function fakeBackendAuthentication() + { + $objectManager = ObjectManager::getInstance(); + $objectManager->get(BackendUrl::class)->turnOffSecretKey(); + + $auth = $objectManager->get(BackendAuth::class); + $auth->login(TestFramework::ADMIN_NAME, TestFramework::ADMIN_PASSWORD); + } + + private function configureRequestForAction(string $route, string $actionPath, string $actionName) + { + $request = $this->getRequest(); + + $request->setRouteName($route); + $request->setControllerName($actionPath); + $request->setActionName($actionName); + $request->setDispatched(); + } + + private function getEventManager(): Event\ManagerInterface + { + return ObjectManager::getInstance()->get(Event\ManagerInterface::class); + } + + private function assertPreAndPostDispatchEventsAreDispatched() + { + $this->assertEventDispatchCount('controller_action_predispatch', 1); + $this->assertEventDispatchCount('controller_action_predispatch_testroute', 1); + $this->assertEventDispatchCount('controller_action_predispatch_testroute_actionpath_actionname', 1); + $this->assertEventDispatchCount('controller_action_postdispatch_testroute_actionpath_actionname', 1); + $this->assertEventDispatchCount('controller_action_postdispatch_testroute', 1); + $this->assertEventDispatchCount('controller_action_postdispatch', 1); + } + + /** + * @magentoAppArea frontend + * @magentoAppIsolation enabled + */ + public function testInheritanceBasedFrontendActionDispatchesEvents() + { + $this->setupEventManagerSpy(); + + /** @var InheritanceBasedFrontendAction $action */ + $action = ObjectManager::getInstance()->create(InheritanceBasedFrontendAction::class); + $this->configureRequestForAction('testroute', 'actionpath', 'actionname'); + + $action->dispatch($this->getRequest()); + + $this->assertPreAndPostDispatchEventsAreDispatched(); + } + + /** + * @magentoAppArea frontend + * @magentoAppIsolation enabled + */ + public function testInterfaceOnlyFrontendActionDispatchesEvents() + { + $this->setupEventManagerSpy(); + + /** @var InterfaceOnlyFrontendAction $action */ + $action = ObjectManager::getInstance()->create(InterfaceOnlyFrontendAction::class); + $this->configureRequestForAction('testroute', 'actionpath', 'actionname'); + + $action->execute(); + + $this->assertPreAndPostDispatchEventsAreDispatched(); + } + + /** + * @magentoAppArea adminhtml + * @magentoAppIsolation enabled + */ + public function testInheritanceBasedAdminhtmlActionDispatchesEvents() + { + $this->fakeBackendAuthentication(); + + $this->setupEventManagerSpy(); + + /** @var InheritanceBasedBackendAction $action */ + $action = ObjectManager::getInstance()->create(InheritanceBasedBackendAction::class); + $this->configureRequestForAction('testroute', 'actionpath', 'actionname'); + + $action->dispatch($this->getRequest()); + + $this->assertPreAndPostDispatchEventsAreDispatched(); + } + + /** + * @magentoAppArea adminhtml + * @magentoAppIsolation enabled + */ + public function testInterfaceOnlyAdminhtmlActionDispatchesEvents() + { + $this->setupEventManagerSpy(); + + /** @var InterfaceOnlyBackendAction $action */ + $action = ObjectManager::getInstance()->create(InterfaceOnlyBackendAction::class); + $this->configureRequestForAction('testroute', 'actionpath', 'actionname'); + + $action->execute(); + + $this->assertPreAndPostDispatchEventsAreDispatched(); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedBackendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedBackendAction.php new file mode 100644 index 0000000000000..59cc9d2edccf7 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedBackendAction.php @@ -0,0 +1,25 @@ +pageFactory = $pageFactory; + } + + public function execute() + { + return $this->pageFactory->create(); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php new file mode 100644 index 0000000000000..725cccc838a6b --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php @@ -0,0 +1,26 @@ +pageFactory = $pageFactory; + } + + public function execute() + { + return $this->pageFactory->create(); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php new file mode 100644 index 0000000000000..52362601d1965 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php @@ -0,0 +1,24 @@ +pageFactory = $pageFactory; + } + + public function execute() + { + return $this->pageFactory->create(); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php new file mode 100644 index 0000000000000..56eed45ea56bf --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php @@ -0,0 +1,42 @@ +pageFactory = $pageFactory; + $this->request = $request; + } + + public function execute() + { + return $this->pageFactory->create(); + } + + /** + * This method is a workaround for the interface violation where core code expects + * actions to extend the AbstractAction :((((( + * + * @return RequestInterface + */ + public function getRequest(): RequestInterface + { + return $this->request; + } +} diff --git a/lib/internal/Magento/Framework/App/Action/Action.php b/lib/internal/Magento/Framework/App/Action/Action.php index b68e7e873be6a..7412965be14cc 100644 --- a/lib/internal/Magento/Framework/App/Action/Action.php +++ b/lib/internal/Magento/Framework/App/Action/Action.php @@ -92,32 +92,12 @@ public function dispatch(RequestInterface $request) { $this->_request = $request; $profilerKey = 'CONTROLLER_ACTION:' . $request->getFullActionName(); - $eventParameters = ['controller_action' => $this, 'request' => $request]; - $this->_eventManager->dispatch('controller_action_predispatch', $eventParameters); - $this->_eventManager->dispatch('controller_action_predispatch_' . $request->getRouteName(), $eventParameters); - $this->_eventManager->dispatch( - 'controller_action_predispatch_' . $request->getFullActionName(), - $eventParameters - ); \Magento\Framework\Profiler::start($profilerKey); $result = null; if ($request->isDispatched() && !$this->_actionFlag->get('', self::FLAG_NO_DISPATCH)) { \Magento\Framework\Profiler::start('action_body'); $result = $this->execute(); - \Magento\Framework\Profiler::start('postdispatch'); - if (!$this->_actionFlag->get('', self::FLAG_NO_POST_DISPATCH)) { - $this->_eventManager->dispatch( - 'controller_action_postdispatch_' . $request->getFullActionName(), - $eventParameters - ); - $this->_eventManager->dispatch( - 'controller_action_postdispatch_' . $request->getRouteName(), - $eventParameters - ); - $this->_eventManager->dispatch('controller_action_postdispatch', $eventParameters); - } - \Magento\Framework\Profiler::stop('postdispatch'); \Magento\Framework\Profiler::stop('action_body'); } \Magento\Framework\Profiler::stop($profilerKey); diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php new file mode 100644 index 0000000000000..8c80aa1676a11 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php @@ -0,0 +1,100 @@ +request = $request; + $this->eventManager = $eventManager; + } + + public function beforeExecute(ActionInterface $subject) + { + $this->dispatchPreDispatchEvents($subject); + } + + /** + * @param ActionInterface $subject + * @return mixed[] + */ + private function getEventParameters(ActionInterface $subject): array + { + return ['controller_action' => $subject, 'request' => $this->request]; + } + + /** + * @param ActionInterface $subject + * @param ResultInterface|Response|null $result + * @return ResultInterface|Response|null + */ + public function afterExecute(ActionInterface $subject, $result) + { + if (! $this->isSetActionNoPostDispatchFlag($subject)) { + $this->dispatchPostDispatchEvents($subject); + } + + return $result; + } + + /** + * @param ActionInterface $subject + * @return bool + */ + private function isSetActionNoPostDispatchFlag(ActionInterface $subject): bool + { + return $subject instanceof Action && $subject->getActionFlag()->get('', Action::FLAG_NO_POST_DISPATCH); + } + + /** + * @param ActionInterface $action + */ + private function dispatchPreDispatchEvents(ActionInterface $action) + { + $this->eventManager->dispatch('controller_action_predispatch', $this->getEventParameters($action)); + $this->eventManager->dispatch( + 'controller_action_predispatch_' . $this->request->getRouteName(), + $this->getEventParameters($action) + ); + $this->eventManager->dispatch( + 'controller_action_predispatch_' . $this->request->getFullActionName(), + $this->getEventParameters($action) + ); + } + + /** + * @param ActionInterface $action + */ + private function dispatchPostDispatchEvents(ActionInterface $action) + { + $this->eventManager->dispatch( + 'controller_action_postdispatch_' . $this->request->getFullActionName(), + $this->getEventParameters($action) + ); + $this->eventManager->dispatch( + 'controller_action_postdispatch_' . $this->request->getRouteName(), + $this->getEventParameters($action) + ); + $this->eventManager->dispatch('controller_action_postdispatch', $this->getEventParameters($action)); + } +} diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Action/ActionTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Action/ActionTest.php index ebd72f5badccf..cc0a43a703985 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Action/ActionTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Action/ActionTest.php @@ -85,14 +85,13 @@ protected function setUp() $this->_eventManagerMock = $this->createMock(\Magento\Framework\Event\ManagerInterface::class); $this->_actionFlagMock = $this->createMock(\Magento\Framework\App\ActionFlag::class); $this->_redirectMock = $this->createMock(\Magento\Framework\App\Response\RedirectInterface::class); - $this->_requestMock = $this->getMockBuilder(\Magento\Framework\App\Request\Http::class) - ->disableOriginalConstructor()->getMock(); + $this->_requestMock = $this->createMock(\Magento\Framework\App\Request\Http::class); $this->_responseMock = $this->createMock(\Magento\Framework\App\ResponseInterface::class); $this->pageConfigMock = $this->createPartialMock(\Magento\Framework\View\Page\Config::class, ['getConfig']); $this->viewMock = $this->createMock(\Magento\Framework\App\ViewInterface::class); $this->viewMock->expects($this->any())->method('getPage')->will($this->returnValue($this->pageConfigMock)); - $this->pageConfigMock->expects($this->any())->method('getConfig')->will($this->returnValue(1)); + $this->pageConfigMock->expects($this->any())->method('getConfig')->willReturn(1); $this->objectManagerHelper = new ObjectManagerHelper($this); $this->action = $this->objectManagerHelper->getObject( @@ -111,29 +110,12 @@ protected function setUp() public function testDispatchPostDispatch() { - $this->_requestMock->expects($this->exactly(3))->method('getFullActionName')->will( - $this->returnValue(self::FULL_ACTION_NAME) - ); - $this->_requestMock->expects($this->exactly(2))->method('getRouteName')->will( - $this->returnValue(self::ROUTE_NAME) - ); - $expectedEventParameters = ['controller_action' => $this->action, 'request' => $this->_requestMock]; - $this->_eventManagerMock->expects($this->at(0))->method('dispatch')->with( - 'controller_action_predispatch', - $expectedEventParameters - ); - $this->_eventManagerMock->expects($this->at(1))->method('dispatch')->with( - 'controller_action_predispatch_' . self::ROUTE_NAME, - $expectedEventParameters - ); - $this->_eventManagerMock->expects($this->at(2))->method('dispatch')->with( - 'controller_action_predispatch_' . self::FULL_ACTION_NAME, - $expectedEventParameters - ); - - $this->_requestMock->expects($this->once())->method('isDispatched')->will($this->returnValue(true)); - $this->_actionFlagMock->expects($this->at(0))->method('get')->with('', Action::FLAG_NO_DISPATCH)->will( - $this->returnValue(false) + $this->_requestMock->method('getFullActionName')->willReturn(self::FULL_ACTION_NAME); + $this->_requestMock->method('getRouteName')->willReturn(self::ROUTE_NAME); + $this->_requestMock->method('isDispatched')->willReturn(true); + $this->_actionFlagMock->method('get')->willReturnMap( + ['', Action::FLAG_NO_DISPATCH, false], + ['', Action::FLAG_NO_POST_DISPATCH] ); // _forward expectations @@ -151,23 +133,6 @@ public function testDispatchPostDispatch() self::$actionParams ); - $this->_actionFlagMock->expects($this->at(1))->method('get')->with('', Action::FLAG_NO_POST_DISPATCH)->will( - $this->returnValue(false) - ); - - $this->_eventManagerMock->expects($this->at(3))->method('dispatch')->with( - 'controller_action_postdispatch_' . self::FULL_ACTION_NAME, - $expectedEventParameters - ); - $this->_eventManagerMock->expects($this->at(4))->method('dispatch')->with( - 'controller_action_postdispatch_' . self::ROUTE_NAME, - $expectedEventParameters - ); - $this->_eventManagerMock->expects($this->at(5))->method('dispatch')->with( - 'controller_action_postdispatch', - $expectedEventParameters - ); - $this->assertEquals($this->_responseMock, $this->action->dispatch($this->_requestMock)); } } From 12052d01e3dc90490360418705605da77154fcb9 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 7 Jan 2018 14:42:46 +0530 Subject: [PATCH 002/229] Remove LoD violation which prohibits non inheritance based action controllers --- app/code/Magento/Customer/Model/Visitor.php | 15 +++++++++++++- .../Customer/Test/Unit/Model/VisitorTest.php | 14 +++++++++---- .../TestStubs/InterfaceOnlyFrontendAction.php | 20 +------------------ 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/app/code/Magento/Customer/Model/Visitor.php b/app/code/Magento/Customer/Model/Visitor.php index 4624dd8b6bcf5..abc4feb4a9ff5 100644 --- a/app/code/Magento/Customer/Model/Visitor.php +++ b/app/code/Magento/Customer/Model/Visitor.php @@ -200,7 +200,7 @@ public function saveByRequest($observer) public function isModuleIgnored($observer) { if (is_array($this->ignores) && $observer) { - $curModule = $observer->getEvent()->getControllerAction()->getRequest()->getRouteName(); + $curModule = $this->getRequest()->getRouteName(); if (isset($this->ignores[$curModule])) { return true; } @@ -315,4 +315,17 @@ public function getOnlineInterval() ); return $configValue ?: static::DEFAULT_ONLINE_MINUTES_INTERVAL; } + + /** + * @return \Magento\Framework\App\RequestInterface|\Magento\Framework\App\Request\Http + */ + private function getRequest() + { + if (null === $this->request) { + $this->request = \Magento\Framework\App\ObjectManager::getInstance()->create( + \Magento\Framework\App\RequestInterface::class + ); + } + return $this->request; + } } diff --git a/app/code/Magento/Customer/Test/Unit/Model/VisitorTest.php b/app/code/Magento/Customer/Test/Unit/Model/VisitorTest.php index ec787b9d3c873..debccda26ba75 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/VisitorTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/VisitorTest.php @@ -39,6 +39,11 @@ class VisitorTest extends \PHPUnit\Framework\TestCase */ protected $session; + /** + * @var \Magento\Framework\App\Request\Http|\PHPUnit_Framework_MockObject_MockObject + */ + private $request; + protected function setUp() { $this->registry = $this->createMock(\Magento\Framework\Registry::class); @@ -46,6 +51,7 @@ protected function setUp() ->disableOriginalConstructor() ->setMethods(['getSessionId', 'getVisitorData', 'setVisitorData']) ->getMock(); + $this->request = $this->createMock(\Magento\Framework\App\Request\Http::class); $this->objectManagerHelper = new ObjectManagerHelper($this); @@ -69,6 +75,7 @@ protected function setUp() 'registry' => $this->registry, 'session' => $this->session, 'resource' => $this->resource, + 'request' => $this->request, ] ); @@ -101,12 +108,11 @@ public function testIsModuleIgnored() 'session' => $this->session, 'resource' => $this->resource, 'ignores' => ['test_route_name' => true], + 'request' => $this->request, ] ); - $request = new \Magento\Framework\DataObject(['route_name' => 'test_route_name']); - $action = new \Magento\Framework\DataObject(['request' => $request]); - $event = new \Magento\Framework\DataObject(['controller_action' => $action]); - $observer = new \Magento\Framework\DataObject(['event' => $event]); + $this->request->method('getRouteName')->willReturn('test_route_name'); + $observer = new \Magento\Framework\DataObject(); $this->assertTrue($this->visitor->isModuleIgnored($observer)); } diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php index 56eed45ea56bf..c95b8e0091f30 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php @@ -3,7 +3,6 @@ namespace Magento\Framework\App\TestStubs; use Magento\Framework\App\ActionInterface; -use Magento\Framework\App\RequestInterface; use Magento\Framework\View\Result\PageFactory; class InterfaceOnlyFrontendAction implements ActionInterface @@ -13,30 +12,13 @@ class InterfaceOnlyFrontendAction implements ActionInterface */ private $pageFactory; - /** - * @var RequestInterface - */ - private $request; - - public function __construct(PageFactory $pageFactory, RequestInterface $request) + public function __construct(PageFactory $pageFactory) { $this->pageFactory = $pageFactory; - $this->request = $request; } public function execute() { return $this->pageFactory->create(); } - - /** - * This method is a workaround for the interface violation where core code expects - * actions to extend the AbstractAction :((((( - * - * @return RequestInterface - */ - public function getRequest(): RequestInterface - { - return $this->request; - } } From c39b1d2fd1b195562ac87f86a9e8024b81c2d694 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 7 Jan 2018 14:48:48 +0530 Subject: [PATCH 003/229] Ignore CouplingBetweenObjects in controller action integration test case --- .../testsuite/Magento/Framework/App/ControllerActionTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php index eb2d2de77f56a..bbc2f7481cd53 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php @@ -14,6 +14,9 @@ use Magento\TestFramework\ObjectManager; use PHPUnit\Framework\TestCase; +/** + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ class ControllerActionTest extends TestCase { public function setupEventManagerSpy(): void From a12b2d097ec04dfa59d2905b6a33ac0b42b88f51 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 7 Jan 2018 15:08:48 +0530 Subject: [PATCH 004/229] Use ActionFlag as direct dependency instead of LoD violation --- .../App/Action/Plugin/EventDispatchPlugin.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php index 8c80aa1676a11..d7738c6d9561b 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php @@ -3,6 +3,7 @@ namespace Magento\Framework\App\Action\Plugin; use Magento\Framework\App\Action\Action; +use Magento\Framework\App\ActionFlag; use Magento\Framework\App\ActionInterface; use Magento\Framework\App\Request\Http; use Magento\Framework\App\RequestInterface; @@ -22,11 +23,16 @@ class EventDispatchPlugin */ private $eventManager; - public function __construct(RequestInterface $request, ManagerInterface $eventManager) + /** + * @var ActionFlag + */ + private $actionFlag; + + public function __construct(RequestInterface $request, ManagerInterface $eventManager, ActionFlag $actionFlag) { - \assert($request instanceof Http, sprintf('The request has to be an instance of %s.', Http::class)); $this->request = $request; $this->eventManager = $eventManager; + $this->actionFlag = $actionFlag; } public function beforeExecute(ActionInterface $subject) @@ -63,7 +69,7 @@ public function afterExecute(ActionInterface $subject, $result) */ private function isSetActionNoPostDispatchFlag(ActionInterface $subject): bool { - return $subject instanceof Action && $subject->getActionFlag()->get('', Action::FLAG_NO_POST_DISPATCH); + return $this->actionFlag->get('', Action::FLAG_NO_POST_DISPATCH); } /** From 777311391bf2bd227500ab3c418f6b8e1573f20e Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 7 Jan 2018 15:10:40 +0530 Subject: [PATCH 005/229] Remove void return type to keep code PHP 7.0 compatible --- .../testsuite/Magento/Framework/App/ControllerActionTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php index bbc2f7481cd53..6c9691576fb8d 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php @@ -19,7 +19,7 @@ */ class ControllerActionTest extends TestCase { - public function setupEventManagerSpy(): void + public function setupEventManagerSpy() { /** @var ObjectManager $objectManager */ $objectManager = ObjectManager::getInstance(); @@ -57,7 +57,7 @@ public function spyOnDispatchedEvent(string $eventName): array $objectManager->addSharedInstance($eventManagerSpy, Event\Manager\Proxy::class); } - private function assertEventDispatchCount($eventName, $expectedCount): void + private function assertEventDispatchCount($eventName, $expectedCount) { $message = sprintf('Event %s was expected to be dispatched %d time(s).', $eventName, $expectedCount); $this->assertCount($expectedCount, $this->getEventManager()->spyOnDispatchedEvent($eventName), $message); From 57bb6d390af5c34b4e81285133c7c3cf95b04f12 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 7 Jan 2018 16:25:01 +0530 Subject: [PATCH 006/229] Prohibit calling controller execute if the NO_DISPATCHED flag was set --- app/code/Magento/Store/etc/di.xml | 1 + .../Framework/App/ControllerActionTest.php | 34 +++++++++++++++++-- .../InheritanceBasedFrontendAction.php | 11 ++++++ .../TestStubs/InterfaceOnlyFrontendAction.php | 11 ++++++ .../Plugin/ActionFlagNoDispatchPlugin.php | 31 +++++++++++++++++ .../App/Action/Plugin/EventDispatchPlugin.php | 3 +- 6 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php diff --git a/app/code/Magento/Store/etc/di.xml b/app/code/Magento/Store/etc/di.xml index e36a3dbe09351..611ae44221a48 100644 --- a/app/code/Magento/Store/etc/di.xml +++ b/app/code/Magento/Store/etc/di.xml @@ -61,6 +61,7 @@ + diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php index 6c9691576fb8d..5127d64c689de 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php @@ -16,6 +16,7 @@ /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ class ControllerActionTest extends TestCase { @@ -68,10 +69,10 @@ private function assertEventDispatchCount($eventName, $expectedCount) */ private function getRequest(): RequestInterface { - return ObjectManager::getInstance()->get(\Magento\Framework\App\Request\Http::class); + return ObjectManager::getInstance()->get(\Magento\TestFramework\Request::class); } - private function fakeBackendAuthentication() + private function fakeAuthenticatedBackendRequest() { $objectManager = ObjectManager::getInstance(); $objectManager->get(BackendUrl::class)->turnOffSecretKey(); @@ -145,7 +146,7 @@ public function testInterfaceOnlyFrontendActionDispatchesEvents() */ public function testInheritanceBasedAdminhtmlActionDispatchesEvents() { - $this->fakeBackendAuthentication(); + $this->fakeAuthenticatedBackendRequest(); $this->setupEventManagerSpy(); @@ -174,4 +175,31 @@ public function testInterfaceOnlyAdminhtmlActionDispatchesEvents() $this->assertPreAndPostDispatchEventsAreDispatched(); } + + /** + * @magentoAppArea frontend + * @magentoAppIsolation enabled + */ + public function testSettingTheNoDispatchActionFlagProhibitsExecuteAndPostdispatchEvents() + { + $this->setupEventManagerSpy(); + + /** @var InterfaceOnlyFrontendAction $action */ + $action = ObjectManager::getInstance()->create(InterfaceOnlyFrontendAction::class); + $this->configureRequestForAction('testroute', 'actionpath', 'actionname'); + + /** @var ActionFlag $actionFlag */ + $actionFlag = ObjectManager::getInstance()->get(ActionFlag::class); + $actionFlag->set('', ActionInterface::FLAG_NO_DISPATCH, true); + + $action->execute(); + + $this->assertFalse($action->isExecuted(), 'The controller execute() method was not expected to be called.'); + $this->assertEventDispatchCount('controller_action_predispatch', 1); + $this->assertEventDispatchCount('controller_action_predispatch_testroute', 1); + $this->assertEventDispatchCount('controller_action_predispatch_testroute_actionpath_actionname', 1); + $this->assertEventDispatchCount('controller_action_postdispatch_testroute_actionpath_actionname', 0); + $this->assertEventDispatchCount('controller_action_postdispatch_testroute', 0); + $this->assertEventDispatchCount('controller_action_postdispatch', 0); + } } diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php index 725cccc838a6b..654a0659aa77f 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php @@ -13,6 +13,11 @@ class InheritanceBasedFrontendAction extends Action */ private $pageFactory; + /** + * @var bool + */ + private $executeWasCalled = false; + public function __construct(Context $context, PageFactory $pageFactory) { parent::__construct($context); @@ -21,6 +26,12 @@ public function __construct(Context $context, PageFactory $pageFactory) public function execute() { + $this->executeWasCalled = true; return $this->pageFactory->create(); } + + public function isExecuted(): bool + { + return $this->executeWasCalled; + } } diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php index c95b8e0091f30..81e37d89ce332 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php @@ -12,6 +12,11 @@ class InterfaceOnlyFrontendAction implements ActionInterface */ private $pageFactory; + /** + * @var bool + */ + private $executeWasCalled = false; + public function __construct(PageFactory $pageFactory) { $this->pageFactory = $pageFactory; @@ -19,6 +24,12 @@ public function __construct(PageFactory $pageFactory) public function execute() { + $this->executeWasCalled = true; return $this->pageFactory->create(); } + + public function isExecuted(): bool + { + return $this->executeWasCalled; + } } diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php new file mode 100644 index 0000000000000..fa335a1e2fd84 --- /dev/null +++ b/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php @@ -0,0 +1,31 @@ +actionFlag = $actionFlag; + $this->response = $response; + } + + public function aroundExecute(ActionInterface $subject, callable $proceed) + { + return $this->actionFlag->get('', ActionInterface::FLAG_NO_DISPATCH) ? $this->response : $proceed(); + } +} diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php index d7738c6d9561b..5409d8999c2dc 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php @@ -69,7 +69,8 @@ public function afterExecute(ActionInterface $subject, $result) */ private function isSetActionNoPostDispatchFlag(ActionInterface $subject): bool { - return $this->actionFlag->get('', Action::FLAG_NO_POST_DISPATCH); + return $this->actionFlag->get('', Action::FLAG_NO_DISPATCH) || + $this->actionFlag->get('', Action::FLAG_NO_POST_DISPATCH); } /** From f4c41c4dd56c67ac0d1a46c469ff8d6deedff7c3 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 7 Jan 2018 16:42:02 +0530 Subject: [PATCH 007/229] Avoid duplicate annotations when it can be used on class --- .../Magento/Framework/App/ControllerActionTest.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php index 5127d64c689de..b74ed98d36864 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php @@ -9,12 +9,13 @@ use Magento\Framework\App\TestStubs\InterfaceOnlyBackendAction; use Magento\Framework\App\TestStubs\InterfaceOnlyFrontendAction; use Magento\Framework\Event; -use Magento\Security\Model\Plugin\Auth as SecurityAuth; use Magento\TestFramework\Bootstrap as TestFramework; use Magento\TestFramework\ObjectManager; +use Magento\TestFramework\Request as TestHttpRequest; use PHPUnit\Framework\TestCase; /** + * @magentoAppIsolation enabled * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ @@ -65,11 +66,11 @@ private function assertEventDispatchCount($eventName, $expectedCount) } /** - * @return \Magento\Framework\App\Request\Http + * @return TestHttpRequest */ private function getRequest(): RequestInterface { - return ObjectManager::getInstance()->get(\Magento\TestFramework\Request::class); + return ObjectManager::getInstance()->get(TestHttpRequest::class); } private function fakeAuthenticatedBackendRequest() @@ -108,7 +109,6 @@ private function assertPreAndPostDispatchEventsAreDispatched() /** * @magentoAppArea frontend - * @magentoAppIsolation enabled */ public function testInheritanceBasedFrontendActionDispatchesEvents() { @@ -125,7 +125,6 @@ public function testInheritanceBasedFrontendActionDispatchesEvents() /** * @magentoAppArea frontend - * @magentoAppIsolation enabled */ public function testInterfaceOnlyFrontendActionDispatchesEvents() { @@ -142,7 +141,6 @@ public function testInterfaceOnlyFrontendActionDispatchesEvents() /** * @magentoAppArea adminhtml - * @magentoAppIsolation enabled */ public function testInheritanceBasedAdminhtmlActionDispatchesEvents() { @@ -161,7 +159,6 @@ public function testInheritanceBasedAdminhtmlActionDispatchesEvents() /** * @magentoAppArea adminhtml - * @magentoAppIsolation enabled */ public function testInterfaceOnlyAdminhtmlActionDispatchesEvents() { @@ -178,7 +175,6 @@ public function testInterfaceOnlyAdminhtmlActionDispatchesEvents() /** * @magentoAppArea frontend - * @magentoAppIsolation enabled */ public function testSettingTheNoDispatchActionFlagProhibitsExecuteAndPostdispatchEvents() { From ae4d87c009564bf933d8866c398f53352457ef83 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 7 Jan 2018 16:42:30 +0530 Subject: [PATCH 008/229] Removed unused parameter --- .../Framework/App/Action/Plugin/EventDispatchPlugin.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php index 5409d8999c2dc..202cc86952e79 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php @@ -38,6 +38,8 @@ public function __construct(RequestInterface $request, ManagerInterface $eventMa public function beforeExecute(ActionInterface $subject) { $this->dispatchPreDispatchEvents($subject); + + return []; } /** @@ -56,7 +58,7 @@ private function getEventParameters(ActionInterface $subject): array */ public function afterExecute(ActionInterface $subject, $result) { - if (! $this->isSetActionNoPostDispatchFlag($subject)) { + if (! $this->isSetActionNoPostDispatchFlag()) { $this->dispatchPostDispatchEvents($subject); } @@ -66,8 +68,9 @@ public function afterExecute(ActionInterface $subject, $result) /** * @param ActionInterface $subject * @return bool + * */ - private function isSetActionNoPostDispatchFlag(ActionInterface $subject): bool + private function isSetActionNoPostDispatchFlag(): bool { return $this->actionFlag->get('', Action::FLAG_NO_DISPATCH) || $this->actionFlag->get('', Action::FLAG_NO_POST_DISPATCH); From b2a035d93c98487b69bbcd6b719e79ddf8e39574 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 7 Jan 2018 16:58:59 +0530 Subject: [PATCH 009/229] Move Action::dispatch() plugins to ActionInterface::execute() --- .../Magento/Store/App/Action/Plugin/StoreCheck.php | 14 +++++++------- .../Test/Unit/App/Action/Plugin/StoreCheckTest.php | 8 ++++---- app/code/Magento/Store/etc/di.xml | 6 ++---- .../Magento/Framework/App/Action/Plugin/Design.php | 8 +++----- .../App/Test/Unit/Action/Plugin/DesignTest.php | 5 ++--- 5 files changed, 18 insertions(+), 23 deletions(-) diff --git a/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php b/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php index d9cb146c9f12a..ce32498175ff4 100644 --- a/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php +++ b/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php @@ -4,8 +4,11 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Store\App\Action\Plugin; +use Magento\Framework\App\ActionInterface; + class StoreCheck { /** @@ -23,17 +26,14 @@ public function __construct( } /** - * @param \Magento\Framework\App\Action\AbstractAction $subject - * @param \Magento\Framework\App\RequestInterface $request + * @param ActionInterface $subject * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) * @throws \Magento\Framework\Exception\State\InitException */ - public function beforeDispatch( - \Magento\Framework\App\Action\AbstractAction $subject, - \Magento\Framework\App\RequestInterface $request - ) { - if (!$this->_storeManager->getStore()->isActive()) { + public function beforeExecute(ActionInterface $subject) + { + if (! $this->_storeManager->getStore()->isActive()) { throw new \Magento\Framework\Exception\State\InitException( __('Current store is not active.') ); diff --git a/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php b/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php index 93bd4f2ccfba4..f7ee5c4f9ae79 100644 --- a/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php +++ b/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php @@ -55,16 +55,16 @@ protected function setUp() * @expectedException \Magento\Framework\Exception\State\InitException * @expectedExceptionMessage Current store is not active. */ - public function testBeforeDispatchWhenStoreNotActive() + public function testBeforeExecuteWhenStoreNotActive() { $this->_storeMock->expects($this->any())->method('isActive')->will($this->returnValue(false)); - $this->_plugin->beforeDispatch($this->subjectMock, $this->requestMock); + $this->_plugin->beforeExecute($this->subjectMock, $this->requestMock); } - public function testBeforeDispatchWhenStoreIsActive() + public function testBeforeExecuteWhenStoreIsActive() { $this->_storeMock->expects($this->any())->method('isActive')->will($this->returnValue(true)); - $result = $this->_plugin->beforeDispatch($this->subjectMock, $this->requestMock); + $result = $this->_plugin->beforeExecute($this->subjectMock, $this->requestMock); $this->assertNull($result); } } diff --git a/app/code/Magento/Store/etc/di.xml b/app/code/Magento/Store/etc/di.xml index 611ae44221a48..f5370d8644982 100644 --- a/app/code/Magento/Store/etc/di.xml +++ b/app/code/Magento/Store/etc/di.xml @@ -55,11 +55,9 @@ - - - - + + diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/Design.php b/lib/internal/Magento/Framework/App/Action/Plugin/Design.php index 2893f1209dc98..babde4bcc883a 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/Design.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/Design.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Framework\App\Action\Plugin; use Magento\Framework\Message\MessageInterface; @@ -35,15 +36,12 @@ public function __construct( * Initialize design * * @param \Magento\Framework\App\ActionInterface $subject - * @param \Magento\Framework\App\RequestInterface $request * * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function beforeDispatch( - \Magento\Framework\App\ActionInterface $subject, - \Magento\Framework\App\RequestInterface $request - ) { + public function beforeExecute(\Magento\Framework\App\ActionInterface $subject) + { try { $this->_designLoader->load(); } catch (\Magento\Framework\Exception\LocalizedException $e) { diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/DesignTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/DesignTest.php index d5c7f4d0355ca..40d046f8b1678 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/DesignTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/DesignTest.php @@ -7,14 +7,13 @@ class DesignTest extends \PHPUnit\Framework\TestCase { - public function testAroundDispatch() + public function testBeforeExecute() { $subjectMock = $this->createMock(\Magento\Framework\App\Action\Action::class); $designLoaderMock = $this->createMock(\Magento\Framework\View\DesignLoader::class); $messageManagerMock = $this->createMock(\Magento\Framework\Message\ManagerInterface::class); - $requestMock = $this->createMock(\Magento\Framework\App\RequestInterface::class); $plugin = new \Magento\Framework\App\Action\Plugin\Design($designLoaderMock, $messageManagerMock); $designLoaderMock->expects($this->once())->method('load'); - $plugin->beforeDispatch($subjectMock, $requestMock); + $plugin->beforeExecute($subjectMock); } } From 344c83cb360865c8b7da53abcc0f840af4fd5e0d Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 7 Jan 2018 17:34:25 +0530 Subject: [PATCH 010/229] Move more Action::dispatch() plugins to ActionInterface::execute() --- .../Model/App/Action/ContextPlugin.php | 8 +++---- .../Model/App/Action/ContextPluginTest.php | 7 ++---- app/code/Magento/Customer/etc/frontend/di.xml | 4 ++-- .../Tax/Model/App/Action/ContextPlugin.php | 5 ++-- .../Unit/App/Action/ContextPluginTest.php | 9 ++++--- app/code/Magento/Tax/etc/frontend/di.xml | 2 +- .../Theme/Model/Theme/Plugin/Registration.php | 11 ++++----- .../Model/Theme/Plugin/RegistrationTest.php | 24 ++++++++----------- .../Weee/Model/App/Action/ContextPlugin.php | 7 ++---- .../Unit/App/Action/ContextPluginTest.php | 16 ++++++------- app/code/Magento/Weee/etc/frontend/di.xml | 2 +- 11 files changed, 39 insertions(+), 56 deletions(-) diff --git a/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php b/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php index b8c83551ee381..f221949051393 100644 --- a/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php +++ b/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php @@ -8,8 +8,7 @@ use Magento\Customer\Model\Context; use Magento\Customer\Model\GroupManagement; -use Magento\Framework\App\Action\AbstractAction; -use Magento\Framework\App\RequestInterface; +use Magento\Framework\App\ActionInterface; use Magento\Customer\Model\Session; use Magento\Framework\App\Http\Context as HttpContext; @@ -41,12 +40,11 @@ public function __construct(Session $customerSession, HttpContext $httpContext) /** * Set customer group and customer session id to HTTP context * - * @param AbstractAction $subject - * @param RequestInterface $request + * @param ActionInterface $subject * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function beforeDispatch(AbstractAction $subject, RequestInterface $request) + public function beforeExecute(ActionInterface $subject) { $this->httpContext->setValue( Context::CONTEXT_GROUP, diff --git a/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php b/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php index 4b89fda7c7051..8be32c52fe8b9 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php @@ -53,10 +53,7 @@ protected function setUp() ); } - /** - * Test aroundDispatch - */ - public function testBeforeDispatch() + public function testBeforeExecute() { $this->customerSessionMock->expects($this->once()) ->method('getCustomerGroupId') @@ -74,6 +71,6 @@ public function testBeforeDispatch() ] ) ); - $this->plugin->beforeDispatch($this->subjectMock, $this->requestMock); + $this->plugin->beforeExecute($this->subjectMock, $this->requestMock); } } diff --git a/app/code/Magento/Customer/etc/frontend/di.xml b/app/code/Magento/Customer/etc/frontend/di.xml index 4a45c4ad48d19..98a2e6f6d2773 100644 --- a/app/code/Magento/Customer/etc/frontend/di.xml +++ b/app/code/Magento/Customer/etc/frontend/di.xml @@ -20,8 +20,8 @@ - - + customerSession->isLoggedIn() || !$this->moduleManager->isEnabled('Magento_PageCache') || diff --git a/app/code/Magento/Tax/Test/Unit/App/Action/ContextPluginTest.php b/app/code/Magento/Tax/Test/Unit/App/Action/ContextPluginTest.php index 9a85ba0a9089b..8471e3b49fbb7 100644 --- a/app/code/Magento/Tax/Test/Unit/App/Action/ContextPluginTest.php +++ b/app/code/Magento/Tax/Test/Unit/App/Action/ContextPluginTest.php @@ -111,9 +111,9 @@ protected function setUp() * @param bool $cache * @param bool $taxEnabled * @param bool $loggedIn - * @dataProvider beforeDispatchDataProvider + * @dataProvider beforeExecuteDataProvider */ - public function testBeforeDispatch($cache, $taxEnabled, $loggedIn) + public function testBeforeExecute($cache, $taxEnabled, $loggedIn) { $this->customerSessionMock->expects($this->any()) ->method('isLoggedIn') @@ -159,8 +159,7 @@ public function testBeforeDispatch($cache, $taxEnabled, $loggedIn) } $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class); - $request = $this->createPartialMock(\Magento\Framework\App\Request\Http::class, ['getActionName']); - $result = $this->contextPlugin->beforeDispatch($action, $request); + $result = $this->contextPlugin->beforeExecute($action); $this->assertNull($result); } else { $this->assertFalse($loggedIn); @@ -170,7 +169,7 @@ public function testBeforeDispatch($cache, $taxEnabled, $loggedIn) /** * @return array */ - public function beforeDispatchDataProvider() + public function beforeExecuteDataProvider() { return [ [false, false, false], diff --git a/app/code/Magento/Tax/etc/frontend/di.xml b/app/code/Magento/Tax/etc/frontend/di.xml index 4db3f54b0edd9..d1b8d93e96935 100644 --- a/app/code/Magento/Tax/etc/frontend/di.xml +++ b/app/code/Magento/Tax/etc/frontend/di.xml @@ -35,7 +35,7 @@ - + diff --git a/app/code/Magento/Theme/Model/Theme/Plugin/Registration.php b/app/code/Magento/Theme/Model/Theme/Plugin/Registration.php index 05030c56c2ee0..ae65b52f938af 100644 --- a/app/code/Magento/Theme/Model/Theme/Plugin/Registration.php +++ b/app/code/Magento/Theme/Model/Theme/Plugin/Registration.php @@ -5,8 +5,7 @@ */ namespace Magento\Theme\Model\Theme\Plugin; -use Magento\Backend\App\AbstractAction; -use Magento\Framework\App\RequestInterface; +use Magento\Framework\App\ActionInterface; use Magento\Theme\Model\Theme\Registration as ThemeRegistration; use Magento\Framework\Exception\LocalizedException; use Psr\Log\LoggerInterface; @@ -69,15 +68,13 @@ public function __construct( /** * Add new theme from filesystem and update existing * - * @param AbstractAction $subject - * @param RequestInterface $request + * @param ActionInterface $subject * * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function beforeDispatch( - AbstractAction $subject, - RequestInterface $request + public function beforeExecute( + ActionInterface $subject ) { try { if ($this->appState->getMode() != AppState::MODE_PRODUCTION) { diff --git a/app/code/Magento/Theme/Test/Unit/Model/Theme/Plugin/RegistrationTest.php b/app/code/Magento/Theme/Test/Unit/Model/Theme/Plugin/RegistrationTest.php index 190a6edf55900..1bedfeea368d4 100644 --- a/app/code/Magento/Theme/Test/Unit/Model/Theme/Plugin/RegistrationTest.php +++ b/app/code/Magento/Theme/Test/Unit/Model/Theme/Plugin/RegistrationTest.php @@ -5,6 +5,7 @@ */ namespace Magento\Theme\Test\Unit\Model\Theme\Plugin; +use Magento\Framework\App\ActionInterface; use Magento\Theme\Model\Theme\Plugin\Registration; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Phrase; @@ -17,8 +18,8 @@ class RegistrationTest extends \PHPUnit\Framework\TestCase /** @var \Psr\Log\LoggerInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $logger; - /** @var \Magento\Backend\App\AbstractAction|\PHPUnit_Framework_MockObject_MockObject */ - protected $abstractAction; + /** @var ActionInterface|\PHPUnit_Framework_MockObject_MockObject */ + protected $action; /** @var \Magento\Framework\App\RequestInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $request; @@ -39,12 +40,7 @@ protected function setUp() { $this->themeRegistration = $this->createMock(\Magento\Theme\Model\Theme\Registration::class); $this->logger = $this->getMockForAbstractClass(\Psr\Log\LoggerInterface::class, [], '', false); - $this->abstractAction = $this->getMockForAbstractClass( - \Magento\Backend\App\AbstractAction::class, - [], - '', - false - ); + $this->action = $this->createMock(ActionInterface::class); $this->request = $this->getMockForAbstractClass(\Magento\Framework\App\RequestInterface::class, [], '', false); $this->appState = $this->createMock(\Magento\Framework\App\State::class); $this->themeCollection = $this->createMock(\Magento\Theme\Model\Theme\Collection::class); @@ -60,10 +56,10 @@ protected function setUp() /** * @param bool $hasParentTheme - * @dataProvider dataProviderBeforeDispatch + * @dataProvider dataProviderBeforeExecute * @SuppressWarnings(PHPMD.NPathComplexity) */ - public function testBeforeDispatch( + public function testBeforeExecute( $hasParentTheme ) { $themeId = 1; @@ -147,13 +143,13 @@ public function testBeforeDispatch( ->method('save') ->willReturnSelf(); - $this->plugin->beforeDispatch($this->abstractAction, $this->request); + $this->plugin->beforeExecute($this->action); } /** * @return array */ - public function dataProviderBeforeDispatch() + public function dataProviderBeforeExecute() { return [ [true], @@ -164,7 +160,7 @@ public function dataProviderBeforeDispatch() public function testBeforeDispatchWithProductionMode() { $this->appState->expects($this->once())->method('getMode')->willReturn('production'); - $this->plugin->beforeDispatch($this->abstractAction, $this->request); + $this->plugin->beforeExecute($this->action, $this->request); } public function testBeforeDispatchWithException() @@ -173,6 +169,6 @@ public function testBeforeDispatchWithException() $this->themeRegistration->expects($this->once())->method('register')->willThrowException($exception); $this->logger->expects($this->once())->method('critical'); - $this->plugin->beforeDispatch($this->abstractAction, $this->request); + $this->plugin->beforeExecute($this->action, $this->request); } } diff --git a/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php b/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php index 8363365372f63..58388401342ac 100644 --- a/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php +++ b/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php @@ -92,17 +92,14 @@ public function __construct( /** * @param \Magento\Framework\App\ActionInterface $subject - * @param \Magento\Framework\App\RequestInterface $request * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function beforeDispatch( - \Magento\Framework\App\ActionInterface $subject, - \Magento\Framework\App\RequestInterface $request - ) { + public function beforeExecute(\Magento\Framework\App\ActionInterface $subject) + { if (!$this->weeeHelper->isEnabled() || !$this->customerSession->isLoggedIn() || !$this->moduleManager->isEnabled('Magento_PageCache') || diff --git a/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php b/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php index 5500350e243ad..ba8a9b57cfa6c 100644 --- a/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php +++ b/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php @@ -123,7 +123,7 @@ protected function setUp() ); } - public function testBeforeDispatchBasedOnDefault() + public function testBeforeExecuteBasedOnDefault() { $this->customerSessionMock->expects($this->once()) ->method('isLoggedIn') @@ -188,10 +188,10 @@ public function testBeforeDispatchBasedOnDefault() $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class); $request = $this->createPartialMock(\Magento\Framework\App\Request\Http::class, ['getActionName']); - $this->contextPlugin->beforeDispatch($action, $request); + $this->contextPlugin->beforeExecute($action, $request); } - public function testBeforeDispatchBasedOnOrigin() + public function testBeforeExecuteBasedOnOrigin() { $this->customerSessionMock->expects($this->once()) ->method('isLoggedIn') @@ -217,10 +217,10 @@ public function testBeforeDispatchBasedOnOrigin() $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class); $request = $this->createPartialMock(\Magento\Framework\App\Request\Http::class, ['getActionName']); - $this->contextPlugin->beforeDispatch($action, $request); + $this->contextPlugin->beforeExecute($action, $request); } - public function testBeforeDispatchBasedOnBilling() + public function testBeforeExecuteBasedOnBilling() { $this->customerSessionMock->expects($this->once()) ->method('isLoggedIn') @@ -289,10 +289,10 @@ public function testBeforeDispatchBasedOnBilling() $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class); $request = $this->createPartialMock(\Magento\Framework\App\Request\Http::class, ['getActionName']); - $this->contextPlugin->beforeDispatch($action, $request); + $this->contextPlugin->beforeExecute($action, $request); } - public function testBeforeDispatchBasedOnShipping() + public function testBeforeExecuterBasedOnShipping() { $this->customerSessionMock->expects($this->once()) ->method('isLoggedIn') @@ -361,6 +361,6 @@ public function testBeforeDispatchBasedOnShipping() $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class); $request = $this->createPartialMock(\Magento\Framework\App\Request\Http::class, ['getActionName']); - $this->contextPlugin->beforeDispatch($action, $request); + $this->contextPlugin->beforeExecute($action, $request); } } diff --git a/app/code/Magento/Weee/etc/frontend/di.xml b/app/code/Magento/Weee/etc/frontend/di.xml index 1ce09205b6e77..f6417fd86a3e1 100644 --- a/app/code/Magento/Weee/etc/frontend/di.xml +++ b/app/code/Magento/Weee/etc/frontend/di.xml @@ -13,7 +13,7 @@ - + From 09bc573ad25e1631e2d1dfa9740178a6c641fca7 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 7 Jan 2018 17:51:22 +0530 Subject: [PATCH 011/229] Set area for controller tests --- .../Adminhtml/Authorizenet/Directpost/Payment/PlaceTest.php | 2 ++ .../Magento/Paypal/Controller/Billing/AgreementTest.php | 1 + 2 files changed, 3 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/PlaceTest.php b/dev/tests/integration/testsuite/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/PlaceTest.php index 35892623ef7af..cb012d73bdfb0 100644 --- a/dev/tests/integration/testsuite/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/PlaceTest.php +++ b/dev/tests/integration/testsuite/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/PlaceTest.php @@ -14,6 +14,8 @@ class PlaceTest extends \Magento\TestFramework\TestCase\AbstractBackendControlle { /** * Test requestToAuthorizenetData returning + * + * @magentoAppArea adminhtml */ public function testExecuteAuthorizenetDataReturning() { diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Controller/Billing/AgreementTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Controller/Billing/AgreementTest.php index fd8b4fd2efad5..6f192b6479acd 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Controller/Billing/AgreementTest.php +++ b/dev/tests/integration/testsuite/Magento/Paypal/Controller/Billing/AgreementTest.php @@ -19,6 +19,7 @@ class AgreementTest extends \Magento\TestFramework\TestCase\AbstractController * * @magentoDataFixture Magento/Customer/_files/customer.php * @magentoDbIsolation enabled + * @magentoAppArea frontend */ public function testReturnWizardAction() { From c9507a6de60f7e80627de38247027e7f85b26138 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 7 Jan 2018 18:41:58 +0530 Subject: [PATCH 012/229] Add missing @SuppressWarnings(PHPMD.UnusedFormalParameter) to plugin method --- .../App/Action/Plugin/ActionFlagNoDispatchPlugin.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php index fa335a1e2fd84..98c51475a0687 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php @@ -24,6 +24,13 @@ public function __construct(ActionFlag $actionFlag, ResponseInterface $response) $this->response = $response; } + /** + * @param ActionInterface $subject + * @param callable $proceed + * @return ResponseInterface + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function aroundExecute(ActionInterface $subject, callable $proceed) { return $this->actionFlag->get('', ActionInterface::FLAG_NO_DISPATCH) ? $this->response : $proceed(); From 54ce141d3874f6c11a04806f20be0c13caaeddc1 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 7 Jan 2018 22:32:08 +0530 Subject: [PATCH 013/229] Remove whitespace at end of line --- .../Adminhtml/Authorizenet/Directpost/Payment/PlaceTest.php | 2 +- .../Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php | 2 +- .../Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/PlaceTest.php b/dev/tests/integration/testsuite/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/PlaceTest.php index cb012d73bdfb0..780c6b226ad70 100644 --- a/dev/tests/integration/testsuite/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/PlaceTest.php +++ b/dev/tests/integration/testsuite/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/PlaceTest.php @@ -14,7 +14,7 @@ class PlaceTest extends \Magento\TestFramework\TestCase\AbstractBackendControlle { /** * Test requestToAuthorizenetData returning - * + * * @magentoAppArea adminhtml */ public function testExecuteAuthorizenetDataReturning() diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php index 98c51475a0687..3c84203662073 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php @@ -28,7 +28,7 @@ public function __construct(ActionFlag $actionFlag, ResponseInterface $response) * @param ActionInterface $subject * @param callable $proceed * @return ResponseInterface - * + * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundExecute(ActionInterface $subject, callable $proceed) diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php index 202cc86952e79..c4bd407c2228c 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php @@ -68,7 +68,7 @@ public function afterExecute(ActionInterface $subject, $result) /** * @param ActionInterface $subject * @return bool - * + * */ private function isSetActionNoPostDispatchFlag(): bool { From 8d209c33261f2495b541f3817c1bc10a2d520b4f Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Tue, 9 Jan 2018 16:49:06 +0100 Subject: [PATCH 014/229] Ignore PHPMD StaticAccess for ObjectManager::getInstance() in test class --- .../testsuite/Magento/Framework/App/ControllerActionTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php index b74ed98d36864..ce2d92b62d55d 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php @@ -18,6 +18,7 @@ * @magentoAppIsolation enabled * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.UnusedLocalVariable) + * @SuppressWarnings(PHPMD.StaticAccess) */ class ControllerActionTest extends TestCase { From cd7a64ebcfe0bb0326780f5d2b2ff6d2f7e5b34f Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Wed, 7 Feb 2018 10:18:31 +0100 Subject: [PATCH 015/229] Remove obsolete plugin method request parameter and clean up test class properties --- .../Model/App/Action/ContextPluginTest.php | 12 ++--- .../Unit/App/Action/Plugin/StoreCheckTest.php | 16 ++----- .../Model/Theme/Plugin/RegistrationTest.php | 8 +--- .../Unit/App/Action/ContextPluginTest.php | 48 +++++++++++-------- 4 files changed, 39 insertions(+), 45 deletions(-) diff --git a/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php b/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php index 8be32c52fe8b9..1b70f174c39fd 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php @@ -24,20 +24,15 @@ class ContextPluginTest extends \PHPUnit\Framework\TestCase protected $customerSessionMock; /** - * @var \Magento\Framework\App\Http\Context $httpContext|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\App\Http\Context|\PHPUnit_Framework_MockObject_MockObject */ protected $httpContextMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\App\Action\Action|\PHPUnit_Framework_MockObject_MockObject */ protected $subjectMock; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $requestMock; - /** * Set up */ @@ -46,7 +41,6 @@ protected function setUp() $this->customerSessionMock = $this->createMock(\Magento\Customer\Model\Session::class); $this->httpContextMock = $this->createMock(\Magento\Framework\App\Http\Context::class); $this->subjectMock = $this->createMock(\Magento\Framework\App\Action\Action::class); - $this->requestMock = $this->createMock(\Magento\Framework\App\RequestInterface::class); $this->plugin = new \Magento\Customer\Model\App\Action\ContextPlugin( $this->customerSessionMock, $this->httpContextMock @@ -71,6 +65,6 @@ public function testBeforeExecute() ] ) ); - $this->plugin->beforeExecute($this->subjectMock, $this->requestMock); + $this->plugin->beforeExecute($this->subjectMock); } } diff --git a/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php b/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php index f7ee5c4f9ae79..b24db7aa4a269 100644 --- a/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php +++ b/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php @@ -13,12 +13,12 @@ class StoreCheckTest extends \PHPUnit\Framework\TestCase protected $_plugin; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_storeManagerMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Store\Model\Store|\PHPUnit_Framework_MockObject_MockObject */ protected $_storeMock; @@ -26,12 +26,7 @@ class StoreCheckTest extends \PHPUnit\Framework\TestCase * @var \Magento\Framework\App\Action\AbstractAction|\PHPUnit_Framework_MockObject_MockObject */ protected $subjectMock; - - /** - * @var \Magento\Framework\App\RequestInterface|\PHPUnit_Framework_MockObject_MockObject - */ - protected $requestMock; - + protected function setUp() { $this->_storeManagerMock = $this->createMock(\Magento\Store\Model\StoreManagerInterface::class); @@ -43,7 +38,6 @@ protected function setUp() )->will( $this->returnValue($this->_storeMock) ); - $this->requestMock = $this->createMock(\Magento\Framework\App\RequestInterface::class); $this->subjectMock = $this->getMockBuilder(\Magento\Framework\App\Action\AbstractAction::class) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -58,13 +52,13 @@ protected function setUp() public function testBeforeExecuteWhenStoreNotActive() { $this->_storeMock->expects($this->any())->method('isActive')->will($this->returnValue(false)); - $this->_plugin->beforeExecute($this->subjectMock, $this->requestMock); + $this->_plugin->beforeExecute($this->subjectMock); } public function testBeforeExecuteWhenStoreIsActive() { $this->_storeMock->expects($this->any())->method('isActive')->will($this->returnValue(true)); - $result = $this->_plugin->beforeExecute($this->subjectMock, $this->requestMock); + $result = $this->_plugin->beforeExecute($this->subjectMock); $this->assertNull($result); } } diff --git a/app/code/Magento/Theme/Test/Unit/Model/Theme/Plugin/RegistrationTest.php b/app/code/Magento/Theme/Test/Unit/Model/Theme/Plugin/RegistrationTest.php index 1bedfeea368d4..514964034b967 100644 --- a/app/code/Magento/Theme/Test/Unit/Model/Theme/Plugin/RegistrationTest.php +++ b/app/code/Magento/Theme/Test/Unit/Model/Theme/Plugin/RegistrationTest.php @@ -21,9 +21,6 @@ class RegistrationTest extends \PHPUnit\Framework\TestCase /** @var ActionInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $action; - /** @var \Magento\Framework\App\RequestInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $request; - /** @var \Magento\Framework\App\State|\PHPUnit_Framework_MockObject_MockObject */ protected $appState; @@ -41,7 +38,6 @@ protected function setUp() $this->themeRegistration = $this->createMock(\Magento\Theme\Model\Theme\Registration::class); $this->logger = $this->getMockForAbstractClass(\Psr\Log\LoggerInterface::class, [], '', false); $this->action = $this->createMock(ActionInterface::class); - $this->request = $this->getMockForAbstractClass(\Magento\Framework\App\RequestInterface::class, [], '', false); $this->appState = $this->createMock(\Magento\Framework\App\State::class); $this->themeCollection = $this->createMock(\Magento\Theme\Model\Theme\Collection::class); $this->themeLoader = $this->createMock(\Magento\Theme\Model\ResourceModel\Theme\Collection::class); @@ -160,7 +156,7 @@ public function dataProviderBeforeExecute() public function testBeforeDispatchWithProductionMode() { $this->appState->expects($this->once())->method('getMode')->willReturn('production'); - $this->plugin->beforeExecute($this->action, $this->request); + $this->plugin->beforeExecute($this->action); } public function testBeforeDispatchWithException() @@ -169,6 +165,6 @@ public function testBeforeDispatchWithException() $this->themeRegistration->expects($this->once())->method('register')->willThrowException($exception); $this->logger->expects($this->once())->method('critical'); - $this->plugin->beforeExecute($this->action, $this->request); + $this->plugin->beforeExecute($this->action); } } diff --git a/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php b/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php index ba8a9b57cfa6c..7ede0aaf7ca18 100644 --- a/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php +++ b/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php @@ -14,50 +14,60 @@ class ContextPluginTest extends \PHPUnit\Framework\TestCase { /** - * @var \Magento\Tax\Helper\Data + * @var \Magento\Tax\Helper\Data|\PHPUnit_Framework_MockObject_MockObject */ protected $taxHelperMock; /** - * @var \Magento\Weee\Helper\Data + * @var \Magento\Weee\Helper\Data|\PHPUnit_Framework_MockObject_MockObject */ protected $weeeHelperMock; /** - * @var \Magento\Weee\Model\Tax + * @var \Magento\Weee\Model\Tax|\PHPUnit_Framework_MockObject_MockObject */ protected $weeeTaxMock; /** - * @var \Magento\Framework\App\Http\Context + * @var \Magento\Framework\App\Http\Context|\PHPUnit_Framework_MockObject_MockObject */ protected $httpContextMock; /** - * @var \Magento\Tax\Model\Calculation\Proxy + * @var \Magento\Tax\Model\Calculation\Proxy|\PHPUnit_Framework_MockObject_MockObject */ protected $taxCalculationMock; /** - * @var \Magento\Framework\Module\Manager + * @var \Magento\Framework\Module\Manager|\PHPUnit_Framework_MockObject_MockObject */ protected $moduleManagerMock; /** - * @var \Magento\PageCache\Model\Config + * @var \Magento\PageCache\Model\Config|\PHPUnit_Framework_MockObject_MockObject */ protected $cacheConfigMock; /** - * @var \Magento\Store\Model\StoreManager + * @var \Magento\Store\Model\StoreManager|\PHPUnit_Framework_MockObject_MockObject */ - protected $storeManageMock; + protected $storeManagerMock; /** - * @var \Magento\Framework\App\Config\ScopeConfig + * @var \Magento\Framework\App\Config|\PHPUnit_Framework_MockObject_MockObject */ protected $scopeConfigMock; + /** + * @var \Magento\Customer\Model\Session|\PHPUnit_Framework_MockObject_MockObject + */ + private $customerSessionMock; + + /** + * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager + */ + private $objectManager; + /** * @var \Magento\Tax\Model\App\Action\ContextPlugin */ @@ -98,7 +108,7 @@ protected function setUp() $this->cacheConfigMock = $this->getMockBuilder(\Magento\PageCache\Model\Config::class) ->disableOriginalConstructor() ->getMock(); - + $this->storeManagerMock = $this->getMockBuilder(\Magento\Store\Model\StoreManager::class) ->disableOriginalConstructor() ->getMock(); @@ -185,10 +195,10 @@ public function testBeforeExecuteBasedOnDefault() ->method('setValue') ->with('weee_tax_region', ['countryId' => 'US', 'regionId' => 0], 0); + /** @var \Magento\Framework\App\Test\Unit\Action\Stub\ActionStub $action */ $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class); - $request = $this->createPartialMock(\Magento\Framework\App\Request\Http::class, ['getActionName']); - $this->contextPlugin->beforeExecute($action, $request); + $this->contextPlugin->beforeExecute($action); } public function testBeforeExecuteBasedOnOrigin() @@ -214,10 +224,10 @@ public function testBeforeExecuteBasedOnOrigin() ->method('getTaxBasedOn') ->willReturn('origin'); + /** @var \Magento\Framework\App\Test\Unit\Action\Stub\ActionStub $action */ $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class); - $request = $this->createPartialMock(\Magento\Framework\App\Request\Http::class, ['getActionName']); - $this->contextPlugin->beforeExecute($action, $request); + $this->contextPlugin->beforeExecute($action); } public function testBeforeExecuteBasedOnBilling() @@ -286,10 +296,10 @@ public function testBeforeExecuteBasedOnBilling() ->method('setValue') ->with('weee_tax_region', ['countryId' => 'US', 'regionId' => 1], 0); + /** @var \Magento\Framework\App\Test\Unit\Action\Stub\ActionStub $action */ $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class); - $request = $this->createPartialMock(\Magento\Framework\App\Request\Http::class, ['getActionName']); - $this->contextPlugin->beforeExecute($action, $request); + $this->contextPlugin->beforeExecute($action); } public function testBeforeExecuterBasedOnShipping() @@ -358,9 +368,9 @@ public function testBeforeExecuterBasedOnShipping() ->method('setValue') ->with('weee_tax_region', ['countryId' => 'US', 'regionId' => 1], 0); + /** @var \Magento\Framework\App\Test\Unit\Action\Stub\ActionStub $action */ $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class); - $request = $this->createPartialMock(\Magento\Framework\App\Request\Http::class, ['getActionName']); - $this->contextPlugin->beforeExecute($action, $request); + $this->contextPlugin->beforeExecute($action); } } From 64dcbeac40b9ddee5b8ed4c4af92c95a328a57e2 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Wed, 7 Feb 2018 10:41:24 +0100 Subject: [PATCH 016/229] Return void instead of [] from before plugin if no arguments are modified --- .../App/Action/Plugin/ActionFlagNoDispatchPlugin.php | 5 ++++- .../Framework/App/Action/Plugin/EventDispatchPlugin.php | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php index 3c84203662073..ac1dfadb6a8cb 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php @@ -6,6 +6,9 @@ use Magento\Framework\App\ActionInterface; use Magento\Framework\App\ResponseInterface; +/** + * + */ class ActionFlagNoDispatchPlugin { /** @@ -28,7 +31,7 @@ public function __construct(ActionFlag $actionFlag, ResponseInterface $response) * @param ActionInterface $subject * @param callable $proceed * @return ResponseInterface - * + * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundExecute(ActionInterface $subject, callable $proceed) diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php index c4bd407c2228c..28074e8179bc8 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php @@ -11,6 +11,9 @@ use Magento\Framework\Event\ManagerInterface; use Magento\Framework\HTTP\PhpEnvironment\Response; +/** + * + */ class EventDispatchPlugin { /** @@ -38,8 +41,6 @@ public function __construct(RequestInterface $request, ManagerInterface $eventMa public function beforeExecute(ActionInterface $subject) { $this->dispatchPreDispatchEvents($subject); - - return []; } /** From e0d905624045b7c7934f4ac236e19b9ddafd4649 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Wed, 7 Feb 2018 11:31:06 +0100 Subject: [PATCH 017/229] Change the customer notification plugin from AbstractAction:dispatch to ActionInterface::execute --- .../Model/Plugin/CustomerNotification.php | 62 ++++++++++--- .../Model/Plugin/CustomerNotificationTest.php | 89 ++++++++----------- app/code/Magento/Customer/etc/di.xml | 2 +- 3 files changed, 89 insertions(+), 64 deletions(-) diff --git a/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php b/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php index 517aef5690ee6..230b1aa3fed4c 100644 --- a/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php +++ b/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php @@ -3,13 +3,15 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Customer\Model\Plugin; use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Customer\Model\Customer\NotificationStorage; use Magento\Customer\Model\Session; -use Magento\Framework\App\Action\AbstractAction; +use Magento\Framework\App\ActionInterface; use Magento\Framework\App\Area; +use Magento\Framework\App\ObjectManager; use Magento\Framework\App\RequestInterface; use Magento\Framework\App\State; use Magento\Framework\Exception\NoSuchEntityException; @@ -42,6 +44,11 @@ class CustomerNotification */ private $logger; + /** + * @var RequestInterface|\Magento\Framework\App\Request\Http + */ + private $request; + /** * Initialize dependencies. * @@ -50,37 +57,38 @@ class CustomerNotification * @param State $state * @param CustomerRepositoryInterface $customerRepository * @param LoggerInterface $logger + * @param RequestInterface|null $request */ public function __construct( Session $session, NotificationStorage $notificationStorage, State $state, CustomerRepositoryInterface $customerRepository, - LoggerInterface $logger + LoggerInterface $logger, + RequestInterface $request = null ) { $this->session = $session; $this->notificationStorage = $notificationStorage; $this->state = $state; $this->customerRepository = $customerRepository; $this->logger = $logger; + $this->request = $request ?? ObjectManager::getInstance()->get(RequestInterface::class); } /** - * @param AbstractAction $subject - * @param RequestInterface $request + * Refresh the customer session on frontend post requests if an update session notification is registered. + * + * @param ActionInterface $subject * @return void + * @throws \Magento\Framework\Exception\LocalizedException * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function beforeDispatch(AbstractAction $subject, RequestInterface $request) + public function beforeExecute(ActionInterface $subject) { $customerId = $this->session->getCustomerId(); - if ($this->state->getAreaCode() == Area::AREA_FRONTEND && $request->isPost() - && $this->notificationStorage->isExists( - NotificationStorage::UPDATE_CUSTOMER_SESSION, - $customerId - ) - ) { + if ($this->isFrontendRequest() && $this->isPostRequest() && $this->isSessionUpdateRegisteredFor($customerId)) + { try { $customer = $this->customerRepository->getById($customerId); $this->session->setCustomerData($customer); @@ -92,4 +100,36 @@ public function beforeDispatch(AbstractAction $subject, RequestInterface $reques } } } + + /** + * Because RequestInterface has no isPost method the check is requied before calling it. + * + * @return bool + */ + private function isPostRequest(): bool + { + return method_exists($this->request, 'isPost') && $this->request->isPost(); + } + + /** + * Check if the current application area is frontend. + * + * @return bool + * @throws \Magento\Framework\Exception\LocalizedException + */ + private function isFrontendRequest(): bool + { + return $this->state->getAreaCode() == Area::AREA_FRONTEND; + } + + /** + * True if the session for the given customer ID needs to be refreshed. + * + * @param int $customerId + * @return bool + */ + private function isSessionUpdateRegisteredFor($customerId): bool + { + return $this->notificationStorage->isExists(NotificationStorage::UPDATE_CUSTOMER_SESSION, $customerId); + } } diff --git a/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerNotificationTest.php b/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerNotificationTest.php index c3c853bca1469..27999e903d900 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerNotificationTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerNotificationTest.php @@ -5,12 +5,12 @@ */ namespace Magento\Customer\Test\Unit\Model\Plugin; -use Magento\Backend\App\AbstractAction; use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Customer\Api\Data\CustomerInterface; use Magento\Customer\Model\Customer\NotificationStorage; use Magento\Customer\Model\Plugin\CustomerNotification; use Magento\Customer\Model\Session; +use Magento\Framework\App\ActionInterface; use Magento\Framework\App\Area; use Magento\Framework\App\RequestInterface; use Magento\Framework\App\State; @@ -20,25 +20,25 @@ class CustomerNotificationTest extends \PHPUnit\Framework\TestCase { /** @var Session|\PHPUnit_Framework_MockObject_MockObject */ - private $sessionMock; + private $session; /** @var NotificationStorage|\PHPUnit_Framework_MockObject_MockObject */ - private $notificationStorageMock; + private $notificationStorage; /** @var CustomerRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject */ - private $customerRepositoryMock; + private $customerRepository; /** @var State|\PHPUnit_Framework_MockObject_MockObject */ - private $appStateMock; + private $appState; /** @var RequestInterface|\PHPUnit_Framework_MockObject_MockObject */ - private $requestMock; + private $request; - /** @var AbstractAction|\PHPUnit_Framework_MockObject_MockObject */ - private $abstractActionMock; - - /** @var LoggerInterface */ - private $loggerMock; + /** @var ActionInterface|\PHPUnit_Framework_MockObject_MockObject */ + private $actionInterfaceMock; + + /** @var LoggerInterface|\PHPUnit_Framework_MockObject_MockObject */ + private $logger; /** @var CustomerNotification */ private $plugin; @@ -48,76 +48,61 @@ class CustomerNotificationTest extends \PHPUnit\Framework\TestCase protected function setUp() { - $this->sessionMock = $this->getMockBuilder(Session::class) - ->disableOriginalConstructor() - ->setMethods(['getCustomerId', 'setCustomerData', 'setCustomerGroupId', 'regenerateId']) - ->getMock(); - $this->notificationStorageMock = $this->getMockBuilder(NotificationStorage::class) - ->disableOriginalConstructor() - ->setMethods(['isExists', 'remove']) - ->getMock(); - $this->customerRepositoryMock = $this->getMockBuilder(CustomerRepositoryInterface::class) - ->getMockForAbstractClass(); - $this->abstractActionMock = $this->getMockBuilder(AbstractAction::class) - ->disableOriginalConstructor() - ->getMockForAbstractClass(); - $this->requestMock = $this->getMockBuilder(RequestInterface::class) + $this->session = $this->createMock(Session::class); + $this->notificationStorage = $this->createMock(NotificationStorage::class); + $this->customerRepository = $this->createMock(CustomerRepositoryInterface::class); + $this->actionInterfaceMock = $this->createMock(ActionInterface::class); + $this->request = $this->getMockBuilder(RequestInterface::class) ->setMethods(['isPost']) ->getMockForAbstractClass(); - $this->appStateMock = $this->getMockBuilder(State::class) - ->disableOriginalConstructor() - ->setMethods(['getAreaCode']) - ->getMock(); - - $this->loggerMock = $this->getMockForAbstractClass(LoggerInterface::class); - $this->appStateMock->method('getAreaCode')->willReturn(Area::AREA_FRONTEND); - $this->requestMock->method('isPost')->willReturn(true); - $this->sessionMock->method('getCustomerId')->willReturn(self::$customerId); - $this->notificationStorageMock->expects($this->any()) + $this->appState = $this->createMock(State::class); + $this->logger = $this->createMock(LoggerInterface::class); + + $this->appState->method('getAreaCode')->willReturn(Area::AREA_FRONTEND); + $this->request->method('isPost')->willReturn(true); + $this->session->method('getCustomerId')->willReturn(self::$customerId); + $this->notificationStorage->expects($this->any()) ->method('isExists') ->with(NotificationStorage::UPDATE_CUSTOMER_SESSION, self::$customerId) ->willReturn(true); $this->plugin = new CustomerNotification( - $this->sessionMock, - $this->notificationStorageMock, - $this->appStateMock, - $this->customerRepositoryMock, - $this->loggerMock + $this->session, + $this->notificationStorage, + $this->appState, + $this->customerRepository, + $this->logger, + $this->request ); } - public function testBeforeDispatch() + public function testBeforeExecute() { $customerGroupId =1; - $customerMock = $this->getMockForAbstractClass(CustomerInterface::class); + $customerMock = $this->createMock(CustomerInterface::class); $customerMock->method('getGroupId')->willReturn($customerGroupId); $customerMock->method('getId')->willReturn(self::$customerId); - $this->customerRepositoryMock->expects($this->once()) + $this->customerRepository->expects($this->once()) ->method('getById') ->with(self::$customerId) ->willReturn($customerMock); - $this->notificationStorageMock->expects($this->once()) + $this->notificationStorage->expects($this->once()) ->method('remove') ->with(NotificationStorage::UPDATE_CUSTOMER_SESSION, self::$customerId); - $this->sessionMock->expects($this->once())->method('setCustomerData')->with($customerMock); - $this->sessionMock->expects($this->once())->method('setCustomerGroupId')->with($customerGroupId); - $this->sessionMock->expects($this->once())->method('regenerateId'); - - $this->plugin->beforeDispatch($this->abstractActionMock, $this->requestMock); + $this->plugin->beforeExecute($this->actionInterfaceMock); } public function testBeforeDispatchWithNoCustomerFound() { - $this->customerRepositoryMock->method('getById') + $this->customerRepository->method('getById') ->with(self::$customerId) ->willThrowException(new NoSuchEntityException()); - $this->loggerMock->expects($this->once()) + $this->logger->expects($this->once()) ->method('error'); - $this->plugin->beforeDispatch($this->abstractActionMock, $this->requestMock); + $this->plugin->beforeExecute($this->actionInterfaceMock); } } diff --git a/app/code/Magento/Customer/etc/di.xml b/app/code/Magento/Customer/etc/di.xml index 0d99c1145e81b..082cea58766fd 100644 --- a/app/code/Magento/Customer/etc/di.xml +++ b/app/code/Magento/Customer/etc/di.xml @@ -333,7 +333,7 @@ - + From fd179eac77d12225b38e64f237b15b0403beb975 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Wed, 7 Feb 2018 11:33:22 +0100 Subject: [PATCH 018/229] Remove training whitespace in empty PHPDoc lines --- .../App/Action/Plugin/ActionFlagNoDispatchPlugin.php | 4 ++-- .../Framework/App/Action/Plugin/EventDispatchPlugin.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php index ac1dfadb6a8cb..9256ab97ab7b7 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php @@ -7,7 +7,7 @@ use Magento\Framework\App\ResponseInterface; /** - * + * */ class ActionFlagNoDispatchPlugin { @@ -31,7 +31,7 @@ public function __construct(ActionFlag $actionFlag, ResponseInterface $response) * @param ActionInterface $subject * @param callable $proceed * @return ResponseInterface - * + * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundExecute(ActionInterface $subject, callable $proceed) diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php index 28074e8179bc8..2cc0bea8cf8e6 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php @@ -12,7 +12,7 @@ use Magento\Framework\HTTP\PhpEnvironment\Response; /** - * + * */ class EventDispatchPlugin { From 8e3bb74f377f839c8c0cb54e16deb9cfe3bf14cd Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Wed, 7 Feb 2018 12:41:32 +0100 Subject: [PATCH 019/229] Remove more whitespace at end of line in PHPDoc blocks --- .../Customer/Model/Plugin/CustomerNotification.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php b/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php index 230b1aa3fed4c..60b5a9f572b8a 100644 --- a/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php +++ b/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php @@ -77,7 +77,7 @@ public function __construct( /** * Refresh the customer session on frontend post requests if an update session notification is registered. - * + * * @param ActionInterface $subject * @return void * @throws \Magento\Framework\Exception\LocalizedException @@ -87,8 +87,7 @@ public function beforeExecute(ActionInterface $subject) { $customerId = $this->session->getCustomerId(); - if ($this->isFrontendRequest() && $this->isPostRequest() && $this->isSessionUpdateRegisteredFor($customerId)) - { + if ($this->isFrontendRequest() && $this->isPostRequest() && $this->isSessionUpdateRegisteredFor($customerId)) { try { $customer = $this->customerRepository->getById($customerId); $this->session->setCustomerData($customer); @@ -103,7 +102,7 @@ public function beforeExecute(ActionInterface $subject) /** * Because RequestInterface has no isPost method the check is requied before calling it. - * + * * @return bool */ private function isPostRequest(): bool @@ -113,7 +112,7 @@ private function isPostRequest(): bool /** * Check if the current application area is frontend. - * + * * @return bool * @throws \Magento\Framework\Exception\LocalizedException */ @@ -124,7 +123,7 @@ private function isFrontendRequest(): bool /** * True if the session for the given customer ID needs to be refreshed. - * + * * @param int $customerId * @return bool */ From 5671bba3638cd95169a1dd2a6cd1dbb272e50d32 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Wed, 7 Feb 2018 16:32:38 +0100 Subject: [PATCH 020/229] Add descriptions to the phpdoc blocks, even if they are superfluous --- .../Model/Plugin/CustomerNotification.php | 21 +++++++++++++++++-- app/code/Magento/Customer/Model/Visitor.php | 4 ++++ .../InheritanceBasedBackendAction.php | 3 +++ .../InheritanceBasedFrontendAction.php | 3 +++ .../TestStubs/InterfaceOnlyBackendAction.php | 3 +++ .../TestStubs/InterfaceOnlyFrontendAction.php | 3 +++ .../Plugin/ActionFlagNoDispatchPlugin.php | 4 +++- .../App/Action/Plugin/EventDispatchPlugin.php | 17 ++++++++++++++- 8 files changed, 54 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php b/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php index 60b5a9f572b8a..fe81509747357 100644 --- a/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php +++ b/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php @@ -72,7 +72,7 @@ public function __construct( $this->state = $state; $this->customerRepository = $customerRepository; $this->logger = $logger; - $this->request = $request ?? ObjectManager::getInstance()->get(RequestInterface::class); + $this->request = $request; } /** @@ -100,6 +100,21 @@ public function beforeExecute(ActionInterface $subject) } } + /** + * Return the shared request. + * If the request wasn't injected because of the backward compatible optional constructor dependency, + * create a new request instance. + * + * @return RequestInterface + */ + private function getRequest(): RequestInterface + { + if (null === $this->request) { + $this->request = ObjectManager::getInstance()->get(RequestInterface::class); + } + return $this->request; + } + /** * Because RequestInterface has no isPost method the check is requied before calling it. * @@ -107,7 +122,9 @@ public function beforeExecute(ActionInterface $subject) */ private function isPostRequest(): bool { - return method_exists($this->request, 'isPost') && $this->request->isPost(); + $request = $this->getRequest(); + + return method_exists($request, 'isPost') && $request->isPost(); } /** diff --git a/app/code/Magento/Customer/Model/Visitor.php b/app/code/Magento/Customer/Model/Visitor.php index abc4feb4a9ff5..3d0a3cda7a2e8 100644 --- a/app/code/Magento/Customer/Model/Visitor.php +++ b/app/code/Magento/Customer/Model/Visitor.php @@ -317,6 +317,10 @@ public function getOnlineInterval() } /** + * Return the shared request. + * If the request wasn't injected because of the backward compatible optional constructor dependency, + * create a new request instance. + * * @return \Magento\Framework\App\RequestInterface|\Magento\Framework\App\Request\Http */ private function getRequest() diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedBackendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedBackendAction.php index 59cc9d2edccf7..78bbc598baed0 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedBackendAction.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedBackendAction.php @@ -5,6 +5,9 @@ use Magento\Backend\App\Action; use Magento\Framework\View\Result\PageFactory; +/** + * Stub inheritance based backend action controller for testing purposes. + */ class InheritanceBasedBackendAction extends Action { /** diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php index 654a0659aa77f..8d68014185e03 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php @@ -6,6 +6,9 @@ use Magento\Framework\App\Action\Context; use Magento\Framework\View\Result\PageFactory; +/** + * Stub inheritance based frontend action controller for testing purposes. + */ class InheritanceBasedFrontendAction extends Action { /** diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php index 52362601d1965..5fecd7bca0f80 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php @@ -5,6 +5,9 @@ use Magento\Framework\App\ActionInterface; use Magento\Framework\View\Result\PageFactory; +/** + * Stub interface action controller implementation for testing purposes. + */ class InterfaceOnlyBackendAction implements ActionInterface { /** diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php index 81e37d89ce332..36dd3bfd518f7 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php @@ -5,6 +5,9 @@ use Magento\Framework\App\ActionInterface; use Magento\Framework\View\Result\PageFactory; +/** + * Stub interface only based frontend action controller for testing purposes. + */ class InterfaceOnlyFrontendAction implements ActionInterface { /** diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php index 9256ab97ab7b7..98010656ff91d 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php @@ -7,7 +7,7 @@ use Magento\Framework\App\ResponseInterface; /** - * + * Do not call Action::execute() if the action flag FLAG_NO_DISPATCH is set. */ class ActionFlagNoDispatchPlugin { @@ -28,6 +28,8 @@ public function __construct(ActionFlag $actionFlag, ResponseInterface $response) } /** + * Do not call proceed if the no dispatch action flag is set. + * * @param ActionInterface $subject * @param callable $proceed * @return ResponseInterface diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php index 2cc0bea8cf8e6..e7c4d610c230f 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php @@ -12,7 +12,7 @@ use Magento\Framework\HTTP\PhpEnvironment\Response; /** - * + * Dispatch the controller_action_predispatch and controller_action_post_dispatch events. */ class EventDispatchPlugin { @@ -38,12 +38,19 @@ public function __construct(RequestInterface $request, ManagerInterface $eventMa $this->actionFlag = $actionFlag; } + /** + * Trigger the controller_action_predispatch events + * + * @param ActionInterface $subject + */ public function beforeExecute(ActionInterface $subject) { $this->dispatchPreDispatchEvents($subject); } /** + * Build the event parameter array + * * @param ActionInterface $subject * @return mixed[] */ @@ -53,6 +60,8 @@ private function getEventParameters(ActionInterface $subject): array } /** + * Trigger the controller_action_postdispatch events if the suppressing action flag is not set + * * @param ActionInterface $subject * @param ResultInterface|Response|null $result * @return ResultInterface|Response|null @@ -67,6 +76,8 @@ public function afterExecute(ActionInterface $subject, $result) } /** + * Check if action flags are set that would suppress the post dispatch events. + * * @param ActionInterface $subject * @return bool * @@ -78,6 +89,8 @@ private function isSetActionNoPostDispatchFlag(): bool } /** + * Dispatch the controller_action_predispatch events. + * * @param ActionInterface $action */ private function dispatchPreDispatchEvents(ActionInterface $action) @@ -94,6 +107,8 @@ private function dispatchPreDispatchEvents(ActionInterface $action) } /** + * Dispatch the controller_action_postdispatch events. + * * @param ActionInterface $action */ private function dispatchPostDispatchEvents(ActionInterface $action) From cdac268c1d7645621951fb43cf54e4de31630a75 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Wed, 7 Feb 2018 16:46:21 +0100 Subject: [PATCH 021/229] Remove comment promising to add the request as a future argument to execute because bc does not allow it --- lib/internal/Magento/Framework/App/ActionInterface.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/internal/Magento/Framework/App/ActionInterface.php b/lib/internal/Magento/Framework/App/ActionInterface.php index 921e1a2e16b1e..1501abe9eb956 100644 --- a/lib/internal/Magento/Framework/App/ActionInterface.php +++ b/lib/internal/Magento/Framework/App/ActionInterface.php @@ -25,8 +25,6 @@ interface ActionInterface /** * Execute action based on request and return result * - * Note: Request will be added as operation argument in future - * * @return \Magento\Framework\Controller\ResultInterface|ResponseInterface * @throws \Magento\Framework\Exception\NotFoundException */ From ee8da15bb05db3e00bbfb099e2f2182c0fa9f988 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Wed, 7 Feb 2018 17:34:30 +0100 Subject: [PATCH 022/229] Remove training whitespace from comment --- .../Framework/App/TestStubs/InterfaceOnlyBackendAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php index 5fecd7bca0f80..fd176e8163010 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php @@ -6,7 +6,7 @@ use Magento\Framework\View\Result\PageFactory; /** - * Stub interface action controller implementation for testing purposes. + * Stub interface action controller implementation for testing purposes. */ class InterfaceOnlyBackendAction implements ActionInterface { From 08466c5e53b5af8a1246b68c703d4b7c58708bf6 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 17 Jun 2018 06:35:24 +0200 Subject: [PATCH 023/229] Fix regression left over from rebase --- app/code/Magento/Customer/Model/Visitor.php | 15 ++++++++++----- .../Customer/Test/Unit/Model/VisitorTest.php | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Customer/Model/Visitor.php b/app/code/Magento/Customer/Model/Visitor.php index 3d0a3cda7a2e8..0b89aafb31cf7 100644 --- a/app/code/Magento/Customer/Model/Visitor.php +++ b/app/code/Magento/Customer/Model/Visitor.php @@ -158,6 +158,10 @@ public function initByRequest($observer) $this->setLastVisitAt((new \DateTime())->format(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT)); + // prevent saving Visitor for safe methods, e.g. GET request + if ($this->getRequest()->isSafeMethod()) { + return $this; + } if (!$this->getId()) { $this->setSessionId($this->session->getSessionId()); $this->save(); @@ -177,7 +181,8 @@ public function initByRequest($observer) */ public function saveByRequest($observer) { - if ($this->skipRequestLogging || $this->isModuleIgnored($observer)) { + // prevent saving Visitor for safe methods, e.g. GET request + if ($this->skipRequestLogging || $this->getRequest()->isSafeMethod() || $this->isModuleIgnored($observer)) { return $this; } @@ -321,15 +326,15 @@ public function getOnlineInterval() * If the request wasn't injected because of the backward compatible optional constructor dependency, * create a new request instance. * - * @return \Magento\Framework\App\RequestInterface|\Magento\Framework\App\Request\Http + * @return \Magento\Framework\App\RequestSafetyInterface|\Magento\Framework\App\Request\Http */ private function getRequest() { - if (null === $this->request) { - $this->request = \Magento\Framework\App\ObjectManager::getInstance()->create( + if (null === $this->requestSafety) { + $this->requestSafety = \Magento\Framework\App\ObjectManager::getInstance()->create( \Magento\Framework\App\RequestInterface::class ); } - return $this->request; + return $this->requestSafety; } } diff --git a/app/code/Magento/Customer/Test/Unit/Model/VisitorTest.php b/app/code/Magento/Customer/Test/Unit/Model/VisitorTest.php index debccda26ba75..bdb2de2e99d9f 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/VisitorTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/VisitorTest.php @@ -108,7 +108,7 @@ public function testIsModuleIgnored() 'session' => $this->session, 'resource' => $this->resource, 'ignores' => ['test_route_name' => true], - 'request' => $this->request, + 'requestSafety' => $this->request, ] ); $this->request->method('getRouteName')->willReturn('test_route_name'); From eaeafea871efa5aeba13e79c0a49fc7f8210bda6 Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Sun, 17 Jun 2018 08:44:08 +0200 Subject: [PATCH 024/229] Set area for test so the theme can be loaded --- .../Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFilesTest.php | 2 ++ .../Controller/Adminhtml/Wysiwyg/Images/DeleteFolderTest.php | 2 ++ .../Cms/Controller/Adminhtml/Wysiwyg/Images/NewFolderTest.php | 2 ++ .../Cms/Controller/Adminhtml/Wysiwyg/Images/UploadTest.php | 2 ++ 4 files changed, 8 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFilesTest.php b/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFilesTest.php index bbcbc40dc6640..cee8ebf4a0c15 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFilesTest.php @@ -10,6 +10,8 @@ /** * Test for \Magento\Cms\Controller\Adminhtml\Wysiwyg\Images\DeleteFiles class. + * + * @magentoAppArea adminhtml */ class DeleteFilesTest extends \PHPUnit\Framework\TestCase { diff --git a/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolderTest.php b/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolderTest.php index 8e30e85541a42..05effba827c70 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolderTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolderTest.php @@ -10,6 +10,8 @@ /** * Test for \Magento\Cms\Controller\Adminhtml\Wysiwyg\Images\DeleteFolder class. + * + * @magentoAppArea adminhtml */ class DeleteFolderTest extends \PHPUnit\Framework\TestCase { diff --git a/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/NewFolderTest.php b/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/NewFolderTest.php index 0c74f18e9c44a..61d9a8cc42a82 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/NewFolderTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/NewFolderTest.php @@ -10,6 +10,8 @@ /** * Test for \Magento\Cms\Controller\Adminhtml\Wysiwyg\Images\NewFolder class. + * + * @magentoAppArea adminhtml */ class NewFolderTest extends \PHPUnit\Framework\TestCase { diff --git a/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/UploadTest.php b/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/UploadTest.php index 534eb3db35b3f..b3fdcbc09f3ee 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/UploadTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/UploadTest.php @@ -10,6 +10,8 @@ /** * Test for \Magento\Cms\Controller\Adminhtml\Wysiwyg\Images\Upload class. + * + * @magentoAppArea adminhtml */ class UploadTest extends \PHPUnit\Framework\TestCase { From b6025fceaa5bfb9755e2f83366d1c152d577866b Mon Sep 17 00:00:00 2001 From: Vinai Kopp Date: Wed, 20 Jun 2018 07:35:11 -0400 Subject: [PATCH 025/229] Make required changes after cherry-picking commits over from the 2.2-develop branch to the 2.3-develop branch --- app/code/Magento/Customer/Model/Visitor.php | 22 ++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Customer/Model/Visitor.php b/app/code/Magento/Customer/Model/Visitor.php index 0b89aafb31cf7..642dff9c579f6 100644 --- a/app/code/Magento/Customer/Model/Visitor.php +++ b/app/code/Magento/Customer/Model/Visitor.php @@ -6,8 +6,6 @@ namespace Magento\Customer\Model; -use Magento\Framework\Indexer\StateInterface; - /** * Class Visitor * @package Magento\Customer\Model @@ -67,6 +65,11 @@ class Visitor extends \Magento\Framework\Model\AbstractModel */ protected $indexerRegistry; + /** + * @var \Magento\Framework\App\RequestSafetyInterface + */ + private $requestSafety; + /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry @@ -80,6 +83,7 @@ class Visitor extends \Magento\Framework\Model\AbstractModel * @param array $ignoredUserAgents * @param array $ignores * @param array $data + * @param \Magento\Framework\App\RequestSafetyInterface|null $requestSafety * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ @@ -95,7 +99,8 @@ public function __construct( \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $ignoredUserAgents = [], array $ignores = [], - array $data = [] + array $data = [], + \Magento\Framework\App\RequestSafetyInterface $requestSafety = null ) { $this->session = $session; $this->httpHeader = $httpHeader; @@ -105,6 +110,7 @@ public function __construct( $this->scopeConfig = $scopeConfig; $this->dateTime = $dateTime; $this->indexerRegistry = $indexerRegistry; + $this->requestSafety = $requestSafety; } /** @@ -312,11 +318,9 @@ public function clean() */ public function getOnlineInterval() { - $configValue = intval( - $this->scopeConfig->getValue( - static::XML_PATH_ONLINE_INTERVAL, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE - ) + $configValue = (int) $this->scopeConfig->getValue( + static::XML_PATH_ONLINE_INTERVAL, + \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); return $configValue ?: static::DEFAULT_ONLINE_MINUTES_INTERVAL; } @@ -332,7 +336,7 @@ private function getRequest() { if (null === $this->requestSafety) { $this->requestSafety = \Magento\Framework\App\ObjectManager::getInstance()->create( - \Magento\Framework\App\RequestInterface::class + \Magento\Framework\App\RequestSafetyInterface::class ); } return $this->requestSafety; From 820fd790d85c6ae00413e281689fd45613e2d63a Mon Sep 17 00:00:00 2001 From: Pieter Hoste Date: Sat, 3 Aug 2019 10:20:01 +0200 Subject: [PATCH 026/229] Fixes a less compilation problem with '.abs-modal-overlay' being used in the lib code while it was being defined in the Magento/backend theme. (cherry picked from commit 9340950d1fc9f56bf2d6787028dc977a674d9386) --- .../backend/web/css/source/components/_modals_extend.less | 4 ++++ lib/web/css/source/components/_modals.less | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/design/adminhtml/Magento/backend/web/css/source/components/_modals_extend.less b/app/design/adminhtml/Magento/backend/web/css/source/components/_modals_extend.less index efc747e4d714a..72e9088f7cd34 100644 --- a/app/design/adminhtml/Magento/backend/web/css/source/components/_modals_extend.less +++ b/app/design/adminhtml/Magento/backend/web/css/source/components/_modals_extend.less @@ -33,6 +33,10 @@ // +.modals-overlay { + &:extend(.abs-modal-overlay all); +} + .modal-popup, .modal-slide { .action-close { diff --git a/lib/web/css/source/components/_modals.less b/lib/web/css/source/components/_modals.less index 396930cce6d86..58c9c0674b6ad 100644 --- a/lib/web/css/source/components/_modals.less +++ b/lib/web/css/source/components/_modals.less @@ -150,7 +150,6 @@ // Modals overlay .modals-overlay { - &:extend(.abs-modal-overlay all); .lib-css(z-index, @overlay__z-index); } From 164a0531b0efa3707f1192249e50469c493c96d3 Mon Sep 17 00:00:00 2001 From: Pieter Hoste Date: Sat, 3 Aug 2019 11:47:55 +0200 Subject: [PATCH 027/229] Fixes some less compilation problems in Magento's luma theme. --- .../web/css/source/module/checkout/_estimated-total.less | 3 +-- .../css/source/module/checkout/fields/_file-uploader.less | 1 - .../luma/Magento_Downloadable/web/css/source/_module.less | 5 ----- .../luma/Magento_GiftMessage/web/css/source/_module.less | 1 - 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_estimated-total.less b/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_estimated-total.less index 530c700cbc395..e89ad3aaf137f 100644 --- a/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_estimated-total.less +++ b/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_estimated-total.less @@ -14,7 +14,6 @@ // --------------------------------------------- .opc-estimated-wrapper { - &:extend(.abs-no-display-desktop all); &:extend(.abs-add-clearfix all); .lib-css(background, @checkout-step-content-mobile__background); .lib-css(border-bottom, @checkout-step-title__border); @@ -54,6 +53,6 @@ .media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) { .opc-estimated-wrapper { - display: none; + &:extend(.abs-no-display-desktop all); } } diff --git a/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/fields/_file-uploader.less b/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/fields/_file-uploader.less index 7b06186ef9ad3..fbd9701d44be9 100644 --- a/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/fields/_file-uploader.less +++ b/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/fields/_file-uploader.less @@ -129,7 +129,6 @@ .file-uploader-preview { .action-remove { - &:extend(.abs-action-reset all); .lib-icon-font ( @icon-delete__content, @_icon-font: @icons__font-name, diff --git a/app/design/frontend/Magento/luma/Magento_Downloadable/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_Downloadable/web/css/source/_module.less index 7d911220d9dca..40b8cb8740810 100644 --- a/app/design/frontend/Magento/luma/Magento_Downloadable/web/css/source/_module.less +++ b/app/design/frontend/Magento/luma/Magento_Downloadable/web/css/source/_module.less @@ -92,7 +92,6 @@ } .field.choice { - &:extend(.clearer all); border-bottom: 1px solid @color-gray92; box-sizing: border-box; margin-bottom: @indent__s; @@ -178,10 +177,6 @@ .media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) { .page-product-downloadable { - .product-add-form { - &:extend(.clearer all); - } - .product-options-wrapper { float: left; width: 55%; diff --git a/app/design/frontend/Magento/luma/Magento_GiftMessage/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_GiftMessage/web/css/source/_module.less index ff377a4b88acc..7d0b0c511aa0e 100644 --- a/app/design/frontend/Magento/luma/Magento_GiftMessage/web/css/source/_module.less +++ b/app/design/frontend/Magento/luma/Magento_GiftMessage/web/css/source/_module.less @@ -27,7 +27,6 @@ & when (@media-common = true) { .gift-message { .field { - &:extend(.abs-clearfix all); margin-bottom: @indent__base; .label { From 8419d5ccf1c052cc92c5b1c8a61eedd96e2be5bb Mon Sep 17 00:00:00 2001 From: Pieter Hoste Date: Sat, 3 Aug 2019 11:49:05 +0200 Subject: [PATCH 028/229] Fixes less compilation problems in Magento's luma theme while also fixing: - Magento_CatalogSearch module: hides legend in advanced search form - Magento_Sales module: adds print icon to print link for sales objects in order history - Magento_AdvancedCheckout module: not sure, can't test at the moment --- .../web/css/source/_module.less | 18 ++++++++++++------ .../web/css/source/_module.less | 10 ++++++---- .../Magento_Sales/web/css/source/_module.less | 4 ++-- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/app/design/frontend/Magento/luma/Magento_AdvancedCheckout/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_AdvancedCheckout/web/css/source/_module.less index 8538a481903c7..4f2cf789d3a0e 100644 --- a/app/design/frontend/Magento/luma/Magento_AdvancedCheckout/web/css/source/_module.less +++ b/app/design/frontend/Magento/luma/Magento_AdvancedCheckout/web/css/source/_module.less @@ -48,12 +48,6 @@ } .block-content { - &:extend(.abs-add-clearfix-desktop all); - - .box { - &:extend(.abs-blocks-2columns all); - } - .actions-toolbar { clear: both; .lib-actions-toolbar( @@ -188,4 +182,16 @@ &:extend(.abs-add-clearfix-desktop all); } } + + .column { + .block-addbysku { + .block-content { + &:extend(.abs-add-clearfix-desktop all); + + .box { + &:extend(.abs-blocks-2columns all); + } + } + } + } } diff --git a/app/design/frontend/Magento/luma/Magento_CatalogSearch/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_CatalogSearch/web/css/source/_module.less index 31859a46d3efe..2176fcd241916 100644 --- a/app/design/frontend/Magento/luma/Magento_CatalogSearch/web/css/source/_module.less +++ b/app/design/frontend/Magento/luma/Magento_CatalogSearch/web/css/source/_module.less @@ -18,7 +18,7 @@ // _____________________________________________ & when (@media-common = true) { - + .search { .fieldset { .control { @@ -31,7 +31,7 @@ } } } - + .block-search { margin-bottom: 0; @@ -136,8 +136,6 @@ } .form.search.advanced { - &:extend(.abs-forms-general-desktop all); - .fields.range { .field { &:first-child { @@ -275,4 +273,8 @@ .search-autocomplete { margin-top: 0; } + + .form.search.advanced { + &:extend(.abs-forms-general-desktop all); + } } diff --git a/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_module.less index cc6aba6f3566e..1b216bb988f4e 100644 --- a/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_module.less +++ b/app/design/frontend/Magento/luma/Magento_Sales/web/css/source/_module.less @@ -307,7 +307,6 @@ margin-right: 30px; &.print { - &:extend(.abs-action-print all); display: none; margin: 0; } @@ -585,6 +584,7 @@ .order-actions-toolbar { .action.print { + &:extend(.abs-action-print all); display: block; float: right; } @@ -705,7 +705,7 @@ } } -.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__l) { +.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__l) { .order-links { .item { margin: 0 @tab-control__margin-right 0 0; From 220175565e486681dc209fb20d29d2594f6122fe Mon Sep 17 00:00:00 2001 From: Chris Frewin Date: Sat, 19 Oct 2019 17:13:58 +0200 Subject: [PATCH 029/229] fixed confusing grammar in the backend formatDate() function --- .../Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php index ba6f6c6ea2aaa..56f75887d83a8 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php @@ -61,8 +61,8 @@ public function beforeSave($object) /** * Prepare date for save in DB * - * string format used from input fields (all date input fields need apply locale settings) - * int value can be declared in code (this meen whot we use valid date) + * string format is used in input fields (all date input fields need apply locale settings) + * int (Unix) format can be used in other parts of the code * * @param string|int|\DateTimeInterface $date * @return string @@ -72,7 +72,7 @@ public function formatDate($date) if (empty($date)) { return null; } - // unix timestamp given - simply instantiate date object + // Unix timestamp given - simply instantiate date object if (is_scalar($date) && preg_match('/^[0-9]+$/', $date)) { $date = (new \DateTime())->setTimestamp($date); } elseif (!($date instanceof \DateTimeInterface)) { From b2d553ad7d7726703aac51e6fb02f04e8c7ca1d7 Mon Sep 17 00:00:00 2001 From: Enrique Guadalupe Date: Sun, 27 Oct 2019 13:47:35 +0100 Subject: [PATCH 030/229] Add afterGetList method in CustomerRepository plugin to retrieve is_subscribed --- .../Model/Plugin/CustomerPlugin.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php b/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php index 22b31575debbc..3ed2ceb56700f 100644 --- a/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php +++ b/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php @@ -7,6 +7,8 @@ use Magento\Customer\Api\CustomerRepositoryInterface as CustomerRepository; use Magento\Customer\Api\Data\CustomerInterface; +use Magento\Framework\Api\SearchCriteria; +use Magento\Framework\Api\SearchResults; use Magento\Newsletter\Model\SubscriberFactory; use Magento\Framework\Api\ExtensionAttributesFactory; use Magento\Newsletter\Model\ResourceModel\Subscriber; @@ -165,6 +167,34 @@ public function afterGetById(CustomerRepository $subject, CustomerInterface $cus return $customer; } + /** + * Plugin after getById customer that obtains newsletter subscription status for given customer. + * + * @param CustomerRepository $subject + * @param SearchResults $searchResults + * @param SearchCriteria $searchCriteria + * @return SearchResults + */ + public function afterGetList(CustomerRepository $subject, SearchResults $searchResults, SearchCriteria $searchCriteria) + { + + foreach ($searchResults->getItems() as $customer) { + $extensionAttributes = $customer->getExtensionAttributes(); + + if ($extensionAttributes === null) { + /** @var CustomerExtensionInterface $extensionAttributes */ + $extensionAttributes = $this->extensionFactory->create(CustomerInterface::class); + $customer->setExtensionAttributes($extensionAttributes); + } + if ($extensionAttributes->getIsSubscribed() === null) { + $isSubscribed = $this->isSubscribed($customer); + $extensionAttributes->setIsSubscribed($isSubscribed); + } + } + + return $searchResults; + } + /** * This method returns newsletters subscription status for given customer. * From 8f5bfad585426b22a1fed43fe139bf615b8e2d57 Mon Sep 17 00:00:00 2001 From: Enrique Guadalupe Date: Sun, 27 Oct 2019 14:27:33 +0100 Subject: [PATCH 031/229] Add SuppressWarnings --- app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php b/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php index 3ed2ceb56700f..b6499fe05b4de 100644 --- a/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php +++ b/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php @@ -174,6 +174,7 @@ public function afterGetById(CustomerRepository $subject, CustomerInterface $cus * @param SearchResults $searchResults * @param SearchCriteria $searchCriteria * @return SearchResults + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetList(CustomerRepository $subject, SearchResults $searchResults, SearchCriteria $searchCriteria) { From 8b33f6925f8aebfe04bef9121ff642c88233efa0 Mon Sep 17 00:00:00 2001 From: Enrique Guadalupe Date: Sun, 27 Oct 2019 14:32:17 +0100 Subject: [PATCH 032/229] fix parameter & fix line limit --- .../Newsletter/Model/Plugin/CustomerPlugin.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php b/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php index b6499fe05b4de..1d1b37e4de2e7 100644 --- a/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php +++ b/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php @@ -6,13 +6,14 @@ namespace Magento\Newsletter\Model\Plugin; use Magento\Customer\Api\CustomerRepositoryInterface as CustomerRepository; +use Magento\Customer\Api\Data\CustomerExtensionInterface; use Magento\Customer\Api\Data\CustomerInterface; +use Magento\Framework\Api\ExtensionAttributesFactory; use Magento\Framework\Api\SearchCriteria; +use Magento\Framework\Api\SearchCriteriaInterface; use Magento\Framework\Api\SearchResults; -use Magento\Newsletter\Model\SubscriberFactory; -use Magento\Framework\Api\ExtensionAttributesFactory; use Magento\Newsletter\Model\ResourceModel\Subscriber; -use Magento\Customer\Api\Data\CustomerExtensionInterface; +use Magento\Newsletter\Model\SubscriberFactory; class CustomerPlugin { @@ -176,8 +177,11 @@ public function afterGetById(CustomerRepository $subject, CustomerInterface $cus * @return SearchResults * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function afterGetList(CustomerRepository $subject, SearchResults $searchResults, SearchCriteria $searchCriteria) - { + public function afterGetList( + CustomerRepository $subject, + SearchResults $searchResults, + SearchCriteriaInterface $searchCriteria + ) { foreach ($searchResults->getItems() as $customer) { $extensionAttributes = $customer->getExtensionAttributes(); From a4a2ff7d2444fe24bf13f022b9748ddb961a095c Mon Sep 17 00:00:00 2001 From: konarshankar07 Date: Tue, 29 Oct 2019 18:34:39 +0530 Subject: [PATCH 033/229] Fixed issue when esacpe key is pressed to close prompt --- .../Ui/view/base/web/js/modal/prompt.js | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js index 13b4d55ea2787..396497868e14f 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js @@ -11,10 +11,11 @@ define([ 'underscore', 'mage/template', 'text!ui/template/modal/modal-prompt-content.html', + 'Magento_Ui/js/lib/key-codes', 'jquery-ui-modules/widget', 'Magento_Ui/js/modal/modal', 'mage/translate' -], function ($, _, template, promptContentTmpl) { +], function ($, _, template, promptContentTmpl, keyCodes) { 'use strict'; $.widget('mage.prompt', $.mage.modal, { @@ -64,13 +65,31 @@ define([ click: function () { this.closeModal(true); } - }] + }], + keyEventHandlers: { + + /** + * Escape key press handler, + * close modal window + * @param {Object} event - event + */ + escapeKey: function (event) { + if (this.options.isOpen && this.modal.find(document.activeElement).length || + this.options.isOpen && this.modal[0] === document.activeElement) { + this._close(); + } + } + } }, /** * Create widget. */ _create: function () { + _.bindAll( + this, + 'keyEventSwitcher' + ); this.options.focus = this.options.promptField; this.options.validation = this.options.validation && this.options.validationRules.length; this._super(); @@ -118,6 +137,18 @@ define([ return formTemplate; }, + /** + * Listener key events. + * Call handler function if it exists + */ + keyEventSwitcher: function (event) { + var key = keyCodes[event.keyCode]; + + if (this.options.keyEventHandlers.hasOwnProperty(key)) { + this.options.keyEventHandlers[key].apply(this, arguments); + } + }, + /** * Remove widget */ @@ -177,3 +208,4 @@ define([ return $('
').html(config.content).prompt(config); }; }); + From c81605edfb9ad742327f30a91cac438da23fd2eb Mon Sep 17 00:00:00 2001 From: Chris Frewin Date: Tue, 29 Oct 2019 14:12:17 +0100 Subject: [PATCH 034/229] Always load ALL child products for a configurable product (set skipStockFilter to 'true') --- .../ConfigurableProduct/Model/Product/Type/Configurable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php b/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php index c60953e33e9eb..7637370752a0f 100644 --- a/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php +++ b/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php @@ -1300,7 +1300,7 @@ private function loadUsedProducts(\Magento\Catalog\Model\Product $product, $cach if (!$product->hasData($dataFieldName)) { $usedProducts = $this->readUsedProductsCacheData($cacheKey); if ($usedProducts === null) { - $collection = $this->getConfiguredUsedProductCollection($product, false); + $collection = $this->getConfiguredUsedProductCollection($product, true); if ($salableOnly) { $collection = $this->salableProcessor->process($collection); } From 44e1d532b8f59cc47334b8bd1ecfd0aadd14becd Mon Sep 17 00:00:00 2001 From: Chris Frewin Date: Tue, 29 Oct 2019 14:22:49 +0100 Subject: [PATCH 035/229] woops, have to create a seperate branch as this fix should be in a different pull request --- .../ConfigurableProduct/Model/Product/Type/Configurable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php b/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php index 7637370752a0f..c60953e33e9eb 100644 --- a/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php +++ b/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php @@ -1300,7 +1300,7 @@ private function loadUsedProducts(\Magento\Catalog\Model\Product $product, $cach if (!$product->hasData($dataFieldName)) { $usedProducts = $this->readUsedProductsCacheData($cacheKey); if ($usedProducts === null) { - $collection = $this->getConfiguredUsedProductCollection($product, true); + $collection = $this->getConfiguredUsedProductCollection($product, false); if ($salableOnly) { $collection = $this->salableProcessor->process($collection); } From 2596ca7de56a5175338230a7e54d4e8fda902851 Mon Sep 17 00:00:00 2001 From: korostii <24894168+korostii@users.noreply.github.com> Date: Wed, 30 Oct 2019 02:12:38 +0200 Subject: [PATCH 036/229] Fix #25243 --- app/code/Magento/Ui/view/frontend/web/js/model/messages.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/code/Magento/Ui/view/frontend/web/js/model/messages.js b/app/code/Magento/Ui/view/frontend/web/js/model/messages.js index fb9a20c054da2..f0680fe6eaae5 100644 --- a/app/code/Magento/Ui/view/frontend/web/js/model/messages.js +++ b/app/code/Magento/Ui/view/frontend/web/js/model/messages.js @@ -48,6 +48,10 @@ define([ message = messageObj.message.replace(expr, function (varName) { varName = varName.substr(1); + if (!isNaN(varName)) { + varName--; + } + if (messageObj.parameters.hasOwnProperty(varName)) { return messageObj.parameters[varName]; } From c42d48a44829ad91024e2c61f14fa9d5e9fe9731 Mon Sep 17 00:00:00 2001 From: konarshankar07 Date: Tue, 5 Nov 2019 23:59:31 +0530 Subject: [PATCH 037/229] Fixed static test --- app/code/Magento/Ui/view/base/web/js/modal/prompt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js index 396497868e14f..de7efe5103d5b 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js @@ -73,7 +73,7 @@ define([ * close modal window * @param {Object} event - event */ - escapeKey: function (event) { + escapeKey: function () { if (this.options.isOpen && this.modal.find(document.activeElement).length || this.options.isOpen && this.modal[0] === document.activeElement) { this._close(); From b8e0c42cba3db9a4b5005fe7e0d078891ad5b0ce Mon Sep 17 00:00:00 2001 From: Sergii Ivashchenko Date: Mon, 11 Nov 2019 12:01:21 +0000 Subject: [PATCH 038/229] magento/magento2#25349: Fixed static tests --- app/code/Magento/Ui/view/base/web/js/modal/prompt.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js index de7efe5103d5b..4a73a3454bc07 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js @@ -71,7 +71,6 @@ define([ /** * Escape key press handler, * close modal window - * @param {Object} event - event */ escapeKey: function () { if (this.options.isOpen && this.modal.find(document.activeElement).length || From d6995f7595363e896415f06c1228ffc2f2f719ff Mon Sep 17 00:00:00 2001 From: konarshankar07 Date: Thu, 14 Nov 2019 23:41:50 +0530 Subject: [PATCH 039/229] Fixed issue with prompt closed on pressing escape key instead of hiding --- app/code/Magento/Ui/view/base/web/js/modal/prompt.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js index de7efe5103d5b..8679ebd7de6cc 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js @@ -73,10 +73,10 @@ define([ * close modal window * @param {Object} event - event */ - escapeKey: function () { - if (this.options.isOpen && this.modal.find(document.activeElement).length || - this.options.isOpen && this.modal[0] === document.activeElement) { - this._close(); + escapeKey: function (event) { + if (this.modal.find(document.activeElement).length || + this.modal[0] === document.activeElement) { + this.closeModal(); } } } From 240fc19617589cecc528799824ad1b8378558dd4 Mon Sep 17 00:00:00 2001 From: konarshankar07 Date: Fri, 15 Nov 2019 00:24:14 +0530 Subject: [PATCH 040/229] Fixed static build test --- app/code/Magento/Ui/view/base/web/js/modal/prompt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js index 799f6323f0b87..0a03ea759d071 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js @@ -72,7 +72,7 @@ define([ * Escape key press handler, * close modal window */ - escapeKey: function (event) { + escapeKey: function () { if (this.modal.find(document.activeElement).length || this.modal[0] === document.activeElement) { this.closeModal(); From da6b3612ff51e52caf4bcf7dccf7690cd79d9cd4 Mon Sep 17 00:00:00 2001 From: konarshankar07 Date: Tue, 26 Nov 2019 22:37:53 +0530 Subject: [PATCH 041/229] Reverted changes fix for modal and fixed the e.stopImmediatePropagation issue --- .../Checkout/view/frontend/web/js/sidebar.js | 4 ++- .../Ui/view/base/web/js/modal/modal.js | 5 ++- .../Ui/view/base/web/js/modal/prompt.js | 31 +------------------ 3 files changed, 6 insertions(+), 34 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js index 6fc5ef9d2a574..0545ccf29248c 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js @@ -98,7 +98,9 @@ define([ /** @inheritdoc */ always: function (e) { - e.stopImmediatePropagation(); + if (e) { + e.stopImmediatePropagation(); + } } } }); diff --git a/app/code/Magento/Ui/view/base/web/js/modal/modal.js b/app/code/Magento/Ui/view/base/web/js/modal/modal.js index a8a76206bcd2b..b72e7bc49f2f0 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/modal.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/modal.js @@ -104,12 +104,11 @@ define([ /** * Escape key press handler, * close modal window - * @param {Object} event - event */ - escapeKey: function (event) { + escapeKey: function () { if (this.options.isOpen && this.modal.find(document.activeElement).length || this.options.isOpen && this.modal[0] === document.activeElement) { - this.closeModal(event); + this.closeModal(); } } } diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js index 0a03ea759d071..54a2b4a894df9 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js @@ -65,30 +65,13 @@ define([ click: function () { this.closeModal(true); } - }], - keyEventHandlers: { - - /** - * Escape key press handler, - * close modal window - */ - escapeKey: function () { - if (this.modal.find(document.activeElement).length || - this.modal[0] === document.activeElement) { - this.closeModal(); - } - } - } + }] }, /** * Create widget. */ _create: function () { - _.bindAll( - this, - 'keyEventSwitcher' - ); this.options.focus = this.options.promptField; this.options.validation = this.options.validation && this.options.validationRules.length; this._super(); @@ -136,18 +119,6 @@ define([ return formTemplate; }, - /** - * Listener key events. - * Call handler function if it exists - */ - keyEventSwitcher: function (event) { - var key = keyCodes[event.keyCode]; - - if (this.options.keyEventHandlers.hasOwnProperty(key)) { - this.options.keyEventHandlers[key].apply(this, arguments); - } - }, - /** * Remove widget */ From db51191275245123b84d772a80820454a2cb5631 Mon Sep 17 00:00:00 2001 From: konarshankar07 Date: Tue, 26 Nov 2019 23:53:33 +0530 Subject: [PATCH 042/229] Fixed static test --- app/code/Magento/Ui/view/base/web/js/modal/prompt.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js index 54a2b4a894df9..151ce2e4efca2 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js @@ -11,11 +11,10 @@ define([ 'underscore', 'mage/template', 'text!ui/template/modal/modal-prompt-content.html', - 'Magento_Ui/js/lib/key-codes', 'jquery-ui-modules/widget', 'Magento_Ui/js/modal/modal', 'mage/translate' -], function ($, _, template, promptContentTmpl, keyCodes) { +], function ($, _, template, promptContentTmpl) { 'use strict'; $.widget('mage.prompt', $.mage.modal, { From 14f95d96d8c785bc4148ba9c4a27d4e84187dcbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Bajsarowicz?= Date: Thu, 28 Nov 2019 22:48:59 +0100 Subject: [PATCH 043/229] REFACTOR: Extract Action Groups to separate files (according to MFTF best practices) --- .../AdminClearCustomersFiltersActionGroup.xml | 20 ++ ...CustomerWithWebSiteAndGroupActionGroup.xml | 34 ++++ ...omerWithWebsiteAndStoreViewActionGroup.xml | 24 --- ...CustomerAddressNoZipNoStateActionGroup.xml | 2 +- ...etDefaultShippingAndBillingActionGroup.xml | 2 +- ...inEditCustomerAddressesFromActionGroup.xml | 36 +--- .../AssertSignedUpNewsletterActionGroup.xml | 26 +++ .../ActionGroup/DeleteCustomerActionGroup.xml | 26 +-- .../DeleteCustomerByEmailActionGroup.xml | 34 ++++ .../DeleteCustomerFromAdminActionGroup.xml | 31 +++ .../EnterCustomerAddressInfoActionGroup.xml | 33 +++ ...ustomerAddressInfoFillStateActionGroup.xml | 18 ++ ...ditCustomerAddressFromAdminActionGroup.xml | 32 +++ .../OpenEditCustomerFromAdminActionGroup.xml | 53 ----- .../SaveRegistrationFormActionGroup.xml | 15 ++ ...stomerAddressAttributeValueActionGroup.xml | 24 +++ ...SignUpNewCustomerStorefrontActionGroup.xml | 19 ++ ...SignUpNewUserFromStorefrontActionGroup.xml | 189 ------------------ ...tAddCustomerDefaultAddressActionGroup.xml} | 22 -- ...efrontAddNewCustomerAddressActionGroup.xml | 32 +++ ...eCustomerSignedUpNewsletterActionGroup.xml | 31 +++ .../StorefrontCustomerLogoutActionGroup.xml | 11 - ...refrontFillRegistrationFormActionGroup.xml | 16 ++ ...enCustomerAccountCreatePageActionGroup.xml | 11 - ...eatePageUsingStoreCodeInUrlActionGroup.xml | 21 ++ .../StorefrontSignOutActionGroup.xml | 21 ++ ...erifyCustomerBillingAddressActionGroup.xml | 31 +++ ...omerBillingAddressWithStateActionGroup.xml | 31 +++ ...erifyCustomerNameOnFrontendActionGroup.xml | 27 +++ ...rifyCustomerShippingAddressActionGroup.xml | 30 +++ ...merShippingAddressWithStateActionGroup.xml | 31 +++ .../Mftf/Test/AdminUpdateCustomerTest.xml | 8 +- ...tomerAddressStateContainValuesOnceTest.xml | 2 +- ...StorefrontCheckTaxAddingValidVATIdTest.xml | 2 +- .../StorefrontDeleteCustomerAddressTest.xml | 2 +- ...efrontUpdateCustomerAddressBelgiumTest.xml | 6 +- ...orefrontUpdateCustomerAddressChinaTest.xml | 6 +- ...refrontUpdateCustomerAddressFranceTest.xml | 8 +- .../StorefrontUpdateCustomerAddressUKTest.xml | 10 +- ...pdateCustomerInformationAddAddressTest.xml | 10 +- ...ingCartBehaviorAfterSessionExpiredTest.xml | 2 +- .../Mftf/Test/StorefrontTaxQuoteCartTest.xml | 4 +- .../Test/StorefrontTaxQuoteCheckoutTest.xml | 4 +- 43 files changed, 593 insertions(+), 404 deletions(-) create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminClearCustomersFiltersActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCreateCustomerWithWebSiteAndGroupActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertSignedUpNewsletterActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/DeleteCustomerByEmailActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/DeleteCustomerFromAdminActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/EnterCustomerAddressInfoActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/EnterCustomerAddressInfoFillStateActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/OpenEditCustomerAddressFromAdminActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/SaveRegistrationFormActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/SelectDropdownCustomerAddressAttributeValueActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewCustomerStorefrontActionGroup.xml rename app/code/Magento/Customer/Test/Mftf/ActionGroup/{StorefrontAddCustomerAddressActionGroup.xml => StorefrontAddCustomerDefaultAddressActionGroup.xml} (57%) create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAddNewCustomerAddressActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCreateCustomerSignedUpNewsletterActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFillRegistrationFormActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontOpenCustomerAccountCreatePageUsingStoreCodeInUrlActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontSignOutActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerBillingAddressActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerBillingAddressWithStateActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerNameOnFrontendActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerShippingAddressActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerShippingAddressWithStateActionGroup.xml diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminClearCustomersFiltersActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminClearCustomersFiltersActionGroup.xml new file mode 100644 index 0000000000000..3ca41bb014d47 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminClearCustomersFiltersActionGroup.xml @@ -0,0 +1,20 @@ + + + + + + + Goes to the Admin Customers grid page. Clicks on 'Clear Filters'. + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCreateCustomerWithWebSiteAndGroupActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCreateCustomerWithWebSiteAndGroupActionGroup.xml new file mode 100644 index 0000000000000..fb4c1980fe975 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCreateCustomerWithWebSiteAndGroupActionGroup.xml @@ -0,0 +1,34 @@ + + + + + + + Goes to the Customer grid page. Click on 'Add New Customer'. Fills provided Customer Data. Fill provided Customer Address data. Assigns Product to Website and Store View. Clicks on Save. + + + + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCreateCustomerWithWebsiteAndStoreViewActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCreateCustomerWithWebsiteAndStoreViewActionGroup.xml index 9741d4e4133bf..5757f79a7ac61 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCreateCustomerWithWebsiteAndStoreViewActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCreateCustomerWithWebsiteAndStoreViewActionGroup.xml @@ -47,28 +47,4 @@ - - - - Goes to the Customer grid page. Click on 'Add New Customer'. Fills provided Customer Data. Fill provided Customer Address data. Assigns Product to Website and Store View. Clicks on Save. - - - - - - - - - - - - - - - - - - - - diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerAddressNoZipNoStateActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerAddressNoZipNoStateActionGroup.xml index 4c3660ac605a6..2ccef6f72e23f 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerAddressNoZipNoStateActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerAddressNoZipNoStateActionGroup.xml @@ -8,7 +8,7 @@ - + EXTENDS: AdminEditCustomerAddressesFrom. Removes 'selectState' and 'fillZipCode'. Clicks on 'Set Default' for Billing/Shipping. diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerAddressSetDefaultShippingAndBillingActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerAddressSetDefaultShippingAndBillingActionGroup.xml index 3551375c0e76b..e39800f8d9dd9 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerAddressSetDefaultShippingAndBillingActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerAddressSetDefaultShippingAndBillingActionGroup.xml @@ -8,7 +8,7 @@ - + EXTENDS: AdminEditCustomerAddressesFrom. Removes 'selectState' and 'fillZipCode'. diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerAddressesFromActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerAddressesFromActionGroup.xml index 8ac4779de7a9a..c2b41251c05b1 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerAddressesFromActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerAddressesFromActionGroup.xml @@ -9,7 +9,7 @@ - + Adds the provided Address to a Customer from the Admin Customers creation/edit page. @@ -34,38 +34,4 @@ - - - - EXTENDS: AdminEditCustomerAddressesFrom. Clicks on 'Set Default' for Billing/Shipping. - - - - - - - - - EXTENDS: AdminEditCustomerAddressesFrom. Removes 'selectState' and 'fillZipCode'. Clicks on 'Set Default' for Billing/Shipping. - - - - - - - - - - - Selects the provided Option in the provided Customer Address Attribute drop down menu. Clicks on Save. - - - - - - - - - - diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertSignedUpNewsletterActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertSignedUpNewsletterActionGroup.xml new file mode 100644 index 0000000000000..deabec7d671d6 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertSignedUpNewsletterActionGroup.xml @@ -0,0 +1,26 @@ + + + + + + + Validates that the provided Customer details are present and correct on the Storefront Customer Dashboard page. + + + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/DeleteCustomerActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/DeleteCustomerActionGroup.xml index 58777ec0d3515..9b856966d489e 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/DeleteCustomerActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/DeleteCustomerActionGroup.xml @@ -15,7 +15,7 @@ - + @@ -29,28 +29,4 @@ - - - - Goes to the Admin Customers grid page. Deletes a Customer based on the provided Email Address. - - - - - - - - - - - - - - - - - - - - diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/DeleteCustomerByEmailActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/DeleteCustomerByEmailActionGroup.xml new file mode 100644 index 0000000000000..5920596633f76 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/DeleteCustomerByEmailActionGroup.xml @@ -0,0 +1,34 @@ + + + + + + + Goes to the Admin Customers grid page. Deletes a Customer based on the provided Email Address. + + + + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/DeleteCustomerFromAdminActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/DeleteCustomerFromAdminActionGroup.xml new file mode 100644 index 0000000000000..04083f688b75d --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/DeleteCustomerFromAdminActionGroup.xml @@ -0,0 +1,31 @@ + + + + + + + Goes to the Admin Customers grid page. Deletes the provided Customer from the grid. Validates that the Success message is present and correct. + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/EnterCustomerAddressInfoActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/EnterCustomerAddressInfoActionGroup.xml new file mode 100644 index 0000000000000..c72010fe5c3bf --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/EnterCustomerAddressInfoActionGroup.xml @@ -0,0 +1,33 @@ + + + + + + + Fills in the provided Customer details (First/Last Name, Company, Phone # and Address) on the Admin Customer creation/edit page. Clicks on the Save button. + + + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/EnterCustomerAddressInfoFillStateActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/EnterCustomerAddressInfoFillStateActionGroup.xml new file mode 100644 index 0000000000000..891b578e54e6b --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/EnterCustomerAddressInfoFillStateActionGroup.xml @@ -0,0 +1,18 @@ + + + + + + + EXTENDS: EnterCustomerAddressInfo. Fills the State field. + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/OpenEditCustomerAddressFromAdminActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/OpenEditCustomerAddressFromAdminActionGroup.xml new file mode 100644 index 0000000000000..86ac1dc650bbc --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/OpenEditCustomerAddressFromAdminActionGroup.xml @@ -0,0 +1,32 @@ + + + + + + + Filters the Admin Customers Addresses based on the provided Address. Clicks on Edit. + + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/OpenEditCustomerFromAdminActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/OpenEditCustomerFromAdminActionGroup.xml index e338d1ae4bbd0..c9d5375d9b3d7 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/OpenEditCustomerFromAdminActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/OpenEditCustomerFromAdminActionGroup.xml @@ -26,57 +26,4 @@ - - - - Filters the Admin Customers Addresses based on the provided Address. Clicks on Edit. - - - - - - - - - - - - - - - - - - - - - - Goes to the Admin Customers grid page. Deletes the provided Customer from the grid. Validates that the Success message is present and correct. - - - - - - - - - - - - - - - - - - - - - Goes to the Admin Customers grid page. Clicks on 'Clear Filters'. - - - - - - diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/SaveRegistrationFormActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SaveRegistrationFormActionGroup.xml new file mode 100644 index 0000000000000..babef0fdd60d9 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SaveRegistrationFormActionGroup.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/SelectDropdownCustomerAddressAttributeValueActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SelectDropdownCustomerAddressAttributeValueActionGroup.xml new file mode 100644 index 0000000000000..5d0fb2e7b5c8d --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SelectDropdownCustomerAddressAttributeValueActionGroup.xml @@ -0,0 +1,24 @@ + + + + + + + Selects the provided Option in the provided Customer Address Attribute drop down menu. Clicks on Save. + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewCustomerStorefrontActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewCustomerStorefrontActionGroup.xml new file mode 100644 index 0000000000000..f994bafda73e0 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewCustomerStorefrontActionGroup.xml @@ -0,0 +1,19 @@ + + + + + + + EXTENDS: SignUpNewUserFromStorefrontActionGroup. Adds a waitForPageLoad action to the Action Group. Removes the action for 'seeThankYouMessage'. + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml index 44988b202ab57..10a671aab75cb 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml @@ -29,193 +29,4 @@ - - - - Goes to the Storefront. Clicks on 'Create Account'. Fills in the provided Customer details, including Newsletter Sign-Up. Clicks on 'Create Account' button. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Validates that the provided Customer details are present and correct on the Storefront Customer Dashboard page. - - - - - - - - - - - - - - - - Fills in the provided Customer details (First/Last Name, Company, Phone # and Address) on the Admin Customer creation/edit page. Clicks on the Save button. - - - - - - - - - - - - - - - - - - - - - - - - EXTENDS: EnterCustomerAddressInfo. Fills the State field. - - - - - - - - Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Billing Address is present and correct on the Storefront Customer Dashboard Address section. - - - - - - - - - - - - - - - - - - - - - Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Shipping Address is present and correct. - - - - - - - - - - - - - - - - - - - - Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Billing Address, including the State, is present and correct. - - - - - - - - - - - - - - - - - - - - - Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Shipping Address, including the State, is present and correct. - - - - - - - - - - - - - - - - - - - - - Goes to the Storefront Customer Dashboard page. Validates that the Customer First/Last Name is present and correct. - - - - - - - - - - - - - - - - - EXTENDS: SignUpNewUserFromStorefrontActionGroup. Adds a waitForPageLoad action to the Action Group. Removes the action for 'seeThankYouMessage'. - - - - - diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAddCustomerAddressActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAddCustomerDefaultAddressActionGroup.xml similarity index 57% rename from app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAddCustomerAddressActionGroup.xml rename to app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAddCustomerDefaultAddressActionGroup.xml index dc21ce5f52d73..ce26d14bb95f7 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAddCustomerAddressActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAddCustomerDefaultAddressActionGroup.xml @@ -8,28 +8,6 @@ - - - Goes to the Storefront Customer Add New Address page. Fills in the provided Address details. Clicks on Save. - - - - - - - - - - - - - - - - - - - Goes to the Storefront Customer Add New Default Address page. Fills in the provided Address details. Clicks on Save. diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAddNewCustomerAddressActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAddNewCustomerAddressActionGroup.xml new file mode 100644 index 0000000000000..358930070bc1b --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAddNewCustomerAddressActionGroup.xml @@ -0,0 +1,32 @@ + + + + + + + Goes to the Storefront Customer Add New Address page. Fills in the provided Address details. Clicks on Save. + + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCreateCustomerSignedUpNewsletterActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCreateCustomerSignedUpNewsletterActionGroup.xml new file mode 100644 index 0000000000000..22a90fca78cb2 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCreateCustomerSignedUpNewsletterActionGroup.xml @@ -0,0 +1,31 @@ + + + + + + + Goes to the Storefront. Clicks on 'Create Account'. Fills in the provided Customer details, including Newsletter Sign-Up. Clicks on 'Create Account' button. + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCustomerLogoutActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCustomerLogoutActionGroup.xml index ed221350918a0..bbe5fcbbf4038 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCustomerLogoutActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCustomerLogoutActionGroup.xml @@ -16,15 +16,4 @@ - - - - Clicks on Customer Account. Clicks on 'Sign-Out'. Validates that the success message is present and correct. PLEASE NOTE: The Success Message is hardcoded. - - - - - - - diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFillRegistrationFormActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFillRegistrationFormActionGroup.xml new file mode 100644 index 0000000000000..984d4f437aeb0 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontFillRegistrationFormActionGroup.xml @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontOpenCustomerAccountCreatePageActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontOpenCustomerAccountCreatePageActionGroup.xml index 31a988ac9da0d..b013b1db1c8e7 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontOpenCustomerAccountCreatePageActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontOpenCustomerAccountCreatePageActionGroup.xml @@ -16,15 +16,4 @@ - - - - Goes to the Storefront Customer Create page using Store code in URL option. - - - - - - - diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontOpenCustomerAccountCreatePageUsingStoreCodeInUrlActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontOpenCustomerAccountCreatePageUsingStoreCodeInUrlActionGroup.xml new file mode 100644 index 0000000000000..f095927c5be1b --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontOpenCustomerAccountCreatePageUsingStoreCodeInUrlActionGroup.xml @@ -0,0 +1,21 @@ + + + + + + + Goes to the Storefront Customer Create page using Store code in URL option. + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontSignOutActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontSignOutActionGroup.xml new file mode 100644 index 0000000000000..61c5f9ef7c66e --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontSignOutActionGroup.xml @@ -0,0 +1,21 @@ + + + + + + + Clicks on Customer Account. Clicks on 'Sign-Out'. Validates that the success message is present and correct. PLEASE NOTE: The Success Message is hardcoded. + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerBillingAddressActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerBillingAddressActionGroup.xml new file mode 100644 index 0000000000000..c439f7529993c --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerBillingAddressActionGroup.xml @@ -0,0 +1,31 @@ + + + + + + + Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Billing Address is present and correct on the Storefront Customer Dashboard Address section. + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerBillingAddressWithStateActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerBillingAddressWithStateActionGroup.xml new file mode 100644 index 0000000000000..7e46fcd7807db --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerBillingAddressWithStateActionGroup.xml @@ -0,0 +1,31 @@ + + + + + + + Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Billing Address, including the State, is present and correct. + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerNameOnFrontendActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerNameOnFrontendActionGroup.xml new file mode 100644 index 0000000000000..49ee62e5e86d2 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerNameOnFrontendActionGroup.xml @@ -0,0 +1,27 @@ + + + + + + + Goes to the Storefront Customer Dashboard page. Validates that the Customer First/Last Name is present and correct. + + + + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerShippingAddressActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerShippingAddressActionGroup.xml new file mode 100644 index 0000000000000..e6d07ef1afc63 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerShippingAddressActionGroup.xml @@ -0,0 +1,30 @@ + + + + + + + Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Shipping Address is present and correct. + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerShippingAddressWithStateActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerShippingAddressWithStateActionGroup.xml new file mode 100644 index 0000000000000..a90a05bead69c --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/VerifyCustomerShippingAddressWithStateActionGroup.xml @@ -0,0 +1,31 @@ + + + + + + + Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Shipping Address, including the State, is present and correct. + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest.xml index f58f23dee4235..010f03c9fc97f 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest.xml @@ -42,7 +42,7 @@ - + @@ -115,7 +115,7 @@ - + @@ -170,7 +170,7 @@ - + @@ -305,4 +305,4 @@ - \ No newline at end of file + diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressStateContainValuesOnceTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressStateContainValuesOnceTest.xml index daab5fd2061fb..88cdb32323d56 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressStateContainValuesOnceTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressStateContainValuesOnceTest.xml @@ -52,7 +52,7 @@ - + diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCheckTaxAddingValidVATIdTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCheckTaxAddingValidVATIdTest.xml index 8469126547eb1..4bf009ad7315d 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCheckTaxAddingValidVATIdTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCheckTaxAddingValidVATIdTest.xml @@ -72,7 +72,7 @@ - + diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml index 7a96616885468..fb08a07a7c319 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml @@ -27,7 +27,7 @@ - + diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressBelgiumTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressBelgiumTest.xml index d36d640c5ad17..1459a8e654c28 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressBelgiumTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressBelgiumTest.xml @@ -32,19 +32,19 @@ - + - + - + diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressChinaTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressChinaTest.xml index 285de8d777b48..d2398629b7f40 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressChinaTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressChinaTest.xml @@ -32,19 +32,19 @@ - + - + - + diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressFranceTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressFranceTest.xml index dae456c96a679..9e6e1ac0968fa 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressFranceTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressFranceTest.xml @@ -33,20 +33,20 @@ - + - + - + - \ No newline at end of file + diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressUKTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressUKTest.xml index 7b6e695aa8dc4..d6879761b10c3 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressUKTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressUKTest.xml @@ -33,25 +33,25 @@ - + - + - + - + - \ No newline at end of file + diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifyNoXssInjectionOnUpdateCustomerInformationAddAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifyNoXssInjectionOnUpdateCustomerInformationAddAddressTest.xml index e11404db9a9a9..feccf82d32b2f 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifyNoXssInjectionOnUpdateCustomerInformationAddAddressTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifyNoXssInjectionOnUpdateCustomerInformationAddAddressTest.xml @@ -33,25 +33,25 @@ - + - + - + - + - \ No newline at end of file + diff --git a/app/code/Magento/Persistent/Test/Mftf/Test/CheckShoppingCartBehaviorAfterSessionExpiredTest.xml b/app/code/Magento/Persistent/Test/Mftf/Test/CheckShoppingCartBehaviorAfterSessionExpiredTest.xml index c66a2979aa7f5..f8b132e58dd72 100644 --- a/app/code/Magento/Persistent/Test/Mftf/Test/CheckShoppingCartBehaviorAfterSessionExpiredTest.xml +++ b/app/code/Magento/Persistent/Test/Mftf/Test/CheckShoppingCartBehaviorAfterSessionExpiredTest.xml @@ -31,7 +31,7 @@ - + diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml index 05ced7e61b3b7..491db268c8914 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest.xml @@ -47,7 +47,7 @@ - + @@ -165,7 +165,7 @@ - + diff --git a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml index e7bf08257ea69..f9b9a3ad24da2 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCheckoutTest.xml @@ -151,7 +151,7 @@ - + @@ -386,7 +386,7 @@ - + From 3e25bd1385e9287f0ba5d5c6579a2f65ade3d2b4 Mon Sep 17 00:00:00 2001 From: konarshankar07 Date: Sat, 30 Nov 2019 09:32:50 +0530 Subject: [PATCH 044/229] Fixed always function issue --- app/code/Magento/Checkout/view/frontend/web/js/sidebar.js | 4 +--- app/code/Magento/Ui/view/base/web/js/modal/modal.js | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js index 0545ccf29248c..6fc5ef9d2a574 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js @@ -98,9 +98,7 @@ define([ /** @inheritdoc */ always: function (e) { - if (e) { - e.stopImmediatePropagation(); - } + e.stopImmediatePropagation(); } } }); diff --git a/app/code/Magento/Ui/view/base/web/js/modal/modal.js b/app/code/Magento/Ui/view/base/web/js/modal/modal.js index b72e7bc49f2f0..5a96184294571 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/modal.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/modal.js @@ -105,10 +105,10 @@ define([ * Escape key press handler, * close modal window */ - escapeKey: function () { + escapeKey: function (event) { if (this.options.isOpen && this.modal.find(document.activeElement).length || this.options.isOpen && this.modal[0] === document.activeElement) { - this.closeModal(); + this.closeModal(event); } } } @@ -177,7 +177,7 @@ define([ var key = keyCodes[event.keyCode]; if (this.options.keyEventHandlers.hasOwnProperty(key)) { - this.options.keyEventHandlers[key].apply(this, arguments); + this.options.keyEventHandlers[key].apply(this, arguments, event); } }, From 633ea172803d6d81b823f8791226bf1d0e516957 Mon Sep 17 00:00:00 2001 From: konarshankar07 Date: Tue, 3 Dec 2019 23:26:05 +0530 Subject: [PATCH 045/229] Added missing parameter description --- app/code/Magento/Ui/view/base/web/js/modal/modal.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/modal.js b/app/code/Magento/Ui/view/base/web/js/modal/modal.js index 5a96184294571..49abbb5c7d0b0 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/modal.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/modal.js @@ -104,6 +104,7 @@ define([ /** * Escape key press handler, * close modal window + * @param {Object} event - event */ escapeKey: function (event) { if (this.options.isOpen && this.modal.find(document.activeElement).length || From 1764aa8d357557ca5487ca211828e8c5e9e46137 Mon Sep 17 00:00:00 2001 From: "a.chorniy" Date: Wed, 4 Dec 2019 10:39:02 +0200 Subject: [PATCH 046/229] change tag name from to , to avoid unnecessary issue in exception.log --- .../Sales/view/frontend/templates/order/order_date.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/view/frontend/templates/order/order_date.phtml b/app/code/Magento/Sales/view/frontend/templates/order/order_date.phtml index 80a0ea02499cc..0cc899530e062 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/order_date.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/order_date.phtml @@ -5,5 +5,5 @@ */ ?>
- escapeHtml(__('Order Date: %1', '' . $block->formatDate($block->getOrder()->getCreatedAt(), \IntlDateFormatter::LONG) . ''), ['span', 'date']) ?> + escapeHtml(__('Order Date: %1', '' . $block->formatDate($block->getOrder()->getCreatedAt(), \IntlDateFormatter::LONG) . ''), ['span']) ?>
From 63582cd727fa8181daeae64f4de070f56de5630b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Bajsarowicz?= Date: Thu, 5 Dec 2019 00:15:47 +0100 Subject: [PATCH 047/229] BACKWARD COMPATIBILITY: Deprecated ActionGroups to make change Backward Compatible. --- .../ActionGroup/_Deprecated_ActionGroup.xml | 215 ++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml new file mode 100644 index 0000000000000..ddba404353656 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml @@ -0,0 +1,215 @@ + + + + + + + + Goes to the Customer grid page. Click on 'Add New Customer'. Fills provided Customer Data. Fill provided Customer Address data. Assigns Product to Website and Store View. Clicks on Save. + + + + + + + + + + + + + + + + + + + + + + + + + EXTENDS: AdminEditCustomerAddressesFrom. Clicks on 'Set Default' for Billing/Shipping. + + + + + + + + + + EXTENDS: AdminEditCustomerAddressesFrom. Removes 'selectState' and 'fillZipCode'. Clicks on 'Set Default' for Billing/Shipping. + + + + + + + + + + + + EXTENDS: AdminEditCustomerAddressesFrom. Removes 'selectState' and 'fillZipCode'. Clicks on 'Set Default' for Billing/Shipping. + + + + + + + + + + + + EXTENDS: AdminEditCustomerAddressesFrom. Removes 'selectState' and 'fillZipCode'. + + + + + + + + + + Fills in the provided Customer details (First/Last Name, Company, Phone # and Address) on the Admin Customer creation/edit page. Clicks on the Save button. + + + + + + + + + + + + + + + + + + + + + + + + + EXTENDS: EnterCustomerAddressInfo. Fills the State field. + + + + + + + + + Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Billing Address is present and correct on the Storefront Customer Dashboard Address section. + + + + + + + + + + + + + + + + + + + + + Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Shipping Address is present and correct. + + + + + + + + + + + + + + + + + + + + Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Billing Address, including the State, is present and correct. + + + + + + + + + + + + + + + + + + + + Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Shipping Address, including the State, is present and correct. + + + + + + + + + + + + + + + + + + + + Goes to the Storefront Customer Dashboard page. Validates that the Customer First/Last Name is present and correct. + + + + + + + + + + + + + + From 64b820df6a97a2a0b9cbe688f9552cd3e1fee797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Bajsarowicz?= Date: Thu, 5 Dec 2019 10:46:16 +0100 Subject: [PATCH 048/229] FIX: Duplicated entries for 2 Action Groups --- .../ActionGroup/_Deprecated_ActionGroup.xml | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml index ddba404353656..5ae521b3604cd 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml @@ -37,28 +37,6 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore
- - - EXTENDS: AdminEditCustomerAddressesFrom. Clicks on 'Set Default' for Billing/Shipping. - - - - - - - - - - EXTENDS: AdminEditCustomerAddressesFrom. Removes 'selectState' and 'fillZipCode'. Clicks on 'Set Default' for Billing/Shipping. - - - - - - - - - EXTENDS: AdminEditCustomerAddressesFrom. Removes 'selectState' and 'fillZipCode'. Clicks on 'Set Default' for Billing/Shipping. From 997959f2f081f844b798ccae31cc54fa0833ca60 Mon Sep 17 00:00:00 2001 From: konarshankar07 Date: Tue, 17 Dec 2019 20:48:02 +0530 Subject: [PATCH 049/229] Fixed prompt issue with latest updates --- app/code/Magento/Ui/view/base/web/js/modal/prompt.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js index 151ce2e4efca2..9e5df49e6e8b3 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js @@ -154,8 +154,7 @@ define([ */ closeModal: function (result) { var value; - - if (result) { + if (result && !(result instanceof $.Event)) { if (this.options.validation && !this.validate()) { return false; } From 423a4da934215f9a58ef96d0c37aa7f099a8a2ef Mon Sep 17 00:00:00 2001 From: Oleg Usik Date: Wed, 18 Dec 2019 10:53:06 +0200 Subject: [PATCH 050/229] Fixed issue 25910 choose drop down not close when open another --- app/code/Magento/Swatches/view/adminhtml/web/js/visual.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Swatches/view/adminhtml/web/js/visual.js b/app/code/Magento/Swatches/view/adminhtml/web/js/visual.js index b91fea59229cd..782dc2938a335 100644 --- a/app/code/Magento/Swatches/view/adminhtml/web/js/visual.js +++ b/app/code/Magento/Swatches/view/adminhtml/web/js/visual.js @@ -404,7 +404,10 @@ define([ * Toggle color upload chooser */ $(document).on('click', '.swatch_window', function () { - $(this).next('div').toggle(); + var currentElement = $(this).next('div'); + + jQuery('.swatch_sub-menu_container').not(currentElement).hide(); + currentElement.toggle(); }); }); }; From dca6730db6836614aea42d945a025a3e3fec461b Mon Sep 17 00:00:00 2001 From: "Rav [RedChamps]" Date: Thu, 2 Jan 2020 13:40:48 +0530 Subject: [PATCH 051/229] activated "Pending Reviews" menu item when merchant opens path 'Marketing > User Content > Pending Reviews' --- app/code/Magento/Review/Controller/Adminhtml/Product/Pending.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Review/Controller/Adminhtml/Product/Pending.php b/app/code/Magento/Review/Controller/Adminhtml/Product/Pending.php index 385b7e12bf32a..6e5e64b25985c 100644 --- a/app/code/Magento/Review/Controller/Adminhtml/Product/Pending.php +++ b/app/code/Magento/Review/Controller/Adminhtml/Product/Pending.php @@ -31,6 +31,7 @@ public function execute() } /** @var \Magento\Backend\Model\View\Result\Page $resultPage */ $resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE); + $resultPage->setActiveMenu('Magento_Review::catalog_reviews_ratings_pending'); $resultPage->getConfig()->getTitle()->prepend(__('Customer Reviews')); $resultPage->getConfig()->getTitle()->prepend(__('Pending Reviews')); $this->coreRegistry->register('usePendingFilter', true); From d5cb185e61b3cc3c49ccbdab9c412c5fe43b5036 Mon Sep 17 00:00:00 2001 From: "Rav [RedChamps]" Date: Mon, 6 Jan 2020 15:00:46 +0530 Subject: [PATCH 052/229] added functional test for the change --- .../Review/Test/Mftf/Data/AdminMenuData.xml | 5 +++ ...arketingPendingReviewsNavigateMenuTest.xml | 36 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 app/code/Magento/Review/Test/Mftf/Test/AdminMarketingPendingReviewsNavigateMenuTest.xml diff --git a/app/code/Magento/Review/Test/Mftf/Data/AdminMenuData.xml b/app/code/Magento/Review/Test/Mftf/Data/AdminMenuData.xml index 89882707f5ebd..5599baa0b5e07 100644 --- a/app/code/Magento/Review/Test/Mftf/Data/AdminMenuData.xml +++ b/app/code/Magento/Review/Test/Mftf/Data/AdminMenuData.xml @@ -13,6 +13,11 @@ Reviews magento-review-catalog-reviews-ratings-reviews-all + + Pending Reviews + Pending Reviews + magento-review-catalog-reviews-ratings-pending + Customer Reviews Report By Customers diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingPendingReviewsNavigateMenuTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingPendingReviewsNavigateMenuTest.xml new file mode 100644 index 0000000000000..265b27a3bcbe1 --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingPendingReviewsNavigateMenuTest.xml @@ -0,0 +1,36 @@ + + + + + + + + + + <description value="Admin should be able to navigate to Marketing > Pending Reviews"/> + <severity value="CRITICAL"/> + <testCaseId value="MC-14200"/> + <group value="menu"/> + <group value="mtf_migrated"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> + </before> + <after> + <actionGroup ref="logout" stepKey="logout"/> + </after> + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsViewsPage"> + <argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/> + <argument name="submenuUiId" value="{{AdminMenuUserContentPendingReviews.dataUiId}}"/> + </actionGroup> + <actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seePageTitle"> + <argument name="title" value="{{AdminMenuUserContentPendingReviews.pageTitle}}"/> + </actionGroup> + </test> +</tests> From aa1271bbb9b1a813b456dae46976ced5b479d71c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Bajsarowicz?= <lukasz.bajsarowicz@gmail.com> Date: Thu, 9 Jan 2020 14:42:49 +0100 Subject: [PATCH 053/229] REFACTOR: Extract Action Groups to separate files (MFTF best practices) --- .../ActionGroup/_Deprecated_ActionGroup.xml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 app/code/Magento/Backend/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml new file mode 100644 index 0000000000000..c2278d103a1ea --- /dev/null +++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.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="LoginAsAnyUserActionGroup"> + <arguments> + <argument name="uname" type="string" defaultValue="{{_ENV.MAGENTO_ADMIN_USERNAME}}"/> + <argument name="passwd" type="string" defaultValue="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> + </arguments> + <!-- This ActionGroup is deprecated. Use `LoginAdminWithCredentialsActionGroup` instead --> + <amOnPage url="{{_ENV.MAGENTO_BACKEND_NAME}}" stepKey="navigateToAdmin"/> + <fillField userInput="{{uname}}" selector="{{LoginFormSection.username}}" stepKey="fillUsername"/> + <fillField userInput="{{passwd}}" selector="{{LoginFormSection.password}}" stepKey="fillPassword"/> + <click selector="{{LoginFormSection.signIn}}" stepKey="clickLogin"/> + </actionGroup> +</actionGroups> From d013eff07517776415bab85953807ad87fbcd8a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Bajsarowicz?= <lukasz.bajsarowicz@gmail.com> Date: Mon, 13 Jan 2020 10:42:17 +0100 Subject: [PATCH 054/229] Code Review fix --- .../Backend/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml index c2278d103a1ea..b6daddd1a6216 100644 --- a/app/code/Magento/Backend/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml +++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml @@ -8,7 +8,7 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="LoginAsAnyUserActionGroup"> + <actionGroup name="LoginAsAnyUser"> <arguments> <argument name="uname" type="string" defaultValue="{{_ENV.MAGENTO_ADMIN_USERNAME}}"/> <argument name="passwd" type="string" defaultValue="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> From 2f5909e408ae977435540b260fbabbfa4462a062 Mon Sep 17 00:00:00 2001 From: akartavtsev <akartavcev@magecom.net> Date: Mon, 13 Jan 2020 12:54:13 +0200 Subject: [PATCH 055/229] Added tests for app/code/Magento/Ui/view/frontend/web/js/model/messages.js --- .../Ui/frontend/js/model/messages.test.js | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js new file mode 100644 index 0000000000000..eb618d2756db1 --- /dev/null +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js @@ -0,0 +1,128 @@ +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +define([ + 'ko', + 'uiRegistry', + 'Magento_Ui/js/model/messages' +], function (ko, registry, Constr) { + 'use strict'; + + describe('Magento_Ui/js/model/messages', function () { + var obj = new Constr({ + provider: 'provName', + name: '', + index: '' + }); + + registry.set('provName', { + /** Stub */ + on: function () { + }, + + /** Stub */ + get: function () { + }, + + /** Stub */ + set: function () { + } + }); + + describe('initialize method', function () { + it('check for existing', function () { + expect(obj).toBeDefined(); + }); + }); + + describe('add method', function () { + it('simple message', function () { + var messageObj = { + message: "Message test" + }, + type = [], + returnedObj = ["Message test"]; + expect(obj.add(messageObj, type)).toEqual(true); + expect(type).toEqual(returnedObj); + }); + + it('message with parameters', function () { + var messageObj = { + message: "Message test case %1, case %2 and case %3", + parameters: [ + "one", + "two", + 'three' + ] + }, + type = [], + returnedObj = ["Message test case " + messageObj.parameters[0] + ", case " + + messageObj.parameters[1] + " and case " + messageObj.parameters[2]]; + expect(obj.add(messageObj, type)).toEqual(true); + expect(type).toEqual(returnedObj); + }); + }); + + describe('check methods: hasMessages, addErrorMessage, getErrorMessages', function () { + it('hasMessages method before adding messages', function () { + expect(obj.hasMessages()).toEqual(false); + }); + + it('check addErrorMessage method', function () { + var messageObj = { + message: "Error message test" + }; + + expect(obj.addErrorMessage(messageObj)).toEqual(true); + }); + + it('check getErrorMessage method', function () { + var errorMessages = ko.observableArray(["Error message test"]); + + expect(obj.getErrorMessages()()).toEqual(errorMessages()); + }); + + + it('hasMessages method after adding Error messages', function () { + expect(obj.hasMessages()).toEqual(true); + }); + }); + + describe('check clean method for Error messages', function () { + it('check for cleaning messages', function () { + obj.clear(); + expect(obj.getErrorMessages()()).toEqual([]); + expect(obj.hasMessages()).toEqual(false); + }); + }); + + describe('check methods: hasMessages, addSuccessMessage, getSuccessMessages', function () { + it('check addSuccessMessage and getSuccessMessage', function () { + var messageObj = { + message: "Success message test" + }; + + expect(obj.addSuccessMessage(messageObj)).toEqual(true); + }); + + it('check method getSuccessMessage', function () { + var successMessages = ko.observableArray(["Success message test"]); + expect(obj.getSuccessMessages()()).toEqual(successMessages()); + }); + + it('hasMessages method after adding Success messages', function () { + expect(obj.hasMessages()).toEqual(true); + }); + }); + + describe('check clean method for Success messages', function () { + it('check for cleaning messages', function () { + obj.clear(); + expect(obj.getSuccessMessages()()).toEqual([]); + expect(obj.hasMessages()).toEqual(false); + }); + }); + }); +}); From d1b63cbb6b682597b0a725e672f10c1305ac643f Mon Sep 17 00:00:00 2001 From: akartavtsev <akartavcev@magecom.net> Date: Mon, 13 Jan 2020 12:58:28 +0200 Subject: [PATCH 056/229] Added tests for app/code/Magento/Ui/view/frontend/web/js/model/messages.js --- .../tests/app/code/Magento/Ui/frontend/js/model/messages.test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js index eb618d2756db1..d4acd143b773d 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js @@ -84,7 +84,6 @@ define([ expect(obj.getErrorMessages()()).toEqual(errorMessages()); }); - it('hasMessages method after adding Error messages', function () { expect(obj.hasMessages()).toEqual(true); }); From f08857bbb8950a154e67f71bb83f4a19dc341640 Mon Sep 17 00:00:00 2001 From: akartavtsev <akartavcev@magecom.net> Date: Mon, 13 Jan 2020 14:13:42 +0200 Subject: [PATCH 057/229] fixed syntax error --- .../Ui/frontend/js/model/messages.test.js | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js index d4acd143b773d..eb1de977ffefb 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js @@ -4,10 +4,9 @@ */ define([ - 'ko', 'uiRegistry', 'Magento_Ui/js/model/messages' -], function (ko, registry, Constr) { +], function (registry, Constr) { 'use strict'; describe('Magento_Ui/js/model/messages', function () { @@ -44,6 +43,7 @@ define([ }, type = [], returnedObj = ["Message test"]; + expect(obj.add(messageObj, type)).toEqual(true); expect(type).toEqual(returnedObj); }); @@ -60,28 +60,29 @@ define([ type = [], returnedObj = ["Message test case " + messageObj.parameters[0] + ", case " + messageObj.parameters[1] + " and case " + messageObj.parameters[2]]; + expect(obj.add(messageObj, type)).toEqual(true); expect(type).toEqual(returnedObj); }); }); describe('check methods: hasMessages, addErrorMessage, getErrorMessages', function () { + var errorMessageText = "Error message test"; + it('hasMessages method before adding messages', function () { expect(obj.hasMessages()).toEqual(false); }); it('check addErrorMessage method', function () { var messageObj = { - message: "Error message test" + message: errorMessageText }; expect(obj.addErrorMessage(messageObj)).toEqual(true); }); it('check getErrorMessage method', function () { - var errorMessages = ko.observableArray(["Error message test"]); - - expect(obj.getErrorMessages()()).toEqual(errorMessages()); + expect(obj.getErrorMessages()()).toEqual([errorMessageText]); }); it('hasMessages method after adding Error messages', function () { @@ -98,17 +99,18 @@ define([ }); describe('check methods: hasMessages, addSuccessMessage, getSuccessMessages', function () { + var successMessageText = "Success message test"; + it('check addSuccessMessage and getSuccessMessage', function () { var messageObj = { - message: "Success message test" + message: successMessageText }; expect(obj.addSuccessMessage(messageObj)).toEqual(true); }); it('check method getSuccessMessage', function () { - var successMessages = ko.observableArray(["Success message test"]); - expect(obj.getSuccessMessages()()).toEqual(successMessages()); + expect(obj.getSuccessMessages()()).toEqual([successMessageText]); }); it('hasMessages method after adding Success messages', function () { From 71ca4bb2bc4e490cc696849b5a943b186f5caa6b Mon Sep 17 00:00:00 2001 From: akartavtsev <akartavcev@magecom.net> Date: Mon, 13 Jan 2020 15:54:41 +0200 Subject: [PATCH 058/229] changed double quotes to single --- .../Ui/frontend/js/model/messages.test.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js index eb1de977ffefb..d2efbe0bac040 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js @@ -39,10 +39,10 @@ define([ describe('add method', function () { it('simple message', function () { var messageObj = { - message: "Message test" + message: 'Message test' }, type = [], - returnedObj = ["Message test"]; + returnedObj = ['Message test']; expect(obj.add(messageObj, type)).toEqual(true); expect(type).toEqual(returnedObj); @@ -50,16 +50,16 @@ define([ it('message with parameters', function () { var messageObj = { - message: "Message test case %1, case %2 and case %3", + message: 'Message test case %1, case %2 and case %3', parameters: [ - "one", - "two", + 'one', + 'two', 'three' ] }, type = [], - returnedObj = ["Message test case " + messageObj.parameters[0] + ", case " + - messageObj.parameters[1] + " and case " + messageObj.parameters[2]]; + returnedObj = ['Message test case ' + messageObj.parameters[0] + ', case ' + + messageObj.parameters[1] + ' and case ' + messageObj.parameters[2]]; expect(obj.add(messageObj, type)).toEqual(true); expect(type).toEqual(returnedObj); @@ -67,7 +67,7 @@ define([ }); describe('check methods: hasMessages, addErrorMessage, getErrorMessages', function () { - var errorMessageText = "Error message test"; + var errorMessageText = 'Error message test'; it('hasMessages method before adding messages', function () { expect(obj.hasMessages()).toEqual(false); @@ -99,7 +99,7 @@ define([ }); describe('check methods: hasMessages, addSuccessMessage, getSuccessMessages', function () { - var successMessageText = "Success message test"; + var successMessageText = 'Success message test'; it('check addSuccessMessage and getSuccessMessage', function () { var messageObj = { From 65b2afeeea0801291a924eb64618650faa8d2e93 Mon Sep 17 00:00:00 2001 From: konarshankar07 <konar.shankar2013@gmail.com> Date: Sun, 26 Jan 2020 11:14:54 +0530 Subject: [PATCH 059/229] Feedback changes --- app/code/Magento/Ui/view/base/web/js/modal/modal.js | 4 ++-- app/code/Magento/Ui/view/base/web/js/modal/prompt.js | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/modal.js b/app/code/Magento/Ui/view/base/web/js/modal/modal.js index fcfb86877663c..79dee43ada257 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/modal.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/modal.js @@ -182,7 +182,7 @@ define([ var key = keyCodes[event.keyCode]; if (this.options.keyEventHandlers.hasOwnProperty(key)) { - this.options.keyEventHandlers[key].apply(this, arguments, event); + this.options.keyEventHandlers[key].apply(this, arguments); } }, @@ -308,7 +308,7 @@ define([ * Close modal. * * @return {Element} - current element. */ - closeModal: function () { + closeModal: function (event, result) { var that = this; this._removeKeyListener(); diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js index 9e5df49e6e8b3..3b0485903424b 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js @@ -51,8 +51,8 @@ define([ /** * Click handler. */ - click: function () { - this.closeModal(); + click: function (event) { + this.closeModal(event); } }, { text: $.mage.__('OK'), @@ -61,8 +61,8 @@ define([ /** * Click handler. */ - click: function () { - this.closeModal(true); + click: function (event) { + this.closeModal(event); } }] }, @@ -152,7 +152,7 @@ define([ /** * Close modal window */ - closeModal: function (result) { + closeModal: function (event, result) { var value; if (result && !(result instanceof $.Event)) { if (this.options.validation && !this.validate()) { From 346e544911827c379bdfed10f29ea40889d57078 Mon Sep 17 00:00:00 2001 From: Tobias Nilsson <tobias.nilsson@evalent.com> Date: Mon, 27 Jan 2020 11:19:27 +0100 Subject: [PATCH 060/229] issue/26384 Fix store switcher when using different base url on stores --- .../Magento/Store/Controller/Store/Redirect.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Store/Controller/Store/Redirect.php b/app/code/Magento/Store/Controller/Store/Redirect.php index 8f63a43f5db7c..c0488cc1698fc 100644 --- a/app/code/Magento/Store/Controller/Store/Redirect.php +++ b/app/code/Magento/Store/Controller/Store/Redirect.php @@ -15,6 +15,7 @@ use Magento\Store\Api\StoreRepositoryInterface; use Magento\Store\Api\StoreResolverInterface; use Magento\Store\Model\Store; +use Magento\Store\Model\StoreManagerInterface; use Magento\Store\Model\StoreResolver; use Magento\Store\Model\StoreSwitcher\HashGenerator; @@ -38,6 +39,11 @@ class Redirect extends Action implements HttpGetActionInterface, HttpPostActionI */ private $hashGenerator; + /** + * @var \Magento\Store\Model\StoreManagerInterface + */ + private $storeManager; + /** * @param Context $context * @param StoreRepositoryInterface $storeRepository @@ -45,6 +51,7 @@ class Redirect extends Action implements HttpGetActionInterface, HttpPostActionI * @param \Magento\Framework\Session\Generic $session * @param \Magento\Framework\Session\SidResolverInterface $sidResolver * @param HashGenerator $hashGenerator + * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( @@ -53,12 +60,14 @@ public function __construct( StoreResolverInterface $storeResolver, \Magento\Framework\Session\Generic $session, \Magento\Framework\Session\SidResolverInterface $sidResolver, - HashGenerator $hashGenerator + HashGenerator $hashGenerator, + StoreManagerInterface $storeManager ) { parent::__construct($context); $this->storeRepository = $storeRepository; $this->storeResolver = $storeResolver; $this->hashGenerator = $hashGenerator; + $this->storeManager = $storeManager; } /** @@ -81,6 +90,8 @@ public function execute() try { /** @var Store $fromStore */ $fromStore = $this->storeRepository->get($fromStoreCode); + /** @var Store $targetStore */ + $targetStore = $this->storeRepository->get($targetStoreCode); } catch (NoSuchEntityException $e) { $error = __('Requested store is not found'); } @@ -104,6 +115,7 @@ public function execute() '_nosid' => true, '_query' => $query ]; + $this->storeManager->setCurrentStore($targetStore); $this->_redirect->redirect($this->_response, 'stores/store/switch', $arguments); } From df2615a2891f2bfbe3da4ef2ef1da08e93670897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Bajsarowicz?= <lukasz.bajsarowicz@gmail.com> Date: Sun, 19 Jan 2020 12:19:52 +0100 Subject: [PATCH 061/229] #16268 Amends to adopted branch --- .../Magento/Backend/App/AbstractAction.php | 252 ++++++++++-------- .../App/Action/Plugin/LoadDesignPlugin.php | 46 ++++ app/code/Magento/Backend/etc/adminhtml/di.xml | 5 +- ...CheckUserForgotPasswordBackendObserver.php | 63 +++-- .../Model/App/Action/ContextPlugin.php | 4 +- .../Model/Plugin/CustomerNotification.php | 27 +- app/code/Magento/Customer/Model/Visitor.php | 138 +++++----- .../Model/App/Action/ContextPluginTest.php | 32 ++- .../Model/Plugin/CustomerNotificationTest.php | 132 +++++---- .../Customer/Test/Unit/Model/VisitorTest.php | 101 +++---- .../Store/App/Action/Plugin/StoreCheck.php | 20 +- .../Unit/App/Action/Plugin/StoreCheckTest.php | 24 +- .../Tax/Model/App/Action/ContextPlugin.php | 56 ++-- .../Unit/App/Action/ContextPluginTest.php | 66 +++-- .../Theme/Model/Theme/Plugin/Registration.php | 12 +- .../Model/Theme/Plugin/RegistrationTest.php | 112 +++++--- .../Weee/Model/App/Action/ContextPlugin.php | 100 +++---- .../Unit/App/Action/ContextPluginTest.php | 126 +++++---- .../Directpost/Payment/PlaceTest.php | 73 +++-- .../Framework/App/ControllerActionTest.php | 29 +- .../InheritanceBasedBackendAction.php | 20 +- .../InheritanceBasedFrontendAction.php | 25 +- .../TestStubs/InterfaceOnlyBackendAction.php | 18 +- .../TestStubs/InterfaceOnlyFrontendAction.php | 23 +- .../Magento/Framework/App/Action/Action.php | 41 +-- .../Plugin/ActionFlagNoDispatchPlugin.php | 12 +- .../Framework/App/Action/Plugin/Design.php | 29 +- .../App/Action/Plugin/EventDispatchPlugin.php | 20 +- .../App/Test/Unit/Action/ActionTest.php | 77 +++--- 29 files changed, 1010 insertions(+), 673 deletions(-) create mode 100644 app/code/Magento/Backend/App/Action/Plugin/LoadDesignPlugin.php diff --git a/app/code/Magento/Backend/App/AbstractAction.php b/app/code/Magento/Backend/App/AbstractAction.php index fb2daa283f111..583fc723cc38b 100644 --- a/app/code/Magento/Backend/App/AbstractAction.php +++ b/app/code/Magento/Backend/App/AbstractAction.php @@ -3,11 +3,24 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Backend\App; +use Magento\Backend\App\Action\Context; +use Magento\Backend\Helper\Data as BackendHelper; +use Magento\Backend\Model\Auth; +use Magento\Backend\Model\Session; +use Magento\Backend\Model\UrlInterface; +use Magento\Framework\App\RequestInterface; +use Magento\Framework\AuthorizationInterface; +use Magento\Framework\Data\Form\FormKey\Validator as FormKeyValidator; +use Magento\Framework\Locale\ResolverInterface; +use Magento\Framework\View\Element\AbstractBlock; + /** * Generic backend controller * + * phpcs:disable Magento2.Classes.AbstractApi * @api * @SuppressWarnings(PHPMD.NumberOfChildren) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -45,32 +58,32 @@ abstract class AbstractAction extends \Magento\Framework\App\Action\Action protected $_sessionNamespace = self::SESSION_NAMESPACE; /** - * @var \Magento\Backend\Helper\Data + * @var BackendHelper */ protected $_helper; /** - * @var \Magento\Backend\Model\Session + * @var Session */ protected $_session; /** - * @var \Magento\Framework\AuthorizationInterface + * @var AuthorizationInterface */ protected $_authorization; /** - * @var \Magento\Backend\Model\Auth + * @var Auth */ protected $_auth; /** - * @var \Magento\Backend\Model\UrlInterface + * @var UrlInterface */ protected $_backendUrl; /** - * @var \Magento\Framework\Locale\ResolverInterface + * @var ResolverInterface */ protected $_localeResolver; @@ -80,14 +93,14 @@ abstract class AbstractAction extends \Magento\Framework\App\Action\Action protected $_canUseBaseUrl; /** - * @var \Magento\Framework\Data\Form\FormKey\Validator + * @var FormKeyValidator */ protected $_formKeyValidator; /** - * @param \Magento\Backend\App\Action\Context $context + * @param Context $context */ - public function __construct(Action\Context $context) + public function __construct(Context $context) { parent::__construct($context); $this->_authorization = $context->getAuthorization(); @@ -101,6 +114,95 @@ public function __construct(Action\Context $context) } /** + * Dispatches the Action + * + * @param RequestInterface $request + * @return \Magento\Framework\App\ResponseInterface + */ + public function dispatch(RequestInterface $request) + { + if ($request->isDispatched() && $request->getActionName() !== 'denied' && !$this->_isAllowed()) { + $this->_response->setStatusHeader(403, '1.1', 'Forbidden'); + if (!$this->_auth->isLoggedIn()) { + return $this->_redirect('*/auth/login'); + } + + $this->_view->loadLayout(['default', 'adminhtml_denied'], true, true, false); + $this->_view->renderLayout(); + $this->_request->setDispatched(true); + + return $this->_response; + } + + if ($this->_isUrlChecked()) { + $this->_actionFlag->set('', self::FLAG_IS_URLS_CHECKED, true); + } + + $this->_processLocaleSettings(); + + // Need to preload isFirstPageAfterLogin (see https://github.com/magento/magento2/issues/15510) + if ($this->_auth->isLoggedIn()) { + $this->_auth->getAuthStorage()->isFirstPageAfterLogin(); + } + + return parent::dispatch($request); + } + + /** + * Check url keys. If non valid - redirect + * + * @return bool + * + * @see \Magento\Backend\App\Request\BackendValidator for default request validation. + */ + public function _processUrlKeys() + { + $_isValidFormKey = true; + $_isValidSecretKey = true; + $_keyErrorMsg = ''; + if ($this->_auth->isLoggedIn()) { + if ($this->getRequest()->isPost()) { + $_isValidFormKey = $this->_formKeyValidator->validate($this->getRequest()); + $_keyErrorMsg = __('Invalid Form Key. Please refresh the page.'); + } elseif ($this->_backendUrl->useSecretKey()) { + $_isValidSecretKey = $this->_validateSecretKey(); + $_keyErrorMsg = __('You entered an invalid Secret Key. Please refresh the page.'); + } + } + if (!$_isValidFormKey || !$_isValidSecretKey) { + $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); + $this->_actionFlag->set('', self::FLAG_NO_POST_DISPATCH, true); + if ($this->getRequest()->getQuery('isAjax', false) || $this->getRequest()->getQuery('ajax', false)) { + $this->getResponse()->representJson( + $this->_objectManager->get( + \Magento\Framework\Json\Helper\Data::class + )->jsonEncode( + ['error' => true, 'message' => $_keyErrorMsg] + ) + ); + } else { + $this->_redirect($this->_backendUrl->getStartupPageUrl()); + } + return false; + } + return true; + } + + /** + * Generate url by route and parameters + * + * @param string $route + * @param array $params + * @return string + */ + public function getUrl($route = '', $params = []) + { + return $this->_helper->getUrl($route, $params); + } + + /** + * Determines whether current user is allowed to access Action + * * @return bool */ protected function _isAllowed() @@ -119,6 +221,8 @@ protected function _getSession() } /** + * Returns instantiated Message\ManagerInterface. + * * @return \Magento\Framework\Message\ManagerInterface */ protected function getMessageManager() @@ -146,6 +250,8 @@ protected function _setActiveMenu($itemId) } /** + * Adds element to Breadcrumbs block + * * @param string $label * @param string $title * @param string|null $link @@ -158,79 +264,51 @@ protected function _addBreadcrumb($label, $title, $link = null) } /** - * @param \Magento\Framework\View\Element\AbstractBlock $block + * Adds block to `content` block + * + * @param AbstractBlock $block * @return $this */ - protected function _addContent(\Magento\Framework\View\Element\AbstractBlock $block) + protected function _addContent(AbstractBlock $block) { return $this->_moveBlockToContainer($block, 'content'); } /** - * @param \Magento\Framework\View\Element\AbstractBlock $block + * Moves Block to `left` container + * + * @param AbstractBlock $block * @return $this */ - protected function _addLeft(\Magento\Framework\View\Element\AbstractBlock $block) + protected function _addLeft(AbstractBlock $block) { return $this->_moveBlockToContainer($block, 'left'); } /** - * @param \Magento\Framework\View\Element\AbstractBlock $block + * Adds Block to `js` container + * + * @param AbstractBlock $block * @return $this */ - protected function _addJs(\Magento\Framework\View\Element\AbstractBlock $block) + protected function _addJs(AbstractBlock $block) { return $this->_moveBlockToContainer($block, 'js'); } /** - * Set specified block as an anonymous child to specified container - * - * The block will be moved to the container from previous parent after all other elements + * Set specified block as an anonymous child to specified container. * - * @param \Magento\Framework\View\Element\AbstractBlock $block + * @param AbstractBlock $block * @param string $containerName * @return $this */ - private function _moveBlockToContainer(\Magento\Framework\View\Element\AbstractBlock $block, $containerName) + private function _moveBlockToContainer(AbstractBlock $block, $containerName) { $this->_view->getLayout()->setChild($containerName, $block->getNameInLayout(), ''); return $this; } - /** - * @param \Magento\Framework\App\RequestInterface $request - * @return \Magento\Framework\App\ResponseInterface - */ - public function dispatch(\Magento\Framework\App\RequestInterface $request) - { - if ($request->isDispatched() && $request->getActionName() !== 'denied' && !$this->_isAllowed()) { - $this->_response->setStatusHeader(403, '1.1', 'Forbidden'); - if (!$this->_auth->isLoggedIn()) { - return $this->_redirect('*/auth/login'); - } - $this->_view->loadLayout(['default', 'adminhtml_denied'], true, true, false); - $this->_view->renderLayout(); - $this->_request->setDispatched(true); - - return $this->_response; - } - - if ($this->_isUrlChecked()) { - $this->_actionFlag->set('', self::FLAG_IS_URLS_CHECKED, true); - } - - $this->_processLocaleSettings(); - - // Need to preload isFirstPageAfterLogin (see https://github.com/magento/magento2/issues/15510) - if ($this->_auth->isLoggedIn()) { - $this->_auth->getAuthStorage()->isFirstPageAfterLogin(); - } - - return parent::dispatch($request); - } - /** * Check whether url is checked * @@ -239,55 +317,13 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request) protected function _isUrlChecked() { return !$this->_actionFlag->get('', self::FLAG_IS_URLS_CHECKED) - && !$this->getRequest()->isForwarded() - && !$this->_getSession()->getIsUrlNotice(true) - && !$this->_canUseBaseUrl; + && !$this->getRequest()->isForwarded() + && !$this->_getSession()->getIsUrlNotice(true) + && !$this->_canUseBaseUrl; } /** - * Check url keys. If non valid - redirect - * - * @return bool - * - * @see \Magento\Backend\App\Request\BackendValidator for default - * request validation. - */ - public function _processUrlKeys() - { - $_isValidFormKey = true; - $_isValidSecretKey = true; - $_keyErrorMsg = ''; - if ($this->_auth->isLoggedIn()) { - if ($this->getRequest()->isPost()) { - $_isValidFormKey = $this->_formKeyValidator->validate($this->getRequest()); - $_keyErrorMsg = __('Invalid Form Key. Please refresh the page.'); - } elseif ($this->_backendUrl->useSecretKey()) { - $_isValidSecretKey = $this->_validateSecretKey(); - $_keyErrorMsg = __('You entered an invalid Secret Key. Please refresh the page.'); - } - } - if (!$_isValidFormKey || !$_isValidSecretKey) { - $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); - $this->_actionFlag->set('', self::FLAG_NO_POST_DISPATCH, true); - if ($this->getRequest()->getQuery('isAjax', false) || $this->getRequest()->getQuery('ajax', false)) { - $this->getResponse()->representJson( - $this->_objectManager->get( - \Magento\Framework\Json\Helper\Data::class - )->jsonEncode( - ['error' => true, 'message' => $_keyErrorMsg] - ) - ); - } else { - $this->_redirect($this->_backendUrl->getStartupPageUrl()); - } - return false; - } - return true; - } - - /** - * Set session locale, - * process force locale set through url params + * Set session locale, process force locale set through url params * * @return $this */ @@ -309,8 +345,8 @@ protected function _processLocaleSettings() * Set redirect into response * * @TODO MAGETWO-28356: Refactor controller actions to new ResultInterface - * @param string $path - * @param array $arguments + * @param string $path + * @param array $arguments * @return \Magento\Framework\App\ResponseInterface */ protected function _redirect($path, $arguments = []) @@ -333,19 +369,7 @@ protected function _redirect($path, $arguments = []) protected function _forward($action, $controller = null, $module = null, array $params = null) { $this->_getSession()->setIsUrlNotice($this->_actionFlag->get('', self::FLAG_IS_URLS_CHECKED)); - return parent::_forward($action, $controller, $module, $params); - } - - /** - * Generate url by route and parameters - * - * @param string $route - * @param array $params - * @return string - */ - public function getUrl($route = '', $params = []) - { - return $this->_helper->getUrl($route, $params); + parent::_forward($action, $controller, $module, $params); } /** @@ -359,7 +383,7 @@ protected function _validateSecretKey() return true; } - $secretKey = $this->getRequest()->getParam(\Magento\Backend\Model\UrlInterface::SECRET_KEY_PARAM_NAME, null); + $secretKey = $this->getRequest()->getParam(UrlInterface::SECRET_KEY_PARAM_NAME, null); if (!$secretKey || $secretKey != $this->_backendUrl->getSecretKey()) { return false; } diff --git a/app/code/Magento/Backend/App/Action/Plugin/LoadDesignPlugin.php b/app/code/Magento/Backend/App/Action/Plugin/LoadDesignPlugin.php new file mode 100644 index 0000000000000..1dee1e60b22cb --- /dev/null +++ b/app/code/Magento/Backend/App/Action/Plugin/LoadDesignPlugin.php @@ -0,0 +1,46 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Backend\App\Action\Plugin; + +use Magento\Backend\App\AbstractAction; +use Magento\Framework\View\DesignLoader; + +/** + * Workaround to load Design before Backend Action dispatch. + * + * @FIXME Remove when \Magento\Backend\App\AbstractAction::dispatch refactored. + */ +class LoadDesignPlugin +{ + /** + * @var DesignLoader + */ + private $designLoader; + + /** + * @param DesignLoader $designLoader + */ + public function __construct(DesignLoader $designLoader) + { + $this->designLoader = $designLoader; + } + + /** + * Initiates design before dispatching Backend Actions. + * + * @param AbstractAction $backendAction + * @param array $args + * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function beforeDispatch(AbstractAction $backendAction, ...$args) + { + $this->designLoader->load(); + return $args; + } +} diff --git a/app/code/Magento/Backend/etc/adminhtml/di.xml b/app/code/Magento/Backend/etc/adminhtml/di.xml index 5f566396ab500..e39dbeb5f6680 100644 --- a/app/code/Magento/Backend/etc/adminhtml/di.xml +++ b/app/code/Magento/Backend/etc/adminhtml/di.xml @@ -60,8 +60,9 @@ </arguments> </type> <type name="Magento\Backend\App\AbstractAction"> - <plugin name="adminAuthentication" type="Magento\Backend\App\Action\Plugin\Authentication" sortOrder="100" /> - <plugin name="adminMassactionKey" type="Magento\Backend\App\Action\Plugin\MassactionKey" sortOrder="11" /> + <plugin name="adminAuthentication" type="Magento\Backend\App\Action\Plugin\Authentication" sortOrder="100"/> + <plugin name="adminMassactionKey" type="Magento\Backend\App\Action\Plugin\MassactionKey" sortOrder="11"/> + <plugin name="adminLoadDesign" type="Magento\Backend\App\Action\Plugin\LoadDesignPlugin"/> </type> <type name="Magento\Store\App\Response\Redirect"> <arguments> diff --git a/app/code/Magento/Captcha/Observer/CheckUserForgotPasswordBackendObserver.php b/app/code/Magento/Captcha/Observer/CheckUserForgotPasswordBackendObserver.php index e11e48a527169..21d7e2f1993b7 100644 --- a/app/code/Magento/Captcha/Observer/CheckUserForgotPasswordBackendObserver.php +++ b/app/code/Magento/Captcha/Observer/CheckUserForgotPasswordBackendObserver.php @@ -3,19 +3,28 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Captcha\Observer; +use Magento\Captcha\Helper\Data as CaptchaHelper; +use Magento\Framework\App\Action\Action; +use Magento\Framework\App\ActionFlag; +use Magento\Framework\App\ObjectManager; +use Magento\Framework\App\RequestInterface; +use Magento\Framework\Event\Observer as Event; use Magento\Framework\Event\ObserverInterface; +use Magento\Framework\Message\ManagerInterface; +use Magento\Framework\Session\SessionManagerInterface; /** - * Class CheckUserForgotPasswordBackendObserver + * Handle request for Forgot Password * * @SuppressWarnings(PHPMD.CookieAndSessionMisuse) */ class CheckUserForgotPasswordBackendObserver implements ObserverInterface { /** - * @var \Magento\Captcha\Helper\Data + * @var CaptchaHelper */ protected $_helper; @@ -25,62 +34,70 @@ class CheckUserForgotPasswordBackendObserver implements ObserverInterface protected $captchaStringResolver; /** - * @var \Magento\Framework\Session\SessionManagerInterface + * @var SessionManagerInterface */ protected $_session; /** - * @var \Magento\Framework\App\ActionFlag + * @var ActionFlag */ protected $_actionFlag; /** - * @var \Magento\Framework\Message\ManagerInterface + * @var ManagerInterface */ protected $messageManager; /** - * @param \Magento\Captcha\Helper\Data $helper + * @var RequestInterface + */ + private $request; + + /** + * @param CaptchaHelper $helper * @param CaptchaStringResolver $captchaStringResolver - * @param \Magento\Framework\Session\SessionManagerInterface $session - * @param \Magento\Framework\App\ActionFlag $actionFlag - * @param \Magento\Framework\Message\ManagerInterface $messageManager + * @param SessionManagerInterface $session + * @param ActionFlag $actionFlag + * @param ManagerInterface $messageManager + * @param RequestInterface|null $request */ public function __construct( - \Magento\Captcha\Helper\Data $helper, + CaptchaHelper $helper, CaptchaStringResolver $captchaStringResolver, - \Magento\Framework\Session\SessionManagerInterface $session, - \Magento\Framework\App\ActionFlag $actionFlag, - \Magento\Framework\Message\ManagerInterface $messageManager + SessionManagerInterface $session, + ActionFlag $actionFlag, + ManagerInterface $messageManager, + RequestInterface $request = null ) { $this->_helper = $helper; $this->captchaStringResolver = $captchaStringResolver; $this->_session = $session; $this->_actionFlag = $actionFlag; $this->messageManager = $messageManager; + $this->request = $request ?? ObjectManager::getInstance()->get(RequestInterface::class); } /** * Check Captcha On User Login Backend Page * - * @param \Magento\Framework\Event\Observer $observer - * @throws \Magento\Framework\Exception\Plugin\AuthenticationException + * @param Event $observer * @return $this + * @throws \Magento\Framework\Exception\Plugin\AuthenticationException */ - public function execute(\Magento\Framework\Event\Observer $observer) + public function execute(Event $observer) { $formId = 'backend_forgotpassword'; $captchaModel = $this->_helper->getCaptcha($formId); $controller = $observer->getControllerAction(); - $email = (string)$observer->getControllerAction()->getRequest()->getParam('email'); - $params = $observer->getControllerAction()->getRequest()->getParams(); - if (!empty($email) - && !empty($params) + $params = $this->request->getParams(); + $email = (string)$this->request->getParam('email'); + if (!empty($params) + && !empty($email) && $captchaModel->isRequired() - && !$captchaModel->isCorrect($this->captchaStringResolver->resolve($controller->getRequest(), $formId)) + && !$captchaModel->isCorrect($this->captchaStringResolver->resolve($this->request, $formId)) ) { - $this->_session->setEmail((string)$controller->getRequest()->getPost('email')); - $this->_actionFlag->set('', \Magento\Framework\App\Action\Action::FLAG_NO_DISPATCH, true); + $this->_session->setEmail($email); + $this->_actionFlag->set('', Action::FLAG_NO_DISPATCH, true); $this->messageManager->addErrorMessage(__('Incorrect CAPTCHA')); $controller->getResponse()->setRedirect( $controller->getUrl('*/*/forgotpassword', ['_nosecret' => true]) diff --git a/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php b/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php index f221949051393..5d926b47ca446 100644 --- a/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php +++ b/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php @@ -8,12 +8,12 @@ use Magento\Customer\Model\Context; use Magento\Customer\Model\GroupManagement; -use Magento\Framework\App\ActionInterface; use Magento\Customer\Model\Session; +use Magento\Framework\App\ActionInterface; use Magento\Framework\App\Http\Context as HttpContext; /** - * Class ContextPlugin + * Introduces Context information for ActionInterface of Customer Action */ class ContextPlugin { diff --git a/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php b/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php index bdf1a695589cf..aa821c9355777 100644 --- a/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php +++ b/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php @@ -11,12 +11,16 @@ use Magento\Customer\Model\Session; use Magento\Framework\App\ActionInterface; use Magento\Framework\App\Area; +use Magento\Framework\App\HttpRequestInterface; use Magento\Framework\App\ObjectManager; use Magento\Framework\App\RequestInterface; use Magento\Framework\App\State; use Magento\Framework\Exception\NoSuchEntityException; use Psr\Log\LoggerInterface; +/** + * Refresh the Customer session if `UpdateSession` notification registered + */ class CustomerNotification { /** @@ -72,7 +76,7 @@ public function __construct( $this->state = $state; $this->customerRepository = $customerRepository; $this->logger = $logger; - $this->request = $request; + $this->request = $request ?? ObjectManager::getInstance()->get(RequestInterface::class); } /** @@ -100,21 +104,6 @@ public function beforeExecute(ActionInterface $subject) } } - /** - * Return the shared request. - * If the request wasn't injected because of the backward compatible optional constructor dependency, - * create a new request instance. - * - * @return RequestInterface - */ - private function getRequest(): RequestInterface - { - if (null === $this->request) { - $this->request = ObjectManager::getInstance()->get(RequestInterface::class); - } - return $this->request; - } - /** * Because RequestInterface has no isPost method the check is requied before calling it. * @@ -122,9 +111,7 @@ private function getRequest(): RequestInterface */ private function isPostRequest(): bool { - $request = $this->getRequest(); - - return method_exists($request, 'isPost') && $request->isPost(); + return $this->request instanceof HttpRequestInterface && $this->request->isPost(); } /** @@ -135,7 +122,7 @@ private function isPostRequest(): bool */ private function isFrontendRequest(): bool { - return $this->state->getAreaCode() == Area::AREA_FRONTEND; + return $this->state->getAreaCode() === Area::AREA_FRONTEND; } /** diff --git a/app/code/Magento/Customer/Model/Visitor.php b/app/code/Magento/Customer/Model/Visitor.php index f00bb581509d2..2eb5520f7aa08 100644 --- a/app/code/Magento/Customer/Model/Visitor.php +++ b/app/code/Magento/Customer/Model/Visitor.php @@ -6,8 +6,23 @@ namespace Magento\Customer\Model; +use Magento\Customer\Api\Data\CustomerInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\App\ObjectManager; +use Magento\Framework\App\Request; use Magento\Framework\App\RequestSafetyInterface; +use Magento\Framework\Data\Collection\AbstractDb; +use Magento\Framework\Event\Observer as EventObserver; +use Magento\Framework\HTTP\Header; +use Magento\Framework\Indexer\IndexerRegistry; +use Magento\Framework\Model\AbstractModel; +use Magento\Framework\Model\Context as ModelContext; +use Magento\Framework\Model\ResourceModel\AbstractResource; +use Magento\Framework\Registry; +use Magento\Framework\Session\Config as SessionConfig; +use Magento\Framework\Session\SessionManagerInterface; +use Magento\Framework\Stdlib\DateTime; +use Magento\Store\Model\ScopeInterface; /** * Class Visitor @@ -17,15 +32,13 @@ * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.CookieAndSessionMisuse) */ -class Visitor extends \Magento\Framework\Model\AbstractModel +class Visitor extends AbstractModel { const VISITOR_TYPE_CUSTOMER = 'c'; - const VISITOR_TYPE_VISITOR = 'v'; - const DEFAULT_ONLINE_MINUTES_INTERVAL = 15; - const XML_PATH_ONLINE_INTERVAL = 'customer/online_customers/online_minutes_interval'; + const SECONDS_24_HOURS = 86400; /** * @var string[] @@ -33,12 +46,12 @@ class Visitor extends \Magento\Framework\Model\AbstractModel protected $ignoredUserAgents; /** - * @var \Magento\Framework\Session\SessionManagerInterface + * @var SessionManagerInterface */ protected $session; /** - * @var \Magento\Framework\HTTP\Header + * @var Header */ protected $httpHeader; @@ -57,17 +70,17 @@ class Visitor extends \Magento\Framework\Model\AbstractModel /** * Core store config * - * @var \Magento\Framework\App\Config\ScopeConfigInterface + * @var ScopeConfigInterface */ protected $scopeConfig; /** - * @var \Magento\Framework\Stdlib\DateTime + * @var DateTime */ protected $dateTime; /** - * @var \Magento\Framework\Indexer\IndexerRegistry + * @var IndexerRegistry */ protected $indexerRegistry; @@ -77,15 +90,15 @@ class Visitor extends \Magento\Framework\Model\AbstractModel private $requestSafety; /** - * @param \Magento\Framework\Model\Context $context - * @param \Magento\Framework\Registry $registry - * @param \Magento\Framework\Session\SessionManagerInterface $session - * @param \Magento\Framework\HTTP\Header $httpHeader - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Framework\Stdlib\DateTime $dateTime - * @param \Magento\Framework\Indexer\IndexerRegistry $indexerRegistry - * @param \Magento\Framework\Model\ResourceModel\AbstractResource|null $resource - * @param \Magento\Framework\Data\Collection\AbstractDb|null $resourceCollection + * @param ModelContext $context + * @param Registry $registry + * @param SessionManagerInterface $session + * @param Header $httpHeader + * @param ScopeConfigInterface $scopeConfig + * @param DateTime $dateTime + * @param IndexerRegistry $indexerRegistry + * @param AbstractResource|null $resource + * @param AbstractDb|null $resourceCollection * @param array $ignoredUserAgents * @param array $ignores * @param array $data @@ -94,15 +107,15 @@ class Visitor extends \Magento\Framework\Model\AbstractModel * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Framework\Model\Context $context, - \Magento\Framework\Registry $registry, - \Magento\Framework\Session\SessionManagerInterface $session, - \Magento\Framework\HTTP\Header $httpHeader, - \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Framework\Stdlib\DateTime $dateTime, - \Magento\Framework\Indexer\IndexerRegistry $indexerRegistry, - \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, - \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, + ModelContext $context, + Registry $registry, + SessionManagerInterface $session, + Header $httpHeader, + ScopeConfigInterface $scopeConfig, + DateTime $dateTime, + IndexerRegistry $indexerRegistry, + AbstractResource $resource = null, + AbstractDb $resourceCollection = null, array $ignoredUserAgents = [], array $ignores = [], array $data = [], @@ -116,7 +129,7 @@ public function __construct( $this->scopeConfig = $scopeConfig; $this->dateTime = $dateTime; $this->indexerRegistry = $indexerRegistry; - $this->requestSafety = $requestSafety ?? ObjectManager::getInstance()->get(RequestSafetyInterface::class); + $this->requestSafety = $requestSafety ?? ObjectManager::getInstance()->create(RequestSafetyInterface::class); } /** @@ -126,7 +139,7 @@ public function __construct( */ protected function _construct() { - $this->_init(\Magento\Customer\Model\ResourceModel\Visitor::class); + $this->_init(ResourceModel\Visitor::class); $userAgent = $this->httpHeader->getHttpUserAgent(); if ($this->ignoredUserAgents) { if (in_array($userAgent, $this->ignoredUserAgents)) { @@ -139,7 +152,7 @@ protected function _construct() * Skip request logging * * @param bool $skipRequestLogging - * @return \Magento\Customer\Model\Visitor + * @return Visitor */ public function setSkipRequestLogging($skipRequestLogging) { @@ -148,12 +161,10 @@ public function setSkipRequestLogging($skipRequestLogging) } /** - * Initialization visitor by request + * Initialization visitor by request. Used in event "controller_action_predispatch" * - * Used in event "controller_action_predispatch" - * - * @param \Magento\Framework\Event\Observer $observer - * @return \Magento\Customer\Model\Visitor + * @param EventObserver $observer + * @return Visitor */ public function initByRequest($observer) { @@ -168,7 +179,7 @@ public function initByRequest($observer) } } - $this->setLastVisitAt((new \DateTime())->format(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT)); + $this->setLastVisitAt((new \DateTime())->format(DateTime::DATETIME_PHP_FORMAT)); // prevent saving Visitor for safe methods, e.g. GET request if ($this->requestSafety->isSafeMethod()) { @@ -189,13 +200,13 @@ public function initByRequest($observer) * * Used in event "controller_action_postdispatch" * - * @param \Magento\Framework\Event\Observer $observer - * @return \Magento\Customer\Model\Visitor + * @param EventObserver $observer + * @return Visitor */ public function saveByRequest($observer) { // prevent saving Visitor for safe methods, e.g. GET request - if ($this->skipRequestLogging || $this->getRequest()->isSafeMethod() || $this->isModuleIgnored($observer)) { + if ($this->skipRequestLogging || $this->requestSafety->isSafeMethod() || $this->isModuleIgnored($observer)) { return $this; } @@ -215,13 +226,13 @@ public function saveByRequest($observer) /** * Returns true if the module is required * - * @param \Magento\Framework\Event\Observer $observer + * @param EventObserver $observer * @return bool */ public function isModuleIgnored($observer) { if (is_array($this->ignores) && $observer) { - $curModule = $this->getRequest()->getRouteName(); + $curModule = $this->requestSafety->getRouteName(); if (isset($this->ignores[$curModule])) { return true; } @@ -234,12 +245,12 @@ public function isModuleIgnored($observer) * * Used in event "customer_login" * - * @param \Magento\Framework\Event\Observer $observer - * @return \Magento\Customer\Model\Visitor + * @param EventObserver $observer + * @return Visitor */ public function bindCustomerLogin($observer) { - /** @var \Magento\Customer\Api\Data\CustomerInterface $customer */ + /** @var CustomerInterface $customer */ $customer = $observer->getEvent()->getCustomer(); if (!$this->getCustomerId()) { $this->setDoCustomerLogin(true); @@ -253,8 +264,8 @@ public function bindCustomerLogin($observer) * * Used in event "customer_logout" * - * @param \Magento\Framework\Event\Observer $observer - * @return \Magento\Customer\Model\Visitor + * @param EventObserver $observer + * @return Visitor * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function bindCustomerLogout($observer) @@ -268,8 +279,8 @@ public function bindCustomerLogout($observer) /** * Create binding of checkout quote * - * @param \Magento\Framework\Event\Observer $observer - * @return \Magento\Customer\Model\Visitor + * @param EventObserver $observer + * @return Visitor */ public function bindQuoteCreate($observer) { @@ -286,8 +297,8 @@ public function bindQuoteCreate($observer) /** * Destroy binding of checkout quote * - * @param \Magento\Framework\Event\Observer $observer - * @return \Magento\Customer\Model\Visitor + * @param EventObserver $observer + * @return Visitor */ public function bindQuoteDestroy($observer) { @@ -305,10 +316,10 @@ public function bindQuoteDestroy($observer) */ public function getCleanTime() { - return $this->scopeConfig->getValue( - \Magento\Framework\Session\Config::XML_PATH_COOKIE_LIFETIME, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE - ) + 86400; + return self::SECONDS_24_HOURS + $this->scopeConfig->getValue( + SessionConfig::XML_PATH_COOKIE_LIFETIME, + ScopeInterface::SCOPE_STORE + ); } /** @@ -331,25 +342,8 @@ public function getOnlineInterval() { $configValue = (int)$this->scopeConfig->getValue( static::XML_PATH_ONLINE_INTERVAL, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ScopeInterface::SCOPE_STORE ); return $configValue ?: static::DEFAULT_ONLINE_MINUTES_INTERVAL; } - - /** - * Return the shared request. - * If the request wasn't injected because of the backward compatible optional constructor dependency, - * create a new request instance. - * - * @return \Magento\Framework\App\RequestSafetyInterface|\Magento\Framework\App\Request\Http - */ - private function getRequest() - { - if (null === $this->requestSafety) { - $this->requestSafety = \Magento\Framework\App\ObjectManager::getInstance()->create( - \Magento\Framework\App\RequestSafetyInterface::class - ); - } - return $this->requestSafety; - } } diff --git a/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php b/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php index 1b70f174c39fd..4e722a36b57da 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/App/Action/ContextPluginTest.php @@ -6,30 +6,38 @@ namespace Magento\Customer\Test\Unit\Model\App\Action; +use Magento\Customer\Model\App\Action\ContextPlugin; use Magento\Customer\Model\Context; +use Magento\Customer\Model\Session; +use Magento\Framework\App\Action\Action; +use Magento\Framework\App\Http\Context as HttpContext; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; /** - * Class ContextPluginTest + * Unit Tests to cover ContextPlugin for Action Context */ -class ContextPluginTest extends \PHPUnit\Framework\TestCase +class ContextPluginTest extends TestCase { + const STUB_CUSTOMER_GROUP = 'UAH'; + const STUB_CUSTOMER_NOT_LOGGED_IN = 0; /** - * @var \Magento\Customer\Model\App\Action\ContextPlugin + * @var ContextPlugin */ protected $plugin; /** - * @var \Magento\Customer\Model\Session|\PHPUnit_Framework_MockObject_MockObject + * @var Session|MockObject */ protected $customerSessionMock; /** - * @var \Magento\Framework\App\Http\Context|\PHPUnit_Framework_MockObject_MockObject + * @var HttpContext|MockObject */ protected $httpContextMock; /** - * @var \Magento\Framework\App\Action\Action|\PHPUnit_Framework_MockObject_MockObject + * @var Action|MockObject */ protected $subjectMock; @@ -38,10 +46,10 @@ class ContextPluginTest extends \PHPUnit\Framework\TestCase */ protected function setUp() { - $this->customerSessionMock = $this->createMock(\Magento\Customer\Model\Session::class); - $this->httpContextMock = $this->createMock(\Magento\Framework\App\Http\Context::class); - $this->subjectMock = $this->createMock(\Magento\Framework\App\Action\Action::class); - $this->plugin = new \Magento\Customer\Model\App\Action\ContextPlugin( + $this->customerSessionMock = $this->createMock(Session::class); + $this->httpContextMock = $this->createMock(HttpContext::class); + $this->subjectMock = $this->createMock(Action::class); + $this->plugin = new ContextPlugin( $this->customerSessionMock, $this->httpContextMock ); @@ -60,8 +68,8 @@ public function testBeforeExecute() ->will( $this->returnValueMap( [ - [Context::CONTEXT_GROUP, 'UAH', $this->httpContextMock], - [Context::CONTEXT_AUTH, 0, $this->httpContextMock], + [Context::CONTEXT_GROUP, self::STUB_CUSTOMER_GROUP, $this->httpContextMock], + [Context::CONTEXT_AUTH, self::STUB_CUSTOMER_NOT_LOGGED_IN, $this->httpContextMock], ] ) ); diff --git a/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerNotificationTest.php b/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerNotificationTest.php index 27999e903d900..86bcf59bdd113 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerNotificationTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerNotificationTest.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Customer\Test\Unit\Model\Plugin; use Magento\Customer\Api\CustomerRepositoryInterface; @@ -12,97 +13,116 @@ use Magento\Customer\Model\Session; use Magento\Framework\App\ActionInterface; use Magento\Framework\App\Area; +use Magento\Framework\App\HttpRequestInterface; use Magento\Framework\App\RequestInterface; use Magento\Framework\App\State; use Magento\Framework\Exception\NoSuchEntityException; +use PHPUnit\Framework\MockObject\MockObject; use Psr\Log\LoggerInterface; class CustomerNotificationTest extends \PHPUnit\Framework\TestCase { - /** @var Session|\PHPUnit_Framework_MockObject_MockObject */ - private $session; - - /** @var NotificationStorage|\PHPUnit_Framework_MockObject_MockObject */ - private $notificationStorage; - - /** @var CustomerRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject */ - private $customerRepository; - - /** @var State|\PHPUnit_Framework_MockObject_MockObject */ - private $appState; + private const STUB_CUSTOMER_ID = 1; + + /** + * @var Session|MockObject + */ + private $sessionMock; + + /** + * @var NotificationStorage|MockObject + */ + private $notificationStorageMock; + + /** + * @var CustomerRepositoryInterface|MockObject + */ + private $customerRepositoryMock; + + /** + * @var State|MockObject + */ + private $appStateMock; + + /** + * @var RequestInterface|MockObject + */ + private $requestMock; + + /** + * @var ActionInterface|MockObject + */ + private $actionMock; + + /** + * @var LoggerInterface|MockObject + */ + private $loggerMock; + + /** + * @var CustomerNotification + */ + private $plugin; - /** @var RequestInterface|\PHPUnit_Framework_MockObject_MockObject */ - private $request; + protected function setUp() + { + $this->sessionMock = $this->createMock(Session::class); + $this->sessionMock->method('getCustomerId')->willReturn(self::STUB_CUSTOMER_ID); - /** @var ActionInterface|\PHPUnit_Framework_MockObject_MockObject */ - private $actionInterfaceMock; - - /** @var LoggerInterface|\PHPUnit_Framework_MockObject_MockObject */ - private $logger; + $this->customerRepositoryMock = $this->createMock(CustomerRepositoryInterface::class); + $this->actionMock = $this->createMock(ActionInterface::class); + $this->requestMock = $this->getMockBuilder([RequestInterface::class, HttpRequestInterface::class]) + ->getMock(); + $this->requestMock->method('isPost')->willReturn(true); - /** @var CustomerNotification */ - private $plugin; + $this->loggerMock = $this->createMock(LoggerInterface::class); - /** @var int */ - private static $customerId = 1; + $this->appStateMock = $this->createMock(State::class); + $this->appStateMock->method('getAreaCode')->willReturn(Area::AREA_FRONTEND); - protected function setUp() - { - $this->session = $this->createMock(Session::class); - $this->notificationStorage = $this->createMock(NotificationStorage::class); - $this->customerRepository = $this->createMock(CustomerRepositoryInterface::class); - $this->actionInterfaceMock = $this->createMock(ActionInterface::class); - $this->request = $this->getMockBuilder(RequestInterface::class) - ->setMethods(['isPost']) - ->getMockForAbstractClass(); - $this->appState = $this->createMock(State::class); - $this->logger = $this->createMock(LoggerInterface::class); - - $this->appState->method('getAreaCode')->willReturn(Area::AREA_FRONTEND); - $this->request->method('isPost')->willReturn(true); - $this->session->method('getCustomerId')->willReturn(self::$customerId); - $this->notificationStorage->expects($this->any()) + $this->notificationStorageMock = $this->createMock(NotificationStorage::class); + $this->notificationStorageMock->expects($this->any()) ->method('isExists') - ->with(NotificationStorage::UPDATE_CUSTOMER_SESSION, self::$customerId) + ->with(NotificationStorage::UPDATE_CUSTOMER_SESSION, self::STUB_CUSTOMER_ID) ->willReturn(true); $this->plugin = new CustomerNotification( - $this->session, - $this->notificationStorage, - $this->appState, - $this->customerRepository, - $this->logger, - $this->request + $this->sessionMock, + $this->notificationStorageMock, + $this->appStateMock, + $this->customerRepositoryMock, + $this->loggerMock, + $this->requestMock ); } public function testBeforeExecute() { - $customerGroupId =1; + $customerGroupId = 1; $customerMock = $this->createMock(CustomerInterface::class); $customerMock->method('getGroupId')->willReturn($customerGroupId); - $customerMock->method('getId')->willReturn(self::$customerId); + $customerMock->method('getId')->willReturn(self::STUB_CUSTOMER_ID); - $this->customerRepository->expects($this->once()) + $this->customerRepositoryMock->expects($this->once()) ->method('getById') - ->with(self::$customerId) + ->with(self::STUB_CUSTOMER_ID) ->willReturn($customerMock); - $this->notificationStorage->expects($this->once()) + $this->notificationStorageMock->expects($this->once()) ->method('remove') - ->with(NotificationStorage::UPDATE_CUSTOMER_SESSION, self::$customerId); + ->with(NotificationStorage::UPDATE_CUSTOMER_SESSION, self::STUB_CUSTOMER_ID); - $this->plugin->beforeExecute($this->actionInterfaceMock); + $this->plugin->beforeExecute($this->actionMock); } public function testBeforeDispatchWithNoCustomerFound() { - $this->customerRepository->method('getById') - ->with(self::$customerId) + $this->customerRepositoryMock->method('getById') + ->with(self::STUB_CUSTOMER_ID) ->willThrowException(new NoSuchEntityException()); - $this->logger->expects($this->once()) + $this->loggerMock->expects($this->once()) ->method('error'); - $this->plugin->beforeExecute($this->actionInterfaceMock); + $this->plugin->beforeExecute($this->actionMock); } } diff --git a/app/code/Magento/Customer/Test/Unit/Model/VisitorTest.php b/app/code/Magento/Customer/Test/Unit/Model/VisitorTest.php index bdb2de2e99d9f..c9cd525d71c49 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/VisitorTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/VisitorTest.php @@ -6,16 +6,24 @@ namespace Magento\Customer\Test\Unit\Model; +use Magento\Customer\Model\ResourceModel\Visitor as VisitorResourceModel; +use Magento\Customer\Model\Session; +use Magento\Customer\Model\Visitor as VisitorModel; +use Magento\Framework\App\Request\Http as HttpRequest; +use Magento\Framework\DataObject; +use Magento\Framework\Registry; +use Magento\Framework\Session\SessionManagerInterface; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; /** - * Class VisitorTest - * @package Magento\Customer\Model + * Unit Tests to cover Visitor Model */ -class VisitorTest extends \PHPUnit\Framework\TestCase +class VisitorTest extends TestCase { /** - * @var \Magento\Customer\Model\Visitor + * @var VisitorModel */ protected $visitor; @@ -25,37 +33,37 @@ class VisitorTest extends \PHPUnit\Framework\TestCase protected $objectManagerHelper; /** - * @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject + * @var Registry|MockObject */ - protected $registry; + protected $registryMock; /** - * @var \Magento\Customer\Model\ResourceModel\Visitor|\PHPUnit_Framework_MockObject_MockObject + * @var VisitorResourceModel|MockObject */ - protected $resource; + protected $visitorResourceModelMock; /** - * @var \Magento\Framework\Session\SessionManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var SessionManagerInterface|MockObject */ - protected $session; + protected $sessionMock; /** - * @var \Magento\Framework\App\Request\Http|\PHPUnit_Framework_MockObject_MockObject + * @var HttpRequest|MockObject */ - private $request; + private $httpRequestMock; protected function setUp() { - $this->registry = $this->createMock(\Magento\Framework\Registry::class); - $this->session = $this->getMockBuilder(\Magento\Customer\Model\Session::class) + $this->registryMock = $this->createMock(Registry::class); + $this->sessionMock = $this->getMockBuilder(Session::class) ->disableOriginalConstructor() ->setMethods(['getSessionId', 'getVisitorData', 'setVisitorData']) ->getMock(); - $this->request = $this->createMock(\Magento\Framework\App\Request\Http::class); + $this->httpRequestMock = $this->createMock(HttpRequest::class); $this->objectManagerHelper = new ObjectManagerHelper($this); - $this->resource = $this->getMockBuilder(\Magento\Customer\Model\ResourceModel\Visitor::class) + $this->visitorResourceModelMock = $this->getMockBuilder(VisitorResourceModel::class) ->setMethods([ 'beginTransaction', '__sleep', @@ -66,28 +74,28 @@ protected function setUp() 'commit', 'clean', ])->disableOriginalConstructor()->getMock(); - $this->resource->expects($this->any())->method('getIdFieldName')->willReturn('visitor_id'); - $this->resource->expects($this->any())->method('addCommitCallback')->willReturnSelf(); + $this->visitorResourceModelMock->expects($this->any())->method('getIdFieldName')->willReturn('visitor_id'); + $this->visitorResourceModelMock->expects($this->any())->method('addCommitCallback')->willReturnSelf(); $arguments = $this->objectManagerHelper->getConstructArguments( - \Magento\Customer\Model\Visitor::class, + VisitorModel::class, [ - 'registry' => $this->registry, - 'session' => $this->session, - 'resource' => $this->resource, - 'request' => $this->request, + 'registry' => $this->registryMock, + 'session' => $this->sessionMock, + 'resource' => $this->visitorResourceModelMock, + 'request' => $this->httpRequestMock, ] ); - $this->visitor = $this->objectManagerHelper->getObject(\Magento\Customer\Model\Visitor::class, $arguments); + $this->visitor = $this->objectManagerHelper->getObject(VisitorModel::class, $arguments); } public function testInitByRequest() { $oldSessionId = 'asdfhasdfjhkj2198sadf8sdf897'; $newSessionId = 'bsdfhasdfjhkj2198sadf8sdf897'; - $this->session->expects($this->any())->method('getSessionId')->willReturn($newSessionId); - $this->session->expects($this->atLeastOnce())->method('getVisitorData') + $this->sessionMock->expects($this->any())->method('getSessionId')->willReturn($newSessionId); + $this->sessionMock->expects($this->atLeastOnce())->method('getVisitorData') ->willReturn(['session_id' => $oldSessionId]); $this->visitor->initByRequest(null); $this->assertEquals($newSessionId, $this->visitor->getSessionId()); @@ -95,32 +103,32 @@ public function testInitByRequest() public function testSaveByRequest() { - $this->session->expects($this->once())->method('setVisitorData')->will($this->returnSelf()); + $this->sessionMock->expects($this->once())->method('setVisitorData')->will($this->returnSelf()); $this->assertSame($this->visitor, $this->visitor->saveByRequest(null)); } public function testIsModuleIgnored() { $this->visitor = $this->objectManagerHelper->getObject( - \Magento\Customer\Model\Visitor::class, + VisitorModel::class, [ - 'registry' => $this->registry, - 'session' => $this->session, - 'resource' => $this->resource, + 'registry' => $this->registryMock, + 'session' => $this->sessionMock, + 'resource' => $this->visitorResourceModelMock, 'ignores' => ['test_route_name' => true], - 'requestSafety' => $this->request, + 'requestSafety' => $this->httpRequestMock, ] ); - $this->request->method('getRouteName')->willReturn('test_route_name'); - $observer = new \Magento\Framework\DataObject(); + $this->httpRequestMock->method('getRouteName')->willReturn('test_route_name'); + $observer = new DataObject(); $this->assertTrue($this->visitor->isModuleIgnored($observer)); } public function testBindCustomerLogin() { - $customer = new \Magento\Framework\DataObject(['id' => '1']); - $observer = new \Magento\Framework\DataObject([ - 'event' => new \Magento\Framework\DataObject(['customer' => $customer]), + $customer = new DataObject(['id' => '1']); + $observer = new DataObject([ + 'event' => new DataObject(['customer' => $customer]), ]); $this->visitor->bindCustomerLogin($observer); @@ -136,7 +144,7 @@ public function testBindCustomerLogin() public function testBindCustomerLogout() { - $observer = new \Magento\Framework\DataObject(); + $observer = new DataObject(); $this->visitor->setCustomerId('1'); $this->visitor->bindCustomerLogout($observer); @@ -149,9 +157,9 @@ public function testBindCustomerLogout() public function testBindQuoteCreate() { - $quote = new \Magento\Framework\DataObject(['id' => '1', 'is_checkout_cart' => true]); - $observer = new \Magento\Framework\DataObject([ - 'event' => new \Magento\Framework\DataObject(['quote' => $quote]), + $quote = new DataObject(['id' => '1', 'is_checkout_cart' => true]); + $observer = new DataObject([ + 'event' => new DataObject(['quote' => $quote]), ]); $this->visitor->bindQuoteCreate($observer); $this->assertTrue($this->visitor->getDoQuoteCreate()); @@ -159,9 +167,9 @@ public function testBindQuoteCreate() public function testBindQuoteDestroy() { - $quote = new \Magento\Framework\DataObject(['id' => '1']); - $observer = new \Magento\Framework\DataObject([ - 'event' => new \Magento\Framework\DataObject(['quote' => $quote]), + $quote = new DataObject(['id' => '1']); + $observer = new DataObject([ + 'event' => new DataObject(['quote' => $quote]), ]); $this->visitor->bindQuoteDestroy($observer); $this->assertTrue($this->visitor->getDoQuoteDestroy()); @@ -169,7 +177,10 @@ public function testBindQuoteDestroy() public function testClean() { - $this->resource->expects($this->once())->method('clean')->with($this->visitor)->willReturnSelf(); + $this->visitorResourceModelMock->expects($this->once()) + ->method('clean') + ->with($this->visitor) + ->willReturnSelf(); $this->visitor->clean(); } } diff --git a/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php b/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php index ce32498175ff4..6843e0303edd9 100644 --- a/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php +++ b/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php @@ -1,6 +1,5 @@ <?php /** - * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ @@ -8,33 +7,40 @@ namespace Magento\Store\App\Action\Plugin; use Magento\Framework\App\ActionInterface; +use Magento\Framework\Exception\State\InitException; +use Magento\Store\Model\StoreManagerInterface; +/** + * Plugin verify Store on before Execute on ActionInterface + */ class StoreCheck { /** - * @var \Magento\Store\Model\StoreManagerInterface + * @var StoreManagerInterface */ protected $_storeManager; /** - * @param \Magento\Store\Model\StoreManagerInterface $storeManager + * @param StoreManagerInterface $storeManager */ public function __construct( - \Magento\Store\Model\StoreManagerInterface $storeManager + StoreManagerInterface $storeManager ) { $this->_storeManager = $storeManager; } /** + * Verify before execute + * * @param ActionInterface $subject * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * @throws \Magento\Framework\Exception\State\InitException + * @throws \Magento\Framework\Exception\State\InitExceptionn */ public function beforeExecute(ActionInterface $subject) { - if (! $this->_storeManager->getStore()->isActive()) { - throw new \Magento\Framework\Exception\State\InitException( + if (!$this->_storeManager->getStore()->isActive()) { + throw new InitException( __('Current store is not active.') ); } diff --git a/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php b/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php index b24db7aa4a269..9ecd640b246af 100644 --- a/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php +++ b/app/code/Magento/Store/Test/Unit/App/Action/Plugin/StoreCheckTest.php @@ -5,32 +5,38 @@ */ namespace Magento\Store\Test\Unit\App\Action\Plugin; +use Magento\Framework\App\Action\AbstractAction; +use Magento\Store\App\Action\Plugin\StoreCheck; +use Magento\Store\Model\Store; +use Magento\Store\Model\StoreManagerInterface; +use PHPUnit\Framework\MockObject\MockObject; + class StoreCheckTest extends \PHPUnit\Framework\TestCase { /** - * @var \Magento\Store\App\Action\Plugin\StoreCheck + * @var StoreCheck */ protected $_plugin; /** - * @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var StoreManagerInterface|MockObject */ protected $_storeManagerMock; /** - * @var \Magento\Store\Model\Store|\PHPUnit_Framework_MockObject_MockObject + * @var Store|MockObject */ protected $_storeMock; /** - * @var \Magento\Framework\App\Action\AbstractAction|\PHPUnit_Framework_MockObject_MockObject + * @var AbstractAction|MockObject */ protected $subjectMock; - + protected function setUp() { - $this->_storeManagerMock = $this->createMock(\Magento\Store\Model\StoreManagerInterface::class); - $this->_storeMock = $this->createMock(\Magento\Store\Model\Store::class); + $this->_storeManagerMock = $this->createMock(StoreManagerInterface::class); + $this->_storeMock = $this->createMock(Store::class); $this->_storeManagerMock->expects( $this->any() )->method( @@ -38,11 +44,11 @@ protected function setUp() )->will( $this->returnValue($this->_storeMock) ); - $this->subjectMock = $this->getMockBuilder(\Magento\Framework\App\Action\AbstractAction::class) + $this->subjectMock = $this->getMockBuilder(AbstractAction::class) ->disableOriginalConstructor() ->getMockForAbstractClass(); - $this->_plugin = new \Magento\Store\App\Action\Plugin\StoreCheck($this->_storeManagerMock); + $this->_plugin = new StoreCheck($this->_storeManagerMock); } /** diff --git a/app/code/Magento/Tax/Model/App/Action/ContextPlugin.php b/app/code/Magento/Tax/Model/App/Action/ContextPlugin.php index e8c0897e65c58..d768e2f6092a0 100644 --- a/app/code/Magento/Tax/Model/App/Action/ContextPlugin.php +++ b/app/code/Magento/Tax/Model/App/Action/ContextPlugin.php @@ -6,60 +6,68 @@ namespace Magento\Tax\Model\App\Action; +use Magento\Customer\Model\Session; +use Magento\Framework\App\ActionInterface; +use Magento\Framework\App\Http\Context as HttpContext; +use Magento\Framework\Module\Manager as ModuleManager; +use Magento\PageCache\Model\Config as PageCacheConfig; +use Magento\Tax\Helper\Data as TaxHelper; +use Magento\Tax\Model\Calculation; + /** - * Class ContextPlugin + * Provides Action Context on before executing Controller Action */ class ContextPlugin { /** - * @var \Magento\Customer\Model\Session + * @var Session */ protected $customerSession; /** - * @var \Magento\Framework\App\Http\Context + * @var HttpContext */ protected $httpContext; /** - * @var \Magento\Tax\Helper\Data + * @var TaxHelper */ protected $taxHelper; /** - * @var \Magento\Tax\Model\Calculation\Proxy + * @var Calculation */ protected $taxCalculation; /** * Module manager * - * @var \Magento\Framework\Module\Manager + * @var ModuleManager */ private $moduleManager; /** * Cache config * - * @var \Magento\PageCache\Model\Config + * @var PageCacheConfig */ private $cacheConfig; /** - * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Framework\App\Http\Context $httpContext - * @param \Magento\Tax\Model\Calculation\Proxy $calculation - * @param \Magento\Tax\Helper\Data $taxHelper - * @param \Magento\Framework\Module\Manager $moduleManager - * @param \Magento\PageCache\Model\Config $cacheConfig + * @param Session $customerSession + * @param HttpContext $httpContext + * @param Calculation $calculation + * @param TaxHelper $taxHelper + * @param ModuleManager $moduleManager + * @param PageCacheConfig $cacheConfig */ public function __construct( - \Magento\Customer\Model\Session $customerSession, - \Magento\Framework\App\Http\Context $httpContext, - \Magento\Tax\Model\Calculation\Proxy $calculation, //phpcs:ignore Magento2.Classes.DiscouragedDependencies - \Magento\Tax\Helper\Data $taxHelper, - \Magento\Framework\Module\Manager $moduleManager, - \Magento\PageCache\Model\Config $cacheConfig + Session $customerSession, + HttpContext $httpContext, + Calculation $calculation, //phpcs:ignore Magento2.Classes.DiscouragedDependencies + TaxHelper $taxHelper, + ModuleManager $moduleManager, + PageCacheConfig $cacheConfig ) { $this->customerSession = $customerSession; $this->httpContext = $httpContext; @@ -72,14 +80,12 @@ public function __construct( /** * Before dispatch. * - * @param \Magento\Framework\App\ActionInterface $subject - * @param \Magento\Framework\App\RequestInterface $request - * @return mixed + * @param ActionInterface $subject + * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function beforeExecute( - \Magento\Framework\App\ActionInterface $subject - ) { + public function beforeExecute(ActionInterface $subject) + { if (!$this->customerSession->isLoggedIn() || !$this->moduleManager->isEnabled('Magento_PageCache') || !$this->cacheConfig->isEnabled() || diff --git a/app/code/Magento/Tax/Test/Unit/App/Action/ContextPluginTest.php b/app/code/Magento/Tax/Test/Unit/App/Action/ContextPluginTest.php index bf31a421243a5..8601bdc175ae8 100644 --- a/app/code/Magento/Tax/Test/Unit/App/Action/ContextPluginTest.php +++ b/app/code/Magento/Tax/Test/Unit/App/Action/ContextPluginTest.php @@ -5,81 +5,105 @@ */ namespace Magento\Tax\Test\Unit\App\Action; +use Magento\Customer\Model\Session; +use Magento\Framework\App\Http\Context as HttpContext; +use Magento\Framework\App\Test\Unit\Action\Stub\ActionStub; +use Magento\Framework\Module\Manager as ModuleManager; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; +use Magento\PageCache\Model\Config as PageCacheConfig; +use Magento\Tax\Helper\Data as TaxHelper; +use Magento\Tax\Model\App\Action\ContextPlugin as TaxContextPlugin; +use Magento\Tax\Model\Calculation; +use Magento\Weee\Helper\Data as WeeeHelper; +use Magento\Weee\Model\Tax; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + /** - * Context plugin test + * Unit Tests to cover ContextPlugin */ -class ContextPluginTest extends \PHPUnit\Framework\TestCase +class ContextPluginTest extends TestCase { /** - * @var \Magento\Tax\Helper\Data + * @var ObjectManagerHelper + */ + private $objectManager; + + /** + * @var TaxHelper|MockObject */ protected $taxHelperMock; /** - * @var \Magento\Weee\Helper\Data + * @var WeeeHelper|MockObject */ protected $weeeHelperMock; /** - * @var \Magento\Weee\Model\Tax + * @var Tax|MockObject */ protected $weeeTaxMock; /** - * @var \Magento\Framework\App\Http\Context + * @var HttpContext|MockObject */ protected $httpContextMock; /** - * @var \Magento\Tax\Model\Calculation\Proxy + * @var Calculation|MockObject */ protected $taxCalculationMock; /** * Module manager * - * @var \Magento\Framework\Module\Manager + * @var ModuleManager|MockObject */ private $moduleManagerMock; /** * Cache config * - * @var \Magento\PageCache\Model\Config + * @var PageCacheConfig|MockObject */ private $cacheConfigMock; /** - * @var \Magento\Tax\Model\App\Action\ContextPlugin + * @var Session|MockObject + */ + private $customerSessionMock; + + /** + * @var TaxContextPlugin */ protected $contextPlugin; protected function setUp() { - $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); + $this->objectManager = new ObjectManagerHelper($this); - $this->taxHelperMock = $this->getMockBuilder(\Magento\Tax\Helper\Data::class) + $this->taxHelperMock = $this->getMockBuilder(TaxHelper::class) ->disableOriginalConstructor() ->getMock(); - $this->weeeHelperMock = $this->getMockBuilder(\Magento\Weee\Helper\Data::class) + $this->weeeHelperMock = $this->getMockBuilder(WeeeHelper::class) ->disableOriginalConstructor() ->getMock(); - $this->weeeTaxMock = $this->getMockBuilder(\Magento\Weee\Model\Tax::class) + $this->weeeTaxMock = $this->getMockBuilder(Tax::class) ->disableOriginalConstructor() ->getMock(); - $this->httpContextMock = $this->getMockBuilder(\Magento\Framework\App\Http\Context::class) + $this->httpContextMock = $this->getMockBuilder(HttpContext::class) ->disableOriginalConstructor() ->getMock(); - $this->taxCalculationMock = $this->getMockBuilder(\Magento\Tax\Model\Calculation\Proxy::class) + $this->taxCalculationMock = $this->getMockBuilder(Calculation::class) ->disableOriginalConstructor() ->setMethods(['getTaxRates']) ->getMock(); - $this->customerSessionMock = $this->getMockBuilder(\Magento\Customer\Model\Session::class) + $this->customerSessionMock = $this->getMockBuilder(Session::class) ->disableOriginalConstructor() ->setMethods( [ @@ -89,16 +113,16 @@ protected function setUp() ) ->getMock(); - $this->moduleManagerMock = $this->getMockBuilder(\Magento\Framework\Module\Manager::class) + $this->moduleManagerMock = $this->getMockBuilder(ModuleManager::class) ->disableOriginalConstructor() ->getMock(); - $this->cacheConfigMock = $this->getMockBuilder(\Magento\PageCache\Model\Config::class) + $this->cacheConfigMock = $this->getMockBuilder(PageCacheConfig::class) ->disableOriginalConstructor() ->getMock(); $this->contextPlugin = $this->objectManager->getObject( - \Magento\Tax\Model\App\Action\ContextPlugin::class, + TaxContextPlugin::class, [ 'customerSession' => $this->customerSessionMock, 'httpContext' => $this->httpContextMock, @@ -163,7 +187,7 @@ public function testBeforeExecute($cache, $taxEnabled, $loggedIn) ->with('tax_rates', [], 0); } - $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class); + $action = $this->objectManager->getObject(ActionStub::class); $result = $this->contextPlugin->beforeExecute($action); $this->assertNull($result); } else { diff --git a/app/code/Magento/Theme/Model/Theme/Plugin/Registration.php b/app/code/Magento/Theme/Model/Theme/Plugin/Registration.php index ae65b52f938af..13102a722eddf 100644 --- a/app/code/Magento/Theme/Model/Theme/Plugin/Registration.php +++ b/app/code/Magento/Theme/Model/Theme/Plugin/Registration.php @@ -15,32 +15,34 @@ use Magento\Framework\Config\Theme; /** + * Plugin for Theme Registration + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Registration { /** - * @var \Magento\Theme\Model\Theme\Registration + * @var ThemeRegistration */ protected $themeRegistration; /** - * @var \Magento\Theme\Model\Theme\Collection + * @var ThemeCollection */ protected $themeCollection; /** - * @var \Magento\Theme\Model\ResourceModel\Theme\Collection + * @var ThemeLoader */ protected $themeLoader; /** - * @var \Psr\Log\LoggerInterface + * @var LoggerInterface */ protected $logger; /** - * @var \Magento\Framework\App\State + * @var AppState */ protected $appState; diff --git a/app/code/Magento/Theme/Test/Unit/Model/Theme/Plugin/RegistrationTest.php b/app/code/Magento/Theme/Test/Unit/Model/Theme/Plugin/RegistrationTest.php index 514964034b967..fb320de97dcc8 100644 --- a/app/code/Magento/Theme/Test/Unit/Model/Theme/Plugin/RegistrationTest.php +++ b/app/code/Magento/Theme/Test/Unit/Model/Theme/Plugin/RegistrationTest.php @@ -3,51 +3,76 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Theme\Test\Unit\Model\Theme\Plugin; use Magento\Framework\App\ActionInterface; -use Magento\Theme\Model\Theme\Plugin\Registration; +use Magento\Framework\App\State; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Theme\Model\ResourceModel\Theme\Collection as ThemeCollectionResourceModel; +use Magento\Theme\Model\Theme; +use Magento\Theme\Model\Theme\Collection as ThemeCollection; +use Magento\Theme\Model\Theme\Plugin\Registration as RegistrationPlugin; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Phrase; +use Magento\Theme\Model\Theme\Registration as ThemeRegistration; +use PHPUnit\Framework\MockObject\MockObject; +use Psr\Log\LoggerInterface; class RegistrationTest extends \PHPUnit\Framework\TestCase { - /** @var \Magento\Theme\Model\Theme\Registration|\PHPUnit_Framework_MockObject_MockObject */ - protected $themeRegistration; + /** + * @var ThemeRegistration|MockObject + */ + protected $themeRegistrationMock; - /** @var \Psr\Log\LoggerInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $logger; + /** + * @var LoggerInterface|MockObject + */ + protected $loggerMock; - /** @var ActionInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $action; + /** + * @var ActionInterface|MockObject + */ + protected $actionMock; - /** @var \Magento\Framework\App\State|\PHPUnit_Framework_MockObject_MockObject */ - protected $appState; + /** + * @var State|MockObject + */ + protected $appStateMock; - /** @var \Magento\Theme\Model\Theme\Collection|\PHPUnit_Framework_MockObject_MockObject */ - protected $themeCollection; + /** + * @var ThemeCollection|MockObject + */ + protected $themeCollectionMock; - /** @var \Magento\Theme\Model\ResourceModel\Theme\Collection|\PHPUnit_Framework_MockObject_MockObject */ - protected $themeLoader; + /** + * @var ThemeCollectionResourceModel|MockObject + */ + protected $themeLoaderMock; - /** @var Registration */ + /** + * @var RegistrationPlugin + */ protected $plugin; protected function setUp() { - $this->themeRegistration = $this->createMock(\Magento\Theme\Model\Theme\Registration::class); - $this->logger = $this->getMockForAbstractClass(\Psr\Log\LoggerInterface::class, [], '', false); - $this->action = $this->createMock(ActionInterface::class); - $this->appState = $this->createMock(\Magento\Framework\App\State::class); - $this->themeCollection = $this->createMock(\Magento\Theme\Model\Theme\Collection::class); - $this->themeLoader = $this->createMock(\Magento\Theme\Model\ResourceModel\Theme\Collection::class); - $this->plugin = new Registration( - $this->themeRegistration, - $this->themeCollection, - $this->themeLoader, - $this->logger, - $this->appState - ); + $this->themeRegistrationMock = $this->createMock(ThemeRegistration::class); + $this->loggerMock = $this->getMockForAbstractClass(LoggerInterface::class, [], '', false); + $this->actionMock = $this->createMock(ActionInterface::class); + $this->appStateMock = $this->createMock(State::class); + $this->themeCollectionMock = $this->createMock(ThemeCollection::class); + $this->themeLoaderMock = $this->createMock(ThemeCollectionResourceModel::class); + + $objectManager = new ObjectManager($this); + $this->plugin = $objectManager->getObject(RegistrationPlugin::class, [ + 'themeRegistration' => $this->themeRegistrationMock, + 'themeCollection' => $this->themeCollectionMock, + 'themeLoader' => $this->themeLoaderMock, + 'logger' => $this->loggerMock, + 'appState' => $this->appStateMock + ]); } /** @@ -55,13 +80,12 @@ protected function setUp() * @dataProvider dataProviderBeforeExecute * @SuppressWarnings(PHPMD.NPathComplexity) */ - public function testBeforeExecute( - $hasParentTheme - ) { + public function testBeforeExecute($hasParentTheme) + { $themeId = 1; $themeTitle = 'Theme title'; - $themeFromConfigMock = $this->getMockBuilder(\Magento\Theme\Model\Theme::class) + $themeFromConfigMock = $this->getMockBuilder(Theme::class) ->disableOriginalConstructor() ->setMethods([ 'getArea', @@ -71,7 +95,7 @@ public function testBeforeExecute( ]) ->getMock(); - $themeFromDbMock = $this->getMockBuilder(\Magento\Theme\Model\Theme::class) + $themeFromDbMock = $this->getMockBuilder(Theme::class) ->disableOriginalConstructor() ->setMethods([ 'setParentId', @@ -80,26 +104,26 @@ public function testBeforeExecute( ]) ->getMock(); - $parentThemeFromDbMock = $this->getMockBuilder(\Magento\Theme\Model\Theme::class) + $parentThemeFromDbMock = $this->getMockBuilder(Theme::class) ->disableOriginalConstructor() ->getMock(); - $parentThemeFromConfigMock = $this->getMockBuilder(\Magento\Theme\Model\Theme::class) + $parentThemeFromConfigMock = $this->getMockBuilder(Theme::class) ->disableOriginalConstructor() ->getMock(); - $this->appState->expects($this->once()) + $this->appStateMock->expects($this->once()) ->method('getMode') ->willReturn('default'); - $this->themeRegistration->expects($this->once()) + $this->themeRegistrationMock->expects($this->once()) ->method('register'); - $this->themeCollection->expects($this->once()) + $this->themeCollectionMock->expects($this->once()) ->method('loadData') ->willReturn([$themeFromConfigMock]); - $this->themeLoader->expects($hasParentTheme ? $this->exactly(2) : $this->once()) + $this->themeLoaderMock->expects($hasParentTheme ? $this->exactly(2) : $this->once()) ->method('getThemeByFullPath') ->willReturnMap([ ['frontend/Magento/blank', $parentThemeFromDbMock], @@ -139,7 +163,7 @@ public function testBeforeExecute( ->method('save') ->willReturnSelf(); - $this->plugin->beforeExecute($this->action); + $this->plugin->beforeExecute($this->actionMock); } /** @@ -155,16 +179,16 @@ public function dataProviderBeforeExecute() public function testBeforeDispatchWithProductionMode() { - $this->appState->expects($this->once())->method('getMode')->willReturn('production'); - $this->plugin->beforeExecute($this->action); + $this->appStateMock->expects($this->once())->method('getMode')->willReturn('production'); + $this->plugin->beforeExecute($this->actionMock); } public function testBeforeDispatchWithException() { $exception = new LocalizedException(new Phrase('Phrase')); - $this->themeRegistration->expects($this->once())->method('register')->willThrowException($exception); - $this->logger->expects($this->once())->method('critical'); + $this->themeRegistrationMock->expects($this->once())->method('register')->willThrowException($exception); + $this->loggerMock->expects($this->once())->method('critical'); - $this->plugin->beforeExecute($this->action); + $this->plugin->beforeExecute($this->actionMock); } } diff --git a/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php b/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php index 6113454d7ca27..66485d0410872 100644 --- a/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php +++ b/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php @@ -6,78 +6,92 @@ namespace Magento\Weee\Model\App\Action; +use Magento\Customer\Model\Session as CustomerSession; +use Magento\Framework\App\ActionInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\App\Http\Context as HttpContext; +use Magento\Framework\Module\Manager as ModuleManager; +use Magento\PageCache\Model\Config as PageCacheConfig; +use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\StoreManagerInterface; +use Magento\Tax\Helper\Data as TaxHelper; +use Magento\Tax\Model\Config as TaxConfig; +use Magento\Weee\Helper\Data as WeeeHelper; +use Magento\Weee\Model\Tax; + /** - * Class ContextPlugin + * Plugin to provide Context information to Weee Action + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ContextPlugin { /** - * @var \Magento\Customer\Model\Session + * @var CustomerSession */ protected $customerSession; /** - * @var \Magento\Framework\App\Http\Context + * @var HttpContext */ protected $httpContext; /** - * @var \Magento\Tax\Helper\Data + * @var TaxHelper */ protected $taxHelper; /** - * @var \Magento\Weee\Helper\Data + * @var WeeeHelper */ protected $weeeHelper; /** - * @var \Magento\Framework\Module\Manager + * @var ModuleManager */ protected $moduleManager; /** - * @var \Magento\Weee\Model\Tax + * @var Tax */ protected $weeeTax; /** - * @var \Magento\PageCache\Model\Config + * @var PageCacheConfig */ protected $cacheConfig; /** - * @var \Magento\Store\Model\StoreManagerInterface + * @var StoreManagerInterface */ protected $storeManager; /** - * @var \Magento\Framework\App\Config\ScopeConfigInterface + * @var ScopeConfigInterface */ protected $scopeConfig; /** - * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Framework\App\Http\Context $httpContext - * @param \Magento\Weee\Model\Tax $weeeTax - * @param \Magento\Tax\Helper\Data $taxHelper - * @param \Magento\Weee\Helper\Data $weeeHelper - * @param \Magento\Framework\Module\Manager $moduleManager - * @param \Magento\PageCache\Model\Config $cacheConfig - * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig + * @param CustomerSession $customerSession + * @param HttpContext $httpContext + * @param Tax $weeeTax + * @param TaxHelper $taxHelper + * @param WeeeHelper $weeeHelper + * @param ModuleManager $moduleManager + * @param PageCacheConfig $cacheConfig + * @param StoreManagerInterface $storeManager + * @param ScopeConfigInterface $scopeConfig */ public function __construct( - \Magento\Customer\Model\Session $customerSession, - \Magento\Framework\App\Http\Context $httpContext, - \Magento\Weee\Model\Tax $weeeTax, - \Magento\Tax\Helper\Data $taxHelper, - \Magento\Weee\Helper\Data $weeeHelper, - \Magento\Framework\Module\Manager $moduleManager, - \Magento\PageCache\Model\Config $cacheConfig, - \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig + CustomerSession $customerSession, + HttpContext $httpContext, + Tax $weeeTax, + TaxHelper $taxHelper, + WeeeHelper $weeeHelper, + ModuleManager $moduleManager, + PageCacheConfig $cacheConfig, + StoreManagerInterface $storeManager, + ScopeConfigInterface $scopeConfig ) { $this->customerSession = $customerSession; $this->httpContext = $httpContext; @@ -93,14 +107,14 @@ public function __construct( /** * Before dispatch. * - * @param \Magento\Framework\App\ActionInterface $subject + * @param ActionInterface $subject * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function beforeExecute(\Magento\Framework\App\ActionInterface $subject) + public function beforeExecute(ActionInterface $subject) { if (!$this->weeeHelper->isEnabled() || !$this->customerSession->isLoggedIn() || @@ -125,26 +139,14 @@ public function beforeExecute(\Magento\Framework\App\ActionInterface $subject) } elseif ($countryId && !$regionId) { // country exist and region does not exist $regionId = 0; - $exist = $this->weeeTax->isWeeeInLocation( - $countryId, - $regionId, - $websiteId - ); + $exist = $this->weeeTax->isWeeeInLocation($countryId, $regionId, $websiteId); } else { // country and region exist - $exist = $this->weeeTax->isWeeeInLocation( - $countryId, - $regionId, - $websiteId - ); + $exist = $this->weeeTax->isWeeeInLocation($countryId, $regionId, $websiteId); if (!$exist) { // just check the country for weee $regionId = 0; - $exist = $this->weeeTax->isWeeeInLocation( - $countryId, - $regionId, - $websiteId - ); + $exist = $this->weeeTax->isWeeeInLocation($countryId, $regionId, $websiteId); } } @@ -168,13 +170,13 @@ protected function getWeeeTaxRegion($basedOn) $countryId = null; $regionId = null; $defaultCountryId = $this->scopeConfig->getValue( - \Magento\Tax\Model\Config::CONFIG_XML_PATH_DEFAULT_COUNTRY, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + TaxConfig::CONFIG_XML_PATH_DEFAULT_COUNTRY, + ScopeInterface::SCOPE_STORE, null ); $defaultRegionId = $this->scopeConfig->getValue( - \Magento\Tax\Model\Config::CONFIG_XML_PATH_DEFAULT_REGION, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + TaxConfig::CONFIG_XML_PATH_DEFAULT_REGION, + ScopeInterface::SCOPE_STORE, null ); diff --git a/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php b/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php index ed79892366526..b28a223ef2dce 100644 --- a/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php +++ b/app/code/Magento/Weee/Test/Unit/App/Action/ContextPluginTest.php @@ -3,124 +3,146 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Weee\Test\Unit\App\Action; +use Magento\Customer\Model\Session as CustomerSession; +use Magento\Framework\App\Config; +use Magento\Framework\App\Http\Context as HttpContext; +use Magento\Framework\App\Test\Unit\Action\Stub\ActionStub; +use Magento\Framework\Module\Manager as ModuleManager; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\PageCache\Model\Config as PageCacheConfig; +use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\Store; +use Magento\Store\Model\StoreManager; +use Magento\Tax\Helper\Data as TaxHelper; +use Magento\Tax\Model\Calculation\Proxy as TaxCalculation; +use Magento\Tax\Model\Config as TaxConfig; +use Magento\Weee\Helper\Data as WeeeHelper; +use Magento\Weee\Model\App\Action\ContextPlugin; +use Magento\Weee\Model\Tax; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + /** - * Class ContextPluginTest + * Unit Tests to cover Context Plugin * - * @package Magento\Weee\Test\Unit\App\Action * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class ContextPluginTest extends \PHPUnit\Framework\TestCase +class ContextPluginTest extends TestCase { /** - * @var \Magento\Tax\Helper\Data|\PHPUnit_Framework_MockObject_MockObject + * @var TaxHelper|MockObject */ protected $taxHelperMock; /** - * @var \Magento\Weee\Helper\Data|\PHPUnit_Framework_MockObject_MockObject + * @var WeeeHelper|MockObject */ protected $weeeHelperMock; /** - * @var \Magento\Weee\Model\Tax|\PHPUnit_Framework_MockObject_MockObject + * @var Tax|MockObject */ protected $weeeTaxMock; /** - * @var \Magento\Framework\App\Http\Context|\PHPUnit_Framework_MockObject_MockObject + * @var HttpContext|MockObject */ protected $httpContextMock; /** - * @var \Magento\Tax\Model\Calculation\Proxy|\PHPUnit_Framework_MockObject_MockObject + * @var TaxCalculation|MockObject */ protected $taxCalculationMock; /** - * @var \Magento\Framework\Module\Manager|\PHPUnit_Framework_MockObject_MockObject + * @var ModuleManager|MockObject */ protected $moduleManagerMock; /** - * @var \Magento\PageCache\Model\Config|\PHPUnit_Framework_MockObject_MockObject + * @var PageCacheConfig|MockObject */ protected $cacheConfigMock; /** - * @var \Magento\Store\Model\StoreManager|\PHPUnit_Framework_MockObject_MockObject + * @var StoreManager|MockObject */ protected $storeManagerMock; /** - * @var \Magento\Framework\App\Config|\PHPUnit_Framework_MockObject_MockObject + * @var Config|MockObject */ protected $scopeConfigMock; /** - * @var \Magento\Customer\Model\Session|\PHPUnit_Framework_MockObject_MockObject + * @var CustomerSession|MockObject */ private $customerSessionMock; /** - * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager + * @var ObjectManager */ private $objectManager; /** - * @var \Magento\Tax\Model\App\Action\ContextPlugin + * @var ContextPlugin */ protected $contextPlugin; protected function setUp() { - $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); + $this->objectManager = new ObjectManager($this); - $this->taxHelperMock = $this->getMockBuilder(\Magento\Tax\Helper\Data::class) + $this->taxHelperMock = $this->getMockBuilder(TaxHelper::class) ->disableOriginalConstructor() ->getMock(); - $this->weeeHelperMock = $this->getMockBuilder(\Magento\Weee\Helper\Data::class) + $this->weeeHelperMock = $this->getMockBuilder(WeeeHelper::class) ->disableOriginalConstructor() ->getMock(); - $this->weeeTaxMock = $this->getMockBuilder(\Magento\Weee\Model\Tax::class) + $this->weeeTaxMock = $this->getMockBuilder(Tax::class) ->disableOriginalConstructor() ->getMock(); - $this->httpContextMock = $this->getMockBuilder(\Magento\Framework\App\Http\Context::class) + $this->httpContextMock = $this->getMockBuilder(HttpContext::class) ->disableOriginalConstructor() ->getMock(); - $this->customerSessionMock = $this->getMockBuilder(\Magento\Customer\Model\Session::class) + $this->customerSessionMock = $this->getMockBuilder(CustomerSession::class) ->disableOriginalConstructor() ->setMethods( [ - 'getDefaultTaxBillingAddress', 'getDefaultTaxShippingAddress', 'getCustomerTaxClassId', - 'getWebsiteId', 'isLoggedIn' + 'getDefaultTaxBillingAddress', + 'getDefaultTaxShippingAddress', + 'getCustomerTaxClassId', + 'getWebsiteId', + 'isLoggedIn' ] ) ->getMock(); - $this->moduleManagerMock = $this->getMockBuilder(\Magento\Framework\Module\Manager::class) + $this->moduleManagerMock = $this->getMockBuilder(ModuleManager::class) ->disableOriginalConstructor() ->getMock(); - $this->cacheConfigMock = $this->getMockBuilder(\Magento\PageCache\Model\Config::class) + $this->cacheConfigMock = $this->getMockBuilder(PageCacheConfig::class) ->disableOriginalConstructor() ->getMock(); - - $this->storeManagerMock = $this->getMockBuilder(\Magento\Store\Model\StoreManager::class) + + $this->storeManagerMock = $this->getMockBuilder(StoreManager::class) ->disableOriginalConstructor() ->getMock(); - $this->scopeConfigMock = $this->getMockBuilder(\Magento\Framework\App\Config::class) + $this->scopeConfigMock = $this->getMockBuilder(Config::class) ->disableOriginalConstructor() ->getMock(); $this->contextPlugin = $this->objectManager->getObject( - \Magento\Weee\Model\App\Action\ContextPlugin::class, + ContextPlugin::class, [ 'customerSession' => $this->customerSessionMock, 'httpContext' => $this->httpContextMock, @@ -158,7 +180,7 @@ public function testBeforeExecuteBasedOnDefault() ->method('getTaxBasedOn') ->willReturn('billing'); - $storeMock = $this->getMockBuilder(\Magento\Store\Model\Store::class) + $storeMock = $this->getMockBuilder(Store::class) ->disableOriginalConstructor() ->getMock(); @@ -173,8 +195,8 @@ public function testBeforeExecuteBasedOnDefault() $this->scopeConfigMock->expects($this->at(0)) ->method('getValue') ->with( - \Magento\Tax\Model\Config::CONFIG_XML_PATH_DEFAULT_COUNTRY, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + TaxConfig::CONFIG_XML_PATH_DEFAULT_COUNTRY, + ScopeInterface::SCOPE_STORE, null ) ->willReturn('US'); @@ -182,8 +204,8 @@ public function testBeforeExecuteBasedOnDefault() $this->scopeConfigMock->expects($this->at(1)) ->method('getValue') ->with( - \Magento\Tax\Model\Config::CONFIG_XML_PATH_DEFAULT_REGION, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + TaxConfig::CONFIG_XML_PATH_DEFAULT_REGION, + ScopeInterface::SCOPE_STORE, null ) ->willReturn(0); @@ -197,8 +219,8 @@ public function testBeforeExecuteBasedOnDefault() ->method('setValue') ->with('weee_tax_region', ['countryId' => 'US', 'regionId' => 0], 0); - /** @var \Magento\Framework\App\Test\Unit\Action\Stub\ActionStub $action */ - $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class); + /** @var ActionStub $action */ + $action = $this->objectManager->getObject(ActionStub::class); $this->contextPlugin->beforeExecute($action); } @@ -226,8 +248,8 @@ public function testBeforeExecuteBasedOnOrigin() ->method('getTaxBasedOn') ->willReturn('origin'); - /** @var \Magento\Framework\App\Test\Unit\Action\Stub\ActionStub $action */ - $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class); + /** @var ActionStub $action */ + $action = $this->objectManager->getObject(ActionStub::class); $this->contextPlugin->beforeExecute($action); } @@ -255,7 +277,7 @@ public function testBeforeExecuteBasedOnBilling() ->method('getTaxBasedOn') ->willReturn('billing'); - $storeMock = $this->getMockBuilder(\Magento\Store\Model\Store::class) + $storeMock = $this->getMockBuilder(Store::class) ->disableOriginalConstructor() ->getMock(); @@ -270,8 +292,8 @@ public function testBeforeExecuteBasedOnBilling() $this->scopeConfigMock->expects($this->at(0)) ->method('getValue') ->with( - \Magento\Tax\Model\Config::CONFIG_XML_PATH_DEFAULT_COUNTRY, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + TaxConfig::CONFIG_XML_PATH_DEFAULT_COUNTRY, + ScopeInterface::SCOPE_STORE, null ) ->willReturn('US'); @@ -279,8 +301,8 @@ public function testBeforeExecuteBasedOnBilling() $this->scopeConfigMock->expects($this->at(1)) ->method('getValue') ->with( - \Magento\Tax\Model\Config::CONFIG_XML_PATH_DEFAULT_REGION, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + TaxConfig::CONFIG_XML_PATH_DEFAULT_REGION, + ScopeInterface::SCOPE_STORE, null ) ->willReturn(0); @@ -298,8 +320,8 @@ public function testBeforeExecuteBasedOnBilling() ->method('setValue') ->with('weee_tax_region', ['countryId' => 'US', 'regionId' => 1], 0); - /** @var \Magento\Framework\App\Test\Unit\Action\Stub\ActionStub $action */ - $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class); + /** @var ActionStub $action */ + $action = $this->objectManager->getObject(ActionStub::class); $this->contextPlugin->beforeExecute($action); } @@ -327,7 +349,7 @@ public function testBeforeExecuterBasedOnShipping() ->method('getTaxBasedOn') ->willReturn('shipping'); - $storeMock = $this->getMockBuilder(\Magento\Store\Model\Store::class) + $storeMock = $this->getMockBuilder(Store::class) ->disableOriginalConstructor() ->getMock(); @@ -342,8 +364,8 @@ public function testBeforeExecuterBasedOnShipping() $this->scopeConfigMock->expects($this->at(0)) ->method('getValue') ->with( - \Magento\Tax\Model\Config::CONFIG_XML_PATH_DEFAULT_COUNTRY, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + TaxConfig::CONFIG_XML_PATH_DEFAULT_COUNTRY, + ScopeInterface::SCOPE_STORE, null ) ->willReturn('US'); @@ -351,8 +373,8 @@ public function testBeforeExecuterBasedOnShipping() $this->scopeConfigMock->expects($this->at(1)) ->method('getValue') ->with( - \Magento\Tax\Model\Config::CONFIG_XML_PATH_DEFAULT_REGION, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + TaxConfig::CONFIG_XML_PATH_DEFAULT_REGION, + ScopeInterface::SCOPE_STORE, null ) ->willReturn(0); @@ -370,8 +392,8 @@ public function testBeforeExecuterBasedOnShipping() ->method('setValue') ->with('weee_tax_region', ['countryId' => 'US', 'regionId' => 1], 0); - /** @var \Magento\Framework\App\Test\Unit\Action\Stub\ActionStub $action */ - $action = $this->objectManager->getObject(\Magento\Framework\App\Test\Unit\Action\Stub\ActionStub::class); + /** @var ActionStub $action */ + $action = $this->objectManager->getObject(ActionStub::class); $this->contextPlugin->beforeExecute($action); } diff --git a/dev/tests/integration/testsuite/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/PlaceTest.php b/dev/tests/integration/testsuite/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/PlaceTest.php index 780c6b226ad70..1b8b1b716ce5f 100644 --- a/dev/tests/integration/testsuite/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/PlaceTest.php +++ b/dev/tests/integration/testsuite/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/PlaceTest.php @@ -3,18 +3,33 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Authorizenet\Controller\Adminhtml\Authorizenet\Directpost\Payment; +use Magento\Authorizenet\Model\Directpost; +use Magento\Backend\App\Action\Context as BackendActionContext; +use Magento\Backend\Model\Session\Quote as SessionQuote; +use Magento\Backend\Model\UrlInterface; +use Magento\Framework\Json\Helper\Data as JsonHelper; +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Quote\Model\Quote; +use Magento\Quote\Model\Quote\Payment; +use Magento\Sales\Model\AdminOrder\Create as AdminOrderCreate; +use Magento\Sales\Model\Order; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\TestCase\AbstractBackendController; +use PHPUnit\Framework\MockObject\MockObject; + /** - * Class PlaceTest + * Verify AuthorizeNet Controller for PlaceOrder * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class PlaceTest extends \Magento\TestFramework\TestCase\AbstractBackendController +class PlaceTest extends AbstractBackendController { /** * Test requestToAuthorizenetData returning - * * @magentoAppArea adminhtml */ public function testExecuteAuthorizenetDataReturning() @@ -24,44 +39,44 @@ public function testExecuteAuthorizenetDataReturning() $this->getRequest()->setParam('payment', ['method' => 'authorizenet_directpost']); $this->getRequest()->setParam('controller', 'order_create'); $orderCreateMock = $this->getOrderCreateMock($requestToAuthorizenetData); - $directpostMock = $this->getMockBuilder(\Magento\Authorizenet\Model\Directpost::class) + $directpostMock = $this->getMockBuilder(Directpost::class) ->setMethods(['getCode']) ->disableOriginalConstructor() ->getMock(); $directpostMock->expects($this->once()) ->method('getCode') ->willReturn('authorizenet_directpost'); - $jsonHelper = $this->_objectManager->get(\Magento\Framework\Json\Helper\Data::class); - $objectManagerMock = $this->getMockBuilder(\Magento\Framework\ObjectManagerInterface::class) + $jsonHelper = $this->_objectManager->get(JsonHelper::class); + $objectManagerMock = $this->getMockBuilder(ObjectManagerInterface::class) ->setMethods(['create', 'get']) ->getMockForAbstractClass(); $objectManagerMock->expects($this->atLeastOnce()) ->method('create') - ->with(\Magento\Authorizenet\Model\Directpost::class) + ->with(Directpost::class) ->willReturn($directpostMock); - $authorizenetSessionMock = $this->getMockBuilder(\Magento\Authorizenet\Model\Directpost::class) + $authorizenetSessionMock = $this->getMockBuilder(Directpost::class) ->disableOriginalConstructor() ->getMock(); - $urlMock = $this->getMockBuilder(\Magento\Backend\Model\UrlInterface::class) + $urlMock = $this->getMockBuilder(UrlInterface::class) ->getMockForAbstractClass(); $objectManagerMock->expects($this->atLeastOnce()) ->method('get') ->willReturnMap([ - [\Magento\Sales\Model\AdminOrder\Create::class, $orderCreateMock], - [\Magento\Framework\Json\Helper\Data::class, $jsonHelper], - [\Magento\Authorizenet\Model\Directpost\Session::class, $authorizenetSessionMock], - [\Magento\Backend\Model\UrlInterface::class, $urlMock], + [AdminOrderCreate::class, $orderCreateMock], + [JsonHelper::class, $jsonHelper], + [Directpost\Session::class, $authorizenetSessionMock], + [UrlInterface::class, $urlMock], ]); - $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - \Magento\Backend\App\Action\Context::class, + $context = $this->getObjectManager()->create( + BackendActionContext::class, [ 'objectManager' => $objectManagerMock ] ); - $controller = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - \Magento\Authorizenet\Controller\Adminhtml\Authorizenet\Directpost\Payment\PlaceTesting::class, + $controller = $this->getObjectManager()->create( + PlaceTesting::class, ['context' => $context] ); $controller->execute(); @@ -70,14 +85,14 @@ public function testExecuteAuthorizenetDataReturning() /** * @param array $requestToAuthorizenetData - * @return \PHPUnit_Framework_MockObject_MockObject + * @return AdminOrderCreate|MockObject */ private function getOrderCreateMock($requestToAuthorizenetData) { - $methodInstanceMock = $this->getMockBuilder(\Magento\Authorizenet\Model\Directpost::class) + $methodInstanceMock = $this->getMockBuilder(Directpost::class) ->disableOriginalConstructor() ->getMock(); - $directpostRequestMock = $this->getMockBuilder(\Magento\Authorizenet\Model\Directpost\Request::class) + $directpostRequestMock = $this->getMockBuilder(Directpost\Request::class) ->setMethods(['getData']) ->disableOriginalConstructor() ->getMock(); @@ -87,7 +102,7 @@ private function getOrderCreateMock($requestToAuthorizenetData) $methodInstanceMock->expects($this->once()) ->method('generateRequestFromOrder') ->willReturn($directpostRequestMock); - $paymentMock = $this->getMockBuilder(\Magento\Quote\Model\Quote\Payment::class) + $paymentMock = $this->getMockBuilder(Payment::class) ->setMethods(['getMethod', 'getMethodInstance']) ->disableOriginalConstructor() ->getMock(); @@ -97,28 +112,28 @@ private function getOrderCreateMock($requestToAuthorizenetData) $paymentMock->expects($this->once()) ->method('getMethodInstance') ->willReturn($methodInstanceMock); - $quoteMock = $this->getMockBuilder(\Magento\Quote\Model\Quote::class) + $quoteMock = $this->getMockBuilder(Quote::class) ->setMethods(['getPayment', 'getStoreId']) ->disableOriginalConstructor() ->getMock(); $quoteMock->expects($this->any()) ->method('getPayment') ->willReturn($paymentMock); - $orderMock = $this->getMockBuilder(\Magento\Sales\Model\Order::class) + $orderMock = $this->getMockBuilder(Order::class) ->setMethods(['getPayment']) ->disableOriginalConstructor() ->getMock(); $orderMock->expects($this->any()) ->method('getPayment') ->willReturn($paymentMock); - $sessionQuoteMock = $this->getMockBuilder(\Magento\Backend\Model\Session\Quote::class) + $sessionQuoteMock = $this->getMockBuilder(SessionQuote::class) ->setMethods(['getOrder']) ->disableOriginalConstructor() ->getMock(); $sessionQuoteMock->expects($this->once()) ->method('getOrder') ->willReturn($orderMock); - $orderCreateMock = $this->getMockBuilder(\Magento\Sales\Model\AdminOrder\Create::class) + $orderCreateMock = $this->getMockBuilder(AdminOrderCreate::class) ->setMethods(['getQuote', 'getSession', 'setIsValidate', 'importPostData', 'createOrder', 'setPaymentData']) ->disableOriginalConstructor() ->getMock(); @@ -140,4 +155,12 @@ private function getOrderCreateMock($requestToAuthorizenetData) return $orderCreateMock; } + + /** + * @return ObjectManagerInterface + */ + private function getObjectManager(): ObjectManagerInterface + { + return Bootstrap::getObjectManager(); + } } diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php index ce2d92b62d55d..12be7607e1872 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/ControllerActionTest.php @@ -1,4 +1,10 @@ -<?php declare(strict_types=1); +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); namespace Magento\Framework\App; @@ -28,8 +34,7 @@ public function setupEventManagerSpy() $objectManager = ObjectManager::getInstance(); $originalEventManager = $objectManager->create(Event\ManagerInterface::class); - $eventManagerSpy = new class($originalEventManager) implements Event\ManagerInterface - { + $eventManagerSpy = new class($originalEventManager) implements Event\ManagerInterface { /** * @var Event\ManagerInterface */ @@ -57,7 +62,7 @@ public function spyOnDispatchedEvent(string $eventName): array } }; - $objectManager->addSharedInstance($eventManagerSpy, Event\Manager\Proxy::class); + $objectManager->addSharedInstance($eventManagerSpy, get_class($originalEventManager)); } private function assertEventDispatchCount($eventName, $expectedCount) @@ -86,7 +91,7 @@ private function fakeAuthenticatedBackendRequest() private function configureRequestForAction(string $route, string $actionPath, string $actionName) { $request = $this->getRequest(); - + $request->setRouteName($route); $request->setControllerName($actionPath); $request->setActionName($actionName); @@ -114,11 +119,11 @@ private function assertPreAndPostDispatchEventsAreDispatched() public function testInheritanceBasedFrontendActionDispatchesEvents() { $this->setupEventManagerSpy(); - + /** @var InheritanceBasedFrontendAction $action */ $action = ObjectManager::getInstance()->create(InheritanceBasedFrontendAction::class); $this->configureRequestForAction('testroute', 'actionpath', 'actionname'); - + $action->dispatch($this->getRequest()); $this->assertPreAndPostDispatchEventsAreDispatched(); @@ -130,7 +135,7 @@ public function testInheritanceBasedFrontendActionDispatchesEvents() public function testInterfaceOnlyFrontendActionDispatchesEvents() { $this->setupEventManagerSpy(); - + /** @var InterfaceOnlyFrontendAction $action */ $action = ObjectManager::getInstance()->create(InterfaceOnlyFrontendAction::class); $this->configureRequestForAction('testroute', 'actionpath', 'actionname'); @@ -146,7 +151,7 @@ public function testInterfaceOnlyFrontendActionDispatchesEvents() public function testInheritanceBasedAdminhtmlActionDispatchesEvents() { $this->fakeAuthenticatedBackendRequest(); - + $this->setupEventManagerSpy(); /** @var InheritanceBasedBackendAction $action */ @@ -184,13 +189,13 @@ public function testSettingTheNoDispatchActionFlagProhibitsExecuteAndPostdispatc /** @var InterfaceOnlyFrontendAction $action */ $action = ObjectManager::getInstance()->create(InterfaceOnlyFrontendAction::class); $this->configureRequestForAction('testroute', 'actionpath', 'actionname'); - + /** @var ActionFlag $actionFlag */ $actionFlag = ObjectManager::getInstance()->get(ActionFlag::class); $actionFlag->set('', ActionInterface::FLAG_NO_DISPATCH, true); - + $action->execute(); - + $this->assertFalse($action->isExecuted(), 'The controller execute() method was not expected to be called.'); $this->assertEventDispatchCount('controller_action_predispatch', 1); $this->assertEventDispatchCount('controller_action_predispatch_testroute', 1); diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedBackendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedBackendAction.php index 78bbc598baed0..b24cc2e30382c 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedBackendAction.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedBackendAction.php @@ -1,8 +1,17 @@ -<?php declare(strict_types=1); +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); namespace Magento\Framework\App\TestStubs; use Magento\Backend\App\Action; +use Magento\Framework\App\ResponseInterface; +use Magento\Framework\Controller\ResultInterface; +use Magento\Framework\View\Result\Page; use Magento\Framework\View\Result\PageFactory; /** @@ -15,12 +24,21 @@ class InheritanceBasedBackendAction extends Action */ private $pageFactory; + /** + * @param Action\Context $context + * @param PageFactory $pageFactory + */ public function __construct(Action\Context $context, PageFactory $pageFactory) { parent::__construct($context); $this->pageFactory = $pageFactory; } + /** + * Creates Page + * + * @return ResponseInterface|ResultInterface|Page + */ public function execute() { return $this->pageFactory->create(); diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php index 8d68014185e03..315df9585c715 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InheritanceBasedFrontendAction.php @@ -1,9 +1,18 @@ -<?php declare(strict_types=1); +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); namespace Magento\Framework\App\TestStubs; use Magento\Framework\App\Action\Action; use Magento\Framework\App\Action\Context; +use Magento\Framework\App\ResponseInterface; +use Magento\Framework\Controller\ResultInterface; +use Magento\Framework\View\Result\Page; use Magento\Framework\View\Result\PageFactory; /** @@ -21,18 +30,32 @@ class InheritanceBasedFrontendAction extends Action */ private $executeWasCalled = false; + /** + * @param Context $context + * @param PageFactory $pageFactory + */ public function __construct(Context $context, PageFactory $pageFactory) { parent::__construct($context); $this->pageFactory = $pageFactory; } + /** + * Runs `execute()` method to create Page + * + * @return ResponseInterface|ResultInterface|Page + */ public function execute() { $this->executeWasCalled = true; return $this->pageFactory->create(); } + /** + * Determines whether execute method was called + * + * @return bool + */ public function isExecuted(): bool { return $this->executeWasCalled; diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php index fd176e8163010..86244fd67237b 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyBackendAction.php @@ -1,8 +1,16 @@ -<?php declare(strict_types=1); +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); namespace Magento\Framework\App\TestStubs; use Magento\Framework\App\ActionInterface; +use Magento\Framework\App\ResponseInterface; +use Magento\Framework\Controller\ResultInterface; +use Magento\Framework\View\Result\Page; use Magento\Framework\View\Result\PageFactory; /** @@ -15,11 +23,19 @@ class InterfaceOnlyBackendAction implements ActionInterface */ private $pageFactory; + /** + * @param PageFactory $pageFactory + */ public function __construct(PageFactory $pageFactory) { $this->pageFactory = $pageFactory; } + /** + * Creates Page object + * + * @return ResponseInterface|ResultInterface|Page + */ public function execute() { return $this->pageFactory->create(); diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php index 36dd3bfd518f7..123fe2ea87be1 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/TestStubs/InterfaceOnlyFrontendAction.php @@ -1,8 +1,16 @@ -<?php declare(strict_types=1); +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); namespace Magento\Framework\App\TestStubs; use Magento\Framework\App\ActionInterface; +use Magento\Framework\App\ResponseInterface; +use Magento\Framework\Controller\ResultInterface; +use Magento\Framework\View\Result\Page; use Magento\Framework\View\Result\PageFactory; /** @@ -20,17 +28,30 @@ class InterfaceOnlyFrontendAction implements ActionInterface */ private $executeWasCalled = false; + /** + * @param PageFactory $pageFactory + */ public function __construct(PageFactory $pageFactory) { $this->pageFactory = $pageFactory; } + /** + * Creates Page object + * + * @return ResponseInterface|ResultInterface|Page + */ public function execute() { $this->executeWasCalled = true; return $this->pageFactory->create(); } + /** + * Returns whether `execute()` method was ran + * + * @return bool + */ public function isExecuted(): bool { return $this->executeWasCalled; diff --git a/lib/internal/Magento/Framework/App/Action/Action.php b/lib/internal/Magento/Framework/App/Action/Action.php index 7412965be14cc..3ae0bbac44f8a 100644 --- a/lib/internal/Magento/Framework/App/Action/Action.php +++ b/lib/internal/Magento/Framework/App/Action/Action.php @@ -3,12 +3,20 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Framework\App\Action; +use Magento\Framework\App\ActionFlag; use Magento\Framework\App\RequestInterface; +use Magento\Framework\App\Response\RedirectInterface; use Magento\Framework\App\ResponseInterface; -use Magento\Framework\Controller\ResultInterface; +use Magento\Framework\App\ViewInterface; +use Magento\Framework\Event\ManagerInterface as EventManagerInterface; use Magento\Framework\Exception\NotFoundException; +use Magento\Framework\Message\ManagerInterface as MessageManagerInterface; +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\Profiler; +use Magento\Framework\UrlInterface; /** * Extend from this class to create actions controllers in frontend area of your application. @@ -17,6 +25,7 @@ * * TODO: Remove this class. Allow implementation of Action Controllers by just implementing Action Interface. * + * phpcs:disable Magento2.Classes.AbstractApi * @api * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.NumberOfChildren) @@ -24,7 +33,7 @@ abstract class Action extends AbstractAction { /** - * @var \Magento\Framework\ObjectManagerInterface + * @var ObjectManagerInterface */ protected $_objectManager; @@ -37,32 +46,32 @@ abstract class Action extends AbstractAction protected $_sessionNamespace; /** - * @var \Magento\Framework\Event\ManagerInterface + * @var EventManagerInterface */ protected $_eventManager; /** - * @var \Magento\Framework\App\ActionFlag + * @var ActionFlag */ protected $_actionFlag; /** - * @var \Magento\Framework\App\Response\RedirectInterface + * @var RedirectInterface */ protected $_redirect; /** - * @var \Magento\Framework\App\ViewInterface + * @var ViewInterface */ protected $_view; /** - * @var \Magento\Framework\UrlInterface + * @var UrlInterface */ protected $_url; /** - * @var \Magento\Framework\Message\ManagerInterface + * @var MessageManagerInterface */ protected $messageManager; @@ -92,15 +101,15 @@ public function dispatch(RequestInterface $request) { $this->_request = $request; $profilerKey = 'CONTROLLER_ACTION:' . $request->getFullActionName(); - \Magento\Framework\Profiler::start($profilerKey); + Profiler::start($profilerKey); $result = null; if ($request->isDispatched() && !$this->_actionFlag->get('', self::FLAG_NO_DISPATCH)) { - \Magento\Framework\Profiler::start('action_body'); + Profiler::start('action_body'); $result = $this->execute(); - \Magento\Framework\Profiler::stop('action_body'); + Profiler::stop('action_body'); } - \Magento\Framework\Profiler::stop($profilerKey); + Profiler::stop($profilerKey); return $result ?: $this->_response; } @@ -139,9 +148,9 @@ protected function _forward($action, $controller = null, $module = null, array $ /** * Set redirect into response * - * @param string $path - * @param array $arguments - * @return ResponseInterface + * @param string $path + * @param array $arguments + * @return ResponseInterface */ protected function _redirect($path, $arguments = []) { @@ -150,6 +159,8 @@ protected function _redirect($path, $arguments = []) } /** + * Returns ActionFlag value + * * @return \Magento\Framework\App\ActionFlag */ public function getActionFlag() diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php index 98010656ff91d..263e3663513d3 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php @@ -1,4 +1,10 @@ -<?php declare(strict_types=1); +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); namespace Magento\Framework\App\Action\Plugin; @@ -21,6 +27,10 @@ class ActionFlagNoDispatchPlugin */ private $response; + /** + * @param ActionFlag $actionFlag + * @param ResponseInterface $response + */ public function __construct(ActionFlag $actionFlag, ResponseInterface $response) { $this->actionFlag = $actionFlag; diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/Design.php b/lib/internal/Magento/Framework/App/Action/Plugin/Design.php index babde4bcc883a..a1979e88d8128 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/Design.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/Design.php @@ -6,27 +6,35 @@ namespace Magento\Framework\App\Action\Plugin; +use Magento\Framework\App\ActionInterface; +use Magento\Framework\Config\Dom\ValidationException; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Message\ManagerInterface as MessageManagerInterface; use Magento\Framework\Message\MessageInterface; +use Magento\Framework\View\DesignLoader; +/** + * Handling Exceptions on Design Loading + */ class Design { /** - * @var \Magento\Framework\View\DesignLoader + * @var DesignLoader */ protected $_designLoader; /** - * @var \Magento\Framework\Message\ManagerInterface + * @var MessageManagerInterface */ protected $messageManager; /** - * @param \Magento\Framework\View\DesignLoader $designLoader - * @param \Magento\Framework\Message\ManagerInterface $messageManager + * @param DesignLoader $designLoader + * @param MessageManagerInterface $messageManager */ public function __construct( - \Magento\Framework\View\DesignLoader $designLoader, - \Magento\Framework\Message\ManagerInterface $messageManager + DesignLoader $designLoader, + MessageManagerInterface $messageManager ) { $this->_designLoader = $designLoader; $this->messageManager = $messageManager; @@ -35,17 +43,16 @@ public function __construct( /** * Initialize design * - * @param \Magento\Framework\App\ActionInterface $subject - * + * @param ActionInterface $subject * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function beforeExecute(\Magento\Framework\App\ActionInterface $subject) + public function beforeExecute(ActionInterface $subject) { try { $this->_designLoader->load(); - } catch (\Magento\Framework\Exception\LocalizedException $e) { - if ($e->getPrevious() instanceof \Magento\Framework\Config\Dom\ValidationException) { + } catch (LocalizedException $e) { + if ($e->getPrevious() instanceof ValidationException) { /** @var MessageInterface $message */ $message = $this->messageManager ->createMessage(MessageInterface::TYPE_ERROR) diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php index e7c4d610c230f..34a8fa3cb1ea2 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php @@ -1,4 +1,10 @@ -<?php declare(strict_types=1); +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); namespace Magento\Framework\App\Action\Plugin; @@ -31,6 +37,11 @@ class EventDispatchPlugin */ private $actionFlag; + /** + * @param RequestInterface $request + * @param ManagerInterface $eventManager + * @param ActionFlag $actionFlag + */ public function __construct(RequestInterface $request, ManagerInterface $eventManager, ActionFlag $actionFlag) { $this->request = $request; @@ -68,10 +79,10 @@ private function getEventParameters(ActionInterface $subject): array */ public function afterExecute(ActionInterface $subject, $result) { - if (! $this->isSetActionNoPostDispatchFlag()) { + if (!$this->isSetActionNoPostDispatchFlag()) { $this->dispatchPostDispatchEvents($subject); } - + return $result; } @@ -80,12 +91,11 @@ public function afterExecute(ActionInterface $subject, $result) * * @param ActionInterface $subject * @return bool - * */ private function isSetActionNoPostDispatchFlag(): bool { return $this->actionFlag->get('', Action::FLAG_NO_DISPATCH) || - $this->actionFlag->get('', Action::FLAG_NO_POST_DISPATCH); + $this->actionFlag->get('', Action::FLAG_NO_POST_DISPATCH); } /** diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Action/ActionTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Action/ActionTest.php index cc0a43a703985..c2d30187845a4 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Action/ActionTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Action/ActionTest.php @@ -8,94 +8,87 @@ use \Magento\Framework\App\Action\Action; +use Magento\Framework\App\ActionFlag; +use Magento\Framework\App\Request\Http as HttpRequest; +use Magento\Framework\App\Response\RedirectInterface; +use Magento\Framework\App\ResponseInterface; +use Magento\Framework\App\ViewInterface; +use Magento\Framework\Event\ManagerInterface; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; +use Magento\Framework\View\Page\Config as PageConfig; +use PHPUnit\Framework\MockObject\MockObject; class ActionTest extends \PHPUnit\Framework\TestCase { - /** @var \Magento\Framework\App\Test\Unit\Action\ActionFake */ + /** + * @var ActionFake + */ protected $action; - /** @var ObjectManagerHelper */ + /** + * @var ObjectManagerHelper + */ protected $objectManagerHelper; /** - * @var \Magento\Framework\App\Request\Http|\PHPUnit_Framework_MockObject_MockObject + * @var HttpRequest|MockObject */ protected $_requestMock; /** - * @var \Magento\Framework\App\ResponseInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ResponseInterface|MockObject */ protected $_responseMock; /** - * @var \Magento\Framework\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ManagerInterface|MockObject */ protected $_eventManagerMock; /** - * @var \Magento\Framework\App\ActionFlag|\PHPUnit_Framework_MockObject_MockObject + * @var ActionFlag|MockObject */ protected $_actionFlagMock; /** - * @var \Magento\Framework\App\Response\RedirectInterface|\PHPUnit_Framework_MockObject_MockObject + * @var RedirectInterface|MockObject */ protected $_redirectMock; /** - * @var \Magento\Framework\App\ViewInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ViewInterface|MockObject */ protected $viewMock; /** - * @var \Magento\Framework\View\Page\Config|\PHPUnit_Framework_MockObject_MockObject + * @var PageConfig|MockObject */ protected $pageConfigMock; - /** - * Full action name - */ - const FULL_ACTION_NAME = 'module/controller/someaction'; - - /** - * Route name - */ - const ROUTE_NAME = 'module/controller/actionroute'; - - /** - * Action name - */ - const ACTION_NAME = 'someaction'; - - /** - * Controller name - */ - const CONTROLLER_NAME = 'controller'; - - /** - * Module name - */ - const MODULE_NAME = 'module'; + public const FULL_ACTION_NAME = 'module/controller/someaction'; + public const ROUTE_NAME = 'module/controller/actionroute'; + public const ACTION_NAME = 'someaction'; + public const CONTROLLER_NAME = 'controller'; + public const MODULE_NAME = 'module'; public static $actionParams = ['param' => 'value']; protected function setUp() { - $this->_eventManagerMock = $this->createMock(\Magento\Framework\Event\ManagerInterface::class); - $this->_actionFlagMock = $this->createMock(\Magento\Framework\App\ActionFlag::class); - $this->_redirectMock = $this->createMock(\Magento\Framework\App\Response\RedirectInterface::class); - $this->_requestMock = $this->createMock(\Magento\Framework\App\Request\Http::class); - $this->_responseMock = $this->createMock(\Magento\Framework\App\ResponseInterface::class); - - $this->pageConfigMock = $this->createPartialMock(\Magento\Framework\View\Page\Config::class, ['getConfig']); - $this->viewMock = $this->createMock(\Magento\Framework\App\ViewInterface::class); + $this->_eventManagerMock = $this->createMock(ManagerInterface::class); + $this->_actionFlagMock = $this->createMock(ActionFlag::class); + $this->_redirectMock = $this->createMock(RedirectInterface::class); + $this->_requestMock = $this->createMock(HttpRequest::class); + $this->_responseMock = $this->createMock(ResponseInterface::class); + + $this->pageConfigMock = $this->createPartialMock(PageConfig::class, ['getConfig']); + $this->viewMock = $this->createMock(ViewInterface::class); $this->viewMock->expects($this->any())->method('getPage')->will($this->returnValue($this->pageConfigMock)); $this->pageConfigMock->expects($this->any())->method('getConfig')->willReturn(1); $this->objectManagerHelper = new ObjectManagerHelper($this); $this->action = $this->objectManagerHelper->getObject( - \Magento\Framework\App\Test\Unit\Action\ActionFake::class, + ActionFake::class, [ 'request' => $this->_requestMock, 'response' => $this->_responseMock, From ef05fa689c0d2328ec792bc08b5b6cc68200a4b7 Mon Sep 17 00:00:00 2001 From: Fred Orosko Dias <fred@absoluteweb.com> Date: Wed, 29 Jan 2020 16:43:40 -0500 Subject: [PATCH 062/229] Improve exception message --- .../Magento/Checkout/Model/ShippingInformationManagement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Model/ShippingInformationManagement.php b/app/code/Magento/Checkout/Model/ShippingInformationManagement.php index 369ae8e6f725e..953f42a49ad80 100644 --- a/app/code/Magento/Checkout/Model/ShippingInformationManagement.php +++ b/app/code/Magento/Checkout/Model/ShippingInformationManagement.php @@ -185,7 +185,7 @@ public function saveAddressInformation( } catch (\Exception $e) { $this->logger->critical($e); throw new InputException( - __('The shipping information was unable to be saved. Verify the input data and try again.') + __('The shipping information was unable to be saved. Error: "%1"', $e->getMessage()) ); } From b00ed884fab246f8b5caceca31d539293df4d255 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Thu, 30 Jan 2020 14:22:02 +0100 Subject: [PATCH 063/229] :rofl: debugging on production --- .../Catalog/Controller/Adminhtml/Product/MassDelete.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/MassDelete.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/MassDelete.php index 7fa9d36163502..f0135a15c223a 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/MassDelete.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/MassDelete.php @@ -87,8 +87,11 @@ public function execute() $this->productRepository->delete($product); $productDeleted++; } catch (LocalizedException $exception) { + $this->messageManager->addErrorMessage((string)$exception); /** @FIXME Temporary for Debugging purposes */ $this->logger->error($exception->getLogMessage()); $productDeletedError++; + } catch (\Exception $e) { + $this->messageManager->addErrorMessage((string)$e); /** @FIXME Temporary for Debugging purposes */ } } From 7185e8f024582226a5badfdafd370091a352f37c Mon Sep 17 00:00:00 2001 From: Alastair Mucklow <amucklow@strangerpixel.com> Date: Thu, 30 Jan 2020 15:40:54 +0000 Subject: [PATCH 064/229] Add missing stories annotation --- .../Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml b/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml index 0320b6f422cd6..f934fbd4af5b3 100644 --- a/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml +++ b/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml @@ -10,6 +10,7 @@ <test name="AdminScheduledImportSettingsHiddenTest"> <annotations> <features value="Directory"/> + <stories value="Check Scheduled Import Settings"/> <title value="Scheduled import settings hidden" /> <description value="Scheduled Import Settings' should hide fields when 'Enabled' is 'No'"/> <severity value="MINOR"/> From b3c311e0142f7c9b5313008f290e9f11ceec0b9c Mon Sep 17 00:00:00 2001 From: Alastair Mucklow <amucklow@strangerpixel.com> Date: Thu, 30 Jan 2020 15:41:06 +0000 Subject: [PATCH 065/229] Remove quote mark --- .../Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml b/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml index f934fbd4af5b3..91fe85f8c1968 100644 --- a/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml +++ b/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml @@ -12,7 +12,7 @@ <features value="Directory"/> <stories value="Check Scheduled Import Settings"/> <title value="Scheduled import settings hidden" /> - <description value="Scheduled Import Settings' should hide fields when 'Enabled' is 'No'"/> + <description value="Scheduled Import Settings should hide fields when 'Enabled' is 'No'"/> <severity value="MINOR"/> </annotations> <before> From fa54aa7fd9671a0245a2608f5d2fb51a95d39d92 Mon Sep 17 00:00:00 2001 From: Alastair Mucklow <amucklow@strangerpixel.com> Date: Thu, 30 Jan 2020 16:20:06 +0000 Subject: [PATCH 066/229] Add missing stories annotation for Create CMS Page tests --- .../Cms/Test/Mftf/Test/AdminCMSPageCreateDisabledPageTest.xml | 1 + .../Test/Mftf/Test/AdminCMSPageCreatePageForDefaultStoreTest.xml | 1 + .../Mftf/Test/AdminCMSPageCreatePageInSingleStoreModeTest.xml | 1 + .../Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageTest.xml | 1 + .../Cms/Test/Mftf/Test/AdminCMSPageCreatePageWithBlockTest.xml | 1 + .../Magento/Cms/Test/Mftf/Test/AdminCmsPageMassActionTest.xml | 1 + .../Test/Mftf/Test/AdminCreateOrderWithDateTimeOptionUITest.xml | 1 + 7 files changed, 7 insertions(+) diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreateDisabledPageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreateDisabledPageTest.xml index 5b83807eca244..2e24e614ab1eb 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreateDisabledPageTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreateDisabledPageTest.xml @@ -10,6 +10,7 @@ <test name="AdminCMSPageCreateDisabledPageTest"> <annotations> <features value="Cms"/> + <stories value="Create CMS Page"/> <title value="Create disabled CMS Page via the Admin"/> <description value="Admin should be able to create a CMS Page"/> <severity value="CRITICAL"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageForDefaultStoreTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageForDefaultStoreTest.xml index a9f5fcd8b17e0..70fb7e6a7fed6 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageForDefaultStoreTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageForDefaultStoreTest.xml @@ -10,6 +10,7 @@ <test name="AdminCMSPageCreatePageForDefaultStoreTest"> <annotations> <features value="Cms"/> + <stories value="Create CMS Page"/> <title value="Create CMS Page via the Admin for default store"/> <description value="Admin should be able to create a CMS Page"/> <severity value="CRITICAL"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageInSingleStoreModeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageInSingleStoreModeTest.xml index 1ec85f90f46ef..e22aa07890033 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageInSingleStoreModeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageInSingleStoreModeTest.xml @@ -10,6 +10,7 @@ <test name="AdminCMSPageCreatePageInSingleStoreModeTest"> <annotations> <features value="Cms"/> + <stories value="Create CMS Page"/> <title value="Create CMS Page via the Admin in single store mode"/> <description value="Admin should be able to create a CMS Page"/> <severity value="CRITICAL"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageTest.xml index 947fa92f2c8ff..6df0de086b63c 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageTest.xml @@ -10,6 +10,7 @@ <test name="AdminCMSPageCreatePageTest"> <annotations> <features value="Cms"/> + <stories value="Create CMS Page"/> <title value="Create CMS Page via the Admin"/> <description value="Admin should be able to create a CMS Page"/> <severity value="CRITICAL"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageWithBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageWithBlockTest.xml index a6c67dc61dd97..c7bc1715bcd73 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageWithBlockTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageWithBlockTest.xml @@ -10,6 +10,7 @@ <test name="AdminCMSPageCreatePageWithBlockTest"> <annotations> <features value="Cms"/> + <stories value="Create CMS Page"/> <title value="Create CMS Page that contains block content via the Admin"/> <description value="Admin should be able to create a CMS Page"/> <severity value="CRITICAL"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageMassActionTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageMassActionTest.xml index 7cc0719dcbeb2..be7122fbef054 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageMassActionTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageMassActionTest.xml @@ -10,6 +10,7 @@ <test name="AdminCmsPageMassActionTest"> <annotations> <features value="CmsPage"/> + <stories value="Create CMS Page"/> <title value="Create two CMS Pages and perform mass disable action"/> <description value="Admin should be able to perform mass actions to CMS pages"/> <stories value="Admin Grid Mass Action" /> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithDateTimeOptionUITest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithDateTimeOptionUITest.xml index 7e58e55c8981e..ccdcaf9ab9147 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithDateTimeOptionUITest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithDateTimeOptionUITest.xml @@ -13,6 +13,7 @@ <title value="Admin create order with date time option UI test"/> <description value="Check asterisk rendered correctly for Product with custom option (datetime) at backend"/> <features value="Sales"/> + <stories value="Create order in Admin"/> <severity value="MINOR"/> <group value="Sales"/> </annotations> From 71b7d1082deee4f01b029734bd46be6c3cdd0fae Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Fri, 31 Jan 2020 01:28:12 +0100 Subject: [PATCH 067/229] Remove temporary debug changes --- .../Controller/Adminhtml/Product/MassDelete.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/MassDelete.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/MassDelete.php index f0135a15c223a..c779c01cd7d71 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/MassDelete.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/MassDelete.php @@ -8,15 +8,13 @@ namespace Magento\Catalog\Controller\Adminhtml\Product; -use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface; -use Magento\Framework\Controller\ResultFactory; use Magento\Backend\App\Action\Context; -use Magento\Ui\Component\MassAction\Filter; -use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory; use Magento\Catalog\Api\ProductRepositoryInterface; -use Magento\Framework\Exception\CouldNotSaveException; -use Magento\Framework\Exception\StateException; +use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory; +use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface; +use Magento\Framework\Controller\ResultFactory; use Magento\Framework\Exception\LocalizedException; +use Magento\Ui\Component\MassAction\Filter; use Psr\Log\LoggerInterface; /** @@ -87,11 +85,8 @@ public function execute() $this->productRepository->delete($product); $productDeleted++; } catch (LocalizedException $exception) { - $this->messageManager->addErrorMessage((string)$exception); /** @FIXME Temporary for Debugging purposes */ $this->logger->error($exception->getLogMessage()); $productDeletedError++; - } catch (\Exception $e) { - $this->messageManager->addErrorMessage((string)$e); /** @FIXME Temporary for Debugging purposes */ } } From c5359421316031034477df6d8e5e54528658528f Mon Sep 17 00:00:00 2001 From: Alastair Mucklow <amucklow@strangerpixel.com> Date: Fri, 31 Jan 2020 12:55:31 +0000 Subject: [PATCH 068/229] Add missing stories annotations --- .../Test/Mftf/Test/AdminCardinalCommerceSettingsHiddenTest.xml | 1 + .../Mftf/Test/ProductAttributeWithoutValueInCompareListTest.xml | 1 + .../Test/StorefrontCategoryAccessibleWhenSuffixIsNullTest.xml | 1 + .../Test/Mftf/Test/NoErrorForMiniCartItemEditTest.xml | 1 + .../Newsletter/Test/Mftf/Test/AdminNameEmptyForGuestTest.xml | 1 + .../Test/StorefrontNoJavascriptErrorOnAddYourReviewClickTest.xml | 1 + .../Mftf/Test/AdminSignifydConfigDependentOnActiveFieldTest.xml | 1 + .../Test/Mftf/Test/AdminSetUpWatermarkForSwatchImageTest.xml | 1 + 8 files changed, 8 insertions(+) diff --git a/app/code/Magento/CardinalCommerce/Test/Mftf/Test/AdminCardinalCommerceSettingsHiddenTest.xml b/app/code/Magento/CardinalCommerce/Test/Mftf/Test/AdminCardinalCommerceSettingsHiddenTest.xml index a41b96f0db6e4..ae799cc4dbd96 100644 --- a/app/code/Magento/CardinalCommerce/Test/Mftf/Test/AdminCardinalCommerceSettingsHiddenTest.xml +++ b/app/code/Magento/CardinalCommerce/Test/Mftf/Test/AdminCardinalCommerceSettingsHiddenTest.xml @@ -10,6 +10,7 @@ <test name="AdminCardinalCommerceSettingsHiddenTest"> <annotations> <features value="CardinalCommerce"/> + <stories value="Configure CardinalCommerce"/> <title value="CardinalCommerce settings hidden" /> <description value="CardinalCommerce config shouldn't be visible if the 3D secure is disabled for Authorize.Net."/> <severity value="MINOR"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/ProductAttributeWithoutValueInCompareListTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/ProductAttributeWithoutValueInCompareListTest.xml index 70d2fb63941c7..e3c3f53affcd2 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/ProductAttributeWithoutValueInCompareListTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/ProductAttributeWithoutValueInCompareListTest.xml @@ -11,6 +11,7 @@ <test name="ProductAttributeWithoutValueInCompareListTest"> <annotations> <features value="Catalog"/> + <stories value="Compare products and their attributes"/> <title value="Product attribute without value in compare list test"/> <description value="The product attribute that has no value should output 'N/A' on the product comparison page."/> diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/StorefrontCategoryAccessibleWhenSuffixIsNullTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/StorefrontCategoryAccessibleWhenSuffixIsNullTest.xml index ef8f2b6b1a3e2..3323e8aaa7dbf 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/StorefrontCategoryAccessibleWhenSuffixIsNullTest.xml +++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/StorefrontCategoryAccessibleWhenSuffixIsNullTest.xml @@ -12,6 +12,7 @@ <title value="Storefront category is accessible when url suffix is set to null test"/> <description value="Check no crash occurs on Category page when catalog/seo/category_url_suffix is set to null"/> <features value="CatalogUrlRewrite"/> + <stories value="Url rewrites"/> <severity value="MAJOR"/> <group value="CatalogUrlRewrite"/> </annotations> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoErrorForMiniCartItemEditTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoErrorForMiniCartItemEditTest.xml index 42bad3e4bb8bf..c40ef02046440 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoErrorForMiniCartItemEditTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoErrorForMiniCartItemEditTest.xml @@ -11,6 +11,7 @@ <test name="NoErrorForMiniCartItemEditTest"> <annotations> <features value="ConfigurableProduct"/> + <stories value="Edit minicart"/> <title value="No error for minicart item edit test"/> <description value="Already selected configurable option should be selected when configurable product is edited from minicart"/> <severity value="MAJOR"/> diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminNameEmptyForGuestTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminNameEmptyForGuestTest.xml index 07c7cc050d5cf..5b9c7ae46c42d 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminNameEmptyForGuestTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminNameEmptyForGuestTest.xml @@ -11,6 +11,7 @@ <test name="AdminNameEmptyForGuestTest"> <annotations> <features value="Newsletter"/> + <stories value="Newsletter Subscribers grid"/> <group value="Newsletter"/> <title value="Empty name for Guest Customer"/> <description value="'Customer First Name' and 'Customer Last Name' should be empty for Guest Customer in Newsletter Subscribers Grid"/> diff --git a/app/code/Magento/Review/Test/Mftf/Test/StorefrontNoJavascriptErrorOnAddYourReviewClickTest.xml b/app/code/Magento/Review/Test/Mftf/Test/StorefrontNoJavascriptErrorOnAddYourReviewClickTest.xml index 99e418a950c69..801d68904a24e 100644 --- a/app/code/Magento/Review/Test/Mftf/Test/StorefrontNoJavascriptErrorOnAddYourReviewClickTest.xml +++ b/app/code/Magento/Review/Test/Mftf/Test/StorefrontNoJavascriptErrorOnAddYourReviewClickTest.xml @@ -11,6 +11,7 @@ <test name="StorefrontNoJavascriptErrorOnAddYourReviewClickTest"> <annotations> <features value="Review"/> + <stories value="Add a review on the storefront"/> <title value="Storefront no javascript error on 'Add Your Review' click test"/> <description value="Verify no javascript error occurs when customer clicks 'Add Your Review' link"/> <severity value="MAJOR"/> diff --git a/app/code/Magento/Signifyd/Test/Mftf/Test/AdminSignifydConfigDependentOnActiveFieldTest.xml b/app/code/Magento/Signifyd/Test/Mftf/Test/AdminSignifydConfigDependentOnActiveFieldTest.xml index dcae0c4091ba6..278d5a09a3aba 100644 --- a/app/code/Magento/Signifyd/Test/Mftf/Test/AdminSignifydConfigDependentOnActiveFieldTest.xml +++ b/app/code/Magento/Signifyd/Test/Mftf/Test/AdminSignifydConfigDependentOnActiveFieldTest.xml @@ -10,6 +10,7 @@ <test name="AdminSignifydConfigDependentOnActiveFieldTest"> <annotations> <features value="Signifyd"/> + <stories value="Configure Signifyd"/> <title value="Signifyd config dependent on active field" /> <description value="Signifyd system configs dependent by Enable this Solution field."/> <severity value="MINOR"/> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminSetUpWatermarkForSwatchImageTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminSetUpWatermarkForSwatchImageTest.xml index 569952019b29b..dfa87424cffc2 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminSetUpWatermarkForSwatchImageTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminSetUpWatermarkForSwatchImageTest.xml @@ -11,6 +11,7 @@ <test name="AdminSetUpWatermarkForSwatchImageTest"> <annotations> <features value="Swatches"/> + <stories value="Set up watermark"/> <title value="Possibility to set up watermark for a swatch image type"/> <description value="Possibility to set up watermark for a swatch image type"/> <severity value="MAJOR"/> From 27bc1352d167b69f82900aa36f6b330cc6f268db Mon Sep 17 00:00:00 2001 From: Alastair Mucklow <amucklow@strangerpixel.com> Date: Fri, 31 Jan 2020 13:08:42 +0000 Subject: [PATCH 069/229] Add missing severity annotations --- .../Test/Mftf/Test/AdminDeleteIntegrationEntityTest.xml | 1 + .../Test/Mftf/Test/NewCustomerPasswordComplexityTest.xml | 1 + .../Security/Test/Mftf/Test/NewCustomerPasswordLengthTest.xml | 1 + .../Test/AdminDeleteCategoryUrlRewriteHypenAsRequestPathTest.xml | 1 + .../Test/AdminDeleteCategoryUrlRewriteWithRequestPathTest.xml | 1 + .../Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml | 1 + .../AdminDeleteCmsPageUrlRewriteWithPermanentRedirectTest.xml | 1 + .../AdminDeleteCmsPageUrlRewriteWithTemporaryRedirectTest.xml | 1 + .../Test/AdminUpdateCmsPageRewriteEntityWithNoRedirectTest.xml | 1 + .../AdminUpdateCmsPageRewriteEntityWithPermanentReirectTest.xml | 1 + .../AdminUpdateCmsPageRewriteEntityWithTemporaryRedirectTest.xml | 1 + 11 files changed, 11 insertions(+) diff --git a/app/code/Magento/Integration/Test/Mftf/Test/AdminDeleteIntegrationEntityTest.xml b/app/code/Magento/Integration/Test/Mftf/Test/AdminDeleteIntegrationEntityTest.xml index 6f46bbf99d218..66e6a29beb06b 100644 --- a/app/code/Magento/Integration/Test/Mftf/Test/AdminDeleteIntegrationEntityTest.xml +++ b/app/code/Magento/Integration/Test/Mftf/Test/AdminDeleteIntegrationEntityTest.xml @@ -14,6 +14,7 @@ <stories value="System Integration"/> <title value="Admin system integration"/> <description value="Admin Deletes Created Integration"/> + <severity value="CRITICAL"/> <group value="integration"/> <group value="mtf_migrated"/> </annotations> diff --git a/app/code/Magento/Security/Test/Mftf/Test/NewCustomerPasswordComplexityTest.xml b/app/code/Magento/Security/Test/Mftf/Test/NewCustomerPasswordComplexityTest.xml index 74a9c68cb2f79..d7151aff22fa7 100644 --- a/app/code/Magento/Security/Test/Mftf/Test/NewCustomerPasswordComplexityTest.xml +++ b/app/code/Magento/Security/Test/Mftf/Test/NewCustomerPasswordComplexityTest.xml @@ -15,6 +15,7 @@ <title value="Notify the customer if password complexity does not match the requirements"/> <description value="Notify the customer if password complexity does not match the requirements"/> <testCaseId value="MC-14368"/> + <severity value="CRITICAL"/> <group value="security"/> <group value="mtf_migrated"/> </annotations> diff --git a/app/code/Magento/Security/Test/Mftf/Test/NewCustomerPasswordLengthTest.xml b/app/code/Magento/Security/Test/Mftf/Test/NewCustomerPasswordLengthTest.xml index a10059d0603c5..298b4de11f9ca 100644 --- a/app/code/Magento/Security/Test/Mftf/Test/NewCustomerPasswordLengthTest.xml +++ b/app/code/Magento/Security/Test/Mftf/Test/NewCustomerPasswordLengthTest.xml @@ -15,6 +15,7 @@ <title value="Notify the customer if password length does not match the requirements"/> <description value="Notify the customer if password length does not match the requirements"/> <testCaseId value="MC-14367"/> + <severity value="CRITICAL"/> <group value="security"/> <group value="mtf_migrated"/> </annotations> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteHypenAsRequestPathTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteHypenAsRequestPathTest.xml index 4b9f37f628f34..5365647a215c4 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteHypenAsRequestPathTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteHypenAsRequestPathTest.xml @@ -14,6 +14,7 @@ <title value="Delete category URL rewrite, hyphen as request path"/> <description value="Delete category URL rewrite, hyphen as request path"/> <testCaseId value="MC-5348" /> + <severity value="CRITICAL"/> <group value="urlRewrite"/> <group value="mtf_migrated"/> </annotations> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteWithRequestPathTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteWithRequestPathTest.xml index 7c4023c6d0f75..54c03dfdb531e 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteWithRequestPathTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteWithRequestPathTest.xml @@ -14,6 +14,7 @@ <title value="Delete category URL rewrite, with request path"/> <description value="Delete category URL rewrite, with request path"/> <testCaseId value="MC-5349" /> + <severity value="CRITICAL"/> <group value="urlRewrite"/> <group value="mtf_migrated"/> </annotations> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml index c40dd3256114e..6b65292ae9b7f 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml @@ -14,6 +14,7 @@ <title value="Delete CMS Page URL rewrite with No Redirects"/> <description value="Log in to admin and delete CMS Page URL rewrite with No Redirects"/> <testCaseId value="MC-14648"/> + <severity value="CRITICAL"/> <group value="mtf_migrated"/> </annotations> <before> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithPermanentRedirectTest.xml index 741be6985d517..f182cd2c6a431 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithPermanentRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithPermanentRedirectTest.xml @@ -14,6 +14,7 @@ <title value="Delete CMS Page URL rewrite with Permanent Redirect"/> <description value="Log in to admin and delete CMS Page URL rewrite with Permanent Redirect"/> <testCaseId value="MC-14649"/> + <severity value="CRITICAL"/> <group value="mtf_migrated"/> </annotations> <before> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithTemporaryRedirectTest.xml index 43de4123f35a8..e3d417f3c1f39 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithTemporaryRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithTemporaryRedirectTest.xml @@ -14,6 +14,7 @@ <title value="Delete CMS Page URL rewrite with Temporary Redirect"/> <description value="Log in to admin and delete CMS Page URL rewrite with Temporary Redirect"/> <testCaseId value="MC-14650"/> + <severity value="CRITICAL"/> <group value="mtf_migrated"/> </annotations> <before> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithNoRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithNoRedirectTest.xml index 6467a5051631d..f308ffc0a4d79 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithNoRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithNoRedirectTest.xml @@ -12,6 +12,7 @@ <stories value="Update CMS Page URL Redirect With No Redirect"/> <title value="Update CMS Page URL Redirect With No Redirect"/> <description value="Login as Admin and tried to update the created URL Rewrite for CMS page"/> + <severity value="CRITICAL"/> <group value="cMSContent"/> <group value="mtf_migrated"/> </annotations> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithPermanentReirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithPermanentReirectTest.xml index 3bf278db8410a..d78148cca3cc2 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithPermanentReirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithPermanentReirectTest.xml @@ -12,6 +12,7 @@ <stories value="Update CMS Page URL Redirect With Permanent Redirect"/> <title value="Update CMS Page URL Redirect With Permanent Redirect"/> <description value="Login as Admin and tried to update the created URL Rewrite for CMS page"/> + <severity value="CRITICAL"/> <group value="cMSContent"/> <group value="mtf_migrated"/> </annotations> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithTemporaryRedirectTest.xml index a7cadcdf753c3..374bdb8315993 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithTemporaryRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithTemporaryRedirectTest.xml @@ -12,6 +12,7 @@ <stories value="Update CMS Page URL Redirect With Temporary Redirect"/> <title value="Update CMS Page URL Redirect With Temporary Redirect"/> <description value="Login as Admin and tried to update the created URL Rewrite for CMS page"/> + <severity value="CRITICAL"/> <group value="cMSContent"/> <group value="mtf_migrated"/> </annotations> From 392bd3b899cd26d5d329eaa0ab7e7a1b91125c4b Mon Sep 17 00:00:00 2001 From: Tobias Nilsson <tobias.nilsson@evalent.com> Date: Fri, 31 Jan 2020 18:21:08 +0100 Subject: [PATCH 070/229] Added Test and backwards compatibility --- .../Store/Controller/Store/Redirect.php | 5 +- .../Unit/Controller/Store/RedirectTest.php | 140 ++++++++++++++++++ 2 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php diff --git a/app/code/Magento/Store/Controller/Store/Redirect.php b/app/code/Magento/Store/Controller/Store/Redirect.php index c0488cc1698fc..6afb76038093d 100644 --- a/app/code/Magento/Store/Controller/Store/Redirect.php +++ b/app/code/Magento/Store/Controller/Store/Redirect.php @@ -61,13 +61,13 @@ public function __construct( \Magento\Framework\Session\Generic $session, \Magento\Framework\Session\SidResolverInterface $sidResolver, HashGenerator $hashGenerator, - StoreManagerInterface $storeManager + StoreManagerInterface $storeManager = null ) { parent::__construct($context); $this->storeRepository = $storeRepository; $this->storeResolver = $storeResolver; $this->hashGenerator = $hashGenerator; - $this->storeManager = $storeManager; + $this->storeManager = $storeManager ?: \Magento\Framework\App\ObjectManager::getInstance()->get(StoreManagerInterface::class); } /** @@ -101,7 +101,6 @@ public function execute() $this->_redirect->redirect($this->_response, $currentStore->getBaseUrl()); } else { $encodedUrl = $this->_request->getParam(\Magento\Framework\App\ActionInterface::PARAM_NAME_URL_ENCODED); - $query = [ '___from_store' => $fromStore->getCode(), StoreResolverInterface::PARAM_NAME => $targetStoreCode, diff --git a/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php b/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php new file mode 100644 index 0000000000000..4481c27757d55 --- /dev/null +++ b/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php @@ -0,0 +1,140 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Store\Test\Unit\Controller\Store; + +use Magento\Store\Api\StoreRepositoryInterface; +use Magento\Store\Api\StoreResolverInterface; +use Magento\Store\Model\StoreManagerInterface; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Store\Model\StoreResolver; + +/** + * Test class for \Magento\Store\Controller\Store\SwitchAction + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + */ +class RedirectTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var \Magento\Store\Controller\Store\SwitchAction + */ + private $model; + + /** + * @var StoreRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $storeRepositoryMock; + + /** + * @var StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $storeManagerMock; + + /** + * @var \Magento\Framework\App\RequestInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $requestMock; + + /** + * @var \Magento\Framework\App\ResponseInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $responseMock; + + /** + * @var \Magento\Framework\App\Response\RedirectInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $redirectMock; + + /** + * @var StoreResolverInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $storeResolverMock; + + + /** + * @return void + */ + protected function setUp() + { + $this->storeManagerMock = $this->getMockBuilder(\Magento\Store\Model\StoreManagerInterface::class)->getMock(); + $this->storeRepositoryMock = $this->getMockBuilder(\Magento\Store\Api\StoreRepositoryInterface::class)->getMock(); + $this->requestMock = $this->getMockBuilder(\Magento\Framework\App\RequestInterface::class) + ->disableOriginalConstructor() + ->setMethods(['getHttpHost']) + ->getMockForAbstractClass(); + $this->responseMock = $this->getMockBuilder(\Magento\Framework\App\ResponseInterface::class) + ->disableOriginalConstructor() + ->setMethods(['setRedirect']) + ->getMockForAbstractClass(); + $this->storeResolverMock = $this->getMockBuilder(StoreResolverInterface::class)->getMock(); + $this->redirectMock = $this->getMockBuilder(\Magento\Framework\App\Response\RedirectInterface::class)->getMock(); + + $this->model = (new ObjectManager($this))->getObject( + \Magento\Store\Controller\Store\Redirect::class, + [ + 'storeRepository' => $this->storeRepositoryMock, + 'storeManager' => $this->storeManagerMock, + 'storeResolver' => $this->storeResolverMock, + '_request' => $this->requestMock, + '_response' => $this->responseMock, + '_redirect' => $this->redirectMock, + ] + ); + } + + /** + * @return void + */ + public function testExecute() + { + $storeToSwitchToCode = 'sv2'; + $defaultStoreViewCode = 'default'; + $defaultStoreViewMock = $this->getMockBuilder(\Magento\Store\Api\Data\StoreInterface::class)->getMock(); + $storeToSwitchToMock = $this->getMockBuilder(\Magento\Store\Api\Data\StoreInterface::class) + ->disableOriginalConstructor() + ->setMethods(['isUseStoreInUrl']) + ->getMockForAbstractClass(); + + $this->storeResolverMock + ->expects($this->once()) + ->method('getCurrentStoreId') + ->willReturn(1); + + $this->storeRepositoryMock + ->expects($this->once()) + ->method('getById') + ->with(1) + ->willReturn($defaultStoreViewCode); + $this->requestMock->expects($this->any())->method('getParam')->willReturnMap( + [ + [StoreResolver::PARAM_NAME, null, $storeToSwitchToCode], + ['___from_store', null, $defaultStoreViewCode] + ] + ); + $this->storeRepositoryMock + ->expects($this->any()) + ->method('get') + ->willReturnMap( + [ + [$defaultStoreViewCode, $defaultStoreViewMock], + [$storeToSwitchToCode, $storeToSwitchToMock] + ] + ); + + $defaultStoreViewMock + ->expects($this->once()) + ->method('getCode') + ->willReturn("default"); + + $this->storeManagerMock + ->expects($this->once()) + ->method('setCurrentStore') + ->with($storeToSwitchToMock); + + $this->redirectMock->expects($this->once())->method('redirect'); + + $this->model->execute(); + } +} From 0cbc5b641efdee01fa2bd4222c2cc313d3846198 Mon Sep 17 00:00:00 2001 From: Tobias Nilsson <tobias.nilsson@evalent.com> Date: Mon, 3 Feb 2020 09:20:05 +0100 Subject: [PATCH 071/229] Added Const variables and cleanup code --- .../Unit/Controller/Store/RedirectTest.php | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php b/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php index 4481c27757d55..df50afafced09 100644 --- a/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php +++ b/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php @@ -5,18 +5,28 @@ */ namespace Magento\Store\Test\Unit\Controller\Store; +use Magento\Framework\App\RequestInterface; +use Magento\Framework\App\Response\RedirectInterface; +use Magento\Framework\App\ResponseInterface; use Magento\Store\Api\StoreRepositoryInterface; use Magento\Store\Api\StoreResolverInterface; +use Magento\Store\Controller\Store\Redirect; use Magento\Store\Model\StoreManagerInterface; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Store\Model\StoreResolver; +use Magento\Store\Api\Data\StoreInterface; +use PHPUnit\Framework\TestCase; /** * Test class for \Magento\Store\Controller\Store\SwitchAction * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class RedirectTest extends \PHPUnit\Framework\TestCase +class RedirectTest extends TestCase { + + const STUB_STORE_TO_SWITCH_TO_CODE = 'sv2'; + const STUB_DEFAULT_STORE_VIEW = 'default'; + /** * @var \Magento\Store\Controller\Store\SwitchAction */ @@ -58,21 +68,21 @@ class RedirectTest extends \PHPUnit\Framework\TestCase */ protected function setUp() { - $this->storeManagerMock = $this->getMockBuilder(\Magento\Store\Model\StoreManagerInterface::class)->getMock(); - $this->storeRepositoryMock = $this->getMockBuilder(\Magento\Store\Api\StoreRepositoryInterface::class)->getMock(); - $this->requestMock = $this->getMockBuilder(\Magento\Framework\App\RequestInterface::class) + $this->storeManagerMock = $this->getMockBuilder(StoreManagerInterface::class)->getMock(); + $this->storeRepositoryMock = $this->getMockBuilder(StoreRepositoryInterface::class)->getMock(); + $this->requestMock = $this->getMockBuilder(RequestInterface::class) ->disableOriginalConstructor() ->setMethods(['getHttpHost']) ->getMockForAbstractClass(); - $this->responseMock = $this->getMockBuilder(\Magento\Framework\App\ResponseInterface::class) + $this->responseMock = $this->getMockBuilder(ResponseInterface::class) ->disableOriginalConstructor() ->setMethods(['setRedirect']) ->getMockForAbstractClass(); $this->storeResolverMock = $this->getMockBuilder(StoreResolverInterface::class)->getMock(); - $this->redirectMock = $this->getMockBuilder(\Magento\Framework\App\Response\RedirectInterface::class)->getMock(); + $this->redirectMock = $this->getMockBuilder(RedirectInterface::class)->getMock(); $this->model = (new ObjectManager($this))->getObject( - \Magento\Store\Controller\Store\Redirect::class, + Redirect::class, [ 'storeRepository' => $this->storeRepositoryMock, 'storeManager' => $this->storeManagerMock, @@ -89,10 +99,8 @@ protected function setUp() */ public function testExecute() { - $storeToSwitchToCode = 'sv2'; - $defaultStoreViewCode = 'default'; - $defaultStoreViewMock = $this->getMockBuilder(\Magento\Store\Api\Data\StoreInterface::class)->getMock(); - $storeToSwitchToMock = $this->getMockBuilder(\Magento\Store\Api\Data\StoreInterface::class) + $defaultStoreViewMock = $this->getMockBuilder(StoreInterface::class)->getMock(); + $storeToSwitchToMock = $this->getMockBuilder(StoreInterface::class) ->disableOriginalConstructor() ->setMethods(['isUseStoreInUrl']) ->getMockForAbstractClass(); @@ -106,11 +114,11 @@ public function testExecute() ->expects($this->once()) ->method('getById') ->with(1) - ->willReturn($defaultStoreViewCode); + ->willReturn(self::STUB_DEFAULT_STORE_VIEW); $this->requestMock->expects($this->any())->method('getParam')->willReturnMap( [ - [StoreResolver::PARAM_NAME, null, $storeToSwitchToCode], - ['___from_store', null, $defaultStoreViewCode] + [StoreResolver::PARAM_NAME, null, self::STUB_STORE_TO_SWITCH_TO_CODE], + ['___from_store', null, self::STUB_DEFAULT_STORE_VIEW] ] ); $this->storeRepositoryMock @@ -118,8 +126,8 @@ public function testExecute() ->method('get') ->willReturnMap( [ - [$defaultStoreViewCode, $defaultStoreViewMock], - [$storeToSwitchToCode, $storeToSwitchToMock] + [self::STUB_DEFAULT_STORE_VIEW, $defaultStoreViewMock], + [self::STUB_STORE_TO_SWITCH_TO_CODE, $storeToSwitchToMock] ] ); From c9e79cb9a2bfabfa7add26fe462fbb38ed294d3b Mon Sep 17 00:00:00 2001 From: Vladimir Fishchenko <hws47a@gmail.com> Date: Tue, 4 Feb 2020 13:48:11 +0000 Subject: [PATCH 072/229] Update the product model custom option methods PHPdoc --- app/code/Magento/Catalog/Model/Product.php | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php index 7015fa0295cfb..dc181f84bfc54 100644 --- a/app/code/Magento/Catalog/Model/Product.php +++ b/app/code/Magento/Catalog/Model/Product.php @@ -10,6 +10,7 @@ use Magento\Catalog\Api\Data\ProductInterface; use Magento\Catalog\Api\ProductLinkRepositoryInterface; use Magento\Catalog\Model\Product\Attribute\Backend\Media\EntryConverterPool; +use Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface; use Magento\Catalog\Model\FilterProductCustomAttribute; use Magento\Framework\Api\AttributeValueFactory; use Magento\Framework\App\Filesystem\DirectoryList; @@ -108,7 +109,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements /** * Product object customization (not stored in DB) * - * @var array + * @var OptionInterface[] */ protected $_customOptions = []; @@ -2062,7 +2063,7 @@ public function addCustomOption($code, $value, $product = null) /** * Sets custom options for the product * - * @param array $options Array of options + * @param OptionInterface[] $options Array of options * @return void */ public function setCustomOptions(array $options) @@ -2073,7 +2074,7 @@ public function setCustomOptions(array $options) /** * Get all custom options of the product * - * @return array + * @return OptionInterface[] */ public function getCustomOptions() { @@ -2084,14 +2085,11 @@ public function getCustomOptions() * Get product custom option info * * @param string $code - * @return array + * @return OptionInterface|null */ public function getCustomOption($code) { - if (isset($this->_customOptions[$code])) { - return $this->_customOptions[$code]; - } - return null; + return $this->_customOptions[$code] ?? null; } /** @@ -2101,11 +2099,7 @@ public function getCustomOption($code) */ public function hasCustomOptions() { - if (count($this->_customOptions)) { - return true; - } else { - return false; - } + return (bool)count($this->_customOptions); } /** From e2854db23330f83eb6152a531a3a3c75535214aa Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Wed, 5 Feb 2020 01:08:10 -0600 Subject: [PATCH 073/229] introduced product image metadata size of images is stored in database --- .../Product/Helper/Form/Gallery/Content.php | 64 +++++++++++++------ .../Model/Product/Gallery/CreateHandler.php | 3 +- .../ResourceModel/Product/Collection.php | 2 +- .../Model/ResourceModel/Product/Gallery.php | 59 ++++++++++++++--- app/code/Magento/Catalog/etc/db_schema.xml | 1 + .../Catalog/etc/db_schema_whitelist.json | 3 +- 6 files changed, 102 insertions(+), 30 deletions(-) diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php index 8e6011c09a27f..d04d0936aa480 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php @@ -13,12 +13,12 @@ */ namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery; -use Magento\Framework\App\ObjectManager; +use Magento\Backend\Block\DataProviders\ImageUploadConfig as ImageUploadConfigDataProvider; use Magento\Backend\Block\Media\Uploader; -use Magento\Framework\View\Element\AbstractBlock; use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\FileSystemException; -use Magento\Backend\Block\DataProviders\ImageUploadConfig as ImageUploadConfigDataProvider; +use Magento\Framework\View\Element\AbstractBlock; use Magento\MediaStorage\Helper\File\Storage\Database; /** @@ -56,6 +56,11 @@ class Content extends \Magento\Backend\Block\Widget */ private $fileStorageDatabase; + /** + * @var \Magento\Framework\Filesystem\Directory\ReadInterface + */ + private $mediaDirectory; + /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder @@ -75,6 +80,7 @@ public function __construct( $this->_jsonEncoder = $jsonEncoder; $this->_mediaConfig = $mediaConfig; parent::__construct($context, $data); + $this->mediaDirectory = $this->_filesystem->getDirectoryRead(DirectoryList::MEDIA); $this->imageUploadConfigDataProvider = $imageUploadConfigDataProvider ?: ObjectManager::getInstance()->get(ImageUploadConfigDataProvider::class); $this->fileStorageDatabase = $fileStorageDatabase @@ -157,6 +163,38 @@ public function getAddImagesButton() ); } + /** + * @param string $fileName + */ + private function syncImageToDatabase(string $fileName): void + { + if ($this->fileStorageDatabase->checkDbUsage() && + !$this->mediaDirectory->isFile($this->_mediaConfig->getMediaPath($fileName)) + ) { + $this->fileStorageDatabase->saveFileToFilesystem( + $this->_mediaConfig->getMediaPath($fileName) + ); + } + } + + /** + * @param string $fileName + * @return array + */ + private function getFileMetadata(string $fileName): array + { + $metadata = []; + try { + $fileHandler = $this->mediaDirectory->stat($this->_mediaConfig->getMediaPath($fileName)); + $metadata['size'] = $fileHandler['size']; + } catch (FileSystemException $e) { + $metadata['url'] = $this->getImageHelper()->getDefaultPlaceholderUrl('small_image'); + $metadata['size'] = 0; + $this->_logger->warning($e); + } + return $metadata; + } + /** * Returns image json * @@ -170,24 +208,14 @@ public function getImagesJson() is_array($value['images']) && count($value['images']) ) { - $mediaDir = $this->_filesystem->getDirectoryRead(DirectoryList::MEDIA); $images = $this->sortImagesByPosition($value['images']); foreach ($images as &$image) { $image['url'] = $this->_mediaConfig->getMediaUrl($image['file']); - if ($this->fileStorageDatabase->checkDbUsage() && - !$mediaDir->isFile($this->_mediaConfig->getMediaPath($image['file'])) - ) { - $this->fileStorageDatabase->saveFileToFilesystem( - $this->_mediaConfig->getMediaPath($image['file']) - ); - } - try { - $fileHandler = $mediaDir->stat($this->_mediaConfig->getMediaPath($image['file'])); - $image['size'] = $fileHandler['size']; - } catch (FileSystemException $e) { - $image['url'] = $this->getImageHelper()->getDefaultPlaceholderUrl('small_image'); - $image['size'] = 0; - $this->_logger->warning($e); + $this->syncImageToDatabase($image['file']); + if (isset($image['image_metadata']) && is_array($image['image_metadata'])) { + $image = array_replace_recursive($image, $image['image_metadata']); + } else { + $image = array_replace_recursive($image, $this->getFileMetadata($image['file'])); } } return $this->_jsonEncoder->encode($images); diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php b/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php index 225a3a4c44a9b..e216a1006883d 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php @@ -290,7 +290,8 @@ protected function processNewAndExistingImages($product, array &$images) $data['position'] = isset($image['position']) ? (int)$image['position'] : 0; $data['disabled'] = isset($image['disabled']) ? (int)$image['disabled'] : 0; $data['store_id'] = (int)$product->getStoreId(); - + $stat = $this->mediaDirectory->stat($this->mediaConfig->getMediaPath($image['file'])); + $data['image_metadata']['size'] = $stat['size']; $data[$this->metadata->getLinkField()] = (int)$product->getData($this->metadata->getLinkField()); $this->resourceModel->insertGalleryValueInStore($data); diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php index e31180d4ff6cf..8015707c4842b 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php @@ -12,6 +12,7 @@ use Magento\Catalog\Model\Indexer\Product\Price\PriceTableResolver; use Magento\Catalog\Model\Product\Attribute\Source\Status as ProductStatus; use Magento\Catalog\Model\Product\Gallery\ReadHandler as GalleryReadHandler; +use Magento\Catalog\Model\ResourceModel\Category; use Magento\Catalog\Model\ResourceModel\Product\Collection\ProductLimitationFactory; use Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator; use Magento\CatalogUrlRewrite\Model\Storage\DbStorage; @@ -23,7 +24,6 @@ use Magento\Framework\Indexer\DimensionFactory; use Magento\Store\Model\Indexer\WebsiteDimensionProvider; use Magento\Store\Model\Store; -use Magento\Catalog\Model\ResourceModel\Category; /** * Product collection diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php index a9741cd8e1ec7..b02d6b05a0618 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php @@ -6,6 +6,8 @@ namespace Magento\Catalog\Model\ResourceModel\Product; +use Magento\Framework\DB\Select; +use Magento\Framework\DB\Sql\ColumnValueExpression; use Magento\Store\Model\Store; /** @@ -33,10 +35,12 @@ class Gallery extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb protected $metadata; /** - * @param \Magento\Framework\Model\ResourceModel\Db\Context $context - * @param \Magento\Framework\EntityManager\MetadataPool $metadataPool - * @param string $connectionName - */ + * Gallery constructor. + * @param \Magento\Framework\Model\ResourceModel\Db\Context $context + * @param \Magento\Framework\EntityManager\MetadataPool $metadataPool + * @param null $connectionName + * @throws \Exception + */ public function __construct( \Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Framework\EntityManager\MetadataPool $metadataPool, @@ -134,16 +138,18 @@ public function loadProductGalleryByAttributeId($product, $attributeId) $result = $this->getConnection()->fetchAll($select); $this->removeDuplicates($result); - return $result; } /** * Create base load select * + * Misleading method, methods relies on autoincrement field instead of entity ID + * * @param int $entityId * @param int $storeId * @param int $attributeId + * @deprecated * @return \Magento\Framework\DB\Select * @throws \Magento\Framework\Exception\LocalizedException * @since 101.0.0 @@ -159,6 +165,34 @@ protected function createBaseLoadSelect($entityId, $storeId, $attributeId) return $select; } + /** + * @param int $storeId + * @param array $entityIds + * @param bool $preserveSortOrder + * @return array + * @throws \Magento\Framework\Exception\LocalizedException + * @throws \Zend_Db_Statement_Exception + */ + public function getMediaRecords(int $storeId, array $entityIds, bool $preserveSortOrder = false) : array + { + $output = []; + $linkField = $this->metadata->getLinkField(); + $select = $this->createBatchBaseSelect($storeId) + ->where('cpe.' . $linkField . ' IN (?)', $entityIds); + if (!$preserveSortOrder) { + // due to performance consideration it is better to do not use sorting for this query + $select->reset(Select::ORDER); + } + $cursor = $this->getConnection()->query($select); + while ($row = $cursor->fetch()) { + if (!empty($row['image_metadata'])) { + $row['image_metadata'] = $this->getSerializer()->unserialize($row['image_metadata']); + } + $output[] = $row; + } + return $output; + } + /** * Create batch base select * @@ -191,6 +225,10 @@ public function createBatchBaseSelect($storeId, $attributeId) ['entity' => $this->getTable(self::GALLERY_VALUE_TO_ENTITY_TABLE)], $mainTableAlias . '.value_id = entity.value_id', [$linkField] + )->joinInner( + ['cpe' => $this->getTable('catalog_product_entity')], + sprintf('cpe.%1$s = entity.%1$s', $linkField), + ['entity_id' => 'cpe.entity_id'] )->joinLeft( ['value' => $this->getTable(self::GALLERY_VALUE_TABLE)], implode( @@ -219,11 +257,11 @@ public function createBatchBaseSelect($storeId, $attributeId) 'disabled' => $this->getConnection()->getIfNullSql('`value`.`disabled`', '`default_value`.`disabled`'), 'label_default' => 'default_value.label', 'position_default' => 'default_value.position', - 'disabled_default' => 'default_value.disabled' + 'disabled_default' => 'default_value.disabled', + 'image_metadata' => new ColumnValueExpression( + 'JSON_MERGE_PATCH(default_value.image_metadata, value.image_metadata)' + ) ])->where( - $mainTableAlias . '.attribute_id = ?', - $attributeId - )->where( $mainTableAlias . '.disabled = 0' )->order( $positionCheckSql . ' ' . \Magento\Framework\DB\Select::SQL_ASC @@ -357,6 +395,9 @@ public function insertGalleryValueInStore($data) $this->getTable(self::GALLERY_VALUE_TABLE) ); + if ($data['image_metadata']) { + $data['image_metadata'] = $this->getSerializer()->serialize($data['image_metadata']); + } $this->getConnection()->insert( $this->getTable(self::GALLERY_VALUE_TABLE), $data diff --git a/app/code/Magento/Catalog/etc/db_schema.xml b/app/code/Magento/Catalog/etc/db_schema.xml index d5b318f671726..9f43c8a69b5e5 100644 --- a/app/code/Magento/Catalog/etc/db_schema.xml +++ b/app/code/Magento/Catalog/etc/db_schema.xml @@ -813,6 +813,7 @@ default="0" comment="Is Disabled"/> <column xsi:type="int" name="record_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Record ID"/> + <column xsi:type="json" name="image_metadata" comment="Image metadata"/> <constraint xsi:type="primary" referenceId="PRIMARY"> <column name="record_id"/> </constraint> diff --git a/app/code/Magento/Catalog/etc/db_schema_whitelist.json b/app/code/Magento/Catalog/etc/db_schema_whitelist.json index d4bd6927d4345..a9b5dd2084c35 100644 --- a/app/code/Magento/Catalog/etc/db_schema_whitelist.json +++ b/app/code/Magento/Catalog/etc/db_schema_whitelist.json @@ -479,7 +479,8 @@ "label": true, "position": true, "disabled": true, - "record_id": true + "record_id": true, + "image_metadata": true }, "index": { "CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_STORE_ID": true, From 3a540831fa3408218c77a07f22eca6ac3c1f0b55 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Wed, 5 Feb 2020 01:11:14 -0600 Subject: [PATCH 074/229] read image metadata from database first --- .../Model/Product/Gallery/CreateHandler.php | 1 - .../ResourceModel/Product/Collection.php | 35 +++++-------------- .../Model/ResourceModel/Product/Gallery.php | 18 ++++------ 3 files changed, 16 insertions(+), 38 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php b/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php index e216a1006883d..7cdc79c6493de 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php @@ -245,7 +245,6 @@ public function getAttribute() 'media_gallery' ); } - return $this->attribute; } diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php index 8015707c4842b..d753d13d347c6 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php @@ -2334,49 +2334,32 @@ public function addPriceDataFieldFilter($comparisonFormat, $fields) * @SuppressWarnings(PHPMD.NPathComplexity) * @since 101.0.1 * @throws \Magento\Framework\Exception\LocalizedException + * @throws \Zend_Db_Statement_Exception */ public function addMediaGalleryData() { if ($this->getFlag('media_gallery_added')) { return $this; } - if (!$this->getSize()) { return $this; } - - $items = $this->getItems(); - $linkField = $this->getProductEntityMetadata()->getLinkField(); - - $select = $this->getMediaGalleryResource() - ->createBatchBaseSelect( - $this->getStoreId(), - $this->getAttribute('media_gallery')->getAttributeId() - )->reset( - Select::ORDER // we don't care what order is in current scenario - )->where( - 'entity.' . $linkField . ' IN (?)', - array_map( - function ($item) use ($linkField) { - return (int) $item->getOrigData($linkField); - }, - $items - ) - ); - + $records = $this->getMediaGalleryResource()->getMediaRecords( + $this->getStoreId(), + $this->getLoadedIds() + ); $mediaGalleries = []; - foreach ($this->getConnection()->fetchAll($select) as $row) { - $mediaGalleries[$row[$linkField]][] = $row; + foreach ($records as $record) { + $mediaGalleries[$record['entity_id']][] = $record; } - foreach ($items as $item) { + foreach ($this->getItems() as $item) { $this->getGalleryReadHandler() ->addMediaDataToProduct( $item, - $mediaGalleries[$item->getOrigData($linkField)] ?? [] + $mediaGalleries[$item->getId()] ?? [] ); } - $this->setFlag('media_gallery_added', true); return $this; } diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php index b02d6b05a0618..f5a1e4236eadb 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php @@ -126,17 +126,13 @@ public function loadDataFromTableByValueId( * @param int $attributeId * @return array * @since 101.0.0 + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @throws \Magento\Framework\Exception\LocalizedException + * @throws \Zend_Db_Statement_Exception */ - public function loadProductGalleryByAttributeId($product, $attributeId) + public function loadProductGalleryByAttributeId($product, $attributeId = null) { - $select = $this->createBaseLoadSelect( - $product->getData($this->metadata->getLinkField()), - $product->getStoreId(), - $attributeId - ); - - $result = $this->getConnection()->fetchAll($select); - + $result = $this->getMediaRecords($product->getStoreId(), [$product->getId()], true); $this->removeDuplicates($result); return $result; } @@ -200,9 +196,10 @@ public function getMediaRecords(int $storeId, array $entityIds, bool $preserveSo * @param int $attributeId * @return \Magento\Framework\DB\Select * @throws \Magento\Framework\Exception\LocalizedException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) * @since 101.0.1 */ - public function createBatchBaseSelect($storeId, $attributeId) + public function createBatchBaseSelect($storeId, $attributeId = null) { $linkField = $this->metadata->getLinkField(); @@ -266,7 +263,6 @@ public function createBatchBaseSelect($storeId, $attributeId) )->order( $positionCheckSql . ' ' . \Magento\Framework\DB\Select::SQL_ASC ); - return $select; } From 7957ad14eeb9235b37f8885b72534034fdecbee7 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Wed, 5 Feb 2020 15:05:20 -0600 Subject: [PATCH 075/229] added Storage component --- .../Product/Helper/Form/Gallery/Content.php | 7 +- .../AdapterFactoryInterface.php | 25 ++++ .../Storage/AdapterFactory/AwsS3Factory.php | 31 +++++ .../Storage/AdapterFactory/AzureFactory.php | 32 +++++ .../Storage/AdapterFactory/LocalFactory.php | 31 +++++ .../InvalidStorageConfigurationException.php | 14 ++ .../Magento/Framework/Storage/README.md | 121 ++++++++++++++++++ .../Magento/Framework/Storage/Storage.php | 16 +++ .../Storage/StorageAdapterProvider.php | 63 +++++++++ .../Framework/Storage/StorageInterface.php | 19 +++ .../Framework/Storage/StorageProvider.php | 91 +++++++++++++ .../Storage/UnsupportedStorageException.php | 13 ++ 12 files changed, 461 insertions(+), 2 deletions(-) create mode 100644 lib/internal/Magento/Framework/Storage/AdapterFactory/AdapterFactoryInterface.php create mode 100644 lib/internal/Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php create mode 100644 lib/internal/Magento/Framework/Storage/AdapterFactory/AzureFactory.php create mode 100644 lib/internal/Magento/Framework/Storage/AdapterFactory/LocalFactory.php create mode 100644 lib/internal/Magento/Framework/Storage/InvalidStorageConfigurationException.php create mode 100644 lib/internal/Magento/Framework/Storage/README.md create mode 100644 lib/internal/Magento/Framework/Storage/Storage.php create mode 100644 lib/internal/Magento/Framework/Storage/StorageAdapterProvider.php create mode 100644 lib/internal/Magento/Framework/Storage/StorageInterface.php create mode 100644 lib/internal/Magento/Framework/Storage/StorageProvider.php create mode 100644 lib/internal/Magento/Framework/Storage/UnsupportedStorageException.php diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php index d04d0936aa480..aa91b0970da9a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php @@ -180,13 +180,15 @@ private function syncImageToDatabase(string $fileName): void /** * @param string $fileName * @return array + * @throws FileNotFoundException */ private function getFileMetadata(string $fileName): array { $metadata = []; try { - $fileHandler = $this->mediaDirectory->stat($this->_mediaConfig->getMediaPath($fileName)); - $metadata['size'] = $fileHandler['size']; + $info = $this->storageProvider->get('media') + ->getMetadata($this->_mediaConfig->getMediaPath($fileName)); + $metadata['size'] = $info['size']; } catch (FileSystemException $e) { $metadata['url'] = $this->getImageHelper()->getDefaultPlaceholderUrl('small_image'); $metadata['size'] = 0; @@ -199,6 +201,7 @@ private function getFileMetadata(string $fileName): array * Returns image json * * @return string + * @throws FileNotFoundException */ public function getImagesJson() { diff --git a/lib/internal/Magento/Framework/Storage/AdapterFactory/AdapterFactoryInterface.php b/lib/internal/Magento/Framework/Storage/AdapterFactory/AdapterFactoryInterface.php new file mode 100644 index 0000000000000..56794bbd29fcf --- /dev/null +++ b/lib/internal/Magento/Framework/Storage/AdapterFactory/AdapterFactoryInterface.php @@ -0,0 +1,25 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Framework\Storage\AdapterFactory; + +use League\Flysystem\AdapterInterface; + +/** + * Storage adapter factory + * + * A storage adapter should have a factory implementing this interface in order to be supported by Magento. + * A new factory should be registered in \Magento\Framework\Storage\StorageProvider::$storageAdapters via di.xml. + */ +interface AdapterFactoryInterface +{ + /** + * Create instance of a storage adapter + * + * @param array $options + * @return AdapterInterface + */ + public function create(array $options): AdapterInterface; +} diff --git a/lib/internal/Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php b/lib/internal/Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php new file mode 100644 index 0000000000000..719c85b6f7f9d --- /dev/null +++ b/lib/internal/Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php @@ -0,0 +1,31 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Framework\Storage\AdapterFactory; + +use Aws\S3\S3Client; +use League\Flysystem\AdapterInterface; +use League\Flysystem\AwsS3v3\AwsS3Adapter; +use Magento\Framework\Storage\InvalidStorageConfigurationException; + +/** + * Factory for AWS S3 storage adapter + */ +class AwsS3Factory implements AdapterFactoryInterface +{ + /** + * @inheritdoc + */ + public function create(array $options): AdapterInterface + { + if (empty($options['client']) || empty($options['bucket'])) { + throw new InvalidStorageConfigurationException( + "Can't create AWS S3 adapter: required 'client' and/or 'bucket' options are absent" + ); + } + $client = new S3Client($options['client']); + return new AwsS3Adapter($client, $options['bucket'], $options['prefix'] ?? ''); + } +} diff --git a/lib/internal/Magento/Framework/Storage/AdapterFactory/AzureFactory.php b/lib/internal/Magento/Framework/Storage/AdapterFactory/AzureFactory.php new file mode 100644 index 0000000000000..1d548151cb95a --- /dev/null +++ b/lib/internal/Magento/Framework/Storage/AdapterFactory/AzureFactory.php @@ -0,0 +1,32 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Framework\Storage\AdapterFactory; + +use League\Flysystem\AdapterInterface; +use League\Flysystem\AzureBlobStorage\AzureBlobStorageAdapter; +use Magento\Framework\Storage\InvalidStorageConfigurationException; +use MicrosoftAzure\Storage\Blob\BlobRestProxy; + +/** + * Factory for Azure storage adapter + */ +class AzureFactory implements AdapterFactoryInterface +{ + /** + * @inheritdoc + */ + public function create(array $options): AdapterInterface + { + if (empty($options['connection_string']) || empty($options['container_name'])) { + throw new InvalidStorageConfigurationException( + "Can't create Azure Blob storage adapter: " . + "required 'connection_string' and/or 'container_name' options are absent" + ); + } + $client = BlobRestProxy::createBlobService($options['connection_string']); + return new AzureBlobStorageAdapter($client, $options['container_name'], $options['prefix'] ?? null); + } +} diff --git a/lib/internal/Magento/Framework/Storage/AdapterFactory/LocalFactory.php b/lib/internal/Magento/Framework/Storage/AdapterFactory/LocalFactory.php new file mode 100644 index 0000000000000..edf6535f372f9 --- /dev/null +++ b/lib/internal/Magento/Framework/Storage/AdapterFactory/LocalFactory.php @@ -0,0 +1,31 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Framework\Storage\AdapterFactory; + +use League\Flysystem\Adapter\Local; +use League\Flysystem\AdapterInterface; +use Magento\Framework\Storage\InvalidStorageConfigurationException; + +/** + * Factory for local filesystem storage adapter + */ +class LocalFactory implements AdapterFactoryInterface +{ + public const ADAPTER_NAME = 'local'; + + /** + * @inheritdoc + */ + public function create(array $options): AdapterInterface + { + if (empty($options['root'])) { + throw new InvalidStorageConfigurationException( + "Can't create local filesystem storage adapter: required 'root' option is absent" + ); + } + return new Local($options['root']); + } +} diff --git a/lib/internal/Magento/Framework/Storage/InvalidStorageConfigurationException.php b/lib/internal/Magento/Framework/Storage/InvalidStorageConfigurationException.php new file mode 100644 index 0000000000000..6f388103bfe21 --- /dev/null +++ b/lib/internal/Magento/Framework/Storage/InvalidStorageConfigurationException.php @@ -0,0 +1,14 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Framework\Storage; + +/** + * Exception to be thrown in a case when storage is configured incorrectly + */ +class InvalidStorageConfigurationException extends \RuntimeException +{ +} diff --git a/lib/internal/Magento/Framework/Storage/README.md b/lib/internal/Magento/Framework/Storage/README.md new file mode 100644 index 0000000000000..4cd276df8808f --- /dev/null +++ b/lib/internal/Magento/Framework/Storage/README.md @@ -0,0 +1,121 @@ +The Storage library provides abstraction over different file storage providers. + +## Usage + +A module that needs file storage, it can be configured via `\Magento\Framework\Storage\StorageProvider` in `di.xml`: + +```xml +<type name="Magento\Framework\Storage\StorageProvider"> + <arguments> + <argument name="storage" xsi:type="array"> + <item name="storage-name" xsi:type="string">default/location</item> + </argument> + </arguments> +</type> +``` + +`default/location` is a default path in local filesystem, relative to Magento root. + +Now, in a PHP class that uses the declared storage, use the same `\Magento\Framework\Storage\StorageProvider` to get it: + +```php +/** + * @var \Magento\Framework\Storage\StorageProvider + */ +private $storageProvider; + +public function doSomething() +{ + $storage = $this->storageProvider->get('storage-name') + $storage->put('path.txt', $content); +} +``` + +## Configuring Storage + +A storage can be configured in `env.php`: + +```php +'storage' => [ + 'storage-name' => [ + 'adapter' => 'aws_s3', + 'options' => [ + 'client' => [ + 'credentials' => [ + 'key' => '<key>', + 'secret' => '<secret>' + ], + 'region' => '<region>', + 'version' => 'latest', + ], + 'bucket' => '<bucket>', + ], + ], + 'media' => [ + // this is default configuration, so it doesn't need to be configured explicitly like so + 'adapter' => 'local', + 'options' => [ + 'root' => 'pub/media' + ] + ] +] +``` + +Different providers have different `options` available for configuration. +Under the hood, Magento Storage relies on [Flysystem](https://github.com/thephpleague/flysystem) library, so`options` might reflect options required by a corresponding storage adapter implemented for Flysystem. + +## Storage Providers + +By default, Magento Storage provides support for the following storage providers: + +* Local filesystem (based on `\League\Flysystem\Adapter\Local`) + * Adapter name: `local` + * Options: + ```php + [ + 'root' => 'path/relative/to/magento/root' + ] + ``` +* AWS S3 V3 (based on `\League\Flysystem\AwsS3v3\AwsS3Adapter`) + * Adapter name: `aws_s3` + * Options: + ```php + [ + 'client' => [ + 'credentials' => [ + 'key' => '<key>', + 'secret' => '<secret>' + ], + 'region' => '<region>', + 'version' => 'latest', + ], + 'bucket' => '<bucket>', + 'prefix' => '<prefix>', + ] + ``` +* Azure Blob storage (based on `\League\Flysystem\AzureBlobStorage\AzureBlobStorageAdapter`) + * Adapter name: `ms_azure` + * Options: + ```php + [ + 'connection_string' => '<connection-string>', + 'container_name' => '<container-name>', + 'prefix' => '<prefix>', + ] + ``` + +Additional adapters can be added by: +1. Creating an adapter factory implementing `\Magento\Framework\Storage\AdapterFactory\AdapterFactoryInterface` +2. Registering the factory in `Magento\Framework\Storage\StorageProvider` via `di.xml`: + ```xml + <type name="Magento\Framework\Storage\StorageProvider"> + <arguments> + <argument name="storageAdapters" xsi:type="array"> + <item name="custom_adapter" xsi:type="string">My\Storage\AdapterFactory</item> + </argument> + </arguments> + </type> + ``` + +The factory is registered as a "string" (name of the class). +That's because in most cases only a few adapters will be really created for a single application, and we don't want to create unnecessary factory instances. diff --git a/lib/internal/Magento/Framework/Storage/Storage.php b/lib/internal/Magento/Framework/Storage/Storage.php new file mode 100644 index 0000000000000..f2dc56478cac0 --- /dev/null +++ b/lib/internal/Magento/Framework/Storage/Storage.php @@ -0,0 +1,16 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Framework\Storage; + +use League\Flysystem\Filesystem; + +/** + * File storage abstraction + */ +class Storage extends Filesystem implements StorageInterface +{ + +} diff --git a/lib/internal/Magento/Framework/Storage/StorageAdapterProvider.php b/lib/internal/Magento/Framework/Storage/StorageAdapterProvider.php new file mode 100644 index 0000000000000..bcd5fe806c0c3 --- /dev/null +++ b/lib/internal/Magento/Framework/Storage/StorageAdapterProvider.php @@ -0,0 +1,63 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Framework\Storage; + +use League\Flysystem\AdapterInterface; +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\Storage\AdapterFactory\AdapterFactoryInterface; + +/** + * Provider of storage adapters based on storage name + */ +class StorageAdapterProvider +{ + /** + * @var ObjectManagerInterface + */ + private $objectManager; + + /** + * @var array + */ + private $config; + + /** + * Constructor + * + * @param ObjectManagerInterface $objectManager + * @param array $config + */ + public function __construct(ObjectManagerInterface $objectManager, array $config) + { + $this->objectManager = $objectManager; + $this->config = $config; + } + + /** + * Create storage adapter based on its name with provided options + * + * @param string $adapterName + * @param array $options + * @return AdapterInterface|null + */ + public function create(string $adapterName, array $options) :? AdapterInterface + { + if (!isset($this->config[$adapterName])) { + throw new InvalidStorageConfigurationException( + "Configured adapter '$adapterName' is not supported" + ); + } + $adapterFactoryClass = $this->config[$adapterName]; + $adapterFactory = $this->objectManager->get($adapterFactoryClass); + if (!$adapterFactory instanceof AdapterFactoryInterface) { + throw new InvalidStorageConfigurationException( + "Configured storage adapter factory '$adapterFactory' must implement " . + "'\Magento\Framework\Storage\AdapterFactory\AdapterFactoryInterface'" + ); + } + return $adapterFactory->create($options); + } +} diff --git a/lib/internal/Magento/Framework/Storage/StorageInterface.php b/lib/internal/Magento/Framework/Storage/StorageInterface.php new file mode 100644 index 0000000000000..562ddd4a4317a --- /dev/null +++ b/lib/internal/Magento/Framework/Storage/StorageInterface.php @@ -0,0 +1,19 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Framework\Storage; + +use League\Flysystem\FilesystemInterface; + +/** + * Storage interface to be used by client code to manipulate objects in the storage + * + * Retrieve a real instance of storage via $storageProvider->get('<your-storage-name>'), + * where $storageProvider is an instance of \Magento\Framework\Storage\StorageProvider + */ +interface StorageInterface extends FilesystemInterface +{ + +} diff --git a/lib/internal/Magento/Framework/Storage/StorageProvider.php b/lib/internal/Magento/Framework/Storage/StorageProvider.php new file mode 100644 index 0000000000000..ea4468fab47d4 --- /dev/null +++ b/lib/internal/Magento/Framework/Storage/StorageProvider.php @@ -0,0 +1,91 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Framework\Storage; + +use Magento\Framework\App\DeploymentConfig; +use Magento\Framework\Storage\AdapterFactory\LocalFactory; +use Magento\Framework\Storage\StorageFactory; + +/** + * Main entry point for accessing file storage + * + * See README.md for usage details + */ +class StorageProvider +{ + private $storageConfig = []; + + private $storage = []; + + /** + * @var StorageFactory + */ + private $storageFactory; + + /** + * @var StorageAdapterProvider + */ + private $adapterProvider; + + /** + * Constructor + * + * @param StorageAdapterProvider $adapterProvider + * @param \Magento\Framework\Storage\StorageFactory $storageFactory + * @param array $storage + * @param DeploymentConfig $envConfig + */ + public function __construct( + StorageAdapterProvider $adapterProvider, + StorageFactory $storageFactory, + array $storage, + DeploymentConfig $envConfig + ) { + foreach ($storage as $storageName => $localPath) { + $this->storageConfig[$storageName] = [ + 'adapter' => LocalFactory::ADAPTER_NAME, + 'options' => [ + 'root' => BP . '/' . $localPath, + ], + ]; + $envStorageConfig = $envConfig->get('storage/' . $storageName); + if ($envStorageConfig) { + $this->storageConfig[$storageName] = array_replace( + $this->storageConfig[$storageName], + $envStorageConfig + ); + } + } + $this->storageFactory = $storageFactory; + $this->adapterProvider = $adapterProvider; + } + + /** + * Get storage by its name + * + * @param string $storageName + * @return StorageInterface + */ + public function get(string $storageName): StorageInterface + { + if (!isset($this->storage[$storageName])) { + if (isset($this->storageConfig[$storageName])) { + $config = $this->storageConfig[$storageName]; + if (empty($config['adapter']) || empty($config['options'])) { + throw new InvalidStorageConfigurationException( + "Incorrect configuration for storage '$storageName': required field " . + "'adapter' and/or 'options' is not defined" + ); + } + $adapter = $this->adapterProvider->create($config['adapter'], $config['options']); + $this->storage[$storageName] = $this->storageFactory->create(['adapter' => $adapter]); + } else { + throw new UnsupportedStorageException("No storage with name '$storageName' is declared"); + } + } + return $this->storage[$storageName]; + } +} diff --git a/lib/internal/Magento/Framework/Storage/UnsupportedStorageException.php b/lib/internal/Magento/Framework/Storage/UnsupportedStorageException.php new file mode 100644 index 0000000000000..8267fea85319e --- /dev/null +++ b/lib/internal/Magento/Framework/Storage/UnsupportedStorageException.php @@ -0,0 +1,13 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Framework\Storage; + +/** + * Exception to be thrown when unsupported (undeclared) storage is requested + */ +class UnsupportedStorageException extends \RuntimeException +{ +} From 3cddeba66d7e35b181827145e4cc4eb61ccdf868 Mon Sep 17 00:00:00 2001 From: Olga Kopylova <buskamuza@gmail.com> Date: Wed, 5 Feb 2020 15:18:21 -0600 Subject: [PATCH 076/229] Storage library update --- .../Product/Helper/Form/Gallery/Content.php | 14 +- .../Magento/Catalog/Block/Product/Gallery.php | 51 +- .../Adminhtml/Product/Gallery/Upload.php | 20 +- app/code/Magento/Catalog/Helper/Image.php | 3 + .../Magento/Catalog/Model/ImageUploader.php | 14 + app/code/Magento/Catalog/Model/Product.php | 4 + .../Model/Product/Gallery/CreateHandler.php | 36 +- .../Magento/Catalog/Model/Product/Image.php | 59 +- .../Model/View/Asset/Image/Context.php | 5 +- .../Form/Modifier/Data/AssociatedProducts.php | 3 +- .../MediaStorage/Service/ImageResize.php | 18 +- .../Test/Unit/Service/ImageResizeTest.php | 39 +- app/code/Magento/MediaStorage/etc/di.xml | 7 + .../HeaderProvider/UpgradeInsecureTest.php | 2 +- app/etc/di.xml | 9 + composer.json | 9 +- composer.lock | 584 ++++++++++++++---- .../HTTP/PhpEnvironment/Response.php | 9 + 18 files changed, 678 insertions(+), 208 deletions(-) diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php index aa91b0970da9a..ed5deb870b280 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php @@ -13,12 +13,13 @@ */ namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery; -use Magento\Backend\Block\DataProviders\ImageUploadConfig as ImageUploadConfigDataProvider; +use League\Flysystem\FileNotFoundException; +use Magento\Framework\App\ObjectManager; use Magento\Backend\Block\Media\Uploader; +use Magento\Framework\Storage\StorageProvider; +use Magento\Framework\View\Element\AbstractBlock; use Magento\Framework\App\Filesystem\DirectoryList; -use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\FileSystemException; -use Magento\Framework\View\Element\AbstractBlock; use Magento\MediaStorage\Helper\File\Storage\Database; /** @@ -55,6 +56,10 @@ class Content extends \Magento\Backend\Block\Widget * @var Database */ private $fileStorageDatabase; + /** + * @var StorageProvider + */ + private $storageProvider; /** * @var \Magento\Framework\Filesystem\Directory\ReadInterface @@ -65,6 +70,7 @@ class Content extends \Magento\Backend\Block\Widget * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder * @param \Magento\Catalog\Model\Product\Media\Config $mediaConfig + * @param StorageProvider $storageProvider * @param array $data * @param ImageUploadConfigDataProvider $imageUploadConfigDataProvider * @param Database $fileStorageDatabase @@ -73,6 +79,7 @@ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Framework\Json\EncoderInterface $jsonEncoder, \Magento\Catalog\Model\Product\Media\Config $mediaConfig, + StorageProvider $storageProvider, array $data = [], ImageUploadConfigDataProvider $imageUploadConfigDataProvider = null, Database $fileStorageDatabase = null @@ -85,6 +92,7 @@ public function __construct( ?: ObjectManager::getInstance()->get(ImageUploadConfigDataProvider::class); $this->fileStorageDatabase = $fileStorageDatabase ?: ObjectManager::getInstance()->get(Database::class); + $this->storageProvider = $storageProvider; } /** diff --git a/app/code/Magento/Catalog/Block/Product/Gallery.php b/app/code/Magento/Catalog/Block/Product/Gallery.php index 54f848a92e958..c5c6658c32fbb 100644 --- a/app/code/Magento/Catalog/Block/Product/Gallery.php +++ b/app/code/Magento/Catalog/Block/Product/Gallery.php @@ -11,9 +11,13 @@ */ namespace Magento\Catalog\Block\Product; +use League\Flysystem\FileNotFoundException; use Magento\Catalog\Model\Product; -use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Catalog\Model\Product\Media\Config; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Data\Collection; +use Magento\Framework\Registry; +use Magento\Framework\Storage\StorageProvider; /** * Product gallery block @@ -26,22 +30,37 @@ class Gallery extends \Magento\Framework\View\Element\Template /** * Core registry * - * @var \Magento\Framework\Registry + * @var Registry */ protected $_coreRegistry = null; + /** + * @var StorageProvider + */ + private $storageProvider; + /** + * @var Config + */ + private $mediaConfig; + /** * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Framework\Registry $registry + * @param Registry $registry * @param array $data + * @param StorageProvider $storageProvider + * @param Config $mediaConfig */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, - \Magento\Framework\Registry $registry, - array $data = [] + Registry $registry, + array $data = [], + StorageProvider $storageProvider = null, + Config $mediaConfig = null ) { $this->_coreRegistry = $registry; parent::__construct($context, $data); + $this->storageProvider = $storageProvider ?? ObjectManager::getInstance()->get(StorageProvider::class); + $this->mediaConfig = $mediaConfig ?? ObjectManager::getInstance()->get(Config::class); } /** @@ -121,16 +140,24 @@ public function getImageFile() */ public function getImageWidth() { - $file = $this->getCurrentImage()->getPath(); - - if ($this->_filesystem->getDirectoryRead(DirectoryList::MEDIA)->isFile($file)) { - $size = getimagesize($file); - if (isset($size[0])) { - if ($size[0] > 600) { + $file = $this->getCurrentImage()->getFile(); + if (!$file) { + return false; + } + $productMediaFile = $this->mediaConfig->getMediaPath($file); + + $mediaStorage = $this->storageProvider->get('media'); + if ($mediaStorage->has($productMediaFile)) { + try { + $meta = $mediaStorage->getMetadata($productMediaFile); + $size = $meta['size']; + if ($size > 600) { return 600; } else { - return (int) $size[0]; + return (int) $size; } + } catch (FileNotFoundException $e) { + return false; } } diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php index 3e7cc3ee962b9..fda3d0abced7f 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php @@ -8,7 +8,7 @@ use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\ObjectManager; -use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Storage\StorageProvider; /** * Upload product image action controller @@ -52,9 +52,15 @@ class Upload extends \Magento\Backend\App\Action implements HttpPostActionInterf */ private $productMediaConfig; + /** + * @var StorageProvider + */ + private $storageProvider; + /** * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Framework\Controller\Result\RawFactory $resultRawFactory + * @param StorageProvider $storageProvider * @param \Magento\Framework\Image\AdapterFactory $adapterFactory * @param \Magento\Framework\Filesystem $filesystem * @param \Magento\Catalog\Model\Product\Media\Config $productMediaConfig @@ -62,6 +68,7 @@ class Upload extends \Magento\Backend\App\Action implements HttpPostActionInterf public function __construct( \Magento\Backend\App\Action\Context $context, \Magento\Framework\Controller\Result\RawFactory $resultRawFactory, + StorageProvider $storageProvider, \Magento\Framework\Image\AdapterFactory $adapterFactory = null, \Magento\Framework\Filesystem $filesystem = null, \Magento\Catalog\Model\Product\Media\Config $productMediaConfig = null @@ -74,6 +81,7 @@ public function __construct( ->get(\Magento\Framework\Filesystem::class); $this->productMediaConfig = $productMediaConfig ?: ObjectManager::getInstance() ->get(\Magento\Catalog\Model\Product\Media\Config::class); + $this->storageProvider = $storageProvider; } /** @@ -84,6 +92,7 @@ public function __construct( public function execute() { try { + /** @var \Magento\MediaStorage\Model\File\Uploader $uploader */ $uploader = $this->_objectManager->create( \Magento\MediaStorage\Model\File\Uploader::class, ['fileId' => 'image'] @@ -93,11 +102,18 @@ public function execute() $uploader->addValidateCallback('catalog_product_image', $imageAdapter, 'validateUploadFile'); $uploader->setAllowRenameFiles(true); $uploader->setFilesDispersion(true); + $mediaDirectory = $this->filesystem->getDirectoryRead(DirectoryList::MEDIA); + $baseImagePath = $this->productMediaConfig->getBaseTmpMediaPath(); $result = $uploader->save( - $mediaDirectory->getAbsolutePath($this->productMediaConfig->getBaseTmpMediaPath()) + $mediaDirectory->getAbsolutePath($baseImagePath) ); + $origFile = $this->productMediaConfig->getTmpMediaPath($result['file']); + $storage = $this->storageProvider->get('media'); + $content = $mediaDirectory->readFile($origFile); + $storage->put($origFile, $content); + $this->_eventManager->dispatch( 'catalog_product_gallery_upload_image_after', ['result' => $result, 'action' => $this] diff --git a/app/code/Magento/Catalog/Helper/Image.php b/app/code/Magento/Catalog/Helper/Image.php index 3e0976936329c..0dff475b23f30 100644 --- a/app/code/Magento/Catalog/Helper/Image.php +++ b/app/code/Magento/Catalog/Helper/Image.php @@ -570,6 +570,9 @@ public function save() * Return resized product image information * * @return array + * @deprecated Magento is not responsible for image resizing anymore. This method works with local filesystem only. + * Service that provides resized images should guarantee that the image sizes correspond to requested ones. + * Use `getWidth()` and `getHeight()` instead. */ public function getResizedImageInfo() { diff --git a/app/code/Magento/Catalog/Model/ImageUploader.php b/app/code/Magento/Catalog/Model/ImageUploader.php index 0c3e008fa8bb5..00c15830c9510 100644 --- a/app/code/Magento/Catalog/Model/ImageUploader.php +++ b/app/code/Magento/Catalog/Model/ImageUploader.php @@ -6,6 +6,7 @@ namespace Magento\Catalog\Model; use Magento\Framework\File\Uploader; +use Magento\Framework\Storage\StorageProvider; /** * Catalog image uploader @@ -73,6 +74,11 @@ class ImageUploader */ private $allowedMimeTypes; + /** + * @var StorageProvider + */ + private $storageProvider; + /** * ImageUploader constructor * @@ -84,6 +90,7 @@ class ImageUploader * @param string $baseTmpPath * @param string $basePath * @param string[] $allowedExtensions + * @param StorageProvider $storageProvider * @param string[] $allowedMimeTypes */ public function __construct( @@ -95,6 +102,7 @@ public function __construct( $baseTmpPath, $basePath, $allowedExtensions, + StorageProvider $storageProvider, $allowedMimeTypes = [] ) { $this->coreFileStorageDatabase = $coreFileStorageDatabase; @@ -106,6 +114,7 @@ public function __construct( $this->basePath = $basePath; $this->allowedExtensions = $allowedExtensions; $this->allowedMimeTypes = $allowedMimeTypes; + $this->storageProvider = $storageProvider; } /** @@ -220,6 +229,11 @@ public function moveFileFromTmp($imageName, $returnRelativePath = false) $baseTmpImagePath, $baseImagePath ); + + $storage = $this->storageProvider->get('media'); + $content = $this->mediaDirectory->readFile($baseImagePath); + $storage->put($baseImagePath, $content); + } catch (\Exception $e) { throw new \Magento\Framework\Exception\LocalizedException( __('Something went wrong while saving the file(s).') diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php index 7015fa0295cfb..dbe3adb976da5 100644 --- a/app/code/Magento/Catalog/Model/Product.php +++ b/app/code/Magento/Catalog/Model/Product.php @@ -1539,7 +1539,11 @@ public function getMediaGalleryImages() } $image['url'] = $this->getMediaConfig()->getMediaUrl($image['file']); $image['id'] = $image['value_id']; + + // @deprecated 'path' should not be used + // The file can be absent in local filesystem if remote storage is used $image['path'] = $directory->getAbsolutePath($this->getMediaConfig()->getMediaPath($image['file'])); + $images->addItem(new \Magento\Framework\DataObject($image)); } $this->setData('media_gallery_images', $images); diff --git a/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php b/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php index 7cdc79c6493de..e56fb8e59d0e9 100644 --- a/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php +++ b/app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php @@ -11,6 +11,7 @@ use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\ObjectManager; use Magento\Framework\EntityManager\Operation\ExtensionInterface; +use Magento\Framework\Storage\StorageProvider; use Magento\MediaStorage\Model\File\Uploader as FileUploader; use Magento\Store\Model\StoreManagerInterface; @@ -88,6 +89,10 @@ class CreateHandler implements ExtensionInterface * @var \Magento\Store\Model\StoreManagerInterface */ private $storeManager; + /** + * @var StorageProvider + */ + private $storageProvider; /** * @param \Magento\Framework\EntityManager\MetadataPool $metadataPool @@ -98,6 +103,7 @@ class CreateHandler implements ExtensionInterface * @param \Magento\Framework\Filesystem $filesystem * @param \Magento\MediaStorage\Helper\File\Storage\Database $fileStorageDb * @param \Magento\Store\Model\StoreManagerInterface|null $storeManager + * @param StorageProvider $storageProvider * @throws \Magento\Framework\Exception\FileSystemException */ public function __construct( @@ -108,7 +114,8 @@ public function __construct( \Magento\Catalog\Model\Product\Media\Config $mediaConfig, \Magento\Framework\Filesystem $filesystem, \Magento\MediaStorage\Helper\File\Storage\Database $fileStorageDb, - \Magento\Store\Model\StoreManagerInterface $storeManager = null + \Magento\Store\Model\StoreManagerInterface $storeManager = null, + StorageProvider $storageProvider = null ) { $this->metadata = $metadataPool->getMetadata(\Magento\Catalog\Api\Data\ProductInterface::class); $this->attributeRepository = $attributeRepository; @@ -118,6 +125,7 @@ public function __construct( $this->mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA); $this->fileStorageDb = $fileStorageDb; $this->storeManager = $storeManager ?: ObjectManager::getInstance()->get(StoreManagerInterface::class); + $this->storageProvider = $storageProvider ?: ObjectManager::getInstance()->get(StorageProvider::class); } /** @@ -366,20 +374,20 @@ protected function moveImageFromTmp($file) $file = $this->getFilenameFromTmp($this->getSafeFilename($file)); $destinationFile = $this->getUniqueFileName($file); - if ($this->fileStorageDb->checkDbUsage()) { - $this->fileStorageDb->renameFile( - $this->mediaConfig->getTmpMediaShortUrl($file), - $this->mediaConfig->getMediaShortUrl($destinationFile) - ); + $tmpMediaPath = $this->mediaConfig->getTmpMediaPath($file); + $mediaPath = $this->mediaConfig->getMediaPath($destinationFile); + $this->mediaDirectory->renameFile( + $tmpMediaPath, + $mediaPath + ); + $this->fileStorageDb->renameFile( + $this->mediaConfig->getTmpMediaShortUrl($file), + $this->mediaConfig->getMediaShortUrl($destinationFile) + ); - $this->mediaDirectory->delete($this->mediaConfig->getTmpMediaPath($file)); - $this->mediaDirectory->delete($this->mediaConfig->getMediaPath($destinationFile)); - } else { - $this->mediaDirectory->renameFile( - $this->mediaConfig->getTmpMediaPath($file), - $this->mediaConfig->getMediaPath($destinationFile) - ); - } + $storage = $this->storageProvider->get('media'); + $content = $this->mediaDirectory->readFile($mediaPath); + $storage->put($mediaPath, $content); return str_replace('\\', '/', $destinationFile); } diff --git a/app/code/Magento/Catalog/Model/Product/Image.php b/app/code/Magento/Catalog/Model/Product/Image.php index a0be36c5a327c..64f9b019aa6d8 100644 --- a/app/code/Magento/Catalog/Model/Product/Image.php +++ b/app/code/Magento/Catalog/Model/Product/Image.php @@ -13,6 +13,8 @@ use Magento\Framework\Image as MagentoImage; use Magento\Framework\Serialize\SerializerInterface; use Magento\Catalog\Model\Product\Image\ParamsBuilder; +use Magento\Framework\Storage\StorageInterface; +use Magento\Framework\Storage\StorageProvider; /** * Image operations @@ -199,6 +201,11 @@ class Image extends \Magento\Framework\Model\AbstractModel */ private $serializer; + /** + * @var StorageInterface + */ + private $storage; + /** * Constructor * @@ -214,6 +221,7 @@ class Image extends \Magento\Framework\Model\AbstractModel * @param ImageFactory $viewAssetImageFactory * @param PlaceholderFactory $viewAssetPlaceholderFactory * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig + * @param StorageProvider $storageProvider * @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection * @param array $data @@ -235,6 +243,7 @@ public function __construct( ImageFactory $viewAssetImageFactory, PlaceholderFactory $viewAssetPlaceholderFactory, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, + StorageProvider $storageProvider, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [], @@ -243,14 +252,18 @@ public function __construct( ) { $this->_storeManager = $storeManager; $this->_catalogProductMediaConfig = $catalogProductMediaConfig; - $this->_coreFileStorageDatabase = $coreFileStorageDatabase; - parent::__construct($context, $registry, $resource, $resourceCollection, $data); + $this->_mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA); + $this->_coreFileStorageDatabase = $coreFileStorageDatabase; $this->_imageFactory = $imageFactory; + $this->viewAssetImageFactory = $viewAssetImageFactory; + + $this->storage = $storageProvider->get('media'); + + parent::__construct($context, $registry, $resource, $resourceCollection, $data); $this->_assetRepo = $assetRepo; $this->_viewFileSystem = $viewFileSystem; $this->_scopeConfig = $scopeConfig; - $this->viewAssetImageFactory = $viewAssetImageFactory; $this->viewAssetPlaceholderFactory = $viewAssetPlaceholderFactory; $this->serializer = $serializer ?: ObjectManager::getInstance()->get(SerializerInterface::class); $this->paramsBuilder = $paramsBuilder ?: ObjectManager::getInstance()->get(ParamsBuilder::class); @@ -421,19 +434,20 @@ public function setBaseFile($file) { $this->_isBaseFilePlaceholder = false; - $this->imageAsset = $this->viewAssetImageFactory->create( - [ - 'miscParams' => $this->getMiscParams(), - 'filePath' => $file, - ] - ); - if ($file == 'no_selection' || !$this->_fileExists($this->imageAsset->getSourceFile())) { + if ($file == 'no_selection' || empty($file)) { $this->_isBaseFilePlaceholder = true; $this->imageAsset = $this->viewAssetPlaceholderFactory->create( [ 'type' => $this->getDestinationSubdir(), ] ); + } else { + $this->imageAsset = $this->viewAssetImageFactory->create( + [ + 'miscParams' => $this->getMiscParams(), + 'filePath' => $file, + ] + ); } $this->_baseFile = $this->imageAsset->getSourceFile(); @@ -663,7 +677,7 @@ public function getDestinationSubdir() public function isCached() { $path = $this->imageAsset->getPath(); - return is_array($this->loadImageInfoFromCache($path)) || file_exists($path); + return is_array($this->loadImageInfoFromCache($path)) || $this->_mediaDirectory->isExist($path); } /** @@ -835,35 +849,20 @@ public function clearCache() { $directory = $this->_catalogProductMediaConfig->getBaseMediaPath() . '/cache'; $this->_mediaDirectory->delete($directory); + $this->storage->deleteDir($directory); $this->_coreFileStorageDatabase->deleteFolder($this->_mediaDirectory->getAbsolutePath($directory)); $this->clearImageInfoFromCache(); } - /** - * First check this file on FS - * - * If it doesn't exist - try to download it from DB - * - * @param string $filename - * @return bool - */ - protected function _fileExists($filename) - { - if ($this->_mediaDirectory->isFile($filename)) { - return true; - } else { - return $this->_coreFileStorageDatabase->saveFileToFilesystem( - $this->_mediaDirectory->getAbsolutePath($filename) - ); - } - } - /** * Return resized product image information * * @return array * @throws NotLoadInfoImageException + * @deprecated Magento is not responsible for image resizing anymore. This method works with local filesystem only. + * Service that provides resized images should guarantee that the image sizes correspond to requested ones. + * Use `getWidth()` and `getHeight()` instead. */ public function getResizedImageInfo() { diff --git a/app/code/Magento/Catalog/Model/View/Asset/Image/Context.php b/app/code/Magento/Catalog/Model/View/Asset/Image/Context.php index 49d150a31750c..ead68c897f95f 100644 --- a/app/code/Magento/Catalog/Model/View/Asset/Image/Context.php +++ b/app/code/Magento/Catalog/Model/View/Asset/Image/Context.php @@ -47,11 +47,10 @@ public function __construct( $this->mediaConfig = $mediaConfig; $this->filesystem = $filesystem; $this->mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA); - $this->mediaDirectory->create($this->mediaConfig->getBaseMediaPath()); } /** - * {@inheritdoc} + * @inheritdoc */ public function getPath() { @@ -59,7 +58,7 @@ public function getPath() } /** - * {@inheritdoc} + * @inheritdoc */ public function getBaseUrl() { diff --git a/app/code/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/Data/AssociatedProducts.php b/app/code/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/Data/AssociatedProducts.php index ec69baeb92cb9..034f68bdab9d4 100644 --- a/app/code/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/Data/AssociatedProducts.php +++ b/app/code/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/Data/AssociatedProducts.php @@ -314,7 +314,8 @@ protected function prepareVariations() 'canEdit' => 0, 'newProduct' => 0, 'attributes' => $this->getTextAttributes($variationOptions), - 'thumbnail_image' => $this->imageHelper->init($product, 'product_thumbnail_image')->getUrl(), + 'thumbnail_image' => $this->imageHelper->init($product, 'product_thumbnail_image') + ->getUrl(), '__disableTmpl' => true ]; $productIds[] = $product->getId(); diff --git a/app/code/Magento/MediaStorage/Service/ImageResize.php b/app/code/Magento/MediaStorage/Service/ImageResize.php index d061ddbd3dc46..145fcd1b85f4f 100644 --- a/app/code/Magento/MediaStorage/Service/ImageResize.php +++ b/app/code/Magento/MediaStorage/Service/ImageResize.php @@ -19,6 +19,7 @@ use Magento\Framework\Image\Factory as ImageFactory; use Magento\Catalog\Model\Product\Media\ConfigInterface as MediaConfig; use Magento\Framework\App\State; +use Magento\Framework\Storage\StorageProvider; use Magento\Framework\View\ConfigInterface as ViewConfig; use \Magento\Catalog\Model\ResourceModel\Product\Image as ProductImage; use Magento\Store\Model\StoreManagerInterface; @@ -99,6 +100,11 @@ class ImageResize */ private $storeManager; + /** + * @var StorageProvider + */ + private $storageProvider; + /** * @param State $appState * @param MediaConfig $imageConfig @@ -112,6 +118,7 @@ class ImageResize * @param Filesystem $filesystem * @param Database $fileStorageDatabase * @param StoreManagerInterface $storeManager + * @param StorageProvider $storageProvider * @throws \Magento\Framework\Exception\FileSystemException * @internal param ProductImage $gallery * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -128,7 +135,8 @@ public function __construct( Collection $themeCollection, Filesystem $filesystem, Database $fileStorageDatabase = null, - StoreManagerInterface $storeManager = null + StoreManagerInterface $storeManager = null, + StorageProvider $storageProvider = null ) { $this->appState = $appState; $this->imageConfig = $imageConfig; @@ -144,6 +152,7 @@ public function __construct( $this->fileStorageDatabase = $fileStorageDatabase ?: ObjectManager::getInstance()->get(Database::class); $this->storeManager = $storeManager ?? ObjectManager::getInstance()->get(StoreManagerInterface::class); + $this->storageProvider = $storageProvider ?? ObjectManager::getInstance()->get(StorageProvider::class); } /** @@ -337,10 +346,15 @@ private function resize(array $imageParams, string $originalImagePath, string $o $image->save($imageAsset->getPath()); + $mediastoragefilename = $this->mediaDirectory->getRelativePath($imageAsset->getPath()); if ($this->fileStorageDatabase->checkDbUsage()) { - $mediastoragefilename = $this->mediaDirectory->getRelativePath($imageAsset->getPath()); $this->fileStorageDatabase->saveFile($mediastoragefilename); } + + $this->storageProvider->get('media')->put( + $mediastoragefilename, + $this->mediaDirectory->readFile($mediastoragefilename) + ); } /** diff --git a/app/code/Magento/MediaStorage/Test/Unit/Service/ImageResizeTest.php b/app/code/Magento/MediaStorage/Test/Unit/Service/ImageResizeTest.php index f0e1efa7806e4..8a15cd7316a57 100644 --- a/app/code/Magento/MediaStorage/Test/Unit/Service/ImageResizeTest.php +++ b/app/code/Magento/MediaStorage/Test/Unit/Service/ImageResizeTest.php @@ -14,9 +14,11 @@ use Magento\Framework\Image; use Magento\Catalog\Model\Product\Media\ConfigInterface as MediaConfig; use Magento\Framework\App\State; +use Magento\Framework\Storage\StorageInterface; use Magento\Framework\View\ConfigInterface as ViewConfig; use Magento\Framework\Config\View; use Magento\Catalog\Model\ResourceModel\Product\Image as ProductImage; +use Magento\MediaStorage\Service\ImageResize; use Magento\Store\Model\StoreManagerInterface; use Magento\Theme\Model\Config\Customization as ThemeCustomizationConfig; use Magento\Theme\Model\ResourceModel\Theme\Collection; @@ -32,7 +34,7 @@ class ImageResizeTest extends \PHPUnit\Framework\TestCase { /** - * @var \Magento\MediaStorage\Service\ImageResize + * @var ImageResize */ protected $service; @@ -120,11 +122,17 @@ class ImageResizeTest extends \PHPUnit\Framework\TestCase * @var string */ private $testfilepath; + /** * @var \PHPUnit\Framework\MockObject\MockObject|StoreManagerInterface */ private $storeManager; + /** + * @var StorageInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $storage; + /** * @inheritDoc * @SuppressWarnings(PHPMD.ExcessiveMethodLength) @@ -149,10 +157,16 @@ protected function setUp() $this->filesystemMock = $this->createMock(Filesystem::class); $this->databaseMock = $this->createMock(Database::class); $this->storeManager = $this->getMockForAbstractClass(StoreManagerInterface::class); + $storageProvider = $this->createMock(\Magento\Framework\Storage\StorageProvider::class); + $this->storage = $this->getMockForAbstractClass(StorageInterface::class); + $storageProvider->expects($this->any()) + ->method('get') + ->with('media') + ->willReturn($this->storage); $this->mediaDirectoryMock = $this->getMockBuilder(Filesystem::class) ->disableOriginalConstructor() - ->setMethods(['getAbsolutePath','isFile','getRelativePath']) + ->setMethods(['getAbsolutePath','isFile','getRelativePath', 'readFile']) ->getMock(); $this->filesystemMock->expects($this->any()) @@ -223,7 +237,7 @@ protected function setUp() ->method('getStores') ->willReturn([$store]); - $this->service = new \Magento\MediaStorage\Service\ImageResize( + $this->service = new ImageResize( $this->appStateMock, $this->imageConfigMock, $this->productImageMock, @@ -235,7 +249,8 @@ protected function setUp() $this->themeCollectionMock, $this->filesystemMock, $this->databaseMock, - $this->storeManager + $this->storeManager, + $storageProvider ); } @@ -278,6 +293,14 @@ function () { ->method('saveFile') ->with($this->testfilepath); + $this->mediaDirectoryMock->expects($this->any()) + ->method('readFile') + ->with($this->testfilepath) + ->willReturn('image data'); + $this->storage->expects($this->once()) + ->method('put') + ->with($this->testfilepath, 'image data'); + $generator = $this->service->resizeFromThemes(['test-theme']); while ($generator->valid()) { $generator->next(); @@ -316,6 +339,14 @@ public function testResizeFromImageNameMediaStorageDatabase() ->method('saveFile') ->with($this->testfilepath); + $this->mediaDirectoryMock->expects($this->any()) + ->method('readFile') + ->with($this->testfilepath) + ->willReturn('image data'); + $this->storage->expects($this->once()) + ->method('put') + ->with($this->testfilepath, 'image data'); + $this->service->resizeFromImageName($this->testfilename); } } diff --git a/app/code/Magento/MediaStorage/etc/di.xml b/app/code/Magento/MediaStorage/etc/di.xml index 5cdcbb3b2b9a9..061c3be1bbe4a 100644 --- a/app/code/Magento/MediaStorage/etc/di.xml +++ b/app/code/Magento/MediaStorage/etc/di.xml @@ -31,4 +31,11 @@ <argument name="imageResizeScheduler" xsi:type="object">Magento\MediaStorage\Service\ImageResizeScheduler\Proxy</argument> </arguments> </type> + <type name="Magento\Framework\Storage\StorageProvider"> + <arguments> + <argument name="storage" xsi:type="array"> + <item name="media" xsi:type="string">pub/media</item> + </argument> + </arguments> + </type> </config> diff --git a/app/code/Magento/Store/Test/Unit/Model/HeaderProvider/UpgradeInsecureTest.php b/app/code/Magento/Store/Test/Unit/Model/HeaderProvider/UpgradeInsecureTest.php index cf85fb633bbca..29b60ed44d5b1 100644 --- a/app/code/Magento/Store/Test/Unit/Model/HeaderProvider/UpgradeInsecureTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/HeaderProvider/UpgradeInsecureTest.php @@ -19,7 +19,7 @@ class UpgradeInsecureTest extends \PHPUnit\Framework\TestCase /** * Content-Security-Policy header value */ - const HEADER_VALUE = 'upgrade-insecure-requests'; + const HEADER_VALUE = 'upgrade-insecure-requests;'; /** * @var UpgradeInsecure diff --git a/app/etc/di.xml b/app/etc/di.xml index 308ec1ef4d6ed..15080c331383f 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -1803,4 +1803,13 @@ </type> <preference for="Magento\Framework\GraphQl\Query\ErrorHandlerInterface" type="Magento\Framework\GraphQl\Query\ErrorHandler"/> <preference for="Magento\Framework\Filter\VariableResolverInterface" type="Magento\Framework\Filter\VariableResolver\StrategyResolver"/> + <type name="Magento\Framework\Storage\StorageAdapterProvider"> + <arguments> + <argument name="config" xsi:type="array"> + <item name="local" xsi:type="string">Magento\Framework\Storage\AdapterFactory\LocalFactory</item> + <item name="aws_s3" xsi:type="string">Magento\Framework\Storage\AdapterFactory\AwsS3Factory</item> + <item name="ms_azure" xsi:type="string">Magento\Framework\Storage\AdapterFactory\AzureFactory</item> + </argument> + </arguments> + </type> </config> diff --git a/composer.json b/composer.json index 9cbbf1689738f..dcb609f628b8d 100644 --- a/composer.json +++ b/composer.json @@ -35,11 +35,14 @@ "colinmollenhour/php-redis-session-abstract": "~1.4.0", "composer/composer": "^1.6", "elasticsearch/elasticsearch": "~2.0||~5.1||~6.1", + "guzzlehttp/guzzle": "^6.3.3", + "league/flysystem": "^1.0", + "league/flysystem-aws-s3-v3": "^1.0", + "league/flysystem-azure-blob-storage": "^0.1.6", "magento/composer": "1.6.x-dev", "magento/magento-composer-installer": ">=0.1.11", "magento/zendframework1": "~1.14.2", "monolog/monolog": "^1.17", - "wikimedia/less.php": "~1.8.0", "paragonie/sodium_compat": "^1.6", "pelago/emogrifier": "^2.0.0", "php-amqplib/php-amqplib": "~2.7.0||~2.10.0", @@ -52,6 +55,7 @@ "tedivm/jshrink": "~1.3.0", "tubalmartin/cssmin": "4.1.1", "webonyx/graphql-php": "^0.13.8", + "wikimedia/less.php": "~1.8.0", "zendframework/zend-captcha": "^2.7.1", "zendframework/zend-code": "~3.3.0", "zendframework/zend-config": "^2.6.0", @@ -79,8 +83,7 @@ "zendframework/zend-text": "^2.6.0", "zendframework/zend-uri": "^2.5.1", "zendframework/zend-validator": "^2.6.0", - "zendframework/zend-view": "~2.11.2", - "guzzlehttp/guzzle": "^6.3.3" + "zendframework/zend-view": "~2.11.2" }, "require-dev": { "allure-framework/allure-phpunit": "~1.2.0", diff --git a/composer.lock b/composer.lock index 5b94f60fa80a9..b509981204855 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,92 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "988eebffd81167973e4a51d7efd5be46", + "content-hash": "d56fb367a21ffc015055e6f12dfdc17a", "packages": [ + { + "name": "aws/aws-sdk-php", + "version": "3.133.6", + "source": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-php.git", + "reference": "cd7bd2fdd159146ef6c7eeb90b73fae4fd11da57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/cd7bd2fdd159146ef6c7eeb90b73fae4fd11da57", + "reference": "cd7bd2fdd159146ef6c7eeb90b73fae4fd11da57", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^5.3.3|^6.2.1|^7.0", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4.1", + "mtdowling/jmespath.php": "^2.5", + "php": ">=5.5" + }, + "require-dev": { + "andrewsville/php-token-reflection": "^1.4", + "aws/aws-php-sns-message-validator": "~1.0", + "behat/behat": "~3.0", + "doctrine/cache": "~1.4", + "ext-dom": "*", + "ext-openssl": "*", + "ext-pcntl": "*", + "ext-sockets": "*", + "nette/neon": "^2.3", + "phpunit/phpunit": "^4.8.35|^5.4.3", + "psr/cache": "^1.0", + "psr/simple-cache": "^1.0", + "sebastian/comparator": "^1.2.3" + }, + "suggest": { + "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", + "doctrine/cache": "To use the DoctrineCacheAdapter", + "ext-curl": "To send requests using cURL", + "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", + "ext-sockets": "To use client-side monitoring" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Aws\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Amazon Web Services", + "homepage": "http://aws.amazon.com" + } + ], + "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", + "homepage": "http://aws.amazon.com/sdkforphp", + "keywords": [ + "amazon", + "aws", + "cloud", + "dynamodb", + "ec2", + "glacier", + "s3", + "sdk" + ], + "time": "2020-01-24T19:11:35+00:00" + }, { "name": "braintree/braintree_php", "version": "3.35.0", @@ -830,6 +914,7 @@ } ], "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", + "abandoned": true, "time": "2018-07-31T13:22:33+00:00" }, { @@ -880,6 +965,7 @@ "Guzzle", "stream" ], + "abandoned": true, "time": "2014-10-12T19:18:40+00:00" }, { @@ -948,6 +1034,178 @@ ], "time": "2019-09-25T14:49:45+00:00" }, + { + "name": "league/flysystem", + "version": "1.0.63", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8132daec326565036bc8e8d1876f77ec183a7bd6", + "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7.10" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "time": "2020-01-04T16:30:31+00:00" + }, + { + "name": "league/flysystem-aws-s3-v3", + "version": "1.0.23", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", + "reference": "15b0cdeab7240bf8e8bffa85ae5275bbc3692bf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/15b0cdeab7240bf8e8bffa85ae5275bbc3692bf4", + "reference": "15b0cdeab7240bf8e8bffa85ae5275bbc3692bf4", + "shasum": "" + }, + "require": { + "aws/aws-sdk-php": "^3.0.0", + "league/flysystem": "^1.0.40", + "php": ">=5.5.0" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "~1.0.1", + "phpspec/phpspec": "^2.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\AwsS3v3\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Flysystem adapter for the AWS S3 SDK v3.x", + "time": "2019-06-05T17:18:29+00:00" + }, + { + "name": "league/flysystem-azure-blob-storage", + "version": "0.1.6", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-azure-blob-storage.git", + "reference": "97215345f3c42679299ba556a4d16d4847ee7f6d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-azure-blob-storage/zipball/97215345f3c42679299ba556a4d16d4847ee7f6d", + "reference": "97215345f3c42679299ba556a4d16d4847ee7f6d", + "shasum": "" + }, + "require": { + "guzzlehttp/psr7": "^1.5", + "league/flysystem": "^1.0", + "microsoft/azure-storage-blob": "^1.1", + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\AzureBlobStorage\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "time": "2019-06-07T20:42:16+00:00" + }, { "name": "magento/composer", "version": "1.6.x-dev", @@ -1110,6 +1368,94 @@ ], "time": "2019-11-26T15:09:40+00:00" }, + { + "name": "microsoft/azure-storage-blob", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/Azure/azure-storage-blob-php.git", + "reference": "6a333cd28a3742c3e99e79042dc6510f9f917919" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Azure/azure-storage-blob-php/zipball/6a333cd28a3742c3e99e79042dc6510f9f917919", + "reference": "6a333cd28a3742c3e99e79042dc6510f9f917919", + "shasum": "" + }, + "require": { + "microsoft/azure-storage-common": "~1.4", + "php": ">=5.6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "MicrosoftAzure\\Storage\\Blob\\": "src/Blob" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Azure Storage PHP Client Library", + "email": "dmsh@microsoft.com" + } + ], + "description": "This project provides a set of PHP client libraries that make it easy to access Microsoft Azure Storage Blob APIs.", + "keywords": [ + "azure", + "blob", + "php", + "sdk", + "storage" + ], + "time": "2020-01-02T07:18:59+00:00" + }, + { + "name": "microsoft/azure-storage-common", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/Azure/azure-storage-common-php.git", + "reference": "be4df800761d0d0fa91a9460c7f42517197d57a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Azure/azure-storage-common-php/zipball/be4df800761d0d0fa91a9460c7f42517197d57a0", + "reference": "be4df800761d0d0fa91a9460c7f42517197d57a0", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "~6.0", + "php": ">=5.6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "MicrosoftAzure\\Storage\\Common\\": "src/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Azure Storage PHP Client Library", + "email": "dmsh@microsoft.com" + } + ], + "description": "This project provides a set of common code shared by Azure Storage Blob, Table, Queue and File PHP client libraries.", + "keywords": [ + "azure", + "common", + "php", + "sdk", + "storage" + ], + "time": "2020-01-02T07:15:54+00:00" + }, { "name": "monolog/monolog", "version": "1.25.3", @@ -1188,6 +1534,63 @@ ], "time": "2019-12-20T14:15:16+00:00" }, + { + "name": "mtdowling/jmespath.php", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "52168cb9472de06979613d365c7f1ab8798be895" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/52168cb9472de06979613d365c7f1ab8798be895", + "reference": "52168cb9472de06979613d365c7f1ab8798be895", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "symfony/polyfill-mbstring": "^1.4" + }, + "require-dev": { + "composer/xdebug-handler": "^1.2", + "phpunit/phpunit": "^4.8.36|^7.5.15" + }, + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-4": { + "JmesPath\\": "src/" + }, + "files": [ + "src/JmesPath.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "time": "2019-12-30T18:03:34+00:00" + }, { "name": "paragonie/random_compat", "version": "v9.99.99", @@ -5077,8 +5480,8 @@ "authors": [ { "name": "Ivan Krutov", - "email": "vania-pooh@yandex-team.ru", - "role": "Developer" + "role": "Developer", + "email": "vania-pooh@yandex-team.ru" } ], "description": "A Codeception adapter for Allure report.", @@ -5180,8 +5583,8 @@ "authors": [ { "name": "Ivan Krutov", - "email": "vania-pooh@yandex-team.ru", - "role": "Developer" + "role": "Developer", + "email": "vania-pooh@yandex-team.ru" } ], "description": "A PHPUnit adapter for Allure report.", @@ -6647,7 +7050,6 @@ "selenium", "webdriver" ], - "abandoned": "php-webdriver/webdriver", "time": "2019-06-13T08:02:18+00:00" }, { @@ -7146,9 +7548,9 @@ "authors": [ { "name": "Phil Bennett", + "role": "Developer", "email": "philipobenito@gmail.com", - "homepage": "http://www.philipobenito.com", - "role": "Developer" + "homepage": "http://www.philipobenito.com" } ], "description": "A fast and intuitive dependency injection container.", @@ -7164,90 +7566,6 @@ ], "time": "2017-05-10T09:20:27+00:00" }, - { - "name": "league/flysystem", - "version": "1.0.63", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8132daec326565036bc8e8d1876f77ec183a7bd6", - "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6", - "shasum": "" - }, - "require": { - "ext-fileinfo": "*", - "php": ">=5.5.9" - }, - "conflict": { - "league/flysystem-sftp": "<1.0.6" - }, - "require-dev": { - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.10" - }, - "suggest": { - "ext-fileinfo": "Required for MimeType", - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Flysystem\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Filesystem abstraction: Many filesystems, one API.", - "keywords": [ - "Cloud Files", - "WebDAV", - "abstraction", - "aws", - "cloud", - "copy.com", - "dropbox", - "file systems", - "files", - "filesystem", - "filesystems", - "ftp", - "rackspace", - "remote", - "s3", - "sftp", - "storage" - ], - "time": "2020-01-04T16:30:31+00:00" - }, { "name": "lusitanian/oauth", "version": "v0.8.11", @@ -7650,18 +7968,18 @@ "authors": [ { "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "role": "Developer", + "email": "arne@blankerts.de" }, { "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" + "role": "Developer", + "email": "sebastian@phpeople.de" }, { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "role": "Developer", + "email": "sebastian@phpunit.de" } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", @@ -7697,18 +8015,18 @@ "authors": [ { "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "role": "Developer", + "email": "arne@blankerts.de" }, { "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" + "role": "Developer", + "email": "sebastian@phpeople.de" }, { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "role": "Developer", + "email": "sebastian@phpunit.de" } ], "description": "Library for handling version information and constraints", @@ -8063,20 +8381,20 @@ "authors": [ { "name": "Manuel Pichler", + "role": "Project Founder", "email": "github@manuel-pichler.de", - "homepage": "https://github.com/manuelpichler", - "role": "Project Founder" + "homepage": "https://github.com/manuelpichler" }, { "name": "Marc Würth", + "role": "Project Maintainer", "email": "ravage@bluewin.ch", - "homepage": "https://github.com/ravage84", - "role": "Project Maintainer" + "homepage": "https://github.com/ravage84" }, { "name": "Other contributors", - "homepage": "https://github.com/phpmd/phpmd/graphs/contributors", - "role": "Contributors" + "role": "Contributors", + "homepage": "https://github.com/phpmd/phpmd/graphs/contributors" } ], "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.", @@ -8210,16 +8528,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.7", + "version": "0.12.8", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "07fa7958027fd98c567099bbcda5d6a0f2ec5197" + "reference": "62a552602b7586d82826231f2fd4cbfe39fe0b1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/07fa7958027fd98c567099bbcda5d6a0f2ec5197", - "reference": "07fa7958027fd98c567099bbcda5d6a0f2ec5197", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/62a552602b7586d82826231f2fd4cbfe39fe0b1d", + "reference": "62a552602b7586d82826231f2fd4cbfe39fe0b1d", "shasum": "" }, "require": { @@ -8245,7 +8563,7 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2020-01-20T21:59:06+00:00" + "time": "2020-01-26T23:36:48+00:00" }, { "name": "phpunit/php-code-coverage", @@ -8297,8 +8615,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "role": "lead", + "email": "sebastian@phpunit.de" } ], "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", @@ -8345,8 +8663,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "role": "lead", + "email": "sb@sebastian-bergmann.de" } ], "description": "FilterIterator implementation that filters files based on a list of suffixes.", @@ -8387,8 +8705,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "role": "lead", + "email": "sebastian@phpunit.de" } ], "description": "Simple template engine.", @@ -8436,8 +8754,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "role": "lead", + "email": "sb@sebastian-bergmann.de" } ], "description": "Utility class for timing", @@ -8567,8 +8885,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "role": "lead", + "email": "sebastian@phpunit.de" } ], "description": "The PHP Unit Testing framework.", @@ -9240,8 +9558,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "role": "lead", + "email": "sebastian@phpunit.de" } ], "description": "Copy/Paste Detector (CPD) for PHP code.", @@ -9378,8 +9696,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "role": "lead", + "email": "sebastian@phpunit.de" } ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", @@ -10182,8 +10500,8 @@ "authors": [ { "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "lead" + "role": "lead", + "email": "arne@blankerts.de" } ], "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", @@ -10223,8 +10541,8 @@ "authors": [ { "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "role": "Developer", + "email": "arne@blankerts.de" } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", diff --git a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php index dc3e63fcc7df8..2adff8162e5a3 100644 --- a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php +++ b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php @@ -19,6 +19,11 @@ class Response extends \Zend\Http\PhpEnvironment\Response implements \Magento\Fr */ protected $isRedirect = false; + /** + * @var bool + */ + private $headersSent; + /** * @inheritdoc */ @@ -28,6 +33,10 @@ public function getHeader($name) $headers = $this->getHeaders(); if ($headers->has($name)) { $header = $headers->get($name); + // zend-http >= 2.10.11 can return \ArrayIterator instead of a single Header + if ($header instanceof \ArrayIterator) { + $header = $header->current(); + } } return $header; } From 5bb34485e08ff31b23774a87a37d2da84ef08194 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Wed, 5 Feb 2020 15:28:44 -0600 Subject: [PATCH 077/229] PR-155-For-2 4-develop --- app/code/Magento/Catalog/Helper/Image.php | 6 +- .../Source/Web/CatalogMediaUrlFormat.php | 2 +- .../Config/CatalogClone/Media/ImageTest.php | 153 ------------ .../Console/Command/ImagesResizeCommand.php | 3 +- .../Adminhtml/Wysiwyg/Files/ContentTest.php | 220 ------------------ .../Block/Product/View/GalleryTest.php | 84 +++++++ .../Catalog/Model/ImageUploaderTest.php | 165 ------------- .../Test/Unit/Module/I18n/ContextTest.php | 153 ------------ 8 files changed, 89 insertions(+), 697 deletions(-) delete mode 100644 app/code/Magento/Catalog/Test/Unit/Model/Config/CatalogClone/Media/ImageTest.php delete mode 100644 app/code/Magento/Theme/Test/Unit/Block/Adminhtml/Wysiwyg/Files/ContentTest.php delete mode 100644 dev/tests/integration/testsuite/Magento/Catalog/Model/ImageUploaderTest.php delete mode 100644 setup/src/Magento/Setup/Test/Unit/Module/I18n/ContextTest.php diff --git a/app/code/Magento/Catalog/Helper/Image.php b/app/code/Magento/Catalog/Helper/Image.php index 0dff475b23f30..86065329aa3be 100644 --- a/app/code/Magento/Catalog/Helper/Image.php +++ b/app/code/Magento/Catalog/Helper/Image.php @@ -13,11 +13,10 @@ use Magento\Framework\View\Element\Block\ArgumentInterface; /** - * Catalog image helper. + * Catalog image helper * * @api * @SuppressWarnings(PHPMD.TooManyFields) - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @since 100.0.2 */ class Image extends AbstractHelper implements ArgumentInterface @@ -164,7 +163,8 @@ public function __construct( $this->_assetRepo = $assetRepo; $this->viewConfig = $viewConfig; $this->viewAssetPlaceholderFactory = $placeholderFactory - ?: ObjectManager::getInstance()->get(PlaceholderFactory::class); + ?: ObjectManager::getInstance() + ->get(PlaceholderFactory::class); $this->mediaConfig = $mediaConfig ?: ObjectManager::getInstance()->get(CatalogMediaConfig::class); } diff --git a/app/code/Magento/Catalog/Model/Config/Source/Web/CatalogMediaUrlFormat.php b/app/code/Magento/Catalog/Model/Config/Source/Web/CatalogMediaUrlFormat.php index f24044fc92c95..0ceeeb596655d 100644 --- a/app/code/Magento/Catalog/Model/Config/Source/Web/CatalogMediaUrlFormat.php +++ b/app/code/Magento/Catalog/Model/Config/Source/Web/CatalogMediaUrlFormat.php @@ -24,7 +24,7 @@ public function toOptionArray() 'value' => CatalogMediaConfig::IMAGE_OPTIMIZATION_PARAMETERS, 'label' => __('Image optimization based on query parameters') ], - ['value' => CatalogMediaConfig::HASH, 'label' => __('Unique hash per image variant (Legacy mode)')] + ['value' => CatalogMediaConfig::HASH, 'label' => __('Legacy mode (unique hash per image variant)')] ]; } } diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Config/CatalogClone/Media/ImageTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Config/CatalogClone/Media/ImageTest.php deleted file mode 100644 index 23f0aec5b69a2..0000000000000 --- a/app/code/Magento/Catalog/Test/Unit/Model/Config/CatalogClone/Media/ImageTest.php +++ /dev/null @@ -1,153 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Catalog\Test\Unit\Model\Config\CatalogClone\Media; - -use Magento\Catalog\Model\Product; -use Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend; -use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; - -/** - * Tests \Magento\Catalog\Model\Config\CatalogClone\Media\Image. - * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) - */ -class ImageTest extends \PHPUnit\Framework\TestCase -{ - /** - * @var \Magento\Catalog\Model\Config\CatalogClone\Media\Image - */ - private $model; - - /** - * @var \Magento\Eav\Model\Config|\PHPUnit_Framework_MockObject_MockObject - */ - private $eavConfig; - - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $attributeCollectionFactory; - - /** - * @var \Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection|\PHPUnit_Framework_MockObject_MockObject - */ - private $attributeCollection; - - /** - * @var \Magento\Eav\Model\Entity\Attribute|\PHPUnit_Framework_MockObject_MockObject - */ - private $attribute; - - /** - * @var \Magento\Framework\Escaper|\PHPUnit_Framework_MockObject_MockObject - */ - private $escaperMock; - - /** - * @inheritdoc - */ - protected function setUp() - { - $this->eavConfig = $this->getMockBuilder(\Magento\Eav\Model\Config::class) - ->disableOriginalConstructor() - ->getMock(); - - $this->attributeCollection = $this->getMockBuilder( - \Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection::class - ) - ->disableOriginalConstructor() - ->getMock(); - - $this->attributeCollectionFactory = $this->getMockBuilder( - \Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory::class - ) - ->setMethods(['create']) - ->disableOriginalConstructor() - ->getMock(); - $this->attributeCollectionFactory->expects($this->any())->method('create')->will( - $this->returnValue($this->attributeCollection) - ); - - $this->attribute = $this->getMockBuilder(\Magento\Eav\Model\Entity\Attribute::class) - ->disableOriginalConstructor() - ->getMock(); - - $this->escaperMock = $this->getMockBuilder( - \Magento\Framework\Escaper::class - ) - ->disableOriginalConstructor() - ->setMethods(['escapeHtml']) - ->getMock(); - - $helper = new ObjectManager($this); - $this->model = $helper->getObject( - \Magento\Catalog\Model\Config\CatalogClone\Media\Image::class, - [ - 'eavConfig' => $this->eavConfig, - 'attributeCollectionFactory' => $this->attributeCollectionFactory, - 'escaper' => $this->escaperMock, - ] - ); - } - - /** - * @param string $actualLabel - * @param string $expectedLabel - * @return void - * - * @dataProvider getPrefixesDataProvider - */ - public function testGetPrefixes(string $actualLabel, string $expectedLabel): void - { - $entityTypeId = 3; - /** @var \Magento\Eav\Model\Entity\Type|\PHPUnit_Framework_MockObject_MockObject $entityType */ - $entityType = $this->getMockBuilder(\Magento\Eav\Model\Entity\Type::class) - ->disableOriginalConstructor() - ->getMock(); - $entityType->expects($this->once())->method('getId')->willReturn($entityTypeId); - - /** @var AbstractFrontend|\PHPUnit_Framework_MockObject_MockObject $frontend */ - $frontend = $this->getMockBuilder(\Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend::class) - ->setMethods(['getLabel']) - ->disableOriginalConstructor() - ->getMockForAbstractClass(); - $frontend->expects($this->once())->method('getLabel')->willReturn($actualLabel); - - $this->attributeCollection->expects($this->once())->method('setEntityTypeFilter')->with($entityTypeId); - $this->attributeCollection->expects($this->once())->method('setFrontendInputTypeFilter')->with('media_image'); - - $this->attribute->expects($this->once())->method('getAttributeCode')->willReturn('attributeCode'); - $this->attribute->expects($this->once())->method('getFrontend')->willReturn($frontend); - - $this->attributeCollection->expects($this->any())->method('getIterator') - ->willReturn(new \ArrayIterator([$this->attribute])); - - $this->eavConfig->expects($this->any())->method('getEntityType')->with(Product::ENTITY) - ->willReturn($entityType); - - $this->escaperMock->expects($this->once())->method('escapeHtml')->with($actualLabel) - ->willReturn($expectedLabel); - - $this->assertEquals([['field' => 'attributeCode_', 'label' => $expectedLabel]], $this->model->getPrefixes()); - } - - /** - * @return array - */ - public function getPrefixesDataProvider(): array - { - return [ - [ - 'actual_label' => 'testLabel', - 'expected_label' => 'testLabel', - ], - [ - 'actual_label' => '<media-image-attributelabel', - 'expected_label' => '<media-image-attributelabel', - ], - ]; - } -} diff --git a/app/code/Magento/MediaStorage/Console/Command/ImagesResizeCommand.php b/app/code/Magento/MediaStorage/Console/Command/ImagesResizeCommand.php index d592a004e111a..526774a3e6bcd 100644 --- a/app/code/Magento/MediaStorage/Console/Command/ImagesResizeCommand.php +++ b/app/code/Magento/MediaStorage/Console/Command/ImagesResizeCommand.php @@ -86,8 +86,7 @@ protected function configure() $this->setName('catalog:images:resize') ->setDescription( 'Creates resized product images ' . - '(Not relevant when image resizing is offloaded from Magento. ' . - 'See https://docs.magento.com/m2/ee/user_guide/configuration/general/web.html#url-options )' + '(Deprecated: see https://docs.magento.com/m2/ee/user_guide/configuration/general/web.html#url-options' ) ->setDefinition($this->getOptionsList()); } diff --git a/app/code/Magento/Theme/Test/Unit/Block/Adminhtml/Wysiwyg/Files/ContentTest.php b/app/code/Magento/Theme/Test/Unit/Block/Adminhtml/Wysiwyg/Files/ContentTest.php deleted file mode 100644 index 7fe3b25cf97b2..0000000000000 --- a/app/code/Magento/Theme/Test/Unit/Block/Adminhtml/Wysiwyg/Files/ContentTest.php +++ /dev/null @@ -1,220 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Theme\Test\Unit\Block\Adminhtml\Wysiwyg\Files; - -use Magento\Theme\Model\Wysiwyg\Storage; - -class ContentTest extends \PHPUnit\Framework\TestCase -{ - /** - * @var \Magento\Backend\Model\Url|PHPUnit_Framework_MockObject_MockObject - */ - protected $_urlBuilder; - - /** - * @var \Magento\Theme\Helper\Storage|PHPUnit_Framework_MockObject_MockObject - */ - protected $_helperStorage; - - /** - * @var \Magento\Theme\Block\Adminhtml\Wysiwyg\Files\Content|PHPUnit_Framework_MockObject_MockObject - */ - protected $_filesContent; - - /** - * @var \Magento\Framework\App\RequestInterface|PHPUnit_Framework_MockObject_MockObject - */ - protected $_request; - - protected function setUp() - { - $this->_helperStorage = $this->createMock(\Magento\Theme\Helper\Storage::class); - $this->_urlBuilder = $this->createMock(\Magento\Backend\Model\Url::class); - $this->_request = $this->createMock(\Magento\Framework\App\RequestInterface::class); - - $objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); - $constructArguments = $objectManagerHelper->getConstructArguments( - \Magento\Theme\Block\Adminhtml\Wysiwyg\Files\Content::class, - [ - 'urlBuilder' => $this->_urlBuilder, - 'request' => $this->_request, - 'storageHelper' => $this->_helperStorage - ] - ); - $this->_filesContent = $objectManagerHelper->getObject( - \Magento\Theme\Block\Adminhtml\Wysiwyg\Files\Content::class, - $constructArguments - ); - } - - /** - * @dataProvider requestParamsProvider - * @param array $requestParams - */ - public function testGetNewFolderUrl($requestParams) - { - $expectedUrl = 'some_url'; - - $this->_helperStorage->expects( - $this->once() - )->method( - 'getRequestParams' - )->will( - $this->returnValue($requestParams) - ); - - $this->_urlBuilder->expects( - $this->once() - )->method( - 'getUrl' - )->with( - 'adminhtml/*/newFolder', - $requestParams - )->will( - $this->returnValue($expectedUrl) - ); - - $this->assertEquals($expectedUrl, $this->_filesContent->getNewfolderUrl()); - } - - /** - * @dataProvider requestParamsProvider - * @param array $requestParams - */ - public function testGetDeleteFilesUrl($requestParams) - { - $expectedUrl = 'some_url'; - - $this->_helperStorage->expects( - $this->once() - )->method( - 'getRequestParams' - )->will( - $this->returnValue($requestParams) - ); - - $this->_urlBuilder->expects( - $this->once() - )->method( - 'getUrl' - )->with( - 'adminhtml/*/deleteFiles', - $requestParams - )->will( - $this->returnValue($expectedUrl) - ); - - $this->assertEquals($expectedUrl, $this->_filesContent->getDeleteFilesUrl()); - } - - /** - * @dataProvider requestParamsProvider - * @param array $requestParams - */ - public function testGetOnInsertUrl($requestParams) - { - $expectedUrl = 'some_url'; - - $this->_helperStorage->expects( - $this->once() - )->method( - 'getRequestParams' - )->will( - $this->returnValue($requestParams) - ); - - $this->_urlBuilder->expects( - $this->once() - )->method( - 'getUrl' - )->with( - 'adminhtml/*/onInsert', - $requestParams - )->will( - $this->returnValue($expectedUrl) - ); - - $this->assertEquals($expectedUrl, $this->_filesContent->getOnInsertUrl()); - } - - /** - * Data provider for requestParams - * @return array - */ - public function requestParamsProvider() - { - return [ - [ - 'requestParams' => [ - \Magento\Theme\Helper\Storage::PARAM_THEME_ID => 1, - \Magento\Theme\Helper\Storage::PARAM_CONTENT_TYPE => Storage::TYPE_IMAGE, - \Magento\Theme\Helper\Storage::PARAM_NODE => 'root', - ] - ] - ]; - } - - public function testGetTargetElementId() - { - $expectedRequest = 'some_request'; - - $this->_request->expects( - $this->once() - )->method( - 'getParam' - )->with( - 'target_element_id' - )->will( - $this->returnValue($expectedRequest) - ); - - $this->assertEquals($expectedRequest, $this->_filesContent->getTargetElementId()); - } - - public function testGetContentsUrl() - { - $expectedUrl = 'some_url'; - - $expectedRequest = 'some_request'; - - $requestParams = [ - \Magento\Theme\Helper\Storage::PARAM_THEME_ID => 1, - \Magento\Theme\Helper\Storage::PARAM_CONTENT_TYPE => Storage::TYPE_IMAGE, - \Magento\Theme\Helper\Storage::PARAM_NODE => 'root', - ]; - - $this->_urlBuilder->expects( - $this->once() - )->method( - 'getUrl' - )->with( - 'adminhtml/*/contents', - ['type' => $expectedRequest] + $requestParams - )->will( - $this->returnValue($expectedUrl) - ); - - $this->_request->expects( - $this->once() - )->method( - 'getParam' - )->with( - 'type' - )->will( - $this->returnValue($expectedRequest) - ); - - $this->_helperStorage->expects( - $this->once() - )->method( - 'getRequestParams' - )->will( - $this->returnValue($requestParams) - ); - - $this->assertEquals($expectedUrl, $this->_filesContent->getContentsUrl()); - } -} diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/GalleryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/GalleryTest.php index a3545e4a39e80..d54a0b3306b33 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/GalleryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/GalleryTest.php @@ -331,6 +331,90 @@ public function galleryImagesWithImageOptimizationParametersInUrlDataProvider(): ]; } + /** + * @dataProvider galleryImagesWithImageOptimizationParametersInUrlDataProvider + * @magentoDataFixture Magento/Catalog/_files/product_with_multiple_images.php + * @magentoConfigFixture default/web/url/catalog_media_url_format image_optimization_parameters + * @magentoDbIsolation enabled + * @param array $images + * @param array $expectation + * @return void + */ + public function testGetGalleryImagesJsonWithImageOptimizationParametersInUrl( + array $images, + array $expectation + ): void { + $product = $this->getProduct(); + $this->setGalleryImages($product, $images); + $this->block->setData('product', $this->getProduct()); + [$firstImage, $secondImage] = $this->serializer->unserialize($this->block->getGalleryImagesJson()); + [$firstExpectedImage, $secondExpectedImage] = $expectation; + $this->assertImages($firstImage, $firstExpectedImage); + $this->assertImages($secondImage, $secondExpectedImage); + } + + /** + * @return array + */ + public function galleryImagesWithImageOptimizationParametersInUrlDataProvider(): array + { + + $imageExpectation = [ + 'thumb' => '/m/a/magento_image.jpg?width=88&height=110&store=default&image-type=thumbnail', + 'img' => '/m/a/magento_image.jpg?width=700&height=700&store=default&image-type=image', + 'full' => '/m/a/magento_image.jpg?store=default&image-type=image', + 'caption' => 'Image Alt Text', + 'position' => '1', + 'isMain' => false, + 'type' => 'image', + 'videoUrl' => null, + ]; + + $thumbnailExpectation = [ + 'thumb' => '/m/a/magento_thumbnail.jpg?width=88&height=110&store=default&image-type=thumbnail', + 'img' => '/m/a/magento_thumbnail.jpg?width=700&height=700&store=default&image-type=image', + 'full' => '/m/a/magento_thumbnail.jpg?store=default&image-type=image', + 'caption' => 'Thumbnail Image', + 'position' => '2', + 'isMain' => false, + 'type' => 'image', + 'videoUrl' => null, + ]; + + return [ + 'with_main_image' => [ + 'images' => [ + '/m/a/magento_image.jpg' => [], + '/m/a/magento_thumbnail.jpg' => ['main' => true], + ], + 'expectation' => [ + $imageExpectation, + array_merge($thumbnailExpectation, ['isMain' => true]), + ], + ], + 'without_main_image' => [ + 'images' => [ + '/m/a/magento_image.jpg' => [], + '/m/a/magento_thumbnail.jpg' => [], + ], + 'expectation' => [ + array_merge($imageExpectation, ['isMain' => true]), + $thumbnailExpectation, + ], + ], + 'with_changed_position' => [ + 'images' => [ + '/m/a/magento_image.jpg' => ['position' => '2'], + '/m/a/magento_thumbnail.jpg' => ['position' => '1'], + ], + 'expectation' => [ + array_merge($thumbnailExpectation, ['position' => '1']), + array_merge($imageExpectation, ['position' => '2', 'isMain' => true]), + ], + ], + ]; + } + /** * @dataProvider galleryImagesOnStoreViewDataProvider * @magentoDataFixture Magento/Catalog/_files/product_with_multiple_images.php diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ImageUploaderTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ImageUploaderTest.php deleted file mode 100644 index 569cf2357675c..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ImageUploaderTest.php +++ /dev/null @@ -1,165 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -declare(strict_types=1); - -namespace Magento\Catalog\Model; - -use Magento\Framework\App\Filesystem\DirectoryList; - -/** - * Tests for the \Magento\Catalog\Model\ImageUploader class - */ -class ImageUploaderTest extends \PHPUnit\Framework\TestCase -{ - /** - * @var \Magento\Framework\ObjectManagerInterface - */ - private $objectManager; - - /** - * @var \Magento\Catalog\Model\ImageUploader - */ - private $imageUploader; - - /** - * @var \Magento\Framework\Filesystem - */ - private $filesystem; - - /** - * @var \Magento\Framework\Filesystem\Directory\WriteInterface - */ - private $mediaDirectory; - - /** - * @inheritdoc - */ - protected function setUp() - { - $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var \Magento\Framework\Filesystem $filesystem */ - $this->filesystem = $this->objectManager->get(\Magento\Framework\Filesystem::class); - $this->mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA); - /** @var $uploader \Magento\MediaStorage\Model\File\Uploader */ - $this->imageUploader = $this->objectManager->create( - \Magento\Catalog\Model\ImageUploader::class, - [ - 'baseTmpPath' => 'catalog/tmp/category', - 'basePath' => 'catalog/category', - 'allowedExtensions' => ['jpg', 'jpeg', 'gif', 'png'], - 'allowedMimeTypes' => ['image/jpg', 'image/jpeg', 'image/gif', 'image/png'] - ] - ); - } - - /** - * @return void - */ - public function testSaveFileToTmpDir(): void - { - $fileName = 'magento_small_image.jpg'; - $tmpDirectory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::SYS_TMP); - $fixtureDir = realpath(__DIR__ . '/../_files'); - $filePath = $tmpDirectory->getAbsolutePath($fileName); - copy($fixtureDir . DIRECTORY_SEPARATOR . $fileName, $filePath); - - $_FILES['image'] = [ - 'name' => $fileName, - 'type' => 'image/jpeg', - 'tmp_name' => $filePath, - 'error' => 0, - 'size' => 12500, - ]; - - $this->imageUploader->saveFileToTmpDir('image'); - $filePath = $this->imageUploader->getBaseTmpPath() . DIRECTORY_SEPARATOR. $fileName; - $this->assertTrue(is_file($this->mediaDirectory->getAbsolutePath($filePath))); - } - - /** - * Test that method rename files when move it with the same name into base directory. - * - * @return void - * @magentoDataFixture Magento/Catalog/_files/catalog_category_image.php - * @magentoDataFixture Magento/Catalog/_files/catalog_tmp_category_image.php - */ - public function testMoveFileFromTmp(): void - { - $expectedFilePath = $this->imageUploader->getBasePath() . DIRECTORY_SEPARATOR . 'magento_small_image_1.jpg'; - - $this->assertFileNotExists($this->mediaDirectory->getAbsolutePath($expectedFilePath)); - - $this->imageUploader->moveFileFromTmp('magento_small_image.jpg'); - - $this->assertFileExists($this->mediaDirectory->getAbsolutePath($expectedFilePath)); - } - - /** - * @expectedException \Magento\Framework\Exception\LocalizedException - * @expectedExceptionMessage File validation failed. - * @return void - */ - public function testSaveFileToTmpDirWithWrongExtension(): void - { - $fileName = 'text.txt'; - $tmpDirectory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::SYS_TMP); - $filePath = $tmpDirectory->getAbsolutePath($fileName); - $file = fopen($filePath, "wb"); - fwrite($file, 'just a text'); - - $_FILES['image'] = [ - 'name' => $fileName, - 'type' => 'text/plain', - 'tmp_name' => $filePath, - 'error' => 0, - 'size' => 12500, - ]; - - $this->imageUploader->saveFileToTmpDir('image'); - $filePath = $this->imageUploader->getBaseTmpPath() . DIRECTORY_SEPARATOR. $fileName; - $this->assertFalse(is_file($this->mediaDirectory->getAbsolutePath($filePath))); - } - - /** - * @expectedException \Magento\Framework\Exception\LocalizedException - * @expectedExceptionMessage File validation failed. - * @return void - */ - public function testSaveFileToTmpDirWithWrongFile(): void - { - $fileName = 'file.gif'; - $tmpDirectory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::SYS_TMP); - $filePath = $tmpDirectory->getAbsolutePath($fileName); - $file = fopen($filePath, "wb"); - fwrite($file, 'just a text'); - - $_FILES['image'] = [ - 'name' => $fileName, - 'type' => 'image/gif', - 'tmp_name' => $filePath, - 'error' => 0, - 'size' => 12500, - ]; - - $this->imageUploader->saveFileToTmpDir('image'); - $filePath = $this->imageUploader->getBaseTmpPath() . DIRECTORY_SEPARATOR. $fileName; - $this->assertFalse(is_file($this->mediaDirectory->getAbsolutePath($filePath))); - } - - /** - * @inheritdoc - */ - public static function tearDownAfterClass() - { - parent::tearDownAfterClass(); - $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - \Magento\Framework\Filesystem::class - ); - /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */ - $mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA); - $mediaDirectory->delete('tmp'); - } -} diff --git a/setup/src/Magento/Setup/Test/Unit/Module/I18n/ContextTest.php b/setup/src/Magento/Setup/Test/Unit/Module/I18n/ContextTest.php deleted file mode 100644 index 1917d7aef5d13..0000000000000 --- a/setup/src/Magento/Setup/Test/Unit/Module/I18n/ContextTest.php +++ /dev/null @@ -1,153 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Setup\Test\Unit\Module\I18n; - -use Magento\Framework\Component\ComponentRegistrar; -use \Magento\Setup\Module\I18n\Context; - -class ContextTest extends \PHPUnit\Framework\TestCase -{ - /** - * @var \Magento\Setup\Module\I18n\Context - */ - protected $context; - - /** - * @var \Magento\Framework\Component\ComponentRegistrar|\PHPUnit_Framework_MockObject_MockObject - */ - protected $componentRegistrar; - - protected function setUp() - { - $this->componentRegistrar = $this->createMock(\Magento\Framework\Component\ComponentRegistrar::class); - } - - /** - * @param array $context - * @param string $path - * @param array $pathValues - * @dataProvider dataProviderContextByPath - */ - public function testGetContextByPath($context, $path, $pathValues) - { - $this->componentRegistrar->expects($this->any()) - ->method('getPaths') - ->willReturnMap($pathValues); - $this->context = new Context($this->componentRegistrar); - $this->assertEquals($context, $this->context->getContextByPath($path)); - } - - /** - * @return array - */ - public function dataProviderContextByPath() - { - return [ - [ - [Context::CONTEXT_TYPE_MODULE, 'Magento_Module'], - '/app/code/Magento/Module/Block/Test.php', - [ - [Context::CONTEXT_TYPE_MODULE, ['Magento_Module' => '/app/code/Magento/Module']], - [Context::CONTEXT_TYPE_THEME, []], - ] - ], - [ - [Context::CONTEXT_TYPE_THEME, 'frontend/Some/theme'], - '/app/design/area/theme/test.phtml', - [ - [Context::CONTEXT_TYPE_MODULE, []], - [Context::CONTEXT_TYPE_THEME, ['frontend/Some/theme' => '/app/design/area/theme']], - ] - ], - [ - [Context::CONTEXT_TYPE_LIB, 'lib/web/module/test.phtml'], - '/lib/web/module/test.phtml', - [ - [Context::CONTEXT_TYPE_MODULE, []], - [Context::CONTEXT_TYPE_THEME, []], - ] - ], - ]; - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Invalid path given: "invalid_path". - */ - public function testGetContextByPathWithInvalidPath() - { - $this->componentRegistrar->expects($this->any()) - ->method('getPaths') - ->willReturnMap([ - [ComponentRegistrar::MODULE, ['/path/to/module']], - [ComponentRegistrar::THEME, ['/path/to/theme']] - ]); - $this->context = new Context($this->componentRegistrar); - $this->context->getContextByPath('invalid_path'); - } - - /** - * @param string $path - * @param array $context - * @param array $registrar - * @dataProvider dataProviderPathToLocaleDirectoryByContext - */ - public function testBuildPathToLocaleDirectoryByContext($path, $context, $registrar) - { - $paths = []; - foreach ($registrar as $module) { - $paths[$module[1]] = $module[2]; - } - $this->componentRegistrar->expects($this->any()) - ->method('getPath') - ->willReturnMap($registrar); - $this->context = new Context($this->componentRegistrar); - $this->assertEquals($path, $this->context->buildPathToLocaleDirectoryByContext($context[0], $context[1])); - } - - /** - * @return array - */ - public function dataProviderPathToLocaleDirectoryByContext() - { - return [ - [ - BP . '/app/code/Magento/Module/i18n/', - [Context::CONTEXT_TYPE_MODULE, 'Magento_Module'], - [[ComponentRegistrar::MODULE, 'Magento_Module', BP . '/app/code/Magento/Module']] - ], - [ - BP . '/app/design/frontend/Magento/luma/i18n/', - [Context::CONTEXT_TYPE_THEME, 'frontend/Magento/luma'], - [[ComponentRegistrar::THEME, 'frontend/Magento/luma', BP . '/app/design/frontend/Magento/luma']] - ], - - [ - null, - [Context::CONTEXT_TYPE_MODULE, 'Unregistered_Module'], - [[ComponentRegistrar::MODULE, 'Unregistered_Module', null]] - ], - [ - null, - [Context::CONTEXT_TYPE_THEME, 'frontend/Magento/unregistered'], - [[ComponentRegistrar::THEME, 'frontend/Magento/unregistered', null]] - ], - [BP . '/lib/web/i18n/', [Context::CONTEXT_TYPE_LIB, 'lib/web/module/test.phtml'], []], - ]; - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Invalid context given: "invalid_type". - */ - public function testBuildPathToLocaleDirectoryByContextWithInvalidType() - { - $this->componentRegistrar->expects($this->never()) - ->method('getPath'); - $this->context = new Context($this->componentRegistrar); - $this->context->buildPathToLocaleDirectoryByContext('invalid_type', 'Magento_Module'); - } -} From 7a0f71a13c219fad5d756d943e11bafda1b96d18 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Wed, 5 Feb 2020 15:41:51 -0600 Subject: [PATCH 078/229] PR-155-For-2 4-develop --- app/code/Magento/Catalog/Model/Product/Image.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Image.php b/app/code/Magento/Catalog/Model/Product/Image.php index 9ec765ba8fbef..6a0032ca694a5 100644 --- a/app/code/Magento/Catalog/Model/Product/Image.php +++ b/app/code/Magento/Catalog/Model/Product/Image.php @@ -16,7 +16,6 @@ use Magento\Catalog\Model\Product\Image\ParamsBuilder; use Magento\Framework\Storage\StorageInterface; use Magento\Framework\Storage\StorageProvider; -use Magento\Framework\Filesystem\Driver\File as FilesystemDriver; /** * Image operations @@ -209,11 +208,6 @@ class Image extends \Magento\Framework\Model\AbstractModel */ private $storage; - /** - * @var FilesystemDriver - */ - private $filesystemDriver; - /** * Constructor * @@ -235,7 +229,6 @@ class Image extends \Magento\Framework\Model\AbstractModel * @param array $data * @param SerializerInterface $serializer * @param ParamsBuilder $paramsBuilder - * @param FilesystemDriver $filesystemDriver * @throws \Magento\Framework\Exception\FileSystemException * @SuppressWarnings(PHPMD.ExcessiveParameterList) * @SuppressWarnings(PHPMD.UnusedLocalVariable) @@ -258,8 +251,7 @@ public function __construct( \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [], SerializerInterface $serializer = null, - ParamsBuilder $paramsBuilder = null, - FilesystemDriver $filesystemDriver = null + ParamsBuilder $paramsBuilder = null ) { $this->_storeManager = $storeManager; $this->_catalogProductMediaConfig = $catalogProductMediaConfig; @@ -278,7 +270,6 @@ public function __construct( $this->viewAssetPlaceholderFactory = $viewAssetPlaceholderFactory; $this->serializer = $serializer ?: ObjectManager::getInstance()->get(SerializerInterface::class); $this->paramsBuilder = $paramsBuilder ?: ObjectManager::getInstance()->get(ParamsBuilder::class); - $this->filesystemDriver = $filesystemDriver ?: ObjectManager::getInstance()->get(FilesystemDriver::class); } /** From a05d61541314399465857f9713c3684bc87010a1 Mon Sep 17 00:00:00 2001 From: Anton Kaplya <a.kaplya@gmail.com> Date: Wed, 5 Feb 2020 15:48:56 -0600 Subject: [PATCH 079/229] Update app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php Co-Authored-By: Alex Paliarush <paliarus@adobe.com> --- .../Magento/Catalog/Model/ResourceModel/Product/Gallery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php index f5a1e4236eadb..d18469da96a3b 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php @@ -38,7 +38,7 @@ class Gallery extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb * Gallery constructor. * @param \Magento\Framework\Model\ResourceModel\Db\Context $context * @param \Magento\Framework\EntityManager\MetadataPool $metadataPool - * @param null $connectionName + * @param string $connectionName * @throws \Exception */ public function __construct( From ea8a4ddc34b8f0d71c207aeac533bdd7fd7319b9 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Wed, 5 Feb 2020 16:56:32 -0600 Subject: [PATCH 080/229] Fixed dependency --- .../Block/Adminhtml/Product/Helper/Form/Gallery/Content.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php index ed5deb870b280..21e85b120188a 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php @@ -13,6 +13,7 @@ */ namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery; +use Magento\Backend\Block\DataProviders\ImageUploadConfig as ImageUploadConfigDataProvider; use League\Flysystem\FileNotFoundException; use Magento\Framework\App\ObjectManager; use Magento\Backend\Block\Media\Uploader; From 40442d48f070f2c97acbc89184050f04b43c3ed9 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Wed, 5 Feb 2020 20:13:44 -0600 Subject: [PATCH 081/229] fixed unit tests --- .../ResourceModel/Product/CollectionTest.php | 40 ------------------- .../HeaderProvider/UpgradeInsecureTest.php | 2 +- 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/CollectionTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/CollectionTest.php index 0316b2e374d2f..b49decf96452d 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/CollectionTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/CollectionTest.php @@ -230,46 +230,6 @@ public function testAddProductCategoriesFilter() $this->collection->addCategoriesFilter([$conditionType => $values]); } - public function testAddMediaGalleryData() - { - $attributeId = 42; - $rowId = 4; - $linkField = 'row_id'; - $mediaGalleriesMock = [[$linkField => $rowId]]; - $itemMock = $this->getMockBuilder(\Magento\Catalog\Model\Product::class) - ->disableOriginalConstructor() - ->setMethods(['getOrigData']) - ->getMock(); - $attributeMock = $this->getMockBuilder(\Magento\Eav\Model\Entity\Attribute\AbstractAttribute::class) - ->disableOriginalConstructor() - ->getMock(); - $selectMock = $this->getMockBuilder(\Magento\Framework\DB\Select::class) - ->disableOriginalConstructor() - ->getMock(); - $metadataMock = $this->getMockBuilder(\Magento\Framework\EntityManager\EntityMetadataInterface::class) - ->disableOriginalConstructor() - ->getMock(); - $this->collection->addItem($itemMock); - $this->galleryResourceMock->expects($this->once())->method('createBatchBaseSelect')->willReturn($selectMock); - $attributeMock->expects($this->once())->method('getAttributeId')->willReturn($attributeId); - $this->entityMock->expects($this->once())->method('getAttribute')->willReturn($attributeMock); - $itemMock->expects($this->atLeastOnce())->method('getOrigData')->willReturn($rowId); - $selectMock->expects($this->once())->method('reset')->with(Select::ORDER)->willReturnSelf(); - $selectMock->expects($this->once())->method('where')->with('entity.' . $linkField . ' IN (?)', [$rowId]) - ->willReturnSelf(); - $this->metadataPoolMock->expects($this->once())->method('getMetadata')->willReturn($metadataMock); - $metadataMock->expects($this->once())->method('getLinkField')->willReturn($linkField); - - $this->connectionMock->expects($this->once())->method('fetchOne')->with($selectMock)->willReturn(42); - $this->connectionMock->expects($this->once())->method('fetchAll')->with($selectMock)->willReturn( - [['row_id' => $rowId]] - ); - $this->galleryReadHandlerMock->expects($this->once())->method('addMediaDataToProduct') - ->with($itemMock, $mediaGalleriesMock); - - $this->assertSame($this->collection, $this->collection->addMediaGalleryData()); - } - /** * Test addTierPriceDataByGroupId method. * diff --git a/app/code/Magento/Store/Test/Unit/Model/HeaderProvider/UpgradeInsecureTest.php b/app/code/Magento/Store/Test/Unit/Model/HeaderProvider/UpgradeInsecureTest.php index 29b60ed44d5b1..cf85fb633bbca 100644 --- a/app/code/Magento/Store/Test/Unit/Model/HeaderProvider/UpgradeInsecureTest.php +++ b/app/code/Magento/Store/Test/Unit/Model/HeaderProvider/UpgradeInsecureTest.php @@ -19,7 +19,7 @@ class UpgradeInsecureTest extends \PHPUnit\Framework\TestCase /** * Content-Security-Policy header value */ - const HEADER_VALUE = 'upgrade-insecure-requests;'; + const HEADER_VALUE = 'upgrade-insecure-requests'; /** * @var UpgradeInsecure From 888c0b489e0587f695ac9a436427e1b965398320 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Wed, 5 Feb 2020 22:52:41 -0600 Subject: [PATCH 082/229] fixed behavior with not loaded collection --- .../Magento/Catalog/Model/ResourceModel/Product/Collection.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php index d753d13d347c6..d196079baaab0 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php @@ -2344,6 +2344,9 @@ public function addMediaGalleryData() if (!$this->getSize()) { return $this; } + if (!$this->isLoaded()) { + $this->load(); + } $records = $this->getMediaGalleryResource()->getMediaRecords( $this->getStoreId(), $this->getLoadedIds() From 3cf48ca1f58ea185eebd6dae5ffd18064aba2124 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Thu, 6 Feb 2020 00:25:56 -0600 Subject: [PATCH 083/229] removed tests which tested SQL, this functionality is covered with integration tests --- .../ResourceModel/Product/GalleryTest.php | 198 +----------------- 1 file changed, 2 insertions(+), 196 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/GalleryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/GalleryTest.php index 47ef3c999125f..43c1abc91a1a9 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/GalleryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/GalleryTest.php @@ -5,6 +5,8 @@ */ namespace Magento\Catalog\Test\Unit\Model\ResourceModel\Product; +use Magento\Framework\DB\Sql\ColumnValueExpression; + /** * Unit test for product media gallery resource. */ @@ -280,200 +282,4 @@ public function testBindValueToEntityRecordExists() $entityId = 1; $this->resource->bindValueToEntity($valueId, $entityId); } - - /** - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - public function testLoadGallery() - { - $productId = 5; - $storeId = 1; - $attributeId = 6; - $getTableReturnValue = 'table'; - $quoteInfoReturnValue = - 'main.value_id = value.value_id AND value.store_id = ' . $storeId - . ' AND value.entity_id = entity.entity_id'; - $quoteDefaultInfoReturnValue = - 'main.value_id = default_value.value_id AND default_value.store_id = 0' - . ' AND default_value.entity_id = entity.entity_id'; - - $positionCheckSql = 'testchecksql'; - $resultRow = [ - [ - 'value_id' => '1', - 'file' => '/d/o/download_7.jpg', - 'label' => null, - 'position' => '1', - 'disabled' => '0', - 'label_default' => null, - 'position_default' => '1', - 'disabled_default' => '0', - ], - ]; - - $this->connection->expects($this->once())->method('getCheckSql')->with( - 'value.position IS NULL', - 'default_value.position', - 'value.position' - )->will($this->returnValue($positionCheckSql)); - $this->connection->expects($this->once())->method('select')->will($this->returnValue($this->select)); - $this->select->expects($this->at(0))->method('from')->with( - [ - 'main' => $getTableReturnValue, - ], - [ - 'value_id', - 'file' => 'value', - 'media_type' - ] - )->willReturnSelf(); - $this->select->expects($this->at(1))->method('joinInner')->with( - ['entity' => $getTableReturnValue], - 'main.value_id = entity.value_id', - ['entity_id'] - )->willReturnSelf(); - $this->product->expects($this->at(0))->method('getData') - ->with('entity_id')->willReturn($productId); - $this->product->expects($this->at(1))->method('getStoreId')->will($this->returnValue($storeId)); - $this->connection->expects($this->exactly(2))->method('quoteInto')->withConsecutive( - ['value.store_id = ?'], - ['default_value.store_id = ?'] - )->willReturnOnConsecutiveCalls( - 'value.store_id = ' . $storeId, - 'default_value.store_id = ' . 0 - ); - $this->connection->expects($this->any())->method('getIfNullSql')->will( - $this->returnValueMap([ - [ - '`value`.`label`', - '`default_value`.`label`', - 'IFNULL(`value`.`label`, `default_value`.`label`)' - ], - [ - '`value`.`position`', - '`default_value`.`position`', - 'IFNULL(`value`.`position`, `default_value`.`position`)' - ], - [ - '`value`.`disabled`', - '`default_value`.`disabled`', - 'IFNULL(`value`.`disabled`, `default_value`.`disabled`)' - ] - ]) - ); - $this->select->expects($this->at(2))->method('joinLeft')->with( - ['value' => $getTableReturnValue], - $quoteInfoReturnValue, - [] - )->willReturnSelf(); - $this->select->expects($this->at(3))->method('joinLeft')->with( - ['default_value' => $getTableReturnValue], - $quoteDefaultInfoReturnValue, - [] - )->willReturnSelf(); - $this->select->expects($this->at(4))->method('columns')->with([ - 'label' => 'IFNULL(`value`.`label`, `default_value`.`label`)', - 'position' => 'IFNULL(`value`.`position`, `default_value`.`position`)', - 'disabled' => 'IFNULL(`value`.`disabled`, `default_value`.`disabled`)', - 'label_default' => 'default_value.label', - 'position_default' => 'default_value.position', - 'disabled_default' => 'default_value.disabled' - ])->willReturnSelf(); - $this->select->expects($this->at(5))->method('where')->with( - 'main.attribute_id = ?', - $attributeId - )->willReturnSelf(); - $this->select->expects($this->at(6))->method('where') - ->with('main.disabled = 0')->willReturnSelf(); - $this->select->expects($this->at(8))->method('where') - ->with('entity.entity_id = ?', $productId) - ->willReturnSelf(); - $this->select->expects($this->once())->method('order') - ->with($positionCheckSql . ' ' . \Magento\Framework\DB\Select::SQL_ASC) - ->willReturnSelf(); - $this->connection->expects($this->once())->method('fetchAll') - ->with($this->select) - ->willReturn($resultRow); - - $this->assertEquals($resultRow, $this->resource->loadProductGalleryByAttributeId($this->product, $attributeId)); - } - - public function testInsertGalleryValueInStore() - { - $data = [ - 'value_id' => '8', - 'store_id' => 0, - 'provider' => '', - 'url' => 'https://www.youtube.com/watch?v=abcdfghijk', - 'title' => 'New Title', - 'description' => 'New Description', - 'metadata' => 'New metadata', - ]; - - $this->connection->expects($this->once())->method('describeTable')->willReturn($this->fields); - $this->connection->expects($this->any())->method('prepareColumnValue')->willReturnOnConsecutiveCalls( - '8', - 0, - '', - 'https://www.youtube.com/watch?v=abcdfghijk', - 'New Title', - 'New Description', - 'New metadata' - ); - - $this->resource->insertGalleryValueInStore($data); - } - - public function testDeleteGalleryValueInStore() - { - $valueId = 4; - $entityId = 6; - $storeId = 1; - - $this->connection->expects($this->exactly(3))->method('quoteInto')->withConsecutive( - ['value_id = ?', (int)$valueId], - ['entity_id = ?', (int)$entityId], - ['store_id = ?', (int)$storeId] - )->willReturnOnConsecutiveCalls( - 'value_id = ' . $valueId, - 'entity_id = ' . $entityId, - 'store_id = ' . $storeId - ); - - $this->connection->expects($this->once())->method('delete')->with( - 'table', - 'value_id = 4 AND entity_id = 6 AND store_id = 1' - )->willReturnSelf(); - - $this->resource->deleteGalleryValueInStore($valueId, $entityId, $storeId); - } - - public function testCountImageUses() - { - $results = [ - [ - 'value_id' => '1', - 'attribute_id' => 90, - 'value' => '/d/o/download_7.jpg', - 'media_type' => 'image', - 'disabled' => '0', - ], - ]; - - $this->connection->expects($this->once())->method('select')->will($this->returnValue($this->select)); - $this->select->expects($this->at(0))->method('from')->with( - [ - 'main' => 'table', - ], - '*' - )->willReturnSelf(); - $this->select->expects($this->at(1))->method('where')->with( - 'value = ?', - 1 - )->willReturnSelf(); - $this->connection->expects($this->once())->method('fetchAll') - ->with($this->select) - ->willReturn($results); - $this->assertEquals($this->resource->countImageUses(1), count($results)); - } } From d99c4f0d52e233b97ca84e2901376cb8f445c46f Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Thu, 6 Feb 2020 00:30:52 -0600 Subject: [PATCH 084/229] integration test fix --- .../Block/Product/View/GalleryTest.php | 84 ------------------- 1 file changed, 84 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/GalleryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/GalleryTest.php index d54a0b3306b33..a3545e4a39e80 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/GalleryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/GalleryTest.php @@ -331,90 +331,6 @@ public function galleryImagesWithImageOptimizationParametersInUrlDataProvider(): ]; } - /** - * @dataProvider galleryImagesWithImageOptimizationParametersInUrlDataProvider - * @magentoDataFixture Magento/Catalog/_files/product_with_multiple_images.php - * @magentoConfigFixture default/web/url/catalog_media_url_format image_optimization_parameters - * @magentoDbIsolation enabled - * @param array $images - * @param array $expectation - * @return void - */ - public function testGetGalleryImagesJsonWithImageOptimizationParametersInUrl( - array $images, - array $expectation - ): void { - $product = $this->getProduct(); - $this->setGalleryImages($product, $images); - $this->block->setData('product', $this->getProduct()); - [$firstImage, $secondImage] = $this->serializer->unserialize($this->block->getGalleryImagesJson()); - [$firstExpectedImage, $secondExpectedImage] = $expectation; - $this->assertImages($firstImage, $firstExpectedImage); - $this->assertImages($secondImage, $secondExpectedImage); - } - - /** - * @return array - */ - public function galleryImagesWithImageOptimizationParametersInUrlDataProvider(): array - { - - $imageExpectation = [ - 'thumb' => '/m/a/magento_image.jpg?width=88&height=110&store=default&image-type=thumbnail', - 'img' => '/m/a/magento_image.jpg?width=700&height=700&store=default&image-type=image', - 'full' => '/m/a/magento_image.jpg?store=default&image-type=image', - 'caption' => 'Image Alt Text', - 'position' => '1', - 'isMain' => false, - 'type' => 'image', - 'videoUrl' => null, - ]; - - $thumbnailExpectation = [ - 'thumb' => '/m/a/magento_thumbnail.jpg?width=88&height=110&store=default&image-type=thumbnail', - 'img' => '/m/a/magento_thumbnail.jpg?width=700&height=700&store=default&image-type=image', - 'full' => '/m/a/magento_thumbnail.jpg?store=default&image-type=image', - 'caption' => 'Thumbnail Image', - 'position' => '2', - 'isMain' => false, - 'type' => 'image', - 'videoUrl' => null, - ]; - - return [ - 'with_main_image' => [ - 'images' => [ - '/m/a/magento_image.jpg' => [], - '/m/a/magento_thumbnail.jpg' => ['main' => true], - ], - 'expectation' => [ - $imageExpectation, - array_merge($thumbnailExpectation, ['isMain' => true]), - ], - ], - 'without_main_image' => [ - 'images' => [ - '/m/a/magento_image.jpg' => [], - '/m/a/magento_thumbnail.jpg' => [], - ], - 'expectation' => [ - array_merge($imageExpectation, ['isMain' => true]), - $thumbnailExpectation, - ], - ], - 'with_changed_position' => [ - 'images' => [ - '/m/a/magento_image.jpg' => ['position' => '2'], - '/m/a/magento_thumbnail.jpg' => ['position' => '1'], - ], - 'expectation' => [ - array_merge($thumbnailExpectation, ['position' => '1']), - array_merge($imageExpectation, ['position' => '2', 'isMain' => true]), - ], - ], - ]; - } - /** * @dataProvider galleryImagesOnStoreViewDataProvider * @magentoDataFixture Magento/Catalog/_files/product_with_multiple_images.php From 1375b5356aae59924f0e8f70b1970e8b85877e19 Mon Sep 17 00:00:00 2001 From: Tobias Nilsson <tobias.nilsson@evalent.com> Date: Thu, 6 Feb 2020 10:21:02 +0100 Subject: [PATCH 085/229] Fixed Coding standard issues --- .../Magento/Store/Controller/Store/Redirect.php | 14 +++++++++----- .../Test/Unit/Controller/Store/RedirectTest.php | 1 - 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Store/Controller/Store/Redirect.php b/app/code/Magento/Store/Controller/Store/Redirect.php index 6afb76038093d..6f33d82dd6e8e 100644 --- a/app/code/Magento/Store/Controller/Store/Redirect.php +++ b/app/code/Magento/Store/Controller/Store/Redirect.php @@ -11,7 +11,11 @@ use Magento\Framework\App\Action\Context; use Magento\Framework\App\Action\HttpGetActionInterface; use Magento\Framework\App\Action\HttpPostActionInterface; +use Magento\Framework\App\ActionInterface; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Session\Generic; +use Magento\Framework\Session\SidResolverInterface; use Magento\Store\Api\StoreRepositoryInterface; use Magento\Store\Api\StoreResolverInterface; use Magento\Store\Model\Store; @@ -58,8 +62,8 @@ public function __construct( Context $context, StoreRepositoryInterface $storeRepository, StoreResolverInterface $storeResolver, - \Magento\Framework\Session\Generic $session, - \Magento\Framework\Session\SidResolverInterface $sidResolver, + Generic $session, + SidResolverInterface $sidResolver, HashGenerator $hashGenerator, StoreManagerInterface $storeManager = null ) { @@ -67,7 +71,7 @@ public function __construct( $this->storeRepository = $storeRepository; $this->storeResolver = $storeResolver; $this->hashGenerator = $hashGenerator; - $this->storeManager = $storeManager ?: \Magento\Framework\App\ObjectManager::getInstance()->get(StoreManagerInterface::class); + $this->storeManager = $storeManager ?: ObjectManager::getInstance()->get(StoreManagerInterface::class); } /** @@ -100,11 +104,11 @@ public function execute() $this->messageManager->addErrorMessage($error); $this->_redirect->redirect($this->_response, $currentStore->getBaseUrl()); } else { - $encodedUrl = $this->_request->getParam(\Magento\Framework\App\ActionInterface::PARAM_NAME_URL_ENCODED); + $encodedUrl = $this->_request->getParam(ActionInterface::PARAM_NAME_URL_ENCODED); $query = [ '___from_store' => $fromStore->getCode(), StoreResolverInterface::PARAM_NAME => $targetStoreCode, - \Magento\Framework\App\ActionInterface::PARAM_NAME_URL_ENCODED => $encodedUrl, + ActionInterface::PARAM_NAME_URL_ENCODED => $encodedUrl, ]; $customerHash = $this->hashGenerator->generateHash($fromStore); diff --git a/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php b/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php index df50afafced09..83e840533fc7b 100644 --- a/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php +++ b/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php @@ -62,7 +62,6 @@ class RedirectTest extends TestCase */ private $storeResolverMock; - /** * @return void */ From 73ba904016249b8973e31e3a524f30fdb59ac513 Mon Sep 17 00:00:00 2001 From: Vladimir Fishchenko <hws47a@gmail.com> Date: Thu, 6 Feb 2020 19:33:15 +0000 Subject: [PATCH 086/229] Fix PHPStan code validation issues in Product Model --- app/code/Magento/Catalog/Model/Product.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php index dc181f84bfc54..ffc0feb015842 100644 --- a/app/code/Magento/Catalog/Model/Product.php +++ b/app/code/Magento/Catalog/Model/Product.php @@ -2154,7 +2154,7 @@ public function reset() */ public function getCacheIdTags() { - $tags = parent::getCacheIdTags(); + $tags = (array)$this->getData('cache_id_tags'); $affectedCategoryIds = $this->getAffectedCategoryIds(); if (!$affectedCategoryIds) { $affectedCategoryIds = $this->getCategoryIds(); @@ -2334,7 +2334,8 @@ public function isDisabled() public function getImage() { $this->getTypeInstance()->setImageFromChildProduct($this); - return parent::getImage(); + + return (string)$this->getData('image'); } /** From 42b9e3269a8b06bc431f47f788bb5e255c1600b7 Mon Sep 17 00:00:00 2001 From: Vladimir Fishchenko <hws47a@gmail.com> Date: Thu, 6 Feb 2020 22:14:27 +0000 Subject: [PATCH 087/229] Add PHPCompatibility ignore to __toArray method in Product model --- app/code/Magento/Catalog/Model/Product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php index ffc0feb015842..ae2c2974add20 100644 --- a/app/code/Magento/Catalog/Model/Product.php +++ b/app/code/Magento/Catalog/Model/Product.php @@ -2404,7 +2404,7 @@ public function reloadPriceInfo() * @return array * @todo refactor with converter for AbstractExtensibleModel */ - public function __toArray() + public function __toArray() //phpcs:ignore PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames { $data = $this->_data; $hasToArray = function ($model) { From ce2247b5e5be9767bca74d454847e0b066bb61cd Mon Sep 17 00:00:00 2001 From: Oleh Usik <o.usik@atwix.com> Date: Fri, 7 Feb 2020 18:58:19 +0200 Subject: [PATCH 088/229] fix wrong type of argument --- .../Magento/Review/Model/ResourceModel/Review/Summary.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Review/Model/ResourceModel/Review/Summary.php b/app/code/Magento/Review/Model/ResourceModel/Review/Summary.php index f18bc2094930a..e7597f7c313e4 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Review/Summary.php +++ b/app/code/Magento/Review/Model/ResourceModel/Review/Summary.php @@ -79,14 +79,14 @@ public function reAggregate($summary) * Append review summary fields to product collection * * @param \Magento\Catalog\Model\ResourceModel\Product\Collection $productCollection - * @param string $storeId + * @param int $storeId * @param string $entityCode * @return Summary * @throws \Magento\Framework\Exception\LocalizedException */ public function appendSummaryFieldsToCollection( \Magento\Catalog\Model\ResourceModel\Product\Collection $productCollection, - string $storeId, + int $storeId, string $entityCode ) { if (!$productCollection->isLoaded()) { From b41ea13a925eda843277dc9960071f00207b329e Mon Sep 17 00:00:00 2001 From: konarshankar07 <konar.shankar2013@gmail.com> Date: Sat, 8 Feb 2020 00:17:32 +0530 Subject: [PATCH 089/229] Feedback changes --- app/code/Magento/Ui/view/base/web/js/modal/prompt.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js index 3b0485903424b..f681eb28aca9e 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js @@ -62,7 +62,7 @@ define([ * Click handler. */ click: function (event) { - this.closeModal(event); + this.closeModal(event, true); } }] }, @@ -75,7 +75,7 @@ define([ this.options.validation = this.options.validation && this.options.validationRules.length; this._super(); this.modal.find(this.options.modalContent).append(this.getFormTemplate()); - this.modal.find(this.options.modalCloseBtn).off().on('click', _.bind(this.closeModal, this, false)); + this.modal.find(this.options.modalCloseBtn).off().on('click', _.bind(this.closeModal, this)); if (this.options.validation) { this.setValidationClasses(); @@ -154,7 +154,9 @@ define([ */ closeModal: function (event, result) { var value; - if (result && !(result instanceof $.Event)) { + result = result || false; + + if (result) { if (this.options.validation && !this.validate()) { return false; } From 552eaafd5029a982c5243670e71d618467602319 Mon Sep 17 00:00:00 2001 From: konarshankar07 <konar.shankar2013@gmail.com> Date: Sat, 8 Feb 2020 00:24:05 +0530 Subject: [PATCH 090/229] event is used in the closeModal body --- app/code/Magento/Ui/view/base/web/js/modal/prompt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js index f681eb28aca9e..740b4e5ef0b87 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js @@ -162,9 +162,9 @@ define([ } value = this.modal.find(this.options.promptField).val(); - this.options.actions.confirm.call(this, value); + this.options.actions.confirm.call(event, value); } else { - this.options.actions.cancel.call(this, result); + this.options.actions.cancel.call(event, result); } this.options.actions.always(); From ce6614ef0e813e2d2ae8226c715d8d0a5cfb4d1a Mon Sep 17 00:00:00 2001 From: konarshankar07 <konar.shankar2013@gmail.com> Date: Sat, 8 Feb 2020 00:44:34 +0530 Subject: [PATCH 091/229] event is passed to the always method --- app/code/Magento/Ui/view/base/web/js/modal/prompt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js index 740b4e5ef0b87..098951af2f175 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js @@ -167,7 +167,7 @@ define([ this.options.actions.cancel.call(event, result); } - this.options.actions.always(); + this.options.actions.always(event); this.element.bind('promptclosed', _.bind(this._remove, this)); return this._super(); From 1a3b7d0c37fa9c9e1fd8a5016f1540e95662134a Mon Sep 17 00:00:00 2001 From: Vladimir Fishchenko <hws47a@gmail.com> Date: Sat, 8 Feb 2020 01:59:21 +0000 Subject: [PATCH 092/229] Update app/code/Magento/Catalog/Model/Product.php --- app/code/Magento/Catalog/Model/Product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php index ae2c2974add20..5643be2dd0d3c 100644 --- a/app/code/Magento/Catalog/Model/Product.php +++ b/app/code/Magento/Catalog/Model/Product.php @@ -2335,7 +2335,7 @@ public function getImage() { $this->getTypeInstance()->setImageFromChildProduct($this); - return (string)$this->getData('image'); + return $this->getData('image'); } /** From c559a663e86b19999851a5ad898231a71f3d9dc0 Mon Sep 17 00:00:00 2001 From: Oleh Usik <o.usik@atwix.com> Date: Sat, 8 Feb 2020 13:06:02 +0200 Subject: [PATCH 093/229] Fixed issue for Unit Test related with changes in this PR --- ...alogProductListCollectionAppendSummaryFieldsObserverTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Review/Test/Unit/Observer/CatalogProductListCollectionAppendSummaryFieldsObserverTest.php b/app/code/Magento/Review/Test/Unit/Observer/CatalogProductListCollectionAppendSummaryFieldsObserverTest.php index 894463de93227..e67b1c815b28f 100644 --- a/app/code/Magento/Review/Test/Unit/Observer/CatalogProductListCollectionAppendSummaryFieldsObserverTest.php +++ b/app/code/Magento/Review/Test/Unit/Observer/CatalogProductListCollectionAppendSummaryFieldsObserverTest.php @@ -23,7 +23,7 @@ */ class CatalogProductListCollectionAppendSummaryFieldsObserverTest extends TestCase { - private const STORE_ID = '1'; + private const STORE_ID = 1; /** * @var Event|MockObject From 611ceb44e0b413fae1a61ca62017820d4f4b172c Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Wed, 5 Feb 2020 12:14:37 +0100 Subject: [PATCH 094/229] Code Review changes: Add sortOrder to plugin, avoid returning value from beforeDispatch --- .../Magento/Backend/App/Action/Plugin/LoadDesignPlugin.php | 6 ++---- app/code/Magento/Backend/etc/adminhtml/di.xml | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Backend/App/Action/Plugin/LoadDesignPlugin.php b/app/code/Magento/Backend/App/Action/Plugin/LoadDesignPlugin.php index 1dee1e60b22cb..1dfe055a1f06c 100644 --- a/app/code/Magento/Backend/App/Action/Plugin/LoadDesignPlugin.php +++ b/app/code/Magento/Backend/App/Action/Plugin/LoadDesignPlugin.php @@ -34,13 +34,11 @@ public function __construct(DesignLoader $designLoader) * Initiates design before dispatching Backend Actions. * * @param AbstractAction $backendAction - * @param array $args - * @return array + * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function beforeDispatch(AbstractAction $backendAction, ...$args) + public function beforeDispatch(AbstractAction $backendAction) { $this->designLoader->load(); - return $args; } } diff --git a/app/code/Magento/Backend/etc/adminhtml/di.xml b/app/code/Magento/Backend/etc/adminhtml/di.xml index e39dbeb5f6680..1bfc504cf50e9 100644 --- a/app/code/Magento/Backend/etc/adminhtml/di.xml +++ b/app/code/Magento/Backend/etc/adminhtml/di.xml @@ -62,7 +62,7 @@ <type name="Magento\Backend\App\AbstractAction"> <plugin name="adminAuthentication" type="Magento\Backend\App\Action\Plugin\Authentication" sortOrder="100"/> <plugin name="adminMassactionKey" type="Magento\Backend\App\Action\Plugin\MassactionKey" sortOrder="11"/> - <plugin name="adminLoadDesign" type="Magento\Backend\App\Action\Plugin\LoadDesignPlugin"/> + <plugin name="adminLoadDesign" type="Magento\Backend\App\Action\Plugin\LoadDesignPlugin" sortOrder="101"/> </type> <type name="Magento\Store\App\Response\Redirect"> <arguments> From 46a03804b28e4f3c3748c03efa4ff19b8e9977e1 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Wed, 5 Feb 2020 18:12:26 +0100 Subject: [PATCH 095/229] Fix static analysis --- .../Magento/Backend/App/Action/Plugin/LoadDesignPlugin.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Backend/App/Action/Plugin/LoadDesignPlugin.php b/app/code/Magento/Backend/App/Action/Plugin/LoadDesignPlugin.php index 1dfe055a1f06c..7075e1b05e7db 100644 --- a/app/code/Magento/Backend/App/Action/Plugin/LoadDesignPlugin.php +++ b/app/code/Magento/Backend/App/Action/Plugin/LoadDesignPlugin.php @@ -8,6 +8,7 @@ namespace Magento\Backend\App\Action\Plugin; use Magento\Backend\App\AbstractAction; +use Magento\Framework\App\RequestInterface; use Magento\Framework\View\DesignLoader; /** @@ -34,10 +35,11 @@ public function __construct(DesignLoader $designLoader) * Initiates design before dispatching Backend Actions. * * @param AbstractAction $backendAction + * @param RequestInterface $request * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function beforeDispatch(AbstractAction $backendAction) + public function beforeDispatch(AbstractAction $backendAction, RequestInterface $request) { $this->designLoader->load(); } From 2c419143f454241d4d712462734d2aa5ae09c8db Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Sat, 8 Feb 2020 23:41:10 +0100 Subject: [PATCH 096/229] Fix failure for missing product on Storefront --- .../Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest.xml index 052f6b1924e89..91b32fe7b0154 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest.xml @@ -30,6 +30,7 @@ <argument name="category" value="$$createPreReqCategory$$"/> <argument name="simpleProduct" value="_defaultProduct"/> </actionGroup> + <magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/> <actionGroup ref="AssertProductInStorefrontCategoryPage" stepKey="assertProductInStorefront1"> <argument name="category" value="$$createPreReqCategory$$"/> <argument name="product" value="_defaultProduct"/> From 0690647aafd18d2c792fa93eba1010f61bdef6de Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Sun, 9 Feb 2020 03:10:07 +0100 Subject: [PATCH 097/229] Fix failure related to "seeProductCOnCategoryK" step --- ...yProductAndProductCategoryPartialReindexTest.xml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml index e91f9742b2841..96240524d8f02 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml @@ -55,8 +55,7 @@ <argument name="categoryName" value="$$categoryN.name$$, $$categoryM.name$$"/> </actionGroup> - <magentoCLI command="indexer:reindex" stepKey="reindex"/> - <magentoCLI command="cache:flush" arguments="full_page" stepKey="flushCache"/> + <magentoCron stepKey="runCronIndex" groups="index"/> </before> <after> <!-- Change "Category Products" and "Product Categories" indexers to "Update on Save" mode --> @@ -138,9 +137,8 @@ <amOnPage url="{{StorefrontCategoryPage.url($$categoryK.custom_attributes[url_key]$$/$$categoryN.custom_attributes[url_key]$$)}}" stepKey="amOnCategoryN"/> <see userInput="$$productC.name$$" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="seeProductInCategoryN"/> - <!-- Run cron twice --> - <magentoCLI command="cron:run" stepKey="runCron"/> - <magentoCLI command="cron:run" stepKey="runCronAgain"/> + <!-- Run cron --> + <magentoCron stepKey="runMagentoCron" groups="index"/> <!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied --> <!-- Category K contains only Products A, C --> @@ -199,9 +197,8 @@ <amOnPage url="{{StorefrontCategoryPage.url($$categoryK.custom_attributes[url_key]$$/$$categoryN.custom_attributes[url_key]$$)}}" stepKey="onStorefrontCategoryN"/> <see userInput="$$productC.name$$" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="productCOnCategoryN"/> - <!-- Run cron twice --> - <magentoCLI command="cron:run" stepKey="firstCronRun"/> - <magentoCLI command="cron:run" stepKey="secondCronRun"/> + <!-- Run Cron once to reindex product changes --> + <magentoCron stepKey="runCronIndexAfterProductAssignToCategory" groups="index"/> <!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied --> From d221355ee319ad9bfed2a87df149391ee150b6af Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Sun, 9 Feb 2020 03:41:34 +0100 Subject: [PATCH 098/229] Rollback use of `<magentoCron` for now --- ...tegoryProductAndProductCategoryPartialReindexTest.xml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml index 96240524d8f02..eb41da757803e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml @@ -55,7 +55,8 @@ <argument name="categoryName" value="$$categoryN.name$$, $$categoryM.name$$"/> </actionGroup> - <magentoCron stepKey="runCronIndex" groups="index"/> + <wait stepKey="waitBeforeRunCronIndex" time="30"/> + <magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/> </before> <after> <!-- Change "Category Products" and "Product Categories" indexers to "Update on Save" mode --> @@ -138,7 +139,8 @@ <see userInput="$$productC.name$$" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="seeProductInCategoryN"/> <!-- Run cron --> - <magentoCron stepKey="runMagentoCron" groups="index"/> + <wait stepKey="waitBeforeRunMagentoCron" time="30"/> + <magentoCLI stepKey="runMagentoCron" command="cron:run --group=index"/> <!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied --> <!-- Category K contains only Products A, C --> @@ -198,7 +200,8 @@ <see userInput="$$productC.name$$" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="productCOnCategoryN"/> <!-- Run Cron once to reindex product changes --> - <magentoCron stepKey="runCronIndexAfterProductAssignToCategory" groups="index"/> + <wait stepKey="waitBeforeRunCronIndexAfterProductAssignToCategory" time="30"/> + <magentoCLI stepKey="runCronIndexAfterProductAssignToCategory" command="cron:run --group=index"/> <!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied --> From 5fd92fc59deb95775596300c086d1a9f56746b0d Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Mon, 10 Feb 2020 12:29:42 -0600 Subject: [PATCH 099/229] fixed where condition --- .../Magento/Catalog/Model/ResourceModel/Product/Gallery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php index d18469da96a3b..f4e29e8ba5f47 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php @@ -174,7 +174,7 @@ public function getMediaRecords(int $storeId, array $entityIds, bool $preserveSo $output = []; $linkField = $this->metadata->getLinkField(); $select = $this->createBatchBaseSelect($storeId) - ->where('cpe.' . $linkField . ' IN (?)', $entityIds); + ->where('cpe.entity_id IN (?)', $entityIds); if (!$preserveSortOrder) { // due to performance consideration it is better to do not use sorting for this query $select->reset(Select::ORDER); From 152c745243f27c22cb5f0c61767ff233225ecc54 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Mon, 10 Feb 2020 15:42:13 -0600 Subject: [PATCH 100/229] fixed a product discovery logic --- .../Catalog/Model/Product/Gallery/ReadHandlerTest.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Gallery/ReadHandlerTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Gallery/ReadHandlerTest.php index 89b91ab57e51a..f348372f2029a 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Gallery/ReadHandlerTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Gallery/ReadHandlerTest.php @@ -338,11 +338,7 @@ private function getProductInstance(?int $storeId = null): ProductInterface { /** @var ProductInterface $product */ $product = $this->productFactory->create(); - $product->setData( - $this->productLinkField, - $this->getProduct()->getData($this->productLinkField) - ); - + $product->setId($this->getProduct()->getId()); if ($storeId) { $product->setStoreId($storeId); } From 81d2a172fb10bae21169e2c5b8f6b235de061d78 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Mon, 10 Feb 2020 22:23:40 -0600 Subject: [PATCH 101/229] fixed test addressed review comments --- .../Magento/Catalog/Model/ResourceModel/Product/Gallery.php | 6 ++---- .../Policy/Renderer/SimplePolicyHeaderRendererTest.php | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php index f4e29e8ba5f47..6caf2337047d8 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php @@ -140,12 +140,10 @@ public function loadProductGalleryByAttributeId($product, $attributeId = null) /** * Create base load select * - * Misleading method, methods relies on autoincrement field instead of entity ID - * * @param int $entityId * @param int $storeId * @param int $attributeId - * @deprecated + * @deprecated Misleading method, methods relies on autoincrement field instead of entity ID * @return \Magento\Framework\DB\Select * @throws \Magento\Framework\Exception\LocalizedException * @since 101.0.0 @@ -196,7 +194,7 @@ public function getMediaRecords(int $storeId, array $entityIds, bool $preserveSo * @param int $attributeId * @return \Magento\Framework\DB\Select * @throws \Magento\Framework\Exception\LocalizedException - * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) Media gallery doesn't support other attributes than media_galley * @since 101.0.1 */ public function createBatchBaseSelect($storeId, $attributeId = null) diff --git a/dev/tests/integration/testsuite/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRendererTest.php b/dev/tests/integration/testsuite/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRendererTest.php index 93e7833038a42..12ed71b708b88 100644 --- a/dev/tests/integration/testsuite/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRendererTest.php +++ b/dev/tests/integration/testsuite/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRendererTest.php @@ -58,6 +58,8 @@ public function testRenderRestrictMode(): void foreach ($header as $item) { $contentSecurityPolicyContent[] = $item->getFieldValue(); } + } else { + $contentSecurityPolicyContent = [$header->getFieldValue()]; } $this->assertEquals(['default-src https://magento.com \'self\';'], $contentSecurityPolicyContent); } @@ -84,6 +86,8 @@ public function testRenderRestrictWithReportingMode(): void foreach ($header as $item) { $contentSecurityPolicyContent[] = $item->getFieldValue(); } + } else { + $contentSecurityPolicyContent = [$header->getFieldValue()]; } $this->assertEquals( ['default-src https://magento.com \'self\'; report-uri /csp-reports/; report-to report-endpoint;'], From f88e2b2d98db43e3e99e267a185e4bb68a269199 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Mon, 10 Feb 2020 22:25:30 -0600 Subject: [PATCH 102/229] removed unused variable --- app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php index 6caf2337047d8..7a73bc2a3b713 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php @@ -170,7 +170,6 @@ protected function createBaseLoadSelect($entityId, $storeId, $attributeId) public function getMediaRecords(int $storeId, array $entityIds, bool $preserveSortOrder = false) : array { $output = []; - $linkField = $this->metadata->getLinkField(); $select = $this->createBatchBaseSelect($storeId) ->where('cpe.entity_id IN (?)', $entityIds); if (!$preserveSortOrder) { From ee97fb5c647ce047d98d2a5554c67540df3fd7cf Mon Sep 17 00:00:00 2001 From: Tobias Nilsson <tobias.nilsson@evalent.com> Date: Tue, 11 Feb 2020 10:07:00 +0100 Subject: [PATCH 103/229] Removed full paths from DocBlock --- .../Store/Test/Unit/Controller/Store/RedirectTest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php b/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php index 83e840533fc7b..4741b23e3bd0e 100644 --- a/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php +++ b/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php @@ -11,6 +11,7 @@ use Magento\Store\Api\StoreRepositoryInterface; use Magento\Store\Api\StoreResolverInterface; use Magento\Store\Controller\Store\Redirect; +use Magento\Store\Controller\Store\SwitchAction; use Magento\Store\Model\StoreManagerInterface; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Store\Model\StoreResolver; @@ -28,7 +29,7 @@ class RedirectTest extends TestCase const STUB_DEFAULT_STORE_VIEW = 'default'; /** - * @var \Magento\Store\Controller\Store\SwitchAction + * @var Redirect */ private $model; @@ -43,17 +44,17 @@ class RedirectTest extends TestCase private $storeManagerMock; /** - * @var \Magento\Framework\App\RequestInterface|\PHPUnit_Framework_MockObject_MockObject + * @var RequestInterface|\PHPUnit_Framework_MockObject_MockObject */ private $requestMock; /** - * @var \Magento\Framework\App\ResponseInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ResponseInterface|\PHPUnit_Framework_MockObject_MockObject */ private $responseMock; /** - * @var \Magento\Framework\App\Response\RedirectInterface|\PHPUnit_Framework_MockObject_MockObject + * @var RedirectInterface|\PHPUnit_Framework_MockObject_MockObject */ private $redirectMock; From 689093a20a8d4226c2ca74c039a8136b7604887e Mon Sep 17 00:00:00 2001 From: Tobias Nilsson <tobias.nilsson@evalent.com> Date: Tue, 11 Feb 2020 10:23:37 +0100 Subject: [PATCH 104/229] Chacnged PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject in DocBlocks --- .../Test/Unit/Controller/Store/RedirectTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php b/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php index 4741b23e3bd0e..f90943c46b549 100644 --- a/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php +++ b/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php @@ -34,32 +34,32 @@ class RedirectTest extends TestCase private $model; /** - * @var StoreRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject + * @var StoreRepositoryInterface|\PHPUnit\Framework\MockObject\MockObject */ private $storeRepositoryMock; /** - * @var StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var StoreManagerInterface|\PHPUnit\Framework\MockObject\MockObject */ private $storeManagerMock; /** - * @var RequestInterface|\PHPUnit_Framework_MockObject_MockObject + * @var RequestInterface|\PHPUnit\Framework\MockObject\MockObject */ private $requestMock; /** - * @var ResponseInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ResponseInterface|\PHPUnit\Framework\MockObject\MockObject */ private $responseMock; /** - * @var RedirectInterface|\PHPUnit_Framework_MockObject_MockObject + * @var RedirectInterface|\PHPUnit\Framework\MockObject\MockObject */ private $redirectMock; /** - * @var StoreResolverInterface|\PHPUnit_Framework_MockObject_MockObject + * @var StoreResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ private $storeResolverMock; From 0fcb6a0c06cbcbf733da284bb94b85a5e1ea1f16 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" <engcom-vendorworker-charlie@adobe.com> Date: Tue, 11 Feb 2020 13:50:50 +0200 Subject: [PATCH 105/229] fix static, add unit test --- .../Store/Controller/Store/Redirect.php | 11 ++-- .../Unit/Controller/Store/RedirectTest.php | 60 ++++++++++++++----- 2 files changed, 51 insertions(+), 20 deletions(-) diff --git a/app/code/Magento/Store/Controller/Store/Redirect.php b/app/code/Magento/Store/Controller/Store/Redirect.php index 03cdde5cdff2b..45924b5b0d28a 100644 --- a/app/code/Magento/Store/Controller/Store/Redirect.php +++ b/app/code/Magento/Store/Controller/Store/Redirect.php @@ -44,7 +44,7 @@ class Redirect extends Action implements HttpGetActionInterface, HttpPostActionI private $hashGenerator; /** - * @var \Magento\Store\Model\StoreManagerInterface + * @var StoreManagerInterface */ private $storeManager; @@ -52,10 +52,10 @@ class Redirect extends Action implements HttpGetActionInterface, HttpPostActionI * @param Context $context * @param StoreRepositoryInterface $storeRepository * @param StoreResolverInterface $storeResolver - * @param \Magento\Framework\Session\Generic $session - * @param \Magento\Framework\Session\SidResolverInterface $sidResolver + * @param Generic $session + * @param SidResolverInterface $sidResolver * @param HashGenerator $hashGenerator - * @param \Magento\Store\Model\StoreManagerInterface $storeManager + * @param StoreManagerInterface $storeManager * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function __construct( @@ -96,6 +96,7 @@ public function execute() $fromStore = $this->storeRepository->get($fromStoreCode); /** @var Store $targetStore */ $targetStore = $this->storeRepository->get($targetStoreCode); + $this->storeManager->setCurrentStore($targetStore); } catch (NoSuchEntityException $e) { $error = __("Requested store is not found ({$fromStoreCode})"); } @@ -118,7 +119,7 @@ public function execute() '_nosid' => true, '_query' => $query ]; - $this->storeManager->setCurrentStore($targetStore); + $this->_redirect->redirect($this->_response, 'stores/store/switch', $arguments); } diff --git a/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php b/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php index 4408c45d6a640..cb92f14e6227c 100755 --- a/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php +++ b/app/code/Magento/Store/Test/Unit/Controller/Store/RedirectTest.php @@ -20,6 +20,7 @@ use Magento\Store\Api\StoreResolverInterface; use Magento\Store\Controller\Store\Redirect; use Magento\Store\Model\Store; +use Magento\Store\Model\StoreManagerInterface; use Magento\Store\Model\StoreResolver; use Magento\Store\Model\StoreSwitcher\HashGenerator; use PHPUnit\Framework\MockObject\MockObject; @@ -31,8 +32,20 @@ */ class RedirectTest extends TestCase { - private const DEFAULT_STORE_VIEW_CODE = 'default'; - private const STORE_CODE = 'sv1'; + /** + * Stub for default store view code + */ + private const STUB_DEFAULT_STORE_VIEW_CODE = 'default'; + + /** + * Stub for default store code + */ + private const STUB_STORE_CODE = 'sv1'; + + /** + * @var StoreManagerInterface|MockObject + */ + private $storeManagerMock; /** * @var StoreRepositoryInterface|MockObject @@ -67,7 +80,12 @@ class RedirectTest extends TestCase /** * @var Store|MockObject */ - private $formStoreMock; + private $fromStoreMock; + + /** + * @var Store|MockObject + */ + private $targetStoreMock; /** * @var Store|MockObject @@ -87,13 +105,14 @@ class RedirectTest extends TestCase /** * @var Redirect */ - private $redirectController; + private $model; /** * @inheritDoc */ protected function setUp() { + $this->storeManagerMock = $this->createMock(StoreManagerInterface::class); $this->requestMock = $this->getMockBuilder(RequestInterface::class) ->disableOriginalConstructor() ->setMethods(['getParam']) @@ -117,7 +136,11 @@ protected function setUp() $this->responseMock = $this->getMockBuilder(ResponseInterface::class) ->disableOriginalConstructor() ->getMockForAbstractClass(); - $this->formStoreMock = $this->getMockBuilder(Store::class) + $this->fromStoreMock = $this->getMockBuilder(Store::class) + ->disableOriginalConstructor() + ->setMethods(['getCode']) + ->getMockForAbstractClass(); + $this->targetStoreMock = $this->getMockBuilder(Store::class) ->disableOriginalConstructor() ->setMethods(['getCode']) ->getMockForAbstractClass(); @@ -150,9 +173,10 @@ protected function setUp() 'messageManager' => $this->messageManagerMock, ] ); - $this->redirectController = $objectManager->getObject( + $this->model = $objectManager->getObject( Redirect::class, [ + 'storeManager' => $this->storeManagerMock, 'storeRepository' => $this->storeRepositoryMock, 'storeResolver' => $this->storeResolverMock, 'sidResolver' => $this->sidResolverMock, @@ -186,19 +210,25 @@ public function testRedirect(string $defaultStoreViewCode, string $storeCode): v $defaultStoreViewCode ); $this->storeRepositoryMock - ->expects($this->once()) + ->expects($this->exactly(2)) ->method('get') - ->with($defaultStoreViewCode) - ->willReturn($this->formStoreMock); - $this->formStoreMock + ->willReturnMap([ + [$defaultStoreViewCode, $this->fromStoreMock], + [$storeCode, $this->targetStoreMock], + ]); + $this->fromStoreMock ->expects($this->once()) ->method('getCode') ->willReturn($defaultStoreViewCode); $this->hashGeneratorMock ->expects($this->once()) ->method('generateHash') - ->with($this->formStoreMock) + ->with($this->fromStoreMock) ->willReturn([]); + $this->storeManagerMock + ->expects($this->once()) + ->method('setCurrentStore') + ->with($this->targetStoreMock); $this->redirectMock ->expects($this->once()) ->method('redirect') @@ -214,7 +244,7 @@ public function testRedirect(string $defaultStoreViewCode, string $storeCode): v ] ); - $this->assertEquals(null, $this->redirectController->execute()); + $this->assertEquals(null, $this->model->execute()); } /** @@ -257,7 +287,7 @@ public function testRedirectWithThrowsException(string $defaultStoreViewCode, st ->with($this->responseMock, $this->currentStoreMock) ->willReturnSelf(); - $this->assertEquals(null, $this->redirectController->execute()); + $this->assertEquals(null, $this->model->execute()); } /** @@ -281,7 +311,7 @@ public function testRedirectTargetIsNull(): void ->expects($this->never()) ->method('get'); - $this->assertEquals($this->responseMock, $this->redirectController->execute()); + $this->assertEquals($this->responseMock, $this->model->execute()); } /** @@ -292,7 +322,7 @@ public function testRedirectTargetIsNull(): void public function getConfigDataProvider(): array { return [ - [self::DEFAULT_STORE_VIEW_CODE, self::STORE_CODE] + [self::STUB_DEFAULT_STORE_VIEW_CODE, self::STUB_STORE_CODE] ]; } } From 6c622335ef6563021a3f3f8045f8202332599dde Mon Sep 17 00:00:00 2001 From: Vladimir Fishchenko <hws47a@gmail.com> Date: Tue, 11 Feb 2020 17:57:19 +0000 Subject: [PATCH 106/229] Reduce requirements for parameter in catalog product type factory --- app/code/Magento/Catalog/Model/Product/Type.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/Product/Type.php b/app/code/Magento/Catalog/Model/Product/Type.php index 4c973be20dee5..c17682c28962d 100644 --- a/app/code/Magento/Catalog/Model/Product/Type.php +++ b/app/code/Magento/Catalog/Model/Product/Type.php @@ -116,7 +116,7 @@ public function __construct( /** * Factory to product singleton product type instances * - * @param \Magento\Catalog\Model\Product $product + * @param \Magento\Catalog\Api\Data\ProductInterface $product * @return \Magento\Catalog\Model\Product\Type\AbstractType */ public function factory($product) From 306048c9296aaa30b42ddaf87574c31ea2a88b07 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Tue, 11 Feb 2020 20:56:44 +0100 Subject: [PATCH 107/229] Code Review changes to Customer module --- .../Magento/Customer/Model/Plugin/CustomerNotification.php | 4 ++-- app/code/Magento/Customer/Model/Visitor.php | 4 ++-- .../Test/Unit/Model/Plugin/CustomerNotificationTest.php | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php b/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php index aa821c9355777..db694ad3295ce 100644 --- a/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php +++ b/app/code/Magento/Customer/Model/Plugin/CustomerNotification.php @@ -69,14 +69,14 @@ public function __construct( State $state, CustomerRepositoryInterface $customerRepository, LoggerInterface $logger, - RequestInterface $request = null + RequestInterface $request ) { $this->session = $session; $this->notificationStorage = $notificationStorage; $this->state = $state; $this->customerRepository = $customerRepository; $this->logger = $logger; - $this->request = $request ?? ObjectManager::getInstance()->get(RequestInterface::class); + $this->request = $request; } /** diff --git a/app/code/Magento/Customer/Model/Visitor.php b/app/code/Magento/Customer/Model/Visitor.php index 2eb5520f7aa08..53745aa7a30c6 100644 --- a/app/code/Magento/Customer/Model/Visitor.php +++ b/app/code/Magento/Customer/Model/Visitor.php @@ -38,7 +38,7 @@ class Visitor extends AbstractModel const VISITOR_TYPE_VISITOR = 'v'; const DEFAULT_ONLINE_MINUTES_INTERVAL = 15; const XML_PATH_ONLINE_INTERVAL = 'customer/online_customers/online_minutes_interval'; - const SECONDS_24_HOURS = 86400; + private const SECONDS_24_HOURS = 86400; /** * @var string[] @@ -129,7 +129,7 @@ public function __construct( $this->scopeConfig = $scopeConfig; $this->dateTime = $dateTime; $this->indexerRegistry = $indexerRegistry; - $this->requestSafety = $requestSafety ?? ObjectManager::getInstance()->create(RequestSafetyInterface::class); + $this->requestSafety = $requestSafety ?? ObjectManager::getInstance()->get(RequestSafetyInterface::class); } /** diff --git a/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerNotificationTest.php b/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerNotificationTest.php index 86bcf59bdd113..74a5a002c7845 100644 --- a/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerNotificationTest.php +++ b/app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerNotificationTest.php @@ -112,6 +112,10 @@ public function testBeforeExecute() ->method('remove') ->with(NotificationStorage::UPDATE_CUSTOMER_SESSION, self::STUB_CUSTOMER_ID); + $this->sessionMock->expects($this->once())->method('setCustomerData')->with($customerMock); + $this->sessionMock->expects($this->once())->method('setCustomerGroupId')->with($customerGroupId); + $this->sessionMock->expects($this->once())->method('regenerateId'); + $this->plugin->beforeExecute($this->actionMock); } From 85b119ebd82547d60cee71d87517d170808f6fd4 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Tue, 11 Feb 2020 20:55:47 -0600 Subject: [PATCH 108/229] fixed a if condition --- .../Magento/Catalog/Model/ResourceModel/Product/Gallery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php index 7a73bc2a3b713..5b7c2f5fe5ef9 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php @@ -388,7 +388,7 @@ public function insertGalleryValueInStore($data) $this->getTable(self::GALLERY_VALUE_TABLE) ); - if ($data['image_metadata']) { + if (!empty($data['image_metadata'])) { $data['image_metadata'] = $this->getSerializer()->serialize($data['image_metadata']); } $this->getConnection()->insert( From 2f0d65ae0287974d0a1b2711156f6d8595a12a45 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Wed, 12 Feb 2020 13:00:20 +0100 Subject: [PATCH 109/229] Code Review changes --- app/code/Magento/Store/etc/di.xml | 3 -- app/etc/di.xml | 5 +++ .../{Design.php => LoadDesignPlugin.php} | 2 +- .../Test/Unit/Action/Plugin/DesignTest.php | 19 ----------- .../Action/Plugin/LoadDesignPluginTest.php | 34 +++++++++++++++++++ 5 files changed, 40 insertions(+), 23 deletions(-) rename lib/internal/Magento/Framework/App/Action/Plugin/{Design.php => LoadDesignPlugin.php} (98%) delete mode 100644 lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/DesignTest.php create mode 100644 lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/LoadDesignPluginTest.php diff --git a/app/code/Magento/Store/etc/di.xml b/app/code/Magento/Store/etc/di.xml index 45f79dc5fb5f8..2a138927b1cfa 100644 --- a/app/code/Magento/Store/etc/di.xml +++ b/app/code/Magento/Store/etc/di.xml @@ -65,9 +65,6 @@ <preference for="Magento\Framework\App\Router\PathConfigInterface" type="Magento\Store\Model\PathConfig" /> <type name="Magento\Framework\App\ActionInterface"> <plugin name="storeCheck" type="Magento\Store\App\Action\Plugin\StoreCheck"/> - <plugin name="designLoader" type="Magento\Framework\App\Action\Plugin\Design"/> - <plugin name="eventDispatch" type="Magento\Framework\App\Action\Plugin\EventDispatchPlugin"/> - <plugin name="actionFlagNoDispatch" type="Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin"/> </type> <type name="Magento\Framework\Url\SecurityInfo"> <plugin name="storeUrlSecurityInfo" type="Magento\Store\Url\Plugin\SecurityInfo"/> diff --git a/app/etc/di.xml b/app/etc/di.xml index 8120676e8dda5..2b65451e7eaa3 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -1774,6 +1774,11 @@ </argument> </arguments> </type> + <type name="Magento\Framework\App\ActionInterface"> + <plugin name="designLoader" type="Magento\Framework\App\Action\Plugin\LoadDesignPlugin"/> + <plugin name="eventDispatch" type="Magento\Framework\App\Action\Plugin\EventDispatchPlugin"/> + <plugin name="actionFlagNoDispatch" type="Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin"/> + </type> <type name="Magento\Framework\App\ScopeResolverPool"> <arguments> <argument name="scopeResolvers" xsi:type="array"> diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/Design.php b/lib/internal/Magento/Framework/App/Action/Plugin/LoadDesignPlugin.php similarity index 98% rename from lib/internal/Magento/Framework/App/Action/Plugin/Design.php rename to lib/internal/Magento/Framework/App/Action/Plugin/LoadDesignPlugin.php index a1979e88d8128..2cda49c43c2ce 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/Design.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/LoadDesignPlugin.php @@ -16,7 +16,7 @@ /** * Handling Exceptions on Design Loading */ -class Design +class LoadDesignPlugin { /** * @var DesignLoader diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/DesignTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/DesignTest.php deleted file mode 100644 index 40d046f8b1678..0000000000000 --- a/lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/DesignTest.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Framework\App\Test\Unit\Action\Plugin; - -class DesignTest extends \PHPUnit\Framework\TestCase -{ - public function testBeforeExecute() - { - $subjectMock = $this->createMock(\Magento\Framework\App\Action\Action::class); - $designLoaderMock = $this->createMock(\Magento\Framework\View\DesignLoader::class); - $messageManagerMock = $this->createMock(\Magento\Framework\Message\ManagerInterface::class); - $plugin = new \Magento\Framework\App\Action\Plugin\Design($designLoaderMock, $messageManagerMock); - $designLoaderMock->expects($this->once())->method('load'); - $plugin->beforeExecute($subjectMock); - } -} diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/LoadDesignPluginTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/LoadDesignPluginTest.php new file mode 100644 index 0000000000000..f0c2790b62e7a --- /dev/null +++ b/lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/LoadDesignPluginTest.php @@ -0,0 +1,34 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Framework\App\Test\Unit\Action\Plugin; + +use Magento\Framework\App\Action\Action; +use Magento\Framework\App\Action\Plugin\LoadDesignPlugin; +use Magento\Framework\App\ActionInterface; +use Magento\Framework\Message\ManagerInterface; +use Magento\Framework\View\DesignLoader; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +class DesignTest extends TestCase +{ + public function testBeforeExecute() + { + /** @var MockObject|ActionInterface $actionMock */ + $actionMock = $this->createMock(Action::class); + + /** @var MockObject|DesignLoader $designLoaderMock */ + $designLoaderMock = $this->createMock(DesignLoader::class); + + /** @var MockObject|ManagerInterface $messageManagerMock */ + $messageManagerMock = $this->createMock(ManagerInterface::class); + + $plugin = new LoadDesignPlugin($designLoaderMock, $messageManagerMock); + + $designLoaderMock->expects($this->once())->method('load'); + $plugin->beforeExecute($actionMock); + } +} From 067e40d42a28e926ca4e4cc144295f4945166238 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Wed, 12 Feb 2020 14:06:54 +0100 Subject: [PATCH 110/229] Fix invalid filename --- .../App/Test/Unit/Action/Plugin/LoadDesignPluginTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/LoadDesignPluginTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/LoadDesignPluginTest.php index f0c2790b62e7a..90acfde426931 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/LoadDesignPluginTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Action/Plugin/LoadDesignPluginTest.php @@ -13,7 +13,7 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -class DesignTest extends TestCase +class LoadDesignPluginTest extends TestCase { public function testBeforeExecute() { From ce32042a6152b06f3acc853ddd8a3a965f2f2be2 Mon Sep 17 00:00:00 2001 From: "m.mezhensky" <m.mezhensky@atwix.com> Date: Wed, 12 Feb 2020 15:44:37 +0200 Subject: [PATCH 111/229] magento magento2# Unit test for Magento Catalog Observer SetSpecialPriceStartDate --- .../Observer/SetSpecialPriceStartDateTest.php | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 app/code/Magento/Catalog/Test/Unit/Observer/SetSpecialPriceStartDateTest.php diff --git a/app/code/Magento/Catalog/Test/Unit/Observer/SetSpecialPriceStartDateTest.php b/app/code/Magento/Catalog/Test/Unit/Observer/SetSpecialPriceStartDateTest.php new file mode 100644 index 0000000000000..7fdb4b3cd42b9 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Unit/Observer/SetSpecialPriceStartDateTest.php @@ -0,0 +1,135 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Catalog\Test\Unit\Observer; + +use Magento\Framework\Event; +use Magento\Framework\Event\Observer; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Framework\Stdlib\DateTime\Timezone; +use Magento\Catalog\Model\Product; +use Magento\Catalog\Observer\SetSpecialPriceStartDate; +use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\MockObject\MockObject; + +/** + * Unit test for \Magento\Catalog\Observer\SetSpecialPriceStartDate + */ +class SetSpecialPriceStartDateTest extends TestCase +{ + /** + * Testable Object + * + * @var SetSpecialPriceStartDate + */ + private $observer; + + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * @var Observer|MockObject + */ + private $observerMock; + + /** + * @var Event|MockObject + */ + private $eventMock; + + /** + * @var Product|MockObject + */ + private $productMock; + + /** + * @var Timezone|MockObject + */ + private $timezone; + + /** + * @var \DateTime|MockObject + */ + private $dateObject; + + /** + * @inheritdoc + */ + protected function setUp() : void + { + $this->objectManager = new ObjectManager($this); + $this->observerMock = $this->createMock(Observer::class); + $this->timezone = $this->createMock(Timezone::class); + $this->dateObject = $this->createMock(\DateTime::class); + + $this->eventMock = $this->getMockBuilder(Event::class) + ->disableOriginalConstructor() + ->setMethods(['getProduct']) + ->getMock(); + + $this->productMock = $this->getMockBuilder(Product::class) + ->disableOriginalConstructor() + ->setMethods(['getSpecialPrice', 'getSpecialFromDate', 'setData']) + ->getMock(); + + $this->observer = $this->objectManager->getObject( + SetSpecialPriceStartDate::class, + [ + 'localeDate' => $this->timezone + ] + ); + } + + /** + * Test observer execute method + */ + public function testExecuteModifySpecialFromDate() + { + $specialPrice = 15; + $specialFromDate = null; + $localeDateMock = ['special_from_date' => $this->returnValue($this->dateObject)]; + + $this->observerMock + ->expects($this->once()) + ->method('getEvent') + ->willReturn($this->eventMock); + + $this->eventMock + ->expects($this->once()) + ->method('getProduct') + ->willReturn($this->productMock); + + $this->dateObject->expects($this->any()) + ->method('setTime') + ->will($this->returnSelf()); + + $this->timezone + ->expects($this->once()) + ->method('date') + ->will($this->returnValue($this->dateObject)); + + $this->productMock + ->expects($this->once()) + ->method('getSpecialPrice') + ->willReturn($specialPrice); + + $this->productMock + ->expects($this->once()) + ->method('getSpecialFromDate') + ->willReturn($specialFromDate); + + $this->productMock + ->expects($this->once()) + ->method('setData') + ->willReturn($localeDateMock); + + $this->observer->execute($this->observerMock); + } +} From c2ffbc5ad979d4928a36f4f33cee1ed600cc7270 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Wed, 12 Feb 2020 15:57:30 +0100 Subject: [PATCH 112/229] Rollback changes to di.xml entries --- app/code/Magento/Store/etc/di.xml | 3 +++ app/etc/di.xml | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Store/etc/di.xml b/app/code/Magento/Store/etc/di.xml index 2a138927b1cfa..5bd8f6e2349fc 100644 --- a/app/code/Magento/Store/etc/di.xml +++ b/app/code/Magento/Store/etc/di.xml @@ -65,6 +65,9 @@ <preference for="Magento\Framework\App\Router\PathConfigInterface" type="Magento\Store\Model\PathConfig" /> <type name="Magento\Framework\App\ActionInterface"> <plugin name="storeCheck" type="Magento\Store\App\Action\Plugin\StoreCheck"/> + <plugin name="designLoader" type="Magento\Framework\App\Action\Plugin\LoadDesignPlugin"/> + <plugin name="eventDispatch" type="Magento\Framework\App\Action\Plugin\EventDispatchPlugin"/> + <plugin name="actionFlagNoDispatch" type="Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin"/> </type> <type name="Magento\Framework\Url\SecurityInfo"> <plugin name="storeUrlSecurityInfo" type="Magento\Store\Url\Plugin\SecurityInfo"/> diff --git a/app/etc/di.xml b/app/etc/di.xml index 2b65451e7eaa3..8120676e8dda5 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -1774,11 +1774,6 @@ </argument> </arguments> </type> - <type name="Magento\Framework\App\ActionInterface"> - <plugin name="designLoader" type="Magento\Framework\App\Action\Plugin\LoadDesignPlugin"/> - <plugin name="eventDispatch" type="Magento\Framework\App\Action\Plugin\EventDispatchPlugin"/> - <plugin name="actionFlagNoDispatch" type="Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin"/> - </type> <type name="Magento\Framework\App\ScopeResolverPool"> <arguments> <argument name="scopeResolvers" xsi:type="array"> From ad8fea65e6fccec762c3398892015ee9dd827f16 Mon Sep 17 00:00:00 2001 From: mrtu <ladiesman9x@gmail.com> Date: Thu, 13 Feb 2020 14:21:46 +0700 Subject: [PATCH 113/229] Cover CartTotalRepositoryPlugin by unit test and correct docblock Fix static tests Update commit with meaningful test name Remove unnecessary assignment stub in test code --- .../Model/Cart/CartTotalRepositoryPlugin.php | 16 +- .../Cart/CartTotalRepositoryPluginTest.php | 155 +++++++++++++----- 2 files changed, 120 insertions(+), 51 deletions(-) diff --git a/app/code/Magento/Multishipping/Model/Cart/CartTotalRepositoryPlugin.php b/app/code/Magento/Multishipping/Model/Cart/CartTotalRepositoryPlugin.php index 732bdee314f7c..bb225a5c46228 100644 --- a/app/code/Magento/Multishipping/Model/Cart/CartTotalRepositoryPlugin.php +++ b/app/code/Magento/Multishipping/Model/Cart/CartTotalRepositoryPlugin.php @@ -33,21 +33,21 @@ public function __construct( } /** - * Overwrite the CartTotalRepository quoteTotal and update the shipping price + * Check multishipping update shipping price after get cart total * - * @param CartTotalRepository $subject - * @param Totals $quoteTotals - * @param String $cartId - * @return Totals - * @throws \Magento\Framework\Exception\NoSuchEntityException + * @param CartTotalRepository $subject + * @param Totals $quoteTotals + * @param int $cartId + * @return Totals + * @throws \Magento\Framework\Exception\NoSuchEntityException * @SuppressWarnings(PHPMD.UnusedLocalVariable) * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGet( CartTotalRepository $subject, Totals $quoteTotals, - String $cartId - ) { + $cartId + ) : Totals { $quote = $this->quoteRepository->getActive($cartId); if ($quote->getIsMultiShipping()) { $shippingMethod = $quote->getShippingAddress()->getShippingMethod(); diff --git a/app/code/Magento/Multishipping/Test/Unit/Model/Cart/CartTotalRepositoryPluginTest.php b/app/code/Magento/Multishipping/Test/Unit/Model/Cart/CartTotalRepositoryPluginTest.php index 73b0b9ef3ca7a..8362699efbd45 100644 --- a/app/code/Magento/Multishipping/Test/Unit/Model/Cart/CartTotalRepositoryPluginTest.php +++ b/app/code/Magento/Multishipping/Test/Unit/Model/Cart/CartTotalRepositoryPluginTest.php @@ -6,76 +6,145 @@ namespace Magento\Multishipping\Test\Unit\Model\Cart; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Model\Cart\CartTotalRepository; +use Magento\Quote\Model\Cart\Totals as QuoteTotals; +use Magento\Quote\Model\Quote\Address as QuoteAddress; +use Magento\Quote\Model\Quote\Address\Rate as QuoteAddressRate; +use Magento\Multishipping\Model\Cart\CartTotalRepositoryPlugin; +use Magento\Store\Model\Store; +use PHPUnit\Framework\MockObject\MockObject; + class CartTotalRepositoryPluginTest extends \PHPUnit\Framework\TestCase { /** - * @var \Magento\Multishipping\Model\Cart\CartTotalRepositoryPlugin + * Stub cart id + */ + private const STUB_CART_ID = 10; + + /** + * Stub shipping method + */ + private const STUB_SHIPPING_METHOD = 'flatrate_flatrate'; + + /** + * Stub shipping price + */ + private const STUB_SHIPPING_PRICE = '10.00'; + + /** + * @var CartTotalRepositoryPlugin */ private $modelRepository; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var CartTotalRepository|MockObject + */ + private $quoteTotalRepositoryMock; + + /** + * @var CartRepositoryInterface|MockObject */ private $quoteRepositoryMock; - protected function setUp() - { - $this->quoteRepositoryMock = $this->createMock(\Magento\Quote\Api\CartRepositoryInterface::class); - $this->modelRepository = new \Magento\Multishipping\Model\Cart\CartTotalRepositoryPlugin( - $this->quoteRepositoryMock - ); - } + /** + * @var QuoteTotals|MockObject + */ + private $quoteTotalsMock; /** - * Test quotTotal from cartRepository after get($cartId) function is called + * @var QuoteAddress|MockObject */ - public function testAfterGet() + private $shippingAddressMock; + + /** + * @var QuoteAddressRate|MockObject + */ + private $shippingRateMock; + + /** + * @var Store|MockObject + */ + private $storeMock; + + protected function setUp() { - $cartId = "10"; - $shippingMethod = 'flatrate_flatrate'; - $shippingPrice = '10.00'; - $quoteMock = $this->createPartialMock( - \Magento\Quote\Model\Cart\Totals::class, + $objectManager = new ObjectManager($this); + $this->quoteTotalsMock = $this->createPartialMock( + QuoteTotals::class, [ - 'getStore', - 'getShippingAddress', - 'getIsMultiShipping' + 'getStore', + 'getShippingAddress', + 'getIsMultiShipping' ] ); - $this->quoteRepositoryMock->expects($this->once())->method('getActive')->with($cartId)->willReturn($quoteMock); - $quoteMock->expects($this->once())->method('getIsMultiShipping')->willReturn(true); - $shippingAddressMock = $this->createPartialMock( - \Magento\Quote\Model\Quote\Address::class, + $this->shippingAddressMock = $this->createPartialMock( + QuoteAddress::class, [ - 'getShippingMethod', - 'getShippingRateByCode', - 'getShippingAmount' + 'getShippingMethod', + 'getShippingRateByCode', + 'getShippingAmount' ] ); - $quoteMock->expects($this->any())->method('getShippingAddress')->willReturn($shippingAddressMock); - - $shippingAddressMock->expects($this->once())->method('getShippingMethod')->willReturn($shippingMethod); - $shippingAddressMock->expects($this->any())->method('getShippingAmount')->willReturn($shippingPrice); - $shippingRateMock = $this->createPartialMock( - \Magento\Quote\Model\Quote\Address\Rate::class, + $this->shippingRateMock = $this->createPartialMock( + QuoteAddressRate::class, [ - 'getPrice' + 'getPrice' ] ); - $shippingAddressMock->expects($this->once())->method('getShippingRateByCode')->willReturn($shippingRateMock); - - $shippingRateMock->expects($this->once())->method('getPrice')->willReturn($shippingPrice); - - $storeMock = $this->getMockBuilder(\Magento\Store\Model\Store::class) + $this->storeMock = $this->getMockBuilder(Store::class) ->disableOriginalConstructor() ->getMock(); - $quoteMock->expects($this->any())->method('getStore')->willReturn($storeMock); - $storeMock->expects($this->any())->method('getBaseCurrency')->willReturnSelf(); + $this->quoteRepositoryMock = $this->createMock(CartRepositoryInterface::class); + $this->quoteTotalRepositoryMock = $this->createMock(CartTotalRepository::class); + $this->modelRepository = $objectManager->getObject(CartTotalRepositoryPlugin::class, [ + 'quoteRepository' => $this->quoteRepositoryMock + ]); + } + + /** + * Test quoteTotal from cartRepository after get($cartId) function is called + */ + public function testAfterGetQuoteTotalAddedShippingPrice() + { + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive') + ->with(self::STUB_CART_ID) + ->willReturn($this->quoteTotalsMock); + $this->quoteTotalsMock->expects($this->once()) + ->method('getIsMultiShipping') + ->willReturn(true); + $this->quoteTotalsMock->expects($this->any()) + ->method('getShippingAddress') + ->willReturn($this->shippingAddressMock); + + $this->shippingAddressMock->expects($this->once()) + ->method('getShippingMethod') + ->willReturn(self::STUB_SHIPPING_METHOD); + $this->shippingAddressMock->expects($this->any()) + ->method('getShippingAmount') + ->willReturn(self::STUB_SHIPPING_PRICE); + + $this->shippingAddressMock->expects($this->once()) + ->method('getShippingRateByCode') + ->willReturn($this->shippingRateMock); + + $this->shippingRateMock->expects($this->once()) + ->method('getPrice') + ->willReturn(self::STUB_SHIPPING_PRICE); + + $this->quoteTotalsMock->expects($this->any()) + ->method('getStore') + ->willReturn($this->storeMock); + $this->storeMock->expects($this->any()) + ->method('getBaseCurrency') + ->willReturnSelf(); $this->modelRepository->afterGet( - $this->createMock(\Magento\Quote\Model\Cart\CartTotalRepository::class), - $quoteMock, - $cartId + $this->quoteTotalRepositoryMock, + $this->quoteTotalsMock, + self::STUB_CART_ID ); } } From 9aaf6c43477548150e97828ecd3f38298df480d3 Mon Sep 17 00:00:00 2001 From: Nazar Klovanych <nazarn96@gmail.com> Date: Thu, 13 Feb 2020 11:05:51 +0200 Subject: [PATCH 114/229] Code clenup --- .../Magento/Catalog/Model/Product/Type.php | 47 +++++++++++-------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Type.php b/app/code/Magento/Catalog/Model/Product/Type.php index c17682c28962d..79a55ddada202 100644 --- a/app/code/Magento/Catalog/Model/Product/Type.php +++ b/app/code/Magento/Catalog/Model/Product/Type.php @@ -5,8 +5,17 @@ */ namespace Magento\Catalog\Model\Product; +use Magento\Catalog\Api\Data\ProductInterface; use Magento\Catalog\Model\Product; +use Magento\Catalog\Model\Product\Type\AbstractType; +use Magento\Catalog\Model\Product\Type\Pool; +use Magento\Catalog\Model\Product\Type\Price; +use Magento\Catalog\Model\Product\Type\Price\Factory as PriceFactory; +use Magento\Catalog\Model\Product\Type\Simple; +use Magento\Catalog\Model\ProductTypes\ConfigInterface; use Magento\Framework\Data\OptionSourceInterface; +use Magento\Framework\Pricing\PriceInfo\Factory as PriceInfoFactory; +use Magento\Framework\Pricing\PriceInfoInterface; /** * Product type model @@ -34,15 +43,15 @@ class Type implements OptionSourceInterface /** * Default product type model */ - const DEFAULT_TYPE_MODEL = \Magento\Catalog\Model\Product\Type\Simple::class; + const DEFAULT_TYPE_MODEL = Simple::class; /** * Default price model */ - const DEFAULT_PRICE_MODEL = \Magento\Catalog\Model\Product\Type\Price::class; + const DEFAULT_PRICE_MODEL = Price::class; /** - * @var \Magento\Catalog\Model\ProductTypes\ConfigInterface + * @var ConfigInterface */ protected $_config; @@ -77,35 +86,35 @@ class Type implements OptionSourceInterface /** * Product type factory * - * @var \Magento\Catalog\Model\Product\Type\Pool + * @var Pool */ protected $_productTypePool; /** * Price model factory * - * @var \Magento\Catalog\Model\Product\Type\Price\Factory + * @var PriceFactory */ protected $_priceFactory; /** - * @var \Magento\Framework\Pricing\PriceInfo\Factory + * @var PriceInfoFactory */ protected $_priceInfoFactory; /** * Construct * - * @param \Magento\Catalog\Model\ProductTypes\ConfigInterface $config - * @param \Magento\Catalog\Model\Product\Type\Pool $productTypePool - * @param \Magento\Catalog\Model\Product\Type\Price\Factory $priceFactory - * @param \Magento\Framework\Pricing\PriceInfo\Factory $priceInfoFactory + * @param ConfigInterface $config + * @param Pool $productTypePool + * @param PriceFactory $priceFactory + * @param PriceInfoFactory $priceInfoFactory */ public function __construct( - \Magento\Catalog\Model\ProductTypes\ConfigInterface $config, - \Magento\Catalog\Model\Product\Type\Pool $productTypePool, - \Magento\Catalog\Model\Product\Type\Price\Factory $priceFactory, - \Magento\Framework\Pricing\PriceInfo\Factory $priceInfoFactory + ConfigInterface $config, + Pool $productTypePool, + PriceFactory $priceFactory, + PriceInfoFactory $priceInfoFactory ) { $this->_config = $config; $this->_productTypePool = $productTypePool; @@ -116,8 +125,8 @@ public function __construct( /** * Factory to product singleton product type instances * - * @param \Magento\Catalog\Api\Data\ProductInterface $product - * @return \Magento\Catalog\Model\Product\Type\AbstractType + * @param ProductInterface $product + * @return AbstractType */ public function factory($product) { @@ -139,8 +148,8 @@ public function factory($product) /** * Product type price model factory * - * @param string $productType - * @return \Magento\Catalog\Model\Product\Type\Price + * @param string $productType + * @return Price */ public function priceFactory($productType) { @@ -164,7 +173,7 @@ public function priceFactory($productType) * Get Product Price Info object * * @param Product $saleableItem - * @return \Magento\Framework\Pricing\PriceInfoInterface + * @return PriceInfoInterface */ public function getPriceInfo(Product $saleableItem) { From 4a5cf2f05ba602257612d61b68afe8ff3ddc40dd Mon Sep 17 00:00:00 2001 From: Nazar Klovanych <nazarn96@gmail.com> Date: Thu, 13 Feb 2020 11:08:09 +0200 Subject: [PATCH 115/229] remove doc block from constants --- app/code/Magento/Catalog/Model/Product/Type.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Type.php b/app/code/Magento/Catalog/Model/Product/Type.php index 79a55ddada202..4c2919147944c 100644 --- a/app/code/Magento/Catalog/Model/Product/Type.php +++ b/app/code/Magento/Catalog/Model/Product/Type.php @@ -20,34 +20,22 @@ /** * Product type model * + * * @api * @since 100.0.2 */ class Type implements OptionSourceInterface { - /**#@+ - * Available product types - */ const TYPE_SIMPLE = 'simple'; const TYPE_BUNDLE = 'bundle'; const TYPE_VIRTUAL = 'virtual'; - /**#@-*/ - /** - * Default product type - */ const DEFAULT_TYPE = 'simple'; - /** - * Default product type model - */ const DEFAULT_TYPE_MODEL = Simple::class; - /** - * Default price model - */ const DEFAULT_PRICE_MODEL = Price::class; /** From 6c8aa11b9637c1ac717c64335c3c15b6a46187b1 Mon Sep 17 00:00:00 2001 From: Mohamed-Asar <mohamed.azarudeen@ziffity.com> Date: Thu, 13 Feb 2020 21:58:28 +0530 Subject: [PATCH 116/229] Removed disabled products from low stock report grid --- .../Magento/Reports/Block/Adminhtml/Product/Lowstock/Grid.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Reports/Block/Adminhtml/Product/Lowstock/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Product/Lowstock/Grid.php index 5460dab3a7ff8..47019fb92e0e0 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Product/Lowstock/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Product/Lowstock/Grid.php @@ -68,6 +68,9 @@ protected function _prepareCollection() )->setOrder( 'qty', \Magento\Framework\Data\Collection::SORT_ORDER_ASC + )->addAttributeToFilter( + 'status', + \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED ); if ($storeId) { From cb3ebb81257a24303720787c9042236c70212892 Mon Sep 17 00:00:00 2001 From: Ihor Sviziev <ihor-sviziev@users.noreply.github.com> Date: Mon, 17 Feb 2020 11:32:53 +0200 Subject: [PATCH 117/229] magento/magento2#26778 Eliminate the need for inheritance for action controllers Fix typo --- app/code/Magento/Store/App/Action/Plugin/StoreCheck.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php b/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php index 6843e0303edd9..d1171865275a8 100644 --- a/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php +++ b/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php @@ -35,7 +35,7 @@ public function __construct( * @param ActionInterface $subject * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * @throws \Magento\Framework\Exception\State\InitExceptionn + * @throws \Magento\Framework\Exception\State\InitException */ public function beforeExecute(ActionInterface $subject) { From 96a9f3a4f36f8700fc88b29a63ebb68ed3de9bf4 Mon Sep 17 00:00:00 2001 From: Oleh Usik <o.usik@atwix.com> Date: Mon, 17 Feb 2020 16:30:35 +0200 Subject: [PATCH 118/229] Fix was covered by MFTF test --- ...heckColorUploadChooserVisualSwatchTest.xml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml new file mode 100644 index 0000000000000..96142636c30b9 --- /dev/null +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.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="AdminCheckColorUploadChooserVisualSwatchTest"> + <annotations> + <features value="Swatches"/> + <stories value="Check correct view of visual swatches"/> + <title value="Correct view of Swatches while choosing color or upload image"/> + <description value="Correct view of Swatches while choosing color or upload image"/> + <severity value="AVERAGE"/> + <group value="Swatches"/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + </before> + <amOnPage url="{{ProductAttributePage.url}}" stepKey="addNewProductAttribute"/> + <selectOption selector="{{AttributePropertiesSection.InputType}}" + userInput="{{visualSwatchAttribute.input_type}}" stepKey="fillInputType"/> + + <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch1"/> + <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch2"/> + <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch3"/> + <click selector="{{AdminManageSwatchSection.nthSwatch('3')}}" stepKey="clickSwatch3"/> + <click selector="{{AdminManageSwatchSection.nthSwatch('2')}}" stepKey="clickSwatch2"/> + <click selector="{{AdminManageSwatchSection.nthSwatch('1')}}" stepKey="clickSwatch1"/> + </test> +</tests> From 2527b04cbe29054e9740c5e9634bb9ab0769cadf Mon Sep 17 00:00:00 2001 From: Oleh Usik <o.usik@atwix.com> Date: Mon, 17 Feb 2020 22:05:59 +0200 Subject: [PATCH 119/229] Other element would receive the click issue was fixed --- .../Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml | 1 + .../Test/AdminCheckColorUploadChooserVisualSwatchTest.xml | 6 +++--- app/code/Magento/Swatches/view/adminhtml/web/js/visual.js | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml b/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml index c3ef0a7324bfd..f18de49761533 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml @@ -17,6 +17,7 @@ <element name="nthSwatchText" type="input" selector="#swatch-text-options-panel table tbody tr:nth-of-type({{var}}) td:nth-of-type(3) input" parameterized="true"/> <element name="nthIsDefault" type="input" selector="(//input[@name='defaultvisual[]'])[{{var}}]" parameterized="true"/> <element name="nthSwatchAdminDescription" type="input" selector="#swatch-text-options-panel table tbody tr:nth-of-type({{var}}) td:nth-of-type(4) input" parameterized="true"/> + <element name="nthVisualSwatch" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) .swatches-visual-col" parameterized="true"/> <!-- Selector for Admin Description input where the index is zero-based --> <element name="swatchAdminDescriptionByIndex" type="input" selector="input[name='optiontext[value][option_{{index}}][0]']" parameterized="true"/> <element name="nthChooseColor" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) .swatch_row_name.colorpicker_handler" parameterized="true"/> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml index 96142636c30b9..7582444671f92 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml @@ -26,8 +26,8 @@ <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch1"/> <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch2"/> <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch3"/> - <click selector="{{AdminManageSwatchSection.nthSwatch('3')}}" stepKey="clickSwatch3"/> - <click selector="{{AdminManageSwatchSection.nthSwatch('2')}}" stepKey="clickSwatch2"/> - <click selector="{{AdminManageSwatchSection.nthSwatch('1')}}" stepKey="clickSwatch1"/> + <click selector="{{AdminManageSwatchSection.nthVisualSwatch('3')}}" stepKey="clickSwatch3"/> + <click selector="{{AdminManageSwatchSection.nthVisualSwatch('2')}}" stepKey="clickSwatch2"/> + <click selector="{{AdminManageSwatchSection.nthVisualSwatch('1')}}" stepKey="clickSwatch1"/> </test> </tests> diff --git a/app/code/Magento/Swatches/view/adminhtml/web/js/visual.js b/app/code/Magento/Swatches/view/adminhtml/web/js/visual.js index 782dc2938a335..848e02bbea6a8 100644 --- a/app/code/Magento/Swatches/view/adminhtml/web/js/visual.js +++ b/app/code/Magento/Swatches/view/adminhtml/web/js/visual.js @@ -403,8 +403,8 @@ define([ /** * Toggle color upload chooser */ - $(document).on('click', '.swatch_window', function () { - var currentElement = $(this).next('div'); + $(document).on('click', '.swatches-visual-col', function () { + var currentElement = $(this).find('.swatch_sub-menu_container'); jQuery('.swatch_sub-menu_container').not(currentElement).hide(); currentElement.toggle(); From 2dfed511150873ff891ae6e8fb2b846e73fc9d3f Mon Sep 17 00:00:00 2001 From: Alastair Mucklow <amucklow@strangerpixel.com> Date: Tue, 18 Feb 2020 10:49:26 +0000 Subject: [PATCH 120/229] Remove duplicate severity element --- .../Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml index 3ac254b49e568..e2f0d6af0deab 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml @@ -15,7 +15,6 @@ <description value="Log in to admin and delete CMS Page URL rewrite with No Redirects"/> <severity value="CRITICAL"/> <testCaseId value="MC-14648"/> - <severity value="CRITICAL"/> <group value="mtf_migrated"/> </annotations> <before> From e79f89b2e49747fdb4ff5080ef6bc64b19e4fdce Mon Sep 17 00:00:00 2001 From: Dominic <dfernando@altayer.com> Date: Tue, 18 Feb 2020 17:19:42 +0530 Subject: [PATCH 121/229] When click View(Preview) then open it in new page --- app/code/Magento/Cms/Ui/Component/Listing/Column/PageActions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Cms/Ui/Component/Listing/Column/PageActions.php b/app/code/Magento/Cms/Ui/Component/Listing/Column/PageActions.php index fa3756abfded4..7792c2b53f912 100644 --- a/app/code/Magento/Cms/Ui/Component/Listing/Column/PageActions.php +++ b/app/code/Magento/Cms/Ui/Component/Listing/Column/PageActions.php @@ -111,6 +111,7 @@ public function prepareDataSource(array $dataSource) ), 'label' => __('View'), '__disableTmpl' => true, + 'target' => '_blank' ]; } } From b1ab6a97c8354b3ef1c80aac379140fe356898e4 Mon Sep 17 00:00:00 2001 From: Nazar Klovanych <nazarn96@gmail.com> Date: Tue, 18 Feb 2020 14:32:01 +0200 Subject: [PATCH 122/229] static test fix --- app/code/Magento/Ui/view/base/web/js/modal/modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/modal.js b/app/code/Magento/Ui/view/base/web/js/modal/modal.js index c15fd156af803..2e797a09d225f 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/modal.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/modal.js @@ -308,7 +308,7 @@ define([ * Close modal. * * @return {Element} - current element. */ - closeModal: function (event, result) { + closeModal: function (event, result) {//eslint-disable-line no-unused-vars var that = this; this._removeKeyListener(); From 437fab3b783eb68460d283214f41f6b9d9fcb49f Mon Sep 17 00:00:00 2001 From: Nazar Klovanych <nazarn96@gmail.com> Date: Tue, 18 Feb 2020 14:36:32 +0200 Subject: [PATCH 123/229] static test fix --- app/code/Magento/Ui/view/base/web/js/modal/prompt.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js index 098951af2f175..d5a8654249612 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js @@ -154,6 +154,7 @@ define([ */ closeModal: function (event, result) { var value; + result = result || false; if (result) { From a678834a740ad9cf48f617a3075df3cf9616a0e2 Mon Sep 17 00:00:00 2001 From: Oleh Usik <o.usik@atwix.com> Date: Tue, 18 Feb 2020 14:36:56 +0200 Subject: [PATCH 124/229] set int type for Store Id --- .../CatalogProductListCollectionAppendSummaryFieldsObserver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Review/Observer/CatalogProductListCollectionAppendSummaryFieldsObserver.php b/app/code/Magento/Review/Observer/CatalogProductListCollectionAppendSummaryFieldsObserver.php index bb69284b5f0b8..4ee5a5e559fab 100644 --- a/app/code/Magento/Review/Observer/CatalogProductListCollectionAppendSummaryFieldsObserver.php +++ b/app/code/Magento/Review/Observer/CatalogProductListCollectionAppendSummaryFieldsObserver.php @@ -53,7 +53,7 @@ public function execute(EventObserver $observer) $productCollection = $observer->getEvent()->getCollection(); $this->sumResourceFactory->create()->appendSummaryFieldsToCollection( $productCollection, - $this->storeManager->getStore()->getId(), + (int)$this->storeManager->getStore()->getId(), \Magento\Review\Model\Review::ENTITY_PRODUCT_CODE ); From e537a76055864b4e3c17f21beb745cab276ec849 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" <engcom-vendorworker-charlie@adobe.com> Date: Mon, 17 Feb 2020 16:37:58 +0200 Subject: [PATCH 125/229] mftf, fix static --- .../Test/Mftf/Section/StorefrontOrderDetailsSection.xml | 1 + .../Mftf/Test/CreateInvoiceAndCheckInvoiceOrderTest.xml | 1 + .../Sales/view/frontend/templates/order/order_date.phtml | 8 +++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Section/StorefrontOrderDetailsSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/StorefrontOrderDetailsSection.xml index d262dfa9b010c..d1c94965640c5 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/StorefrontOrderDetailsSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/StorefrontOrderDetailsSection.xml @@ -9,6 +9,7 @@ <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="StorefrontOrderDetailsSection"> + <element name="orderDateTagElement" type="block" selector=".order-date date"/> <element name="orderDetailsBlock" type="block" selector=".block-order-details-view"/> <element name="billingAddressBlock" type="block" selector=".box-order-billing-address > .box-content > address"/> <element name="discountSalesRule" type="text" selector="tr.discount span.price"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceAndCheckInvoiceOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceAndCheckInvoiceOrderTest.xml index 45953b7b584f2..bcfa9cb6f945f 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceAndCheckInvoiceOrderTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceAndCheckInvoiceOrderTest.xml @@ -143,6 +143,7 @@ <!-- Assert invoiced amount on frontend --> <click selector="{{StorefrontCustomerOrderSection.viewOrder}}" stepKey="clickViewOrder"/> + <dontSeeElement selector="{{StorefrontOrderDetailsSection.orderDateTagElement}}" stepKey="dontSeeDateTag"/> <click selector="{{StorefrontOrderInvoicesSection.invoiceTab}}" stepKey="clickInvoiceTabOnStorefront"/> <see selector="{{StorefrontOrderInvoicesSection.grandTotalPrice}}" userInput="$110.00" stepKey="seePrice"/> </test> diff --git a/app/code/Magento/Sales/view/frontend/templates/order/order_date.phtml b/app/code/Magento/Sales/view/frontend/templates/order/order_date.phtml index 0cc899530e062..3e2b653e8b3bd 100644 --- a/app/code/Magento/Sales/view/frontend/templates/order/order_date.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/order/order_date.phtml @@ -5,5 +5,11 @@ */ ?> <div class="order-date"> - <?= $block->escapeHtml(__('<span class="label">Order Date:</span> %1', '<span>' . $block->formatDate($block->getOrder()->getCreatedAt(), \IntlDateFormatter::LONG) . '</span>'), ['span']) ?> + <?= $block->escapeHtml( + __( + '<span class="label">Order Date:</span> %1', + '<span>' . $block->formatDate($block->getOrder()->getCreatedAt(), \IntlDateFormatter::LONG) . '</span>' + ), + ['span'] + )?> </div> From a35a19acfeccdc366a0aaf8dc41d10cd07c6a346 Mon Sep 17 00:00:00 2001 From: "m.mezhensky" <m.mezhensky@atwix.com> Date: Tue, 18 Feb 2020 17:16:55 +0200 Subject: [PATCH 126/229] magento magento2# Unit test for Magento\CatalogUrlRewrite\Observer\ProductProcessUrlRewriteRemovingObserver --- ...tProcessUrlRewriteRemovingObserverTest.php | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/ProductProcessUrlRewriteRemovingObserverTest.php diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/ProductProcessUrlRewriteRemovingObserverTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/ProductProcessUrlRewriteRemovingObserverTest.php new file mode 100644 index 0000000000000..7d7927e2accb7 --- /dev/null +++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/ProductProcessUrlRewriteRemovingObserverTest.php @@ -0,0 +1,120 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\CatalogUrlRewrite\Test\Unit\Observer; + +use Magento\Catalog\Model\Product; +use Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator; +use Magento\CatalogUrlRewrite\Observer\ProductProcessUrlRewriteRemovingObserver; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Framework\Event; +use Magento\Framework\Event\Observer; +use Magento\UrlRewrite\Service\V1\Data\UrlRewrite; +use Magento\UrlRewrite\Model\UrlPersistInterface; +use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\MockObject\MockObject; + +/** + * Unit test for Magento\CatalogUrlRewrite\Observer\ProductProcessUrlRewriteRemovingObserver + */ +class ProductProcessUrlRewriteRemovingObserverTest extends TestCase +{ + /** + * Testable Object + * + * @var ProductProcessUrlRewriteRemovingObserver + */ + private $observer; + + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * @var Observer|MockObject + */ + private $observerMock; + + /** + * @var Event|MockObject + */ + private $eventMock; + + /** + * @var Product|MockObject + */ + private $productMock; + + /** + * @var UrlPersistInterface|MockObject + */ + private $urlPersist; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + $this->objectManager = new ObjectManager($this); + $this->observerMock = $this->createMock(Observer::class); + + $this->eventMock = $this->getMockBuilder(Event::class) + ->disableOriginalConstructor() + ->setMethods(['getProduct']) + ->getMock(); + + $this->productMock = $this->getMockBuilder(Product::class) + ->disableOriginalConstructor() + ->setMethods(['getId']) + ->getMock(); + + $this->urlPersist = $this->getMockBuilder(UrlPersistInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->observer = $this->objectManager->getObject( + ProductProcessUrlRewriteRemovingObserver::class, + [ + 'urlPersist' => $this->urlPersist + ] + ); + } + + /** + * Test for execute() + */ + public function testRemoveProductUrlsFromStorage() + { + $productId = 333; + + $this->observerMock + ->expects($this->once()) + ->method('getEvent') + ->willReturn($this->eventMock); + + $this->eventMock + ->expects($this->once()) + ->method('getProduct') + ->willReturn($this->productMock); + + $this->productMock + ->expects($this->exactly(2)) + ->method('getId') + ->willReturn($productId); + + $this->urlPersist->expects($this->once()) + ->method('deleteByData') + ->with([ + UrlRewrite::ENTITY_ID => $productId, + UrlRewrite::ENTITY_TYPE => ProductUrlRewriteGenerator::ENTITY_TYPE, + ]); + + $this->observer->execute($this->observerMock); + } +} From 6aa28f380a8d9e1638f895317d193e036668370a Mon Sep 17 00:00:00 2001 From: Dominic <dfernando@altayer.com> Date: Tue, 18 Feb 2020 22:16:51 +0530 Subject: [PATCH 127/229] test coverage --- .../Listing/Column/PageActionsTest.php | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/PageActionsTest.php b/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/PageActionsTest.php index 53d8ee5220768..07edc4a74b7a5 100644 --- a/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/PageActionsTest.php +++ b/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/PageActionsTest.php @@ -22,6 +22,9 @@ public function testPrepareItemsByPageId() $urlBuilderMock = $this->getMockBuilder(\Magento\Framework\UrlInterface::class) ->disableOriginalConstructor() ->getMock(); + $scopeUrlBuilderMock = $this->getMockBuilder(\Magento\Cms\ViewModel\Page\Grid\UrlBuilder::class) + ->disableOriginalConstructor() + ->getMock(); $contextMock = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\ContextInterface::class) ->getMockForAbstractClass(); $processor = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\Processor::class) @@ -35,6 +38,7 @@ public function testPrepareItemsByPageId() [ 'urlBuilder' => $urlBuilderMock, 'context' => $contextMock, + 'scopeUrlBuilder' => $scopeUrlBuilderMock ] ); @@ -46,12 +50,15 @@ public function testPrepareItemsByPageId() // Define test input and expectations $title = 'page title'; + $identifier = 'page_identifier'; + $items = [ 'data' => [ 'items' => [ [ 'page_id' => $pageId, - 'title' => $title + 'title' => $title, + 'identifier' => $identifier ] ] ] @@ -61,6 +68,7 @@ public function testPrepareItemsByPageId() [ 'page_id' => $pageId, 'title' => $title, + 'identifier' => $identifier, $name => [ 'edit' => [ 'href' => 'test/url/edit', @@ -78,6 +86,12 @@ public function testPrepareItemsByPageId() 'post' => true, '__disableTmpl' => true, ], + 'preview' => [ + 'href' => 'test/url/view', + 'label' => __('View'), + '__disableTmpl' => true, + 'target' => '_blank' + ] ], ], ]; @@ -107,6 +121,11 @@ public function testPrepareItemsByPageId() ], ] ); + + $scopeUrlBuilderMock->expects($this->any()) + ->method('getUrl') + ->willReturn('test/url/view'); + $model->setName($name); $items = $model->prepareDataSource($items); // Run test From b05c700aaf17313dac796b6a1d9b3b921250aea1 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Tue, 18 Feb 2020 23:07:21 -0600 Subject: [PATCH 128/229] wrapped filesystem lib --- .../Storage/FileNotFoundException.php | 16 +++++ .../Storage/RootViolationException.php | 14 +++++ .../Magento/Framework/Storage/Storage.php | 63 ++++++++++++++++++- .../Framework/Storage/StorageInterface.php | 44 ++++++++++++- .../Framework/Storage/StorageProvider.php | 25 ++++++-- 5 files changed, 154 insertions(+), 8 deletions(-) create mode 100644 lib/internal/Magento/Framework/Storage/FileNotFoundException.php create mode 100644 lib/internal/Magento/Framework/Storage/RootViolationException.php diff --git a/lib/internal/Magento/Framework/Storage/FileNotFoundException.php b/lib/internal/Magento/Framework/Storage/FileNotFoundException.php new file mode 100644 index 0000000000000..1b8dc2d2c62b3 --- /dev/null +++ b/lib/internal/Magento/Framework/Storage/FileNotFoundException.php @@ -0,0 +1,16 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\Storage; + +/** + * Class FileNotFoundException + */ +class FileNotFoundException extends \RuntimeException +{ + +} diff --git a/lib/internal/Magento/Framework/Storage/RootViolationException.php b/lib/internal/Magento/Framework/Storage/RootViolationException.php new file mode 100644 index 0000000000000..996572e582ec0 --- /dev/null +++ b/lib/internal/Magento/Framework/Storage/RootViolationException.php @@ -0,0 +1,14 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Framework\Storage; + + +class RootViolationException extends \RuntimeException +{ + +} diff --git a/lib/internal/Magento/Framework/Storage/Storage.php b/lib/internal/Magento/Framework/Storage/Storage.php index f2dc56478cac0..fd0eaac008368 100644 --- a/lib/internal/Magento/Framework/Storage/Storage.php +++ b/lib/internal/Magento/Framework/Storage/Storage.php @@ -10,7 +10,68 @@ /** * File storage abstraction */ -class Storage extends Filesystem implements StorageInterface +class Storage implements StorageInterface { + /** + * @var Filesystem + */ + private $filesystem; + + /** + * Storage constructor. + * + * @param Filesystem $filesystem + */ + public function __construct(Filesystem $filesystem) + { + $this->filesystem = $filesystem; + } + + /** + * @inheritDoc + */ + public function put($path, $contents, array $config = []): bool + { + return $this->filesystem->put($path, $contents, $config); + } + + /** + * @inheritDoc + */ + public function deleteDir($dirname): bool + { + try { + $result = $this->filesystem->deleteDir($dirname); + } catch (\League\Flysystem\RootViolationException $exception) { + throw new \Magento\Framework\Storage\RootViolationException($exception->getMessage()); + } + return $result; + } + + /** + * @inheritDoc + */ + public function getMetadata($path): ?array + { + try { + $metadata = $this->filesystem->getMetadata($path); + } catch (\League\Flysystem\FileNotFoundException $exception) { + throw new \Magento\Framework\Storage\FileNotFoundException( + $exception->getMessage() + ); + } + if ($metadata === false) { + $metadata = null; + } + return $metadata; + } + + /** + * @inheritDoc + */ + public function has($path): bool + { + return $this->filesystem->has($path); + } } diff --git a/lib/internal/Magento/Framework/Storage/StorageInterface.php b/lib/internal/Magento/Framework/Storage/StorageInterface.php index 562ddd4a4317a..4cf965b2287cd 100644 --- a/lib/internal/Magento/Framework/Storage/StorageInterface.php +++ b/lib/internal/Magento/Framework/Storage/StorageInterface.php @@ -5,15 +5,53 @@ */ namespace Magento\Framework\Storage; -use League\Flysystem\FilesystemInterface; - /** * Storage interface to be used by client code to manipulate objects in the storage * * Retrieve a real instance of storage via $storageProvider->get('<your-storage-name>'), * where $storageProvider is an instance of \Magento\Framework\Storage\StorageProvider */ -interface StorageInterface extends FilesystemInterface +interface StorageInterface { + /** + * Create a file or update if exists. + * + * @param string $path The path to the file. + * @param string $contents The file contents. + * @param array $config An optional configuration array. + * + * @return bool True on success, false on failure. + */ + public function put($path, $contents, array $config = []): bool; + + /** + * Delete a directory. + * + * @param string $dirname + * + * @throws RootViolationException Thrown if $dirname is empty. + * + * @return bool True on success, false on failure. + */ + public function deleteDir($dirname): bool; + + /** + * Get a file's metadata. + * + * @param string $path The path to the file. + * + * @throws FileNotFoundException + * + * @return array|false The file metadata or false on failure. + */ + public function getMetadata($path): ?array; + /** + * Check whether a file exists. + * + * @param string $path + * + * @return bool + */ + public function has($path): bool; } diff --git a/lib/internal/Magento/Framework/Storage/StorageProvider.php b/lib/internal/Magento/Framework/Storage/StorageProvider.php index ea4468fab47d4..afd5367f01a1d 100644 --- a/lib/internal/Magento/Framework/Storage/StorageProvider.php +++ b/lib/internal/Magento/Framework/Storage/StorageProvider.php @@ -8,6 +8,7 @@ use Magento\Framework\App\DeploymentConfig; use Magento\Framework\Storage\AdapterFactory\LocalFactory; use Magento\Framework\Storage\StorageFactory; +use League\Flysystem\FilesystemFactory; /** * Main entry point for accessing file storage @@ -31,18 +32,26 @@ class StorageProvider private $adapterProvider; /** - * Constructor - * + * @var FilesystemFactory + */ + private $filesystemFactory; + + /** + * StorageProvider constructor. * @param StorageAdapterProvider $adapterProvider * @param \Magento\Framework\Storage\StorageFactory $storageFactory * @param array $storage * @param DeploymentConfig $envConfig + * @param FilesystemFactory $filesystemFactory + * @throws \Magento\Framework\Exception\FileSystemException + * @throws \Magento\Framework\Exception\RuntimeException */ public function __construct( StorageAdapterProvider $adapterProvider, StorageFactory $storageFactory, array $storage, - DeploymentConfig $envConfig + DeploymentConfig $envConfig, + FilesystemFactory $filesystemFactory ) { foreach ($storage as $storageName => $localPath) { $this->storageConfig[$storageName] = [ @@ -81,7 +90,15 @@ public function get(string $storageName): StorageInterface ); } $adapter = $this->adapterProvider->create($config['adapter'], $config['options']); - $this->storage[$storageName] = $this->storageFactory->create(['adapter' => $adapter]); + $this->storage[$storageName] = $this->storageFactory->create( + [ + 'factory' => $this->filesystemFactory->create( + [ + 'adapter' => $adapter + ] + ) + ] + ); } else { throw new UnsupportedStorageException("No storage with name '$storageName' is declared"); } From 85fe3ca5514b196059cb78a014b2b98a9c5974c5 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Tue, 18 Feb 2020 23:21:25 -0600 Subject: [PATCH 129/229] external exceptions usage replaced with the wrapped --- .../Block/Adminhtml/Product/Helper/Form/Gallery/Content.php | 2 +- app/code/Magento/Catalog/Block/Product/Gallery.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php index 21e85b120188a..6a3cf54fd363e 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php @@ -14,7 +14,7 @@ namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery; use Magento\Backend\Block\DataProviders\ImageUploadConfig as ImageUploadConfigDataProvider; -use League\Flysystem\FileNotFoundException; +use Magento\Framework\Storage\FileNotFoundException; use Magento\Framework\App\ObjectManager; use Magento\Backend\Block\Media\Uploader; use Magento\Framework\Storage\StorageProvider; diff --git a/app/code/Magento/Catalog/Block/Product/Gallery.php b/app/code/Magento/Catalog/Block/Product/Gallery.php index c5c6658c32fbb..2e9dcd1fe6952 100644 --- a/app/code/Magento/Catalog/Block/Product/Gallery.php +++ b/app/code/Magento/Catalog/Block/Product/Gallery.php @@ -11,7 +11,7 @@ */ namespace Magento\Catalog\Block\Product; -use League\Flysystem\FileNotFoundException; +use Magento\Framework\Storage\FileNotFoundException; use Magento\Catalog\Model\Product; use Magento\Catalog\Model\Product\Media\Config; use Magento\Framework\App\ObjectManager; From 5898776d62e5948bbfee00ce9e2850dec01e09a6 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Wed, 19 Feb 2020 11:35:27 +0200 Subject: [PATCH 130/229] Add assert class, fix mftf test --- ...ssertClassElementRelativeIdActionGroup.xml | 21 +++++++++++++++++++ .../Review/Test/Mftf/Data/AdminMenuData.xml | 1 + ...gPendingReviewsNavigateMenuActiveTest.xml} | 16 +++++++------- 3 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 app/code/Magento/Review/Test/Mftf/ActionGroup/AdminAssertClassElementRelativeIdActionGroup.xml rename app/code/Magento/Review/Test/Mftf/Test/{AdminMarketingPendingReviewsNavigateMenuTest.xml => AdminMarketingPendingReviewsNavigateMenuActiveTest.xml} (62%) diff --git a/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminAssertClassElementRelativeIdActionGroup.xml b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminAssertClassElementRelativeIdActionGroup.xml new file mode 100644 index 0000000000000..63013ea79b834 --- /dev/null +++ b/app/code/Magento/Review/Test/Mftf/ActionGroup/AdminAssertClassElementRelativeIdActionGroup.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="AdminAssertClassElementRelativeIdActionGroup"> + <arguments> + <argument name="elementId" type="string" defaultValue="{{AdminMenuSection.marketing}}"/> + <argument name="expectClass" type="string" defaultValue="{{AdminMenuUserContentPendingReviews.activeClass}}" /> + </arguments> + + <grabAttributeFrom selector="{{elementId}}" userInput="class" stepKey="grabClass"/> + <assertContains stepKey="assertClass"> + <actualResult type="string">{$grabClass}</actualResult> + <expectedResult type="string">{{expectClass}}</expectedResult> + </assertContains> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Review/Test/Mftf/Data/AdminMenuData.xml b/app/code/Magento/Review/Test/Mftf/Data/AdminMenuData.xml index 5599baa0b5e07..faff1e1f42932 100644 --- a/app/code/Magento/Review/Test/Mftf/Data/AdminMenuData.xml +++ b/app/code/Magento/Review/Test/Mftf/Data/AdminMenuData.xml @@ -17,6 +17,7 @@ <data key="pageTitle">Pending Reviews</data> <data key="title">Pending Reviews</data> <data key="dataUiId">magento-review-catalog-reviews-ratings-pending</data> + <data key="dataActiveClass">_active</data> </entity> <entity name="AdminMenuReportsReviewsByCustomers"> <data key="pageTitle">Customer Reviews Report</data> diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingPendingReviewsNavigateMenuTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingPendingReviewsNavigateMenuActiveTest.xml similarity index 62% rename from app/code/Magento/Review/Test/Mftf/Test/AdminMarketingPendingReviewsNavigateMenuTest.xml rename to app/code/Magento/Review/Test/Mftf/Test/AdminMarketingPendingReviewsNavigateMenuActiveTest.xml index 265b27a3bcbe1..f1bba674ac5eb 100644 --- a/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingPendingReviewsNavigateMenuTest.xml +++ b/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingPendingReviewsNavigateMenuActiveTest.xml @@ -6,18 +6,14 @@ */ --> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminMarketingPendingReviewsNavigateMenuTest"> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminMarketingPendingReviewsNavigateMenuActiveTest"> <annotations> <features value="Pending Reviews"/> <stories value="Menu Navigation"/> - <title value="Admin marketing pending reviews navigate menu test"/> - <description value="Admin should be able to navigate to Marketing > Pending Reviews"/> - <severity value="CRITICAL"/> - <testCaseId value="MC-14200"/> + <title value="Admin marketing pending reviews navigate menu"/> + <description value="Admin able see navigate head menu Marketing is active, when open page Marketing > Pending Reviews"/> <group value="menu"/> - <group value="mtf_migrated"/> </annotations> <before> <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> @@ -32,5 +28,9 @@ <actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seePageTitle"> <argument name="title" value="{{AdminMenuUserContentPendingReviews.pageTitle}}"/> </actionGroup> + <actionGroup ref="AdminAssertClassElementRelativeIdActionGroup" stepKey="assertClass"> + <argument name="elementId" value="{{AdminMenuSection.marketing}}"/> + <argument name="expectClass" value="{{AdminMenuUserContentPendingReviews.dataActiveClass}}"/> + </actionGroup> </test> </tests> From bb97314dc2428a9b8d1e2c2e58a3cca272b678e2 Mon Sep 17 00:00:00 2001 From: Nandhini Nagaraj <nandhini.nagaraj@ziffity.com> Date: Wed, 19 Feb 2020 17:14:18 +0530 Subject: [PATCH 131/229] Module_Cms - AdminCreateDuplicatedCmsPageTest - Removed the direct action nodes and replaced them with the Action Group --- ...icateCMSPageWithSplitButtonActionGroup.xml | 23 +++++++++++++++ ...erifyCmsPageSaveSplitButtonActionGroup.xml | 22 +++++++++++++++ .../Test/AdminCreateDuplicatedCmsPageTest.xml | 28 ++++++++----------- 3 files changed, 56 insertions(+), 17 deletions(-) create mode 100644 app/code/Magento/Cms/Test/Mftf/ActionGroup/SaveAndDuplicateCMSPageWithSplitButtonActionGroup.xml create mode 100644 app/code/Magento/Cms/Test/Mftf/ActionGroup/VerifyCmsPageSaveSplitButtonActionGroup.xml diff --git a/app/code/Magento/Cms/Test/Mftf/ActionGroup/SaveAndDuplicateCMSPageWithSplitButtonActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/SaveAndDuplicateCMSPageWithSplitButtonActionGroup.xml new file mode 100644 index 0000000000000..255e2a2192296 --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/SaveAndDuplicateCMSPageWithSplitButtonActionGroup.xml @@ -0,0 +1,23 @@ +<?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="SaveAndDuplicateCMSPageWithSplitButtonActionGroup"> + <annotations> + <description>Clicks on the Save and Duplicate button.</description> + </annotations> + + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="waitForExpandSplitButtonToBeVisible"/> + <click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitBtn2" /> + <click selector="{{CmsNewPagePageActionsSection.saveAndDuplicate}}" stepKey="clickSaveAndDuplicate" /> + <waitForPageLoad stepKey="waitForPageLoadAfterClickingSaveAndDuplicate"/> + <see userInput="You saved the page." stepKey="seeSavedPageMsgOnForm"/> + <see userInput="You duplicated the page." stepKey="seeDuplicatedPageMsg"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Cms/Test/Mftf/ActionGroup/VerifyCmsPageSaveSplitButtonActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/VerifyCmsPageSaveSplitButtonActionGroup.xml new file mode 100644 index 0000000000000..5e2219f4758e4 --- /dev/null +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/VerifyCmsPageSaveSplitButtonActionGroup.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="VerifyCmsPageSaveSplitButtonActionGroup"> + <annotations> + <description>Verify Save and Duplicate and Save and Close button.</description> + </annotations> + + <amOnPage url="{{CmsNewPagePage.url}}" stepKey="amOnPageCreationForm"/> + <waitForPageLoad stepKey="waitForPageLoad1"/> + <click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitBtn1" /> + <see selector="{{CmsNewPagePageActionsSection.saveAndDuplicate}}" userInput="Save & Duplicate" stepKey="seeSaveAndDuplicate"/> + <see selector="{{CmsNewPagePageActionsSection.saveAndClose}}" userInput="Save & Close" stepKey="seeSaveAndClose"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDuplicatedCmsPageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDuplicatedCmsPageTest.xml index cf333f8b559d0..c8a1b4af88a4e 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDuplicatedCmsPageTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDuplicatedCmsPageTest.xml @@ -25,25 +25,19 @@ <after> <actionGroup ref="logout" stepKey="logout"/> </after> - <amOnPage url="{{CmsNewPagePage.url}}" stepKey="amOnPageCreationForm"/> - <waitForPageLoad stepKey="waitForPageLoad1"/> - <!--Verify Save&Duplicate button and Save&Close button--> - <click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitBtn1" /> - <see selector="{{CmsNewPagePageActionsSection.saveAndDuplicate}}" userInput="Save & Duplicate" stepKey="seeSaveAndDuplicate"/> - <see selector="{{CmsNewPagePageActionsSection.saveAndClose}}" userInput="Save & Close" stepKey="seeSaveAndClose"/> - <!--Create new CMS Page page--> - <actionGroup ref="FillOutCMSPageContent" stepKey="FillOutBlockContent"/> - <click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitBtn2" /> - <click selector="{{CmsNewPagePageActionsSection.saveAndDuplicate}}" stepKey="clickSaveAndDuplicate" /> - <waitForPageLoad stepKey="waitForPageLoad3"/> - <see userInput="You saved the page." stepKey="seeSavedPageMsgOnForm"/> - <see userInput="You duplicated the page." stepKey="seeDuplicatedPageMsg"/> + <!-- Navigate to create a CMS page and Verify Save&Duplicate - Save&Close button --> + <actionGroup ref="VerifyCmsPageSaveSplitButtonActionGroup" stepKey="verifyCmsPageSaveButton" /> + <!-- Filled out Content --> + <actionGroup ref="FillOutCMSPageContent" stepKey="FillOutPageContent"/> + <!-- Click save and duplicate action --> + <actionGroup ref="SaveAndDuplicateCMSPageWithSplitButtonActionGroup" stepKey="clickSaveAndDuplicateButton"/> <!--Verify duplicated CMS Page--> <seeElement selector="{{BlockNewPageBasicFieldsSection.isActive('0')}}" stepKey="seeBlockNotEnable" /> <actionGroup ref="AssertCMSPageContentActionGroup" stepKey="assertContent"/> - <click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitBtn3" /> - <click selector="{{CmsNewPagePageActionsSection.saveAndClose}}" stepKey="clickSaveAndClose"/> - <see userInput="You saved the page." stepKey="seeSavedCMSPageMsgOnGrid"/> - <seeElement selector="div[data-role='grid-wrapper']" stepKey="seeGridPage" /> + <!-- Click Save Button --> + <actionGroup ref="SaveCmsPageActionGroup" stepKey="clickSaveCmsPageButton"/> + <actionGroup ref="DeletePageByUrlKeyActionGroup" stepKey="deleteCMSPage"> + <argument name="UrlKey" value="{{_duplicatedCMSPage.identifier}}"/> + </actionGroup> </test> </tests> From 9a1320bb9641cc16b252a2135420dfb50bf3dcd4 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" <engcom-vendorworker-charlie@adobe.com> Date: Wed, 19 Feb 2020 14:02:05 +0200 Subject: [PATCH 132/229] fix static, unit test --- .../Model/ShippingInformationManagement.php | 126 +++-- .../ShippingInformationManagementTest.php | 489 +++++++++++++----- 2 files changed, 438 insertions(+), 177 deletions(-) diff --git a/app/code/Magento/Checkout/Model/ShippingInformationManagement.php b/app/code/Magento/Checkout/Model/ShippingInformationManagement.php index 953f42a49ad80..7a2a7d09653fc 100644 --- a/app/code/Magento/Checkout/Model/ShippingInformationManagement.php +++ b/app/code/Magento/Checkout/Model/ShippingInformationManagement.php @@ -6,28 +6,38 @@ namespace Magento\Checkout\Model; +use Magento\Checkout\Api\Data\PaymentDetailsInterface; +use Magento\Checkout\Api\Data\ShippingInformationInterface; +use Magento\Checkout\Api\ShippingInformationManagementInterface; +use Magento\Customer\Api\AddressRepositoryInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\InputException; -use Magento\Framework\Exception\StateException; +use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Exception\StateException; +use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Api\CartTotalRepositoryInterface; use Magento\Quote\Api\Data\AddressInterface; +use Magento\Quote\Api\Data\CartExtensionFactory; use Magento\Quote\Api\Data\CartInterface; -use Psr\Log\LoggerInterface as Logger; +use Magento\Quote\Api\PaymentMethodManagementInterface; +use Magento\Quote\Model\Quote; +use Magento\Quote\Model\Quote\TotalsCollector; use Magento\Quote\Model\QuoteAddressValidator; -use Magento\Quote\Api\Data\CartExtensionFactory; use Magento\Quote\Model\ShippingAssignmentFactory; use Magento\Quote\Model\ShippingFactory; -use Magento\Framework\App\ObjectManager; +use Psr\Log\LoggerInterface as Logger; /** - * Class ShippingInformationManagement + * @inheritdoc * - * @package Magento\Checkout\Model * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class ShippingInformationManagement implements \Magento\Checkout\Api\ShippingInformationManagementInterface +class ShippingInformationManagement implements ShippingInformationManagementInterface { /** - * @var \Magento\Quote\Api\PaymentMethodManagementInterface + * @var PaymentMethodManagementInterface */ protected $paymentMethodManagement; @@ -37,12 +47,12 @@ class ShippingInformationManagement implements \Magento\Checkout\Api\ShippingInf protected $paymentDetailsFactory; /** - * @var \Magento\Quote\Api\CartTotalRepositoryInterface + * @var CartTotalRepositoryInterface */ protected $cartTotalsRepository; /** - * @var \Magento\Quote\Api\CartRepositoryInterface + * @var CartRepositoryInterface */ protected $quoteRepository; @@ -57,65 +67,63 @@ class ShippingInformationManagement implements \Magento\Checkout\Api\ShippingInf protected $addressValidator; /** - * @var \Magento\Customer\Api\AddressRepositoryInterface + * @var AddressRepositoryInterface * @deprecated 100.2.0 */ protected $addressRepository; /** - * @var \Magento\Framework\App\Config\ScopeConfigInterface + * @var ScopeConfigInterface * @deprecated 100.2.0 */ protected $scopeConfig; /** - * @var \Magento\Quote\Model\Quote\TotalsCollector + * @var TotalsCollector * @deprecated 100.2.0 */ protected $totalsCollector; /** - * @var \Magento\Quote\Api\Data\CartExtensionFactory + * @var CartExtensionFactory */ private $cartExtensionFactory; /** - * @var \Magento\Quote\Model\ShippingAssignmentFactory + * @var ShippingAssignmentFactory */ protected $shippingAssignmentFactory; /** - * @var \Magento\Quote\Model\ShippingFactory + * @var ShippingFactory */ private $shippingFactory; /** - * Constructor - * - * @param \Magento\Quote\Api\PaymentMethodManagementInterface $paymentMethodManagement - * @param \Magento\Checkout\Model\PaymentDetailsFactory $paymentDetailsFactory - * @param \Magento\Quote\Api\CartTotalRepositoryInterface $cartTotalsRepository - * @param \Magento\Quote\Api\CartRepositoryInterface $quoteRepository - * @param \Magento\Quote\Model\QuoteAddressValidator $addressValidator + * @param PaymentMethodManagementInterface $paymentMethodManagement + * @param PaymentDetailsFactory $paymentDetailsFactory + * @param CartTotalRepositoryInterface $cartTotalsRepository + * @param CartRepositoryInterface $quoteRepository + * @param QuoteAddressValidator $addressValidator * @param Logger $logger - * @param \Magento\Customer\Api\AddressRepositoryInterface $addressRepository - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Quote\Model\Quote\TotalsCollector $totalsCollector + * @param AddressRepositoryInterface $addressRepository + * @param ScopeConfigInterface $scopeConfig + * @param TotalsCollector $totalsCollector * @param CartExtensionFactory|null $cartExtensionFactory * @param ShippingAssignmentFactory|null $shippingAssignmentFactory * @param ShippingFactory|null $shippingFactory * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Quote\Api\PaymentMethodManagementInterface $paymentMethodManagement, - \Magento\Checkout\Model\PaymentDetailsFactory $paymentDetailsFactory, - \Magento\Quote\Api\CartTotalRepositoryInterface $cartTotalsRepository, - \Magento\Quote\Api\CartRepositoryInterface $quoteRepository, + PaymentMethodManagementInterface $paymentMethodManagement, + PaymentDetailsFactory $paymentDetailsFactory, + CartTotalRepositoryInterface $cartTotalsRepository, + CartRepositoryInterface $quoteRepository, QuoteAddressValidator $addressValidator, Logger $logger, - \Magento\Customer\Api\AddressRepositoryInterface $addressRepository, - \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Quote\Model\Quote\TotalsCollector $totalsCollector, + AddressRepositoryInterface $addressRepository, + ScopeConfigInterface $scopeConfig, + TotalsCollector $totalsCollector, CartExtensionFactory $cartExtensionFactory = null, ShippingAssignmentFactory $shippingAssignmentFactory = null, ShippingFactory $shippingFactory = null @@ -141,24 +149,23 @@ public function __construct( * Save address information. * * @param int $cartId - * @param \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation - * @return \Magento\Checkout\Api\Data\PaymentDetailsInterface + * @param ShippingInformationInterface $addressInformation + * @return PaymentDetailsInterface * @throws InputException * @throws NoSuchEntityException * @throws StateException */ public function saveAddressInformation( $cartId, - \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation - ) { - /** @var \Magento\Quote\Model\Quote $quote */ + ShippingInformationInterface $addressInformation + ): PaymentDetailsInterface { + /** @var Quote $quote */ $quote = $this->quoteRepository->getActive($cartId); $this->validateQuote($quote); $address = $addressInformation->getShippingAddress(); - if (!$address || !$address->getCountryId()) { - throw new StateException(__('The shipping address is missing. Set the address and try again.')); - } + $this->validateAddress($address); + if (!$address->getCustomerAddressId()) { $address->setCustomerAddressId(null); } @@ -182,10 +189,18 @@ public function saveAddressInformation( $quote->setIsMultiShipping(false); $this->quoteRepository->save($quote); + } catch (LocalizedException $e) { + $this->logger->critical($e); + throw new InputException( + __( + 'The shipping information was unable to be saved. Error: "%message"', + ['message' => $e->getMessage()] + ) + ); } catch (\Exception $e) { $this->logger->critical($e); throw new InputException( - __('The shipping information was unable to be saved. Error: "%1"', $e->getMessage()) + __('The shipping information was unable to be saved. Verify the input data and try again.') ); } @@ -199,26 +214,39 @@ public function saveAddressInformation( ); } - /** @var \Magento\Checkout\Api\Data\PaymentDetailsInterface $paymentDetails */ + /** @var PaymentDetailsInterface $paymentDetails */ $paymentDetails = $this->paymentDetailsFactory->create(); $paymentDetails->setPaymentMethods($this->paymentMethodManagement->getList($cartId)); $paymentDetails->setTotals($this->cartTotalsRepository->get($cartId)); return $paymentDetails; } + /** + * Validate shipping address + * + * @param AddressInterface $address + * @return void + * @throws StateException + */ + private function validateAddress(AddressInterface $address): void + { + if (!$address || !$address->getCountryId()) { + throw new StateException(__('The shipping address is missing. Set the address and try again.')); + } + } + /** * Validate quote * - * @param \Magento\Quote\Model\Quote $quote + * @param Quote $quote * @throws InputException - * @throws NoSuchEntityException * @return void */ - protected function validateQuote(\Magento\Quote\Model\Quote $quote) + protected function validateQuote(Quote $quote): void { - if (0 == $quote->getItemsCount()) { + if (!$quote->getItemsCount()) { throw new InputException( - __("The shipping method can't be set for an empty cart. Add an item to cart and try again.") + __('The shipping method can\'t be set for an empty cart. Add an item to cart and try again.') ); } } @@ -231,7 +259,7 @@ protected function validateQuote(\Magento\Quote\Model\Quote $quote) * @param string $method * @return CartInterface */ - private function prepareShippingAssignment(CartInterface $quote, AddressInterface $address, $method) + private function prepareShippingAssignment(CartInterface $quote, AddressInterface $address, $method): CartInterface { $cartExtension = $quote->getExtensionAttributes(); if ($cartExtension === null) { diff --git a/app/code/Magento/Checkout/Test/Unit/Model/ShippingInformationManagementTest.php b/app/code/Magento/Checkout/Test/Unit/Model/ShippingInformationManagementTest.php index 93375bb884535..86d5ca75fc58f 100644 --- a/app/code/Magento/Checkout/Test/Unit/Model/ShippingInformationManagementTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Model/ShippingInformationManagementTest.php @@ -6,101 +6,161 @@ namespace Magento\Checkout\Test\Unit\Model; +use Magento\Checkout\Api\Data\PaymentDetailsInterface; +use Magento\Checkout\Api\Data\ShippingInformationInterface; +use Magento\Checkout\Model\PaymentDetailsFactory; +use Magento\Checkout\Model\ShippingInformationManagement; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Exception\StateException; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Quote\Api\CartRepositoryInterface; +use Magento\Quote\Api\CartTotalRepositoryInterface; +use Magento\Quote\Api\Data\AddressInterface; +use Magento\Quote\Api\Data\CartExtension; +use Magento\Quote\Api\Data\CartExtensionFactory; +use Magento\Quote\Api\Data\PaymentMethodInterface; +use Magento\Quote\Api\Data\TotalsInterface; +use Magento\Quote\Api\PaymentMethodManagementInterface; +use Magento\Quote\Model\Quote; +use Magento\Quote\Model\Quote\Address; +use Magento\Quote\Model\QuoteAddressValidator; +use Magento\Quote\Model\Shipping; +use Magento\Quote\Model\ShippingAssignment; +use Magento\Quote\Model\ShippingAssignmentFactory; +use Magento\Quote\Model\ShippingFactory; +use PHPUnit\Framework\MockObject\MockObject as MockObject; +use PHPUnit\Framework\TestCase; + /** + * Test for \Magento\Checkout\Model\ShippingInformationManagement. + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.TooManyFields) */ -class ShippingInformationManagementTest extends \PHPUnit\Framework\TestCase +class ShippingInformationManagementTest extends TestCase { /** - * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager + * Stub cart id + * + * @var int */ - private $objectManager; + private const STUB_CART_ID = 100; + + /** + * Stub items count + * + * @var int + */ + private const STUB_ITEMS_COUNT = 99; + + /** + * Stub carrier code + * + * @var string + */ + private const STUB_CARRIER_CODE = 'carrier_code'; + + /** + * Stub shipping method + * + * @var string + */ + private const STUB_SHIPPING_METHOD = 'shipping_method'; + + /** + * Stub error message + * + * @var string + */ + private const STUB_ERROR_MESSAGE = 'error message'; + + /** + * @var ShippingInformationManagement + */ + private $model; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var ObjectManager */ - protected $paymentMethodManagementMock; + private $objectManager; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var PaymentMethodManagementInterface|MockObject */ - protected $paymentDetailsFactoryMock; + private $paymentMethodManagementMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var PaymentDetailsFactory|MockObject */ - protected $cartTotalsRepositoryMock; + private $paymentDetailsFactoryMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var CartTotalRepositoryInterface|MockObject */ - protected $quoteRepositoryMock; + private $cartTotalsRepositoryMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var CartRepositoryInterface|MockObject */ - protected $shippingAddressMock; + private $quoteRepositoryMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var Address|MockObject */ - protected $quoteMock; + private $shippingAddressMock; /** - * @var \Magento\Checkout\Model\ShippingInformationManagement + * @var Quote|MockObject */ - protected $model; + private $quoteMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var ShippingAssignmentFactory|MockObject */ private $shippingAssignmentFactoryMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var CartExtensionFactory|MockObject */ private $cartExtensionFactoryMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var ShippingFactory|MockObject */ private $shippingFactoryMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var CartExtension|MockObject */ private $cartExtensionMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var ShippingAssignment|MockObject */ private $shippingAssignmentMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var QuoteAddressValidator|MockObject */ - private $shippingMock; + private $addressValidatorMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @inheritdoc */ - private $addressValidatorMock; - protected function setUp() { - $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); - $this->paymentMethodManagementMock = $this->createMock( - \Magento\Quote\Api\PaymentMethodManagementInterface::class - ); + $this->objectManager = new ObjectManager($this); + $this->paymentMethodManagementMock = $this->createMock(PaymentMethodManagementInterface::class); $this->paymentDetailsFactoryMock = $this->createPartialMock( - \Magento\Checkout\Model\PaymentDetailsFactory::class, + PaymentDetailsFactory::class, ['create'] ); - $this->cartTotalsRepositoryMock = $this->createMock(\Magento\Quote\Api\CartTotalRepositoryInterface::class); - $this->quoteRepositoryMock = $this->createMock(\Magento\Quote\Api\CartRepositoryInterface::class); + $this->cartTotalsRepositoryMock = $this->createMock(CartTotalRepositoryInterface::class); + $this->quoteRepositoryMock = $this->createMock(CartRepositoryInterface::class); $this->shippingAddressMock = $this->createPartialMock( - \Magento\Quote\Model\Quote\Address::class, + Address::class, [ 'getSaveInAddressBook', 'getSameAsBilling', @@ -120,7 +180,7 @@ protected function setUp() ); $this->quoteMock = $this->createPartialMock( - \Magento\Quote\Model\Quote::class, + Quote::class, [ 'isVirtual', 'getItemsCount', @@ -134,24 +194,22 @@ protected function setUp() 'getExtensionAttributes', 'setExtensionAttributes', 'setBillingAddress' - ], - [], - '', - false + ] ); - $this->shippingAssignmentFactoryMock = - $this->createPartialMock(\Magento\Quote\Model\ShippingAssignmentFactory::class, ['create']); - $this->cartExtensionFactoryMock = - $this->createPartialMock(\Magento\Quote\Api\Data\CartExtensionFactory::class, ['create']); - $this->shippingFactoryMock = - $this->createPartialMock(\Magento\Quote\Model\ShippingFactory::class, ['create']); - $this->addressValidatorMock = $this->createMock( - \Magento\Quote\Model\QuoteAddressValidator::class + $this->shippingAssignmentFactoryMock = $this->createPartialMock( + ShippingAssignmentFactory::class, + ['create'] + ); + $this->cartExtensionFactoryMock = $this->createPartialMock( + CartExtensionFactory::class, + ['create'] ); + $this->shippingFactoryMock = $this->createPartialMock(ShippingFactory::class, ['create']); + $this->addressValidatorMock = $this->createMock(QuoteAddressValidator::class); $this->model = $this->objectManager->getObject( - \Magento\Checkout\Model\ShippingInformationManagement::class, + ShippingInformationManagement::class, [ 'paymentMethodManagement' => $this->paymentMethodManagementMock, 'paymentDetailsFactory' => $this->paymentDetailsFactoryMock, @@ -166,59 +224,80 @@ protected function setUp() } /** - * @expectedException \Magento\Framework\Exception\InputException - * @expectedExceptionMessage The shipping method can't be set for an empty cart. Add an item to cart and try again. + * Save address with `InputException` + * + * @return void */ - public function testSaveAddressInformationIfCartIsEmpty() + public function testSaveAddressInformationIfCartIsEmpty(): void { - $cartId = 100; - $addressInformationMock = $this->createMock(\Magento\Checkout\Api\Data\ShippingInformationInterface::class); + $cartId = self::STUB_CART_ID; + /** @var ShippingInformationInterface|MockObject $addressInformationMock */ + $addressInformationMock = $this->createMock(ShippingInformationInterface::class); - $this->quoteMock->expects($this->once())->method('getItemsCount')->willReturn(0); + $this->quoteMock->expects($this->once()) + ->method('getItemsCount') + ->willReturn(0); $this->quoteRepositoryMock->expects($this->once()) ->method('getActive') ->with($cartId) ->willReturn($this->quoteMock); + $this->expectException(InputException::class); + $this->expectExceptionMessage( + 'The shipping method can\'t be set for an empty cart. Add an item to cart and try again.' + ); $this->model->saveAddressInformation($cartId, $addressInformationMock); } /** + * Sets shipping assignments + * * @param string $shippingMethod + * @return void */ - private function setShippingAssignmentsMocks($shippingMethod) + private function setShippingAssignmentsMocks($shippingMethod): void { - $this->quoteMock->expects($this->once())->method('getExtensionAttributes')->willReturn(null); - $this->shippingAddressMock->expects($this->once())->method('setLimitCarrier'); + $this->quoteMock->expects($this->once()) + ->method('getExtensionAttributes') + ->willReturn(null); + $this->shippingAddressMock->expects($this->once()) + ->method('setLimitCarrier'); $this->cartExtensionMock = $this->createPartialMock( - \Magento\Quote\Api\Data\CartExtension::class, + CartExtension::class, ['getShippingAssignments', 'setShippingAssignments'] ); $this->cartExtensionFactoryMock->expects($this->once()) ->method('create') ->willReturn($this->cartExtensionMock); - $this->cartExtensionMock->expects($this->once())->method('getShippingAssignments')->willReturn(null); + $this->cartExtensionMock->expects($this->once()) + ->method('getShippingAssignments') + ->willReturn(null); - $this->shippingAssignmentMock = $this->createMock( - \Magento\Quote\Model\ShippingAssignment::class - ); + $this->shippingAssignmentMock = $this->createMock(ShippingAssignment::class); $this->shippingAssignmentFactoryMock->expects($this->once()) ->method('create') ->willReturn($this->shippingAssignmentMock); - $this->shippingAssignmentMock->expects($this->once())->method('getShipping')->willReturn(null); + $this->shippingAssignmentMock->expects($this->once()) + ->method('getShipping') + ->willReturn(null); - $this->shippingMock = $this->createMock(\Magento\Quote\Model\Shipping::class); - $this->shippingFactoryMock->expects($this->once())->method('create')->willReturn($this->shippingMock); + $shippingMock = $this->createMock(Shipping::class); + $this->shippingFactoryMock->expects($this->once()) + ->method('create') + ->willReturn($shippingMock); - $this->shippingMock->expects($this->once()) + $shippingMock->expects($this->once()) ->method('setAddress') ->with($this->shippingAddressMock) ->willReturnSelf(); - $this->shippingMock->expects($this->once())->method('setMethod')->with($shippingMethod)->willReturnSelf(); + $shippingMock->expects($this->once()) + ->method('setMethod') + ->with($shippingMethod) + ->willReturnSelf(); $this->shippingAssignmentMock->expects($this->once()) ->method('setShipping') - ->with($this->shippingMock) + ->with($shippingMock) ->willReturnSelf(); $this->cartExtensionMock->expects($this->once()) @@ -233,38 +312,116 @@ private function setShippingAssignmentsMocks($shippingMethod) } /** - * @expectedException \Magento\Framework\Exception\StateException - * @expectedExceptionMessage The shipping address is missing. Set the address and try again. + * Save address with `StateException` + * + * @return void */ - public function testSaveAddressInformationIfShippingAddressNotSet() + public function testSaveAddressInformationIfShippingAddressNotSet(): void { - $cartId = 100; - $addressInformationMock = $this->createMock(\Magento\Checkout\Api\Data\ShippingInformationInterface::class); + $cartId = self::STUB_CART_ID; + /** @var ShippingInformationInterface|MockObject $addressInformationMock */ + $addressInformationMock = $this->createMock(ShippingInformationInterface::class); $addressInformationMock->expects($this->once()) ->method('getShippingAddress') ->willReturn($this->shippingAddressMock); - $this->shippingAddressMock->expects($this->once())->method('getCountryId')->willReturn(null); + $this->shippingAddressMock->expects($this->once()) + ->method('getCountryId') + ->willReturn(null); $this->quoteRepositoryMock->expects($this->once()) ->method('getActive') ->with($cartId) ->willReturn($this->quoteMock); - $this->quoteMock->expects($this->once())->method('getItemsCount')->willReturn(100); + $this->quoteMock->expects($this->once()) + ->method('getItemsCount') + ->willReturn(self::STUB_ITEMS_COUNT); + + $this->expectException(StateException::class); + $this->expectExceptionMessage('The shipping address is missing. Set the address and try again.'); + $this->model->saveAddressInformation($cartId, $addressInformationMock); + } + + /** + * Save address with `LocalizedException` + * + * @return void + */ + public function testSaveAddressInformationWithLocalizedException(): void + { + $cartId = self::STUB_CART_ID; + $carrierCode = self::STUB_CARRIER_CODE; + $shippingMethod = self::STUB_SHIPPING_METHOD; + $errorMessage = self::STUB_ERROR_MESSAGE; + $exception = new LocalizedException(__($errorMessage)); + /** @var ShippingInformationInterface|MockObject $addressInformationMock */ + $addressInformationMock = $this->createMock(ShippingInformationInterface::class); + + $this->addressValidatorMock->expects($this->exactly(2)) + ->method('validateForCart'); + + $this->quoteRepositoryMock->expects($this->once()) + ->method('getActive') + ->with($cartId) + ->willReturn($this->quoteMock); + + $addressInformationMock->expects($this->once()) + ->method('getShippingAddress') + ->willReturn($this->shippingAddressMock); + $addressInformationMock->expects($this->once()) + ->method('getShippingCarrierCode') + ->willReturn($carrierCode); + $addressInformationMock->expects($this->once()) + ->method('getShippingMethodCode') + ->willReturn($shippingMethod); + $billingAddress = $this->createMock(AddressInterface::class); + $addressInformationMock->expects($this->once()) + ->method('getBillingAddress') + ->willReturn($billingAddress); + + $this->shippingAddressMock->expects($this->once()) + ->method('getCountryId') + ->willReturn('USA'); + + $this->setShippingAssignmentsMocks($carrierCode . '_' . $shippingMethod); + + $this->quoteMock->expects($this->once()) + ->method('getItemsCount') + ->willReturn(self::STUB_ITEMS_COUNT); + $this->quoteMock->expects($this->once()) + ->method('setIsMultiShipping') + ->with(false) + ->willReturnSelf(); + $this->quoteMock->expects($this->once()) + ->method('setBillingAddress') + ->with($billingAddress) + ->willReturnSelf(); + + $this->quoteRepositoryMock->expects($this->once()) + ->method('save') + ->with($this->quoteMock) + ->willThrowException($exception); + + $this->expectException(LocalizedException::class); + $this->expectExceptionMessage( + 'The shipping information was unable to be saved. Error: "' . $errorMessage . '"' + ); $this->model->saveAddressInformation($cartId, $addressInformationMock); } /** - * @expectedException \Magento\Framework\Exception\InputException - * @expectedExceptionMessage The shipping information was unable to be saved. Verify the input data and try again. + * Save address with `InputException` + * + * @return void */ - public function testSaveAddressInformationIfCanNotSaveQuote() + public function testSaveAddressInformationIfCanNotSaveQuote(): void { - $cartId = 100; - $carrierCode = 'carrier_code'; - $shippingMethod = 'shipping_method'; - $addressInformationMock = $this->createMock(\Magento\Checkout\Api\Data\ShippingInformationInterface::class); + $cartId = self::STUB_CART_ID; + $carrierCode = self::STUB_CARRIER_CODE; + $shippingMethod = self::STUB_SHIPPING_METHOD; + /** @var ShippingInformationInterface|MockObject $addressInformationMock */ + $addressInformationMock = $this->createMock(ShippingInformationInterface::class); $this->addressValidatorMock->expects($this->exactly(2)) ->method('validateForCart'); @@ -277,38 +434,59 @@ public function testSaveAddressInformationIfCanNotSaveQuote() $addressInformationMock->expects($this->once()) ->method('getShippingAddress') ->willReturn($this->shippingAddressMock); - $addressInformationMock->expects($this->once())->method('getShippingCarrierCode')->willReturn($carrierCode); - $addressInformationMock->expects($this->once())->method('getShippingMethodCode')->willReturn($shippingMethod); + $addressInformationMock->expects($this->once()) + ->method('getShippingCarrierCode') + ->willReturn($carrierCode); + $addressInformationMock->expects($this->once()) + ->method('getShippingMethodCode') + ->willReturn($shippingMethod); - $billingAddress = $this->createMock(\Magento\Quote\Api\Data\AddressInterface::class); - $addressInformationMock->expects($this->once())->method('getBillingAddress')->willReturn($billingAddress); + $billingAddress = $this->createMock(AddressInterface::class); + $addressInformationMock->expects($this->once()) + ->method('getBillingAddress') + ->willReturn($billingAddress); - $this->shippingAddressMock->expects($this->once())->method('getCountryId')->willReturn('USA'); + $this->shippingAddressMock->expects($this->once()) + ->method('getCountryId') + ->willReturn('USA'); $this->setShippingAssignmentsMocks($carrierCode . '_' . $shippingMethod); - $this->quoteMock->expects($this->once())->method('getItemsCount')->willReturn(100); - $this->quoteMock->expects($this->once())->method('setIsMultiShipping')->with(false)->willReturnSelf(); - $this->quoteMock->expects($this->once())->method('setBillingAddress')->with($billingAddress)->willReturnSelf(); + $this->quoteMock->expects($this->once()) + ->method('getItemsCount') + ->willReturn(self::STUB_ITEMS_COUNT); + $this->quoteMock->expects($this->once()) + ->method('setIsMultiShipping') + ->with(false)->willReturnSelf(); + $this->quoteMock->expects($this->once()) + ->method('setBillingAddress') + ->with($billingAddress) + ->willReturnSelf(); $this->quoteRepositoryMock->expects($this->once()) ->method('save') ->with($this->quoteMock) ->willThrowException(new \Exception()); + $this->expectException(InputException::class); + $this->expectExceptionMessage( + 'The shipping information was unable to be saved. Verify the input data and try again.' + ); $this->model->saveAddressInformation($cartId, $addressInformationMock); } /** - * @expectedException \Magento\Framework\Exception\NoSuchEntityException - * @expectedExceptionMessage Carrier with such method not found: carrier_code, shipping_method + * Save address with `NoSuchEntityException` + * + * @return void */ - public function testSaveAddressInformationIfCarrierCodeIsInvalid() + public function testSaveAddressInformationIfCarrierCodeIsInvalid(): void { - $cartId = 100; - $carrierCode = 'carrier_code'; - $shippingMethod = 'shipping_method'; - $addressInformationMock = $this->createMock(\Magento\Checkout\Api\Data\ShippingInformationInterface::class); + $cartId = self::STUB_CART_ID; + $carrierCode = self::STUB_CARRIER_CODE; + $shippingMethod = self::STUB_SHIPPING_METHOD; + /** @var ShippingInformationInterface|MockObject $addressInformationMock */ + $addressInformationMock = $this->createMock(ShippingInformationInterface::class); $this->addressValidatorMock->expects($this->exactly(2)) ->method('validateForCart'); @@ -320,39 +498,70 @@ public function testSaveAddressInformationIfCarrierCodeIsInvalid() $addressInformationMock->expects($this->once()) ->method('getShippingAddress') ->willReturn($this->shippingAddressMock); - $addressInformationMock->expects($this->once())->method('getShippingCarrierCode')->willReturn($carrierCode); - $addressInformationMock->expects($this->once())->method('getShippingMethodCode')->willReturn($shippingMethod); + $addressInformationMock->expects($this->once()) + ->method('getShippingCarrierCode') + ->willReturn($carrierCode); + $addressInformationMock->expects($this->once()) + ->method('getShippingMethodCode') + ->willReturn($shippingMethod); - $billingAddress = $this->createMock(\Magento\Quote\Api\Data\AddressInterface::class); - $addressInformationMock->expects($this->once())->method('getBillingAddress')->willReturn($billingAddress); - $this->shippingAddressMock->expects($this->once())->method('getCountryId')->willReturn('USA'); + $billingAddress = $this->createMock(AddressInterface::class); + $addressInformationMock->expects($this->once()) + ->method('getBillingAddress') + ->willReturn($billingAddress); + $this->shippingAddressMock->expects($this->once()) + ->method('getCountryId') + ->willReturn('USA'); $this->setShippingAssignmentsMocks($carrierCode . '_' . $shippingMethod); - $this->quoteMock->expects($this->once())->method('getItemsCount')->willReturn(100); - $this->quoteMock->expects($this->once())->method('setIsMultiShipping')->with(false)->willReturnSelf(); - $this->quoteMock->expects($this->once())->method('setBillingAddress')->with($billingAddress)->willReturnSelf(); - $this->quoteMock->expects($this->once())->method('getShippingAddress')->willReturn($this->shippingAddressMock); + $this->quoteMock->expects($this->once()) + ->method('getItemsCount') + ->willReturn(self::STUB_ITEMS_COUNT); + $this->quoteMock->expects($this->once()) + ->method('setIsMultiShipping') + ->with(false) + ->willReturnSelf(); + $this->quoteMock->expects($this->once()) + ->method('setBillingAddress') + ->with($billingAddress) + ->willReturnSelf(); + $this->quoteMock->expects($this->once()) + ->method('getShippingAddress') + ->willReturn($this->shippingAddressMock); $this->quoteRepositoryMock->expects($this->once()) ->method('save') ->with($this->quoteMock); - $this->shippingAddressMock->expects($this->once())->method('getShippingMethod')->willReturn($shippingMethod); + $this->shippingAddressMock->expects($this->once()) + ->method('getShippingMethod') + ->willReturn($shippingMethod); $this->shippingAddressMock->expects($this->once()) ->method('getShippingRateByCode') ->with($shippingMethod) ->willReturn(false); + $this->expectException(NoSuchEntityException::class); + $this->expectExceptionMessage( + 'Carrier with such method not found: ' . self::STUB_CARRIER_CODE . ', ' . self::STUB_SHIPPING_METHOD + ); + $this->model->saveAddressInformation($cartId, $addressInformationMock); } - public function testSaveAddressInformation() + /** + * Save address info test + * + * @return void + */ + public function testSaveAddressInformation(): void { - $cartId = 100; - $carrierCode = 'carrier_code'; - $shippingMethod = 'shipping_method'; - $addressInformationMock = $this->createMock(\Magento\Checkout\Api\Data\ShippingInformationInterface::class); + $cartId = self::STUB_CART_ID; + $carrierCode = self::STUB_CARRIER_CODE; + $shippingMethod = self::STUB_SHIPPING_METHOD; + /** @var ShippingInformationInterface|MockObject $addressInformationMock */ + $addressInformationMock = $this->createMock(ShippingInformationInterface::class); $this->addressValidatorMock->expects($this->exactly(2)) ->method('validateForCart'); @@ -364,40 +573,62 @@ public function testSaveAddressInformation() $addressInformationMock->expects($this->once()) ->method('getShippingAddress') ->willReturn($this->shippingAddressMock); - $addressInformationMock->expects($this->once())->method('getShippingCarrierCode')->willReturn($carrierCode); - $addressInformationMock->expects($this->once())->method('getShippingMethodCode')->willReturn($shippingMethod); + $addressInformationMock->expects($this->once()) + ->method('getShippingCarrierCode') + ->willReturn($carrierCode); + $addressInformationMock->expects($this->once()) + ->method('getShippingMethodCode') + ->willReturn($shippingMethod); - $billingAddress = $this->createMock(\Magento\Quote\Api\Data\AddressInterface::class); - $addressInformationMock->expects($this->once())->method('getBillingAddress')->willReturn($billingAddress); - $this->shippingAddressMock->expects($this->once())->method('getCountryId')->willReturn('USA'); + $billingAddress = $this->createMock(AddressInterface::class); + $addressInformationMock->expects($this->once()) + ->method('getBillingAddress') + ->willReturn($billingAddress); + $this->shippingAddressMock->expects($this->once()) + ->method('getCountryId') + ->willReturn('USA'); $this->setShippingAssignmentsMocks($carrierCode . '_' . $shippingMethod); - $this->quoteMock->expects($this->once())->method('getItemsCount')->willReturn(100); - $this->quoteMock->expects($this->once())->method('setIsMultiShipping')->with(false)->willReturnSelf(); - $this->quoteMock->expects($this->once())->method('setBillingAddress')->with($billingAddress)->willReturnSelf(); - $this->quoteMock->expects($this->once())->method('getShippingAddress')->willReturn($this->shippingAddressMock); + $this->quoteMock->expects($this->once()) + ->method('getItemsCount') + ->willReturn(self::STUB_ITEMS_COUNT); + $this->quoteMock->expects($this->once()) + ->method('setIsMultiShipping') + ->with(false) + ->willReturnSelf(); + $this->quoteMock->expects($this->once()) + ->method('setBillingAddress') + ->with($billingAddress) + ->willReturnSelf(); + $this->quoteMock->expects($this->once()) + ->method('getShippingAddress') + ->willReturn($this->shippingAddressMock); $this->quoteRepositoryMock->expects($this->once()) ->method('save') ->with($this->quoteMock); - $this->shippingAddressMock->expects($this->once())->method('getShippingMethod')->willReturn($shippingMethod); + $this->shippingAddressMock->expects($this->once()) + ->method('getShippingMethod') + ->willReturn($shippingMethod); $this->shippingAddressMock->expects($this->once()) ->method('getShippingRateByCode') ->with($shippingMethod) ->willReturn('rates'); - $paymentDetailsMock = $this->createMock(\Magento\Checkout\Api\Data\PaymentDetailsInterface::class); - $this->paymentDetailsFactoryMock->expects($this->once())->method('create')->willReturn($paymentDetailsMock); + $paymentDetailsMock = $this->createMock(PaymentDetailsInterface::class); + $this->paymentDetailsFactoryMock->expects($this->once()) + ->method('create') + ->willReturn($paymentDetailsMock); - $paymentMethodMock = $this->createMock(\Magento\Quote\Api\Data\PaymentMethodInterface::class); + $paymentMethodMock = $this->createMock(PaymentMethodInterface::class); $this->paymentMethodManagementMock->expects($this->once()) ->method('getList') ->with($cartId) ->willReturn([$paymentMethodMock]); - $cartTotalsMock = $this->createMock(\Magento\Quote\Api\Data\TotalsInterface::class); + $cartTotalsMock = $this->createMock(TotalsInterface::class); $this->cartTotalsRepositoryMock->expects($this->once()) ->method('get') ->with($cartId) @@ -407,7 +638,9 @@ public function testSaveAddressInformation() ->method('setPaymentMethods') ->with([$paymentMethodMock]) ->willReturnSelf(); - $paymentDetailsMock->expects($this->once())->method('setTotals')->with()->willReturnSelf($cartTotalsMock); + $paymentDetailsMock->expects($this->once()) + ->method('setTotals') + ->willReturn($cartTotalsMock); $this->assertEquals( $paymentDetailsMock, From 08219e880c142e7bcbfbf6320d8422db5c6354de Mon Sep 17 00:00:00 2001 From: Sathish <srsathish92@gmail.com> Date: Wed, 19 Feb 2020 19:35:03 +0530 Subject: [PATCH 133/229] Fix #26917 Tax rate zip/post range check box alignment issue --- .../Magento/Tax/view/adminhtml/templates/rate/form.phtml | 2 +- .../backend/Magento_Tax/web/css/source/_module.less | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml index 304020c3af279..a28d794ed7f1f 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ ?> -<div class="entry-edit form-inline"> +<div class="entry-edit form-inline tax-rate-form"> <?= $block->getFormHtml() ?> </div> <?= $block->getChildHtml('form_after') ?> diff --git a/app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/_module.less b/app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/_module.less index f7ae4cb821fff..1084aa54bbb1a 100644 --- a/app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/_module.less +++ b/app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/_module.less @@ -25,3 +25,11 @@ font-size: 1.3rem; } } + +.tax-rate-form { + .admin__fieldset > .admin__field > .admin__field-control { + input[type='checkbox'] { + margin: 8px 0 0 0; + } + } +} From 103d43ff462c8d4d1efeb07be203408175c02457 Mon Sep 17 00:00:00 2001 From: Stas Puga <stas.puga@transoftgroup.com> Date: Wed, 19 Feb 2020 16:50:57 +0200 Subject: [PATCH 134/229] MC-24241: [MFTF Test] Uploading a Transactional Emails logo --- ...ploadTransactionEmailsImageActionGroup.xml | 30 ++++++++++++ .../TransactionalEmailsLogoUploadTest.xml | 46 +++++++++++-------- .../Mftf/Section/AdminDesignConfigSection.xml | 3 ++ ...FilterSearchResultsBySelectActionGroup.xml | 26 +++++++++++ .../Section/AdminDataGridFilterSection.xml | 1 + 5 files changed, 88 insertions(+), 18 deletions(-) create mode 100644 app/code/Magento/Email/Test/Mftf/ActionGroup/AdminUploadTransactionEmailsImageActionGroup.xml create mode 100644 app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsBySelectActionGroup.xml diff --git a/app/code/Magento/Email/Test/Mftf/ActionGroup/AdminUploadTransactionEmailsImageActionGroup.xml b/app/code/Magento/Email/Test/Mftf/ActionGroup/AdminUploadTransactionEmailsImageActionGroup.xml new file mode 100644 index 0000000000000..8bcc2c4ddaa92 --- /dev/null +++ b/app/code/Magento/Email/Test/Mftf/ActionGroup/AdminUploadTransactionEmailsImageActionGroup.xml @@ -0,0 +1,30 @@ +<?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="AdminUploadTransactionEmailsImageActionGroup"> + <annotations> + <description>Upload logo image for email</description> + </annotations> + <arguments> + <argument name="image" type="string" defaultValue="{{MagentoLogo.file}}"/> + <argument name="width" type="string"/> + <argument name="height" type="string"/> + </arguments> + + <conditionalClick selector="{{AdminDesignConfigSection.logoSectionHeader}}" dependentSelector="{{AdminDesignConfigSection.logoWrapperOpen}}" visible="true" stepKey="openTab"/> + <waitForElementVisible selector="{{AdminDesignConfigSection.logoImageAlt}}" stepKey="waitVisibleUploadLogo"/> + <attachFile selector="{{AdminDesignConfigSection.logoUpload}}" userInput="{{image}}" stepKey="attachLogo"/> + <waitForElementVisible selector="{{AdminDesignConfigSection.logoPreview}}" stepKey="waitingForLogoToUpload"/> + <seeElement selector="{{AdminDesignConfigSection.logoPreview}}" stepKey="LogoPreviewIsVisible"/> + <fillField selector="{{AdminDesignConfigSection.logoImageAlt}}" userInput="{{image}}" stepKey="fillFieldImageAlt"/> + <fillField selector="{{AdminDesignConfigSection.logoImageWidth}}" userInput="{{width}}" stepKey="fillFieldImageWidth"/> + <fillField selector="{{AdminDesignConfigSection.logoImageHeight}}" userInput="{{height}}" stepKey="fillFieldImageHeight"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Email/Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml b/app/code/Magento/Email/Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml index 9e1d9c5c3cdbb..88bfe995d4af1 100644 --- a/app/code/Magento/Email/Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml +++ b/app/code/Magento/Email/Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml @@ -11,33 +11,43 @@ <test name="TransactionalEmailsLogoUploadTest"> <annotations> <features value="Email"/> - <stories value="Email"/> - <title value="MC-13908: Uploading a Transactional Emails logo"/> + <stories value="Transactional Emails logo"/> + <title value="Uploading a Transactional Emails logo"/> <description value="Transactional Emails Logo should be able to be uploaded in the admin and previewed"/> <severity value="CRITICAL"/> - <testCaseId value="MC-13908"/> - <group value="LogoUpload"/> - <skip> - <issueId value="MC-18496"/> - </skip> + <testCaseId value="MC-27620"/> + <useCaseId value="MC-24241"/> + <group value="logoUpload"/> </annotations> - <!--Login to Admin Area--> <before> - <actionGroup ref="LoginAsAdmin" stepKey="loginToAdminArea"/> + <!--Login to Admin Area--> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> - <!--Logout from Admin Area--> <after> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <!-- Clear filter on Design Config Page --> + <amOnPage url="{{DesignConfigPage.url}}" stepKey="navigateToDesignConfigPage" /> + <waitForPageLoad stepKey="waitForPageLoadToViewDesignConfigPage"/> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> + <!--Logout from Admin Area--> + <actionGroup ref="logout" stepKey="logoutFromAdmin"/> </after> <!--Navigate to content->Design->Config page--> <amOnPage url="{{DesignConfigPage.url}}" stepKey="navigateToDesignConfigPage" /> - <waitForPageLoad stepKey="waitForPageloadToViewDesignConfigPage"/> - <click selector="{{AdminDesignConfigSection.scopeRow('3')}}" stepKey="editStoreView"/> + <waitForPageLoad stepKey="waitForPageLoadToViewDesignConfigPage"/> + <actionGroup ref="AdminGridFilterSearchResultsBySelectActionGroup" stepKey="filterThemeDesignConfiguration"> + <argument name="selectorAttr" value="store_id"/> + <argument name="store" value="{{_defaultStore.name}}"/> + </actionGroup> + <click selector="{{AdminDesignConfigSection.scopeRow('1')}}" stepKey="editStoreView"/> <waitForPageLoad stepKey="waitForPageLoadToOpenStoreViewEditPage"/> - <!--Click Upload logo in Transactional Emails and upload the image and preview it--> - <click selector="{{AdminDesignConfigSection.logoWrapperOpen}}" stepKey="openTab" /> - <attachFile selector="{{AdminDesignConfigSection.logoUpload}}" userInput="{{MagentoLogo.file}}" stepKey="attachLogo"/> - <wait time="5" stepKey="waitingForLogoToUpload" /> - <seeElement selector="{{AdminDesignConfigSection.logoPreview}}" stepKey="LogoPreviewIsVisible"/> + <!-- Upload Image --> + <actionGroup ref="AdminUploadTransactionEmailsImageActionGroup" stepKey="uploadImage"> + <argument name="width" value="200"/> + <argument name="height" value="100"/> + </actionGroup> + <!--Save Design Configuration --> + <actionGroup ref="ClickSaveButtonActionGroup" stepKey="saveDesignConfiguration"> + <argument name="message" value="You saved the configuration."/> + </actionGroup> </test> </tests> diff --git a/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml b/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml index 762537ba426f2..d073173bc98a1 100644 --- a/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml +++ b/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml @@ -26,6 +26,9 @@ <element name="logoUpload" type ="input" selector="[name='email_logo']" /> <element name="logoWrapperOpen" type ="text" selector="[data-index='email'] [data-state-collapsible ='closed']"/> <element name="logoPreview" type ="text" selector="[alt ='magento-logo.png']"/> + <element name="logoImageAlt" type ="text" selector="[name='email_logo_alt']"/> + <element name="logoImageWidth" type ="text" selector="[name='email_logo_width']"/> + <element name="logoImageHeight" type ="text" selector="[name='email_logo_height']"/> <element name="faviconArrow" type="button" selector="#ZmF2aWNvbg-- > .jstree-icon" /> <element name="checkIfFaviconArrowExpand" type="button" selector="//li[@id='ZmF2aWNvbg--' and contains(@class,'jstree-closed')]" /> <element name="storesArrow" type="button" selector="#ZmF2aWNvbi9zdG9yZXM- > .jstree-icon" /> diff --git a/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsBySelectActionGroup.xml b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsBySelectActionGroup.xml new file mode 100644 index 0000000000000..9ead85283c81f --- /dev/null +++ b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsBySelectActionGroup.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="AdminGridFilterSearchResultsBySelectActionGroup"> + <annotations> + <description>Filters an Admin Grid page using the provided Filter Selector and Search Value.</description> + </annotations> + <arguments> + <argument name="selectorAttr" type="string"/> + <argument name="store" type="string"/> + </arguments> + + <conditionalClick selector="{{AdminGridFilterControls.clearAll}}" dependentSelector="{{AdminGridFilterControls.clearAll}}" visible="true" stepKey="clearTheFiltersIfPresent"/> + <waitForPageLoad time="30" stepKey="waitForPageLoad"/> + <click selector="{{AdminGridFilterControls.filters}}" stepKey="clickOnFilters"/> + <selectOption selector="{{AdminDataGridFilterSection.selectFieldByNameAttrInGrid(selectorAttr)}}" userInput="{{store}}" stepKey="selectStoreView"/> + <click selector="{{AdminGridFilterControls.applyFilters}}" stepKey="clickOnApplyFilters"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridFilterSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridFilterSection.xml index ad8182c62ae68..a2b768af5587e 100644 --- a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridFilterSection.xml +++ b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridFilterSection.xml @@ -13,6 +13,7 @@ <element name="filterExpand" type="button" selector="//div[@class='admin__data-grid-header'][(not(ancestor::*[@class='sticky-header']) and not(contains(@style,'visibility: hidden'))) or (ancestor::*[@class='sticky-header' and not(contains(@style,'display: none'))])]//button[@data-action='grid-filter-expand']" /> <element name="inputFieldByNameAttr" type="input" selector="//*[@data-part='filter-form']//input[@name='{{inputNameAttr}}']" parameterized="true" /> <element name="inputFieldByNameAttrInGrid" type="input" selector="//*[@data-role='filter-form']//input[@name='{{inputNameAttr}}']" parameterized="true"/> + <element name="selectFieldByNameAttrInGrid" type="select" selector="//*[@data-part='filter-form']//select[@name='{{selectNameAttr}}']" parameterized="true"/> <element name="apply" type="button" selector="//*[@data-part='filter-form']//button[@data-action='grid-filter-apply']" /> <element name="clear" type="button" selector=".admin__data-grid-header [data-action='grid-filter-reset']" /> </section> From 5ebf4333d074b084ecbae7970b93a9f9304c57ef Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Wed, 19 Feb 2020 13:58:51 -0600 Subject: [PATCH 135/229] fixed constructor --- lib/internal/Magento/Framework/Storage/StorageProvider.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/internal/Magento/Framework/Storage/StorageProvider.php b/lib/internal/Magento/Framework/Storage/StorageProvider.php index afd5367f01a1d..d40c81352d1f6 100644 --- a/lib/internal/Magento/Framework/Storage/StorageProvider.php +++ b/lib/internal/Magento/Framework/Storage/StorageProvider.php @@ -68,6 +68,7 @@ public function __construct( ); } } + $this->filesystemFactory = $filesystemFactory; $this->storageFactory = $storageFactory; $this->adapterProvider = $adapterProvider; } From 8f833d5ac3b8652a24374057842bb77d4ea1eafd Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Wed, 19 Feb 2020 15:11:31 -0600 Subject: [PATCH 136/229] fixed constructor --- .../Magento/Framework/Storage/StorageProvider.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/internal/Magento/Framework/Storage/StorageProvider.php b/lib/internal/Magento/Framework/Storage/StorageProvider.php index d40c81352d1f6..bad0813f33002 100644 --- a/lib/internal/Magento/Framework/Storage/StorageProvider.php +++ b/lib/internal/Magento/Framework/Storage/StorageProvider.php @@ -91,15 +91,8 @@ public function get(string $storageName): StorageInterface ); } $adapter = $this->adapterProvider->create($config['adapter'], $config['options']); - $this->storage[$storageName] = $this->storageFactory->create( - [ - 'factory' => $this->filesystemFactory->create( - [ - 'adapter' => $adapter - ] - ) - ] - ); + $filesystem = $this->filesystemFactory->create(['adapter' => $adapter]); + $this->storage[$storageName] = $this->storageFactory->create(['filesystem' => $filesystem]); } else { throw new UnsupportedStorageException("No storage with name '$storageName' is declared"); } From d46349449dae69a5928d4fd825e8cfa7cb5c46a8 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Wed, 19 Feb 2020 17:12:09 -0600 Subject: [PATCH 137/229] updated composer.lock --- composer.lock | 1129 ++++++++++++++++++++++++++----------------------- 1 file changed, 593 insertions(+), 536 deletions(-) diff --git a/composer.lock b/composer.lock index 347a50bdf68e0..b7cd93a041e06 100644 --- a/composer.lock +++ b/composer.lock @@ -1,11 +1,95 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "3b292997ff7767b89b6e08b0c550db7d", + "content-hash": "61173873272efd012d0f1a4a6f42e8f0", "packages": [ + { + "name": "aws/aws-sdk-php", + "version": "3.133.18", + "source": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-php.git", + "reference": "6f41bb144c415e89726eaad2ccdf4d0a54d6e7cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/6f41bb144c415e89726eaad2ccdf4d0a54d6e7cf", + "reference": "6f41bb144c415e89726eaad2ccdf4d0a54d6e7cf", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^5.3.3|^6.2.1|^7.0", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4.1", + "mtdowling/jmespath.php": "^2.5", + "php": ">=5.5" + }, + "require-dev": { + "andrewsville/php-token-reflection": "^1.4", + "aws/aws-php-sns-message-validator": "~1.0", + "behat/behat": "~3.0", + "doctrine/cache": "~1.4", + "ext-dom": "*", + "ext-openssl": "*", + "ext-pcntl": "*", + "ext-sockets": "*", + "nette/neon": "^2.3", + "phpunit/phpunit": "^4.8.35|^5.4.3", + "psr/cache": "^1.0", + "psr/simple-cache": "^1.0", + "sebastian/comparator": "^1.2.3" + }, + "suggest": { + "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", + "doctrine/cache": "To use the DoctrineCacheAdapter", + "ext-curl": "To send requests using cURL", + "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", + "ext-sockets": "To use client-side monitoring" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Aws\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Amazon Web Services", + "homepage": "http://aws.amazon.com" + } + ], + "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", + "homepage": "http://aws.amazon.com/sdkforphp", + "keywords": [ + "amazon", + "aws", + "cloud", + "dynamodb", + "ec2", + "glacier", + "s3", + "sdk" + ], + "time": "2020-02-19T19:12:22+00:00" + }, { "name": "braintree/braintree_php", "version": "3.35.0", @@ -257,16 +341,16 @@ }, { "name": "composer/composer", - "version": "1.9.2", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb" + "reference": "1291a16ce3f48bfdeca39d64fca4875098af4d7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb", - "reference": "7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb", + "url": "https://api.github.com/repos/composer/composer/zipball/1291a16ce3f48bfdeca39d64fca4875098af4d7b", + "reference": "1291a16ce3f48bfdeca39d64fca4875098af4d7b", "shasum": "" }, "require": { @@ -333,7 +417,7 @@ "dependency", "package" ], - "time": "2020-01-14T15:30:32+00:00" + "time": "2020-02-04T11:58:49+00:00" }, { "name": "composer/semver", @@ -398,16 +482,16 @@ }, { "name": "composer/spdx-licenses", - "version": "1.5.2", + "version": "1.5.3", "source": { "type": "git", "url": "https://github.com/composer/spdx-licenses.git", - "reference": "7ac1e6aec371357df067f8a688c3d6974df68fa5" + "reference": "0c3e51e1880ca149682332770e25977c70cf9dae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/7ac1e6aec371357df067f8a688c3d6974df68fa5", - "reference": "7ac1e6aec371357df067f8a688c3d6974df68fa5", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/0c3e51e1880ca149682332770e25977c70cf9dae", + "reference": "0c3e51e1880ca149682332770e25977c70cf9dae", "shasum": "" }, "require": { @@ -454,7 +538,7 @@ "spdx", "validator" ], - "time": "2019-07-29T10:31:59+00:00" + "time": "2020-02-14T07:44:31+00:00" }, { "name": "composer/xdebug-handler", @@ -950,6 +1034,178 @@ ], "time": "2019-09-25T14:49:45+00:00" }, + { + "name": "league/flysystem", + "version": "1.0.64", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "d13c43dbd4b791f815215959105a008515d1a2e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/d13c43dbd4b791f815215959105a008515d1a2e0", + "reference": "d13c43dbd4b791f815215959105a008515d1a2e0", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7.26" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "time": "2020-02-05T18:14:17+00:00" + }, + { + "name": "league/flysystem-aws-s3-v3", + "version": "1.0.23", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", + "reference": "15b0cdeab7240bf8e8bffa85ae5275bbc3692bf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/15b0cdeab7240bf8e8bffa85ae5275bbc3692bf4", + "reference": "15b0cdeab7240bf8e8bffa85ae5275bbc3692bf4", + "shasum": "" + }, + "require": { + "aws/aws-sdk-php": "^3.0.0", + "league/flysystem": "^1.0.40", + "php": ">=5.5.0" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "~1.0.1", + "phpspec/phpspec": "^2.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\AwsS3v3\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Flysystem adapter for the AWS S3 SDK v3.x", + "time": "2019-06-05T17:18:29+00:00" + }, + { + "name": "league/flysystem-azure-blob-storage", + "version": "0.1.6", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-azure-blob-storage.git", + "reference": "97215345f3c42679299ba556a4d16d4847ee7f6d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-azure-blob-storage/zipball/97215345f3c42679299ba556a4d16d4847ee7f6d", + "reference": "97215345f3c42679299ba556a4d16d4847ee7f6d", + "shasum": "" + }, + "require": { + "guzzlehttp/psr7": "^1.5", + "league/flysystem": "^1.0", + "microsoft/azure-storage-blob": "^1.1", + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\AzureBlobStorage\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "time": "2019-06-07T20:42:16+00:00" + }, { "name": "magento/composer", "version": "1.6.x-dev", @@ -1112,6 +1368,94 @@ ], "time": "2019-11-26T15:09:40+00:00" }, + { + "name": "microsoft/azure-storage-blob", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/Azure/azure-storage-blob-php.git", + "reference": "6a333cd28a3742c3e99e79042dc6510f9f917919" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Azure/azure-storage-blob-php/zipball/6a333cd28a3742c3e99e79042dc6510f9f917919", + "reference": "6a333cd28a3742c3e99e79042dc6510f9f917919", + "shasum": "" + }, + "require": { + "microsoft/azure-storage-common": "~1.4", + "php": ">=5.6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "MicrosoftAzure\\Storage\\Blob\\": "src/Blob" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Azure Storage PHP Client Library", + "email": "dmsh@microsoft.com" + } + ], + "description": "This project provides a set of PHP client libraries that make it easy to access Microsoft Azure Storage Blob APIs.", + "keywords": [ + "azure", + "blob", + "php", + "sdk", + "storage" + ], + "time": "2020-01-02T07:18:59+00:00" + }, + { + "name": "microsoft/azure-storage-common", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/Azure/azure-storage-common-php.git", + "reference": "be4df800761d0d0fa91a9460c7f42517197d57a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Azure/azure-storage-common-php/zipball/be4df800761d0d0fa91a9460c7f42517197d57a0", + "reference": "be4df800761d0d0fa91a9460c7f42517197d57a0", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "~6.0", + "php": ">=5.6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "MicrosoftAzure\\Storage\\Common\\": "src/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Azure Storage PHP Client Library", + "email": "dmsh@microsoft.com" + } + ], + "description": "This project provides a set of common code shared by Azure Storage Blob, Table, Queue and File PHP client libraries.", + "keywords": [ + "azure", + "common", + "php", + "sdk", + "storage" + ], + "time": "2020-01-02T07:15:54+00:00" + }, { "name": "monolog/monolog", "version": "1.25.3", @@ -1190,6 +1534,63 @@ ], "time": "2019-12-20T14:15:16+00:00" }, + { + "name": "mtdowling/jmespath.php", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "52168cb9472de06979613d365c7f1ab8798be895" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/52168cb9472de06979613d365c7f1ab8798be895", + "reference": "52168cb9472de06979613d365c7f1ab8798be895", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "symfony/polyfill-mbstring": "^1.4" + }, + "require-dev": { + "composer/xdebug-handler": "^1.2", + "phpunit/phpunit": "^4.8.36|^7.5.15" + }, + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-4": { + "JmesPath\\": "src/" + }, + "files": [ + "src/JmesPath.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "time": "2019-12-30T18:03:34+00:00" + }, { "name": "paragonie/random_compat", "version": "v9.99.99", @@ -1850,6 +2251,11 @@ "MIT" ], "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + }, { "name": "Marijn Huizendveld", "email": "marijn.huizendveld@gmail.com" @@ -1857,11 +2263,6 @@ { "name": "Thibaud Fabre", "email": "thibaud@aztech.io" - }, - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" } ], "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", @@ -1970,16 +2371,16 @@ }, { "name": "seld/phar-utils", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "84715761c35808076b00908a20317a3a8a67d17e" + "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/84715761c35808076b00908a20317a3a8a67d17e", - "reference": "84715761c35808076b00908a20317a3a8a67d17e", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8800503d56b9867d43d9c303b9cbcc26016e82f0", + "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0", "shasum": "" }, "require": { @@ -2008,22 +2409,22 @@ ], "description": "PHAR file format utilities, for when PHP phars you up", "keywords": [ - "phra" + "phar" ], - "time": "2020-01-13T10:41:09+00:00" + "time": "2020-02-14T15:25:33+00:00" }, { "name": "symfony/console", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f" + "reference": "f512001679f37e6a042b51897ed24a2f05eba656" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f", - "reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f", + "url": "https://api.github.com/repos/symfony/console/zipball/f512001679f37e6a042b51897ed24a2f05eba656", + "reference": "f512001679f37e6a042b51897ed24a2f05eba656", "shasum": "" }, "require": { @@ -2086,11 +2487,11 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2020-01-10T21:54:01+00:00" + "time": "2020-01-25T12:44:29+00:00" }, { "name": "symfony/css-selector", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -2143,7 +2544,7 @@ }, { "name": "symfony/event-dispatcher", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -2271,7 +2672,7 @@ }, { "name": "symfony/filesystem", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -2321,7 +2722,7 @@ }, { "name": "symfony/finder", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -2370,16 +2771,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", "shasum": "" }, "require": { @@ -2391,7 +2792,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -2424,20 +2825,20 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", "shasum": "" }, "require": { @@ -2449,7 +2850,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -2483,20 +2884,20 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f" + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/5e66a0fa1070bf46bec4bea7962d285108edd675", + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675", "shasum": "" }, "require": { @@ -2505,7 +2906,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -2541,11 +2942,11 @@ "portable", "shim" ], - "time": "2019-11-27T16:25:15+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/process", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -5098,16 +5499,16 @@ }, { "name": "allure-framework/allure-php-api", - "version": "1.1.6", + "version": "1.1.7", "source": { "type": "git", "url": "https://github.com/allure-framework/allure-php-commons.git", - "reference": "2c62a70d60eca190253a6b80e9aa4c2ebc2e6e7f" + "reference": "243c9a2259b60c1b7a9d298d4fb3fc72b4f64c18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/allure-framework/allure-php-commons/zipball/2c62a70d60eca190253a6b80e9aa4c2ebc2e6e7f", - "reference": "2c62a70d60eca190253a6b80e9aa4c2ebc2e6e7f", + "url": "https://api.github.com/repos/allure-framework/allure-php-commons/zipball/243c9a2259b60c1b7a9d298d4fb3fc72b4f64c18", + "reference": "243c9a2259b60c1b7a9d298d4fb3fc72b4f64c18", "shasum": "" }, "require": { @@ -5147,7 +5548,7 @@ "php", "report" ], - "time": "2020-01-09T10:26:09+00:00" + "time": "2020-02-05T16:43:19+00:00" }, { "name": "allure-framework/allure-phpunit", @@ -5199,90 +5600,6 @@ ], "time": "2017-11-03T13:08:21+00:00" }, - { - "name": "aws/aws-sdk-php", - "version": "3.133.8", - "source": { - "type": "git", - "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "c564fcccd5fc7b5e8514d1cbe35558be1e3a11cd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c564fcccd5fc7b5e8514d1cbe35558be1e3a11cd", - "reference": "c564fcccd5fc7b5e8514d1cbe35558be1e3a11cd", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-pcre": "*", - "ext-simplexml": "*", - "guzzlehttp/guzzle": "^5.3.3|^6.2.1|^7.0", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4.1", - "mtdowling/jmespath.php": "^2.5", - "php": ">=5.5" - }, - "require-dev": { - "andrewsville/php-token-reflection": "^1.4", - "aws/aws-php-sns-message-validator": "~1.0", - "behat/behat": "~3.0", - "doctrine/cache": "~1.4", - "ext-dom": "*", - "ext-openssl": "*", - "ext-pcntl": "*", - "ext-sockets": "*", - "nette/neon": "^2.3", - "phpunit/phpunit": "^4.8.35|^5.4.3", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", - "sebastian/comparator": "^1.2.3" - }, - "suggest": { - "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", - "doctrine/cache": "To use the DoctrineCacheAdapter", - "ext-curl": "To send requests using cURL", - "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", - "ext-sockets": "To use client-side monitoring" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "Aws\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Amazon Web Services", - "homepage": "http://aws.amazon.com" - } - ], - "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", - "homepage": "http://aws.amazon.com/sdkforphp", - "keywords": [ - "amazon", - "aws", - "cloud", - "dynamodb", - "ec2", - "glacier", - "s3", - "sdk" - ], - "time": "2020-02-05T19:12:47+00:00" - }, { "name": "behat/gherkin", "version": "v4.6.0", @@ -5604,80 +5921,43 @@ }, { "name": "consolidation/annotated-command", - "version": "2.12.0", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "512a2e54c98f3af377589de76c43b24652bcb789" + "reference": "33e472d3cceb0f22a527d13ccfa3f76c4d21c178" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/512a2e54c98f3af377589de76c43b24652bcb789", - "reference": "512a2e54c98f3af377589de76c43b24652bcb789", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/33e472d3cceb0f22a527d13ccfa3f76c4d21c178", + "reference": "33e472d3cceb0f22a527d13ccfa3f76c4d21c178", "shasum": "" }, "require": { - "consolidation/output-formatters": "^3.4", - "php": ">=5.4.5", - "psr/log": "^1", - "symfony/console": "^2.8|^3|^4", - "symfony/event-dispatcher": "^2.5|^3|^4", - "symfony/finder": "^2.5|^3|^4" + "consolidation/output-formatters": "^4.1", + "php": ">=7.1.3", + "psr/log": "^1|^2", + "symfony/console": "^4|^5", + "symfony/event-dispatcher": "^4|^5", + "symfony/finder": "^4|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", - "php-coveralls/php-coveralls": "^1", - "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "^2.7" - }, - "type": "library", - "extra": { - "scenarios": { - "symfony4": { - "require": { - "symfony/console": "^4.0" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - }, - "scenario-options": { - "create-lockfile": "false" - } - }, - "phpunit4": { - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } + "php-coveralls/php-coveralls": "^1", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^3" + }, + "type": "library", + "extra": { + "scenarios": { + "symfony4": { + "require": { + "symfony/console": "^4.0" } } }, "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -5696,7 +5976,7 @@ } ], "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2019-03-08T16:55:03+00:00" + "time": "2020-02-07T03:35:30+00:00" }, { "name": "consolidation/config", @@ -5781,74 +6061,33 @@ }, { "name": "consolidation/log", - "version": "1.1.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/consolidation/log.git", - "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a" + "reference": "446f804476db4f73957fa4bcb66ab2facf5397ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/log/zipball/b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", - "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", + "url": "https://api.github.com/repos/consolidation/log/zipball/446f804476db4f73957fa4bcb66ab2facf5397ff", + "reference": "446f804476db4f73957fa4bcb66ab2facf5397ff", "shasum": "" }, "require": { "php": ">=5.4.5", "psr/log": "^1.0", - "symfony/console": "^2.8|^3|^4" + "symfony/console": "^4|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", "php-coveralls/php-coveralls": "^1", "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "^2" + "squizlabs/php_codesniffer": "^3" }, "type": "library", "extra": { - "scenarios": { - "symfony4": { - "require": { - "symfony/console": "^4.0" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - } - }, - "phpunit4": { - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - } - } - }, "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -5867,34 +6106,35 @@ } ], "description": "Improved Psr-3 / Psr\\Log logger based on Symfony Console components.", - "time": "2019-01-01T17:30:51+00:00" + "time": "2020-02-07T01:22:27+00:00" }, { "name": "consolidation/output-formatters", - "version": "3.5.0", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/consolidation/output-formatters.git", - "reference": "99ec998ffb697e0eada5aacf81feebfb13023605" + "reference": "eae721c3a916707c40d4390efbf48d4c799709cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/99ec998ffb697e0eada5aacf81feebfb13023605", - "reference": "99ec998ffb697e0eada5aacf81feebfb13023605", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/eae721c3a916707c40d4390efbf48d4c799709cc", + "reference": "eae721c3a916707c40d4390efbf48d4c799709cc", "shasum": "" }, "require": { "dflydev/dot-access-data": "^1.1.0", - "php": ">=5.4.0", - "symfony/console": "^2.8|^3|^4", - "symfony/finder": "^2.5|^3|^4" + "php": ">=7.1.3", + "symfony/console": "^4|^5", + "symfony/finder": "^4|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", "php-coveralls/php-coveralls": "^1", - "phpunit/phpunit": "^5.7.27", - "squizlabs/php_codesniffer": "^2.7", - "symfony/var-dumper": "^2.8|^3|^4", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^3", + "symfony/var-dumper": "^4", + "symfony/yaml": "^4", "victorjonsson/markdowndocs": "^1.3" }, "suggest": { @@ -5906,50 +6146,11 @@ "symfony4": { "require": { "symfony/console": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^6" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - }, - "symfony3": { - "require": { - "symfony/console": "^3.4", - "symfony/finder": "^3.4", - "symfony/var-dumper": "^3.4" - }, - "config": { - "platform": { - "php": "5.6.32" - } - } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - }, - "scenario-options": { - "create-lockfile": "false" } } }, "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -5968,30 +6169,30 @@ } ], "description": "Format text by applying transformations provided by plug-in formatters.", - "time": "2019-05-30T23:16:01+00:00" + "time": "2020-02-07T03:22:30+00:00" }, { "name": "consolidation/robo", - "version": "1.4.11", + "version": "1.4.12", "source": { "type": "git", "url": "https://github.com/consolidation/Robo.git", - "reference": "5fa1d901776a628167a325baa9db95d8edf13a80" + "reference": "eb45606f498b3426b9a98b7c85e300666a968e51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/Robo/zipball/5fa1d901776a628167a325baa9db95d8edf13a80", - "reference": "5fa1d901776a628167a325baa9db95d8edf13a80", + "url": "https://api.github.com/repos/consolidation/Robo/zipball/eb45606f498b3426b9a98b7c85e300666a968e51", + "reference": "eb45606f498b3426b9a98b7c85e300666a968e51", "shasum": "" }, "require": { - "consolidation/annotated-command": "^2.11.0", - "consolidation/config": "^1.2", - "consolidation/log": "~1", - "consolidation/output-formatters": "^3.1.13", - "consolidation/self-update": "^1", - "grasmash/yaml-expander": "^1.3", - "league/container": "^2.2", + "consolidation/annotated-command": "^2.11.0|^4.1", + "consolidation/config": "^1.2.1", + "consolidation/log": "^1.1.1|^2", + "consolidation/output-formatters": "^3.1.13|^4.1", + "consolidation/self-update": "^1.1.5", + "grasmash/yaml-expander": "^1.4", + "league/container": "^2.4.1", "php": ">=5.5.0", "symfony/console": "^2.8|^3|^4", "symfony/event-dispatcher": "^2.5|^3|^4", @@ -6003,20 +6204,13 @@ "codegyre/robo": "< 1.0" }, "require-dev": { - "codeception/aspect-mock": "^1|^2.1.1", - "codeception/base": "^2.3.7", - "codeception/verify": "^0.3.2", "g1a/composer-test-scenarios": "^3", - "goaop/framework": "~2.1.2", - "goaop/parser-reflection": "^1.1.0", "natxet/cssmin": "3.0.4", - "nikic/php-parser": "^3.1.5", - "patchwork/jsqueeze": "~2", + "patchwork/jsqueeze": "^2", "pear/archive_tar": "^1.4.4", "php-coveralls/php-coveralls": "^1", - "phpunit/php-code-coverage": "~2|~4", - "sebastian/comparator": "^1.2.4", - "squizlabs/php_codesniffer": "^2.8" + "phpunit/phpunit": "^5.7.27", + "squizlabs/php_codesniffer": "^3" }, "suggest": { "henrikbjorn/lurker": "For monitoring filesystem changes in taskWatch", @@ -6044,8 +6238,11 @@ "require": { "symfony/console": "^2.8" }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, "remove": [ - "goaop/framework" + "php-coveralls/php-coveralls" ], "config": { "platform": { @@ -6058,7 +6255,7 @@ } }, "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -6077,7 +6274,7 @@ } ], "description": "Modern task runner", - "time": "2019-10-29T15:50:02+00:00" + "time": "2020-02-18T17:31:26+00:00" }, { "name": "consolidation/self-update", @@ -7189,90 +7386,6 @@ ], "time": "2017-05-10T09:20:27+00:00" }, - { - "name": "league/flysystem", - "version": "1.0.63", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8132daec326565036bc8e8d1876f77ec183a7bd6", - "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6", - "shasum": "" - }, - "require": { - "ext-fileinfo": "*", - "php": ">=5.5.9" - }, - "conflict": { - "league/flysystem-sftp": "<1.0.6" - }, - "require-dev": { - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.10" - }, - "suggest": { - "ext-fileinfo": "Required for MimeType", - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Flysystem\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Filesystem abstraction: Many filesystems, one API.", - "keywords": [ - "Cloud Files", - "WebDAV", - "abstraction", - "aws", - "cloud", - "copy.com", - "dropbox", - "file systems", - "files", - "filesystem", - "filesystems", - "ftp", - "rackspace", - "remote", - "s3", - "sftp", - "storage" - ], - "time": "2020-01-04T16:30:31+00:00" - }, { "name": "lusitanian/oauth", "version": "v0.8.11", @@ -7510,63 +7623,6 @@ "homepage": "http://vfs.bovigo.org/", "time": "2019-10-30T15:31:00+00:00" }, - { - "name": "mtdowling/jmespath.php", - "version": "2.5.0", - "source": { - "type": "git", - "url": "https://github.com/jmespath/jmespath.php.git", - "reference": "52168cb9472de06979613d365c7f1ab8798be895" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/52168cb9472de06979613d365c7f1ab8798be895", - "reference": "52168cb9472de06979613d365c7f1ab8798be895", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "symfony/polyfill-mbstring": "^1.4" - }, - "require-dev": { - "composer/xdebug-handler": "^1.2", - "phpunit/phpunit": "^4.8.36|^7.5.15" - }, - "bin": [ - "bin/jp.php" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-4": { - "JmesPath\\": "src/" - }, - "files": [ - "src/JmesPath.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Declaratively specify how to extract elements from a JSON document", - "keywords": [ - "json", - "jsonpath" - ], - "time": "2019-12-30T18:03:34+00:00" - }, { "name": "mustache/mustache", "version": "v2.13.0", @@ -7856,16 +7912,16 @@ }, { "name": "php-webdriver/webdriver", - "version": "1.8.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/php-webdriver/php-webdriver.git", - "reference": "3e33ee3b8a688d719c55acdd7c6788e3006e1d3e" + "reference": "262ea0d209c292e0330be1041424887bbbffef04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/3e33ee3b8a688d719c55acdd7c6788e3006e1d3e", - "reference": "3e33ee3b8a688d719c55acdd7c6788e3006e1d3e", + "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/262ea0d209c292e0330be1041424887bbbffef04", + "reference": "262ea0d209c292e0330be1041424887bbbffef04", "shasum": "" }, "require": { @@ -7897,12 +7953,12 @@ } }, "autoload": { - "files": [ - "lib/Exception/TimeoutException.php" - ], "psr-4": { "Facebook\\WebDriver\\": "lib/" - } + }, + "files": [ + "lib/Exception/TimeoutException.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -7917,7 +7973,7 @@ "selenium", "webdriver" ], - "time": "2020-02-10T15:04:25+00:00" + "time": "2020-02-17T08:14:38+00:00" }, { "name": "phpcollection/phpcollection", @@ -8079,41 +8135,38 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + "reference": "a48807183a4b819072f26e347bbd0b5199a9d15f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/a48807183a4b819072f26e347bbd0b5199a9d15f", + "reference": "a48807183a4b819072f26e347bbd0b5199a9d15f", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -8124,10 +8177,14 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-12-28T18:55:12+00:00" + "time": "2020-02-09T09:16:15+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -8364,16 +8421,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.7", + "version": "0.12.11", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "07fa7958027fd98c567099bbcda5d6a0f2ec5197" + "reference": "ca5f2b7cf81c6d8fba74f9576970399c5817e03b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/07fa7958027fd98c567099bbcda5d6a0f2ec5197", - "reference": "07fa7958027fd98c567099bbcda5d6a0f2ec5197", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ca5f2b7cf81c6d8fba74f9576970399c5817e03b", + "reference": "ca5f2b7cf81c6d8fba74f9576970399c5817e03b", "shasum": "" }, "require": { @@ -8399,7 +8456,7 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2020-01-20T21:59:06+00:00" + "time": "2020-02-16T14:00:29+00:00" }, { "name": "phpunit/php-code-coverage", @@ -9593,7 +9650,7 @@ }, { "name": "symfony/browser-kit", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", @@ -9652,7 +9709,7 @@ }, { "name": "symfony/config", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/config.git", @@ -9716,16 +9773,16 @@ }, { "name": "symfony/dependency-injection", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "6faf589e1f6af78692aed3ab6b3c336c58d5d83c" + "reference": "ec60a7d12f5e8ab0f99456adce724717d9c1784a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6faf589e1f6af78692aed3ab6b3c336c58d5d83c", - "reference": "6faf589e1f6af78692aed3ab6b3c336c58d5d83c", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/ec60a7d12f5e8ab0f99456adce724717d9c1784a", + "reference": "ec60a7d12f5e8ab0f99456adce724717d9c1784a", "shasum": "" }, "require": { @@ -9785,11 +9842,11 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2020-01-21T07:39:36+00:00" + "time": "2020-01-31T09:49:27+00:00" }, { "name": "symfony/dom-crawler", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", @@ -9850,16 +9907,16 @@ }, { "name": "symfony/http-foundation", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "c33998709f3fe9b8e27e0277535b07fbf6fde37a" + "reference": "491a20dfa87e0b3990170593bc2de0bb34d828a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/c33998709f3fe9b8e27e0277535b07fbf6fde37a", - "reference": "c33998709f3fe9b8e27e0277535b07fbf6fde37a", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/491a20dfa87e0b3990170593bc2de0bb34d828a5", + "reference": "491a20dfa87e0b3990170593bc2de0bb34d828a5", "shasum": "" }, "require": { @@ -9901,11 +9958,11 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2020-01-04T13:00:46+00:00" + "time": "2020-01-31T09:11:17+00:00" }, { "name": "symfony/mime", - "version": "v5.0.3", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", @@ -9967,7 +10024,7 @@ }, { "name": "symfony/options-resolver", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", @@ -10021,22 +10078,22 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46" + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6f9c239e61e1b0c9229a28ff89a812dc449c3d46", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6842f1a39cf7d580655688069a03dd7cd83d244a", + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a", "shasum": "" }, "require": { "php": ">=5.3.3", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.9" + "symfony/polyfill-php72": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -10044,7 +10101,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -10079,20 +10136,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-17T12:01:36+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "af23c7bb26a73b850840823662dda371484926c4" + "reference": "419c4940024c30ccc033650373a1fe13890d3255" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/af23c7bb26a73b850840823662dda371484926c4", - "reference": "af23c7bb26a73b850840823662dda371484926c4", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/419c4940024c30ccc033650373a1fe13890d3255", + "reference": "419c4940024c30ccc033650373a1fe13890d3255", "shasum": "" }, "require": { @@ -10102,7 +10159,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -10138,20 +10195,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038" + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", "shasum": "" }, "require": { @@ -10160,7 +10217,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -10193,11 +10250,11 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/stopwatch", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", @@ -10247,7 +10304,7 @@ }, { "name": "symfony/yaml", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", @@ -10437,16 +10494,16 @@ }, { "name": "webmozart/assert", - "version": "1.6.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", "shasum": "" }, "require": { @@ -10481,7 +10538,7 @@ "check", "validate" ], - "time": "2019-11-24T13:36:37+00:00" + "time": "2020-02-14T12:15:55+00:00" }, { "name": "weew/helpers-array", From 2668433a244ed2e31983fabd2b50be7b45cd6bdb Mon Sep 17 00:00:00 2001 From: "vadim.malesh" <engcom-vendorworker-charlie@adobe.com> Date: Thu, 20 Feb 2020 09:39:49 +0200 Subject: [PATCH 138/229] requested changes --- .../Checkout/Model/ShippingInformationManagement.php | 8 ++++---- .../Unit/Model/ShippingInformationManagementTest.php | 10 ---------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/app/code/Magento/Checkout/Model/ShippingInformationManagement.php b/app/code/Magento/Checkout/Model/ShippingInformationManagement.php index 7a2a7d09653fc..f2c87b545a47b 100644 --- a/app/code/Magento/Checkout/Model/ShippingInformationManagement.php +++ b/app/code/Magento/Checkout/Model/ShippingInformationManagement.php @@ -30,7 +30,7 @@ use Psr\Log\LoggerInterface as Logger; /** - * @inheritdoc + * Class checkout shipping information management * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ @@ -224,11 +224,11 @@ public function saveAddressInformation( /** * Validate shipping address * - * @param AddressInterface $address + * @param AddressInterface|null $address * @return void * @throws StateException */ - private function validateAddress(AddressInterface $address): void + private function validateAddress(?AddressInterface $address): void { if (!$address || !$address->getCountryId()) { throw new StateException(__('The shipping address is missing. Set the address and try again.')); @@ -244,7 +244,7 @@ private function validateAddress(AddressInterface $address): void */ protected function validateQuote(Quote $quote): void { - if (!$quote->getItemsCount()) { + if (0 === $quote->getItemsCount()) { throw new InputException( __('The shipping method can\'t be set for an empty cart. Add an item to cart and try again.') ); diff --git a/app/code/Magento/Checkout/Test/Unit/Model/ShippingInformationManagementTest.php b/app/code/Magento/Checkout/Test/Unit/Model/ShippingInformationManagementTest.php index 86d5ca75fc58f..3b0b809e36580 100644 --- a/app/code/Magento/Checkout/Test/Unit/Model/ShippingInformationManagementTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Model/ShippingInformationManagementTest.php @@ -43,36 +43,26 @@ class ShippingInformationManagementTest extends TestCase { /** * Stub cart id - * - * @var int */ private const STUB_CART_ID = 100; /** * Stub items count - * - * @var int */ private const STUB_ITEMS_COUNT = 99; /** * Stub carrier code - * - * @var string */ private const STUB_CARRIER_CODE = 'carrier_code'; /** * Stub shipping method - * - * @var string */ private const STUB_SHIPPING_METHOD = 'shipping_method'; /** * Stub error message - * - * @var string */ private const STUB_ERROR_MESSAGE = 'error message'; From 82e4623dfdd5a2bdb99952d9a53a2b1981c1974c Mon Sep 17 00:00:00 2001 From: Sathish <srsathish92@gmail.com> Date: Thu, 20 Feb 2020 13:44:58 +0530 Subject: [PATCH 139/229] Static test fix --- .../Magento/backend/Magento_Tax/web/css/source/_module.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/_module.less b/app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/_module.less index 1084aa54bbb1a..21100deb8e027 100644 --- a/app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/_module.less +++ b/app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/_module.less @@ -14,7 +14,7 @@ .block.mselect-list.paginated { .admin__action-multiselect-search-wrap { - border:1px solid @color-gray80; + border: 1px solid @color-gray80; border-bottom: none; border-radius: 3px; margin: 0; From a6e0b3ebc8d8ac0cf8530f3b3a73f0e49af08e24 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" <engcom-vendorworker-charlie@adobe.com> Date: Thu, 20 Feb 2020 10:35:48 +0200 Subject: [PATCH 140/229] fix integration tests --- .../GuestShippingInformationManagementTest.php | 16 +++++++++++++--- .../Api/ShippingInformationManagementTest.php | 16 +++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Api/GuestShippingInformationManagementTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Api/GuestShippingInformationManagementTest.php index 50b1256c0f124..8018f76567d16 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Api/GuestShippingInformationManagementTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Api/GuestShippingInformationManagementTest.php @@ -11,6 +11,7 @@ use Magento\Checkout\Api\Data\ShippingInformationInterfaceFactory; use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\Exception\InputException; use Magento\Quote\Api\CartRepositoryInterface; use Magento\Quote\Api\Data\ShippingAssignmentInterface; use Magento\TestFramework\Helper\Bootstrap; @@ -53,6 +54,9 @@ class GuestShippingInformationManagementTest extends TestCase */ private $maskFactory; + /** + * @inheritdoc + */ protected function setUp() { $objectManager = Bootstrap::getObjectManager(); @@ -73,10 +77,8 @@ protected function setUp() * @magentoDataFixture Magento/Sales/_files/quote.php * @magentoDataFixture Magento/Customer/_files/customer_with_addresses.php * @dataProvider getAddressesVariation - * @expectedException \Magento\Framework\Exception\InputException - * @expectedExceptionMessage The shipping information was unable to be saved. Verify the input data and try again. */ - public function testDifferentAddresses(bool $swapShipping) + public function testDifferentAddresses(bool $swapShipping): void { $carts = $this->cartRepo->getList( $this->searchCriteria->addFilter('reserved_order_id', 'test01')->create() @@ -107,6 +109,14 @@ public function testDifferentAddresses(bool $swapShipping) /** @var QuoteIdMask $idMask */ $idMask = $this->maskFactory->create(); $idMask->load($cart->getId(), 'quote_id'); + + $this->expectExceptionMessage( + sprintf( + 'The shipping information was unable to be saved. Error: "Invalid customer address id %s"', + $address->getCustomerAddressId() + ) + ); + $this->expectException(InputException::class); $this->management->saveAddressInformation($idMask->getMaskedId(), $shippingInformation); } diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Api/ShippingInformationManagementTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Api/ShippingInformationManagementTest.php index 7440fb7fd3d98..a0ccc5014bc19 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Api/ShippingInformationManagementTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Api/ShippingInformationManagementTest.php @@ -13,6 +13,7 @@ use Magento\Quote\Api\CartRepositoryInterface; use Magento\Quote\Api\Data\ShippingAssignmentInterface; use Magento\TestFramework\Helper\Bootstrap; +use Magento\Framework\Exception\InputException; use PHPUnit\Framework\TestCase; /** @@ -40,6 +41,9 @@ class ShippingInformationManagementTest extends TestCase */ private $shippingFactory; + /** + * @inheritdoc + */ protected function setUp() { $objectManager = Bootstrap::getObjectManager(); @@ -58,10 +62,8 @@ protected function setUp() * @magentoDataFixture Magento/Sales/_files/quote_with_customer.php * @magentoDataFixture Magento/Customer/_files/customer_with_addresses.php * @dataProvider getAddressesVariation - * @expectedException \Magento\Framework\Exception\InputException - * @expectedExceptionMessage The shipping information was unable to be saved. Verify the input data and try again. */ - public function testDifferentAddresses(bool $swapShipping) + public function testDifferentAddresses(bool $swapShipping): void { $cart = $this->cartRepo->getForCustomer(1); $otherCustomer = $this->customerRepo->get('customer_with_addresses@test.com'); @@ -86,6 +88,14 @@ public function testDifferentAddresses(bool $swapShipping) $shippingInformation->setBillingAddress($billingAddress); $shippingInformation->setShippingAddress($shippingAddress); $shippingInformation->setShippingMethodCode('flatrate'); + + $this->expectExceptionMessage( + sprintf( + 'The shipping information was unable to be saved. Error: "Invalid customer address id %s"', + $address->getCustomerAddressId() + ) + ); + $this->expectException(InputException::class); $this->management->saveAddressInformation($cart->getId(), $shippingInformation); } From 709c241fd5b7ae1a1fb0102ac1c8876bfdf04c9e Mon Sep 17 00:00:00 2001 From: "vadim.malesh" <engcom-vendorworker-charlie@adobe.com> Date: Thu, 20 Feb 2020 10:53:32 +0200 Subject: [PATCH 141/229] removed constants doc block --- .../Model/ShippingInformationManagementTest.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/app/code/Magento/Checkout/Test/Unit/Model/ShippingInformationManagementTest.php b/app/code/Magento/Checkout/Test/Unit/Model/ShippingInformationManagementTest.php index 3b0b809e36580..79c4b37fb1813 100644 --- a/app/code/Magento/Checkout/Test/Unit/Model/ShippingInformationManagementTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Model/ShippingInformationManagementTest.php @@ -41,29 +41,14 @@ */ class ShippingInformationManagementTest extends TestCase { - /** - * Stub cart id - */ private const STUB_CART_ID = 100; - /** - * Stub items count - */ private const STUB_ITEMS_COUNT = 99; - /** - * Stub carrier code - */ private const STUB_CARRIER_CODE = 'carrier_code'; - /** - * Stub shipping method - */ private const STUB_SHIPPING_METHOD = 'shipping_method'; - /** - * Stub error message - */ private const STUB_ERROR_MESSAGE = 'error message'; /** From 7256c67404c078fb8bbc78a411da04c6d871c001 Mon Sep 17 00:00:00 2001 From: "m.mezhensky" <m.mezhensky@atwix.com> Date: Thu, 20 Feb 2020 12:17:14 +0200 Subject: [PATCH 142/229] Unit test for Magento\CatalogUrlRewrite\Observer\ProductProcessUrlRewriteRemovingObserver --- ...tProcessUrlRewriteRemovingObserverTest.php | 54 ++++++++++++++----- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/ProductProcessUrlRewriteRemovingObserverTest.php b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/ProductProcessUrlRewriteRemovingObserverTest.php index 7d7927e2accb7..7184f1b3cd275 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/ProductProcessUrlRewriteRemovingObserverTest.php +++ b/app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/ProductProcessUrlRewriteRemovingObserverTest.php @@ -11,19 +11,24 @@ use Magento\Catalog\Model\Product; use Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator; use Magento\CatalogUrlRewrite\Observer\ProductProcessUrlRewriteRemovingObserver; -use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Framework\Event; use Magento\Framework\Event\Observer; -use Magento\UrlRewrite\Service\V1\Data\UrlRewrite; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\UrlRewrite\Model\UrlPersistInterface; -use PHPUnit\Framework\TestCase; +use Magento\UrlRewrite\Service\V1\Data\UrlRewrite; use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; /** * Unit test for Magento\CatalogUrlRewrite\Observer\ProductProcessUrlRewriteRemovingObserver */ class ProductProcessUrlRewriteRemovingObserverTest extends TestCase { + /* + * Stub product ID + */ + private const STUB_PRODUCT_ID = 333; + /** * Testable Object * @@ -54,7 +59,7 @@ class ProductProcessUrlRewriteRemovingObserverTest extends TestCase /** * @var UrlPersistInterface|MockObject */ - private $urlPersist; + private $urlPersistMock; /** * @inheritdoc @@ -74,25 +79,23 @@ protected function setUp(): void ->setMethods(['getId']) ->getMock(); - $this->urlPersist = $this->getMockBuilder(UrlPersistInterface::class) + $this->urlPersistMock = $this->getMockBuilder(UrlPersistInterface::class) ->disableOriginalConstructor() ->getMock(); $this->observer = $this->objectManager->getObject( ProductProcessUrlRewriteRemovingObserver::class, [ - 'urlPersist' => $this->urlPersist + 'urlPersist' => $this->urlPersistMock ] ); } /** - * Test for execute() + * Test for execute(), covers test case for removing product URLs from storage */ - public function testRemoveProductUrlsFromStorage() + public function testRemoveProductUrlsFromStorage(): void { - $productId = 333; - $this->observerMock ->expects($this->once()) ->method('getEvent') @@ -106,15 +109,40 @@ public function testRemoveProductUrlsFromStorage() $this->productMock ->expects($this->exactly(2)) ->method('getId') - ->willReturn($productId); + ->willReturn(self::STUB_PRODUCT_ID); - $this->urlPersist->expects($this->once()) + $this->urlPersistMock->expects($this->once()) ->method('deleteByData') ->with([ - UrlRewrite::ENTITY_ID => $productId, + UrlRewrite::ENTITY_ID => self::STUB_PRODUCT_ID, UrlRewrite::ENTITY_TYPE => ProductUrlRewriteGenerator::ENTITY_TYPE, ]); $this->observer->execute($this->observerMock); } + + /** + * Test for execute(), covers test case for removing product URLs when the product doesn't have an ID + */ + public function testRemoveProductUrlsWithEmptyProductId() + { + $this->observerMock + ->expects($this->once()) + ->method('getEvent') + ->willReturn($this->eventMock); + + $this->eventMock + ->expects($this->once()) + ->method('getProduct') + ->willReturn($this->productMock); + + $this->productMock + ->expects($this->once()) + ->method('getId') + ->willReturn(null); + + $this->urlPersistMock->expects($this->never())->method('deleteByData'); + + $this->observer->execute($this->observerMock); + } } From c9f9d71a26e8ad79190ae00dc7902856472c55c4 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" <engcom-vendorworker-charlie@adobe.com> Date: Thu, 20 Feb 2020 13:52:57 +0200 Subject: [PATCH 143/229] improve fix --- .../Model/Plugin/CustomerPlugin.php | 22 +++++++++++++++++++ .../Newsletter/etc/extension_attributes.xml | 6 ++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php b/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php index 60b279b659ca6..147794c8f1d76 100644 --- a/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php +++ b/app/code/Magento/Newsletter/Model/Plugin/CustomerPlugin.php @@ -17,6 +17,7 @@ use Magento\Newsletter\Model\SubscriptionManagerInterface; use Magento\Store\Model\Store; use Magento\Store\Model\StoreManagerInterface; +use Magento\Framework\Api\SearchResults; use Psr\Log\LoggerInterface; /** @@ -229,6 +230,27 @@ public function afterGetById(CustomerRepositoryInterface $subject, CustomerInter return $customer; } + /** + * Add subscription status to customer list + * + * @param CustomerRepositoryInterface $subject + * @param SearchResults $searchResults + * @return SearchResults + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function afterGetList(CustomerRepositoryInterface $subject, SearchResults $searchResults): SearchResults + { + foreach ($searchResults->getItems() as $customer) { + /** @var CustomerExtensionInterface $extensionAttributes */ + $extensionAttributes = $customer->getExtensionAttributes(); + + $isSubscribed = (int) $extensionAttributes->getIsSubscribed() === Subscriber::STATUS_SUBSCRIBED ?: false; + $extensionAttributes->setIsSubscribed($isSubscribed); + } + + return $searchResults; + } + /** * Set Is Subscribed extension attribute * diff --git a/app/code/Magento/Newsletter/etc/extension_attributes.xml b/app/code/Magento/Newsletter/etc/extension_attributes.xml index 50f46af5c033b..09925024e97d5 100644 --- a/app/code/Magento/Newsletter/etc/extension_attributes.xml +++ b/app/code/Magento/Newsletter/etc/extension_attributes.xml @@ -8,6 +8,10 @@ <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd"> <extension_attributes for="Magento\Customer\Api\Data\CustomerInterface"> - <attribute code="is_subscribed" type="boolean" /> + <attribute code="is_subscribed" type="boolean" > + <join reference_table="newsletter_subscriber" reference_field="customer_id" join_on_field="entity_id"> + <field>subscriber_status</field> + </join> + </attribute> </extension_attributes> </config> From c7e6795b7047aae233cccda2cdf42c5983065f1c Mon Sep 17 00:00:00 2001 From: "m.mezhensky" <m.mezhensky@atwix.com> Date: Thu, 20 Feb 2020 15:02:19 +0200 Subject: [PATCH 144/229] Unit test for Magento\Reports\Observer\CatalogProductCompareClearObserver --- ...CatalogProductCompareClearObserverTest.php | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 app/code/Magento/Reports/Test/Unit/Observer/CatalogProductCompareClearObserverTest.php diff --git a/app/code/Magento/Reports/Test/Unit/Observer/CatalogProductCompareClearObserverTest.php b/app/code/Magento/Reports/Test/Unit/Observer/CatalogProductCompareClearObserverTest.php new file mode 100644 index 0000000000000..018ab943ef9ed --- /dev/null +++ b/app/code/Magento/Reports/Test/Unit/Observer/CatalogProductCompareClearObserverTest.php @@ -0,0 +1,143 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Reports\Test\Unit\Observer; + +use Magento\Framework\Event\Observer; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Reports\Model\Event; +use Magento\Reports\Model\Product\Index\Compared; +use Magento\Reports\Model\Product\Index\ComparedFactory; +use Magento\Reports\Model\ReportStatus; +use Magento\Reports\Observer\CatalogProductCompareClearObserver; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +/** + * Unit test for Magento\Reports\Test\Unit\Observer\CatalogProductCompareClearObserver + */ +class CatalogProductCompareClearObserverTest extends TestCase +{ + /** + * Testable Object + * + * @var CatalogProductCompareClearObserver + */ + private $observer; + + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * @var Observer|MockObject + */ + private $observerMock; + + /** + * @var ReportStatus|MockObject + */ + private $reportStatusMock; + + /** + * @var ComparedFactory|MockObject + */ + private $productCompFactoryMock; + + /** + * @var Compared|MockObject + */ + private $productCompModelMock; + + /** + * @var Event|MockObject + */ + private $reportEventMock; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + $this->objectManager = new ObjectManager($this); + $this->observerMock = $this->createMock(Observer::class); + + $this->reportStatusMock = $this->getMockBuilder(ReportStatus::class) + ->disableOriginalConstructor() + ->setMethods(['isReportEnabled']) + ->getMock(); + + $this->reportEventMock = $this->getMockBuilder(Event::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->productCompFactoryMock = $this->getMockBuilder(ComparedFactory::class) + ->disableOriginalConstructor() + ->setMethods(['create']) + ->getMock(); + + $this->productCompModelMock = $this->getMockBuilder(Compared::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->observer = $this->objectManager->getObject( + CatalogProductCompareClearObserver::class, + [ + 'reportStatus' => $this->reportStatusMock, + 'productCompFactory' => $this->productCompFactoryMock + ] + ); + } + + /** + * Test for execute(), covers test case for remove all products from compare products + */ + public function testExecuteRemoveProducts(): void + { + $this->reportStatusMock + ->expects($this->once()) + ->method('isReportEnabled') + ->with(Event::EVENT_PRODUCT_VIEW) + ->willReturn(true); + + $this->productCompFactoryMock + ->expects($this->once()) + ->method('create') + ->willReturn($this->productCompModelMock); + + $this->productCompModelMock + ->expects($this->once()) + ->method('calculate') + ->willReturnSelf(); + + $this->observer->execute($this->observerMock); + } + + /** + * Test for execute(), covers test case for remove all products from compare products with report disabled + */ + public function testExecuteRemoveProductsWithReportDisable(): void + { + $this->reportStatusMock + ->expects($this->once()) + ->method('isReportEnabled') + ->with(Event::EVENT_PRODUCT_VIEW) + ->willReturn(false); + + $this->productCompFactoryMock + ->expects($this->never()) + ->method('create'); + + $this->productCompModelMock + ->expects($this->never()) + ->method('calculate'); + + $this->observer->execute($this->observerMock); + } +} From 50207521b8fbbaa52c3ac99dbb4f854d2ebc6093 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" <engcom-vendorworker-charlie@adobe.com> Date: Thu, 20 Feb 2020 15:44:22 +0200 Subject: [PATCH 145/229] webapi test --- .../Customer/Api/CustomerRepositoryTest.php | 52 ++++++++++++++++--- 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/Customer/Api/CustomerRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Customer/Api/CustomerRepositoryTest.php index 7a02e2f843719..8ee23a1efea44 100644 --- a/dev/tests/api-functional/testsuite/Magento/Customer/Api/CustomerRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Customer/Api/CustomerRepositoryTest.php @@ -8,6 +8,8 @@ use Magento\Customer\Api\Data\CustomerInterface as Customer; use Magento\Customer\Api\Data\AddressInterface as Address; +use Magento\Framework\Api\FilterBuilder; +use Magento\Framework\Api\SearchCriteriaInterface; use Magento\Framework\Api\SortOrder; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\LocalizedException; @@ -482,11 +484,17 @@ public function testCreateCustomerWithoutAddressRequiresException() /** * Test with a single filter + * + * @param bool $subscribeStatus + * @return void + * + * @dataProvider subscriptionDataProvider */ - public function testSearchCustomers() + public function testSearchCustomers(bool $subscribeStatus): void { - $builder = Bootstrap::getObjectManager()->create(\Magento\Framework\Api\FilterBuilder::class); - $customerData = $this->_createCustomer(); + $builder = Bootstrap::getObjectManager()->create(FilterBuilder::class); + $subscribeData = $this->buildSubscriptionData($subscribeStatus); + $customerData = $this->_createCustomer($subscribeData); $filter = $builder ->setField(Customer::EMAIL) ->setValue($customerData[Customer::EMAIL]) @@ -494,13 +502,13 @@ public function testSearchCustomers() $this->searchCriteriaBuilder->addFilters([$filter]); $searchData = $this->dataObjectProcessor->buildOutputDataArray( $this->searchCriteriaBuilder->create(), - \Magento\Framework\Api\SearchCriteriaInterface::class + SearchCriteriaInterface::class ); $requestData = ['searchCriteria' => $searchData]; $serviceInfo = [ 'rest' => [ 'resourcePath' => self::RESOURCE_PATH . '/search' . '?' . http_build_query($requestData), - 'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_GET, + 'httpMethod' => Request::HTTP_METHOD_GET, ], 'soap' => [ 'service' => self::SERVICE_NAME, @@ -511,6 +519,35 @@ public function testSearchCustomers() $searchResults = $this->_webApiCall($serviceInfo, $requestData); $this->assertEquals(1, $searchResults['total_count']); $this->assertEquals($customerData[Customer::ID], $searchResults['items'][0][Customer::ID]); + $this->assertEquals($subscribeStatus, $searchResults['items'][0]['extension_attributes']['is_subscribed']); + } + + /** + * Build subscription extension attributes data + * + * @param bool $status + * @return array + */ + private function buildSubscriptionData(bool $status): array + { + return [ + 'extension_attributes' => [ + 'is_subscribed' => $status, + ], + ]; + } + + /** + * Subscription customer data provider + * + * @return array + */ + public function subscriptionDataProvider(): array + { + return [ + 'subscribed user' => [true], + 'not subscribed user' => [false], + ]; } /** @@ -857,11 +894,12 @@ protected function _getCustomerData($customerId) } /** + * @param array|null $additionalData * @return array|bool|float|int|string */ - protected function _createCustomer() + protected function _createCustomer(?array $additionalData = []) { - $customerData = $this->customerHelper->createSampleCustomer(); + $customerData = $this->customerHelper->createSampleCustomer($additionalData); $this->currentCustomerId[] = $customerData['id']; return $customerData; } From 83e5938e43c05edf71cf742457497f622dedcfed Mon Sep 17 00:00:00 2001 From: "m.mezhensky" <m.mezhensky@atwix.com> Date: Thu, 20 Feb 2020 16:28:38 +0200 Subject: [PATCH 146/229] Unit test for Magento\SalesRule\Observer\AssignCouponDataAfterOrderCustomerAssignObserver --- ...taAfterOrderCustomerAssignObserverTest.php | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 app/code/Magento/SalesRule/Test/Unit/Observer/AssignCouponDataAfterOrderCustomerAssignObserverTest.php diff --git a/app/code/Magento/SalesRule/Test/Unit/Observer/AssignCouponDataAfterOrderCustomerAssignObserverTest.php b/app/code/Magento/SalesRule/Test/Unit/Observer/AssignCouponDataAfterOrderCustomerAssignObserverTest.php new file mode 100644 index 0000000000000..f72a47a318de0 --- /dev/null +++ b/app/code/Magento/SalesRule/Test/Unit/Observer/AssignCouponDataAfterOrderCustomerAssignObserverTest.php @@ -0,0 +1,150 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\SalesRule\Test\Unit\Observer; + +use Magento\Framework\Event; +use Magento\Framework\Event\Observer; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Sales\Api\Data\OrderInterface; +use Magento\SalesRule\Model\Coupon\UpdateCouponUsages; +use Magento\SalesRule\Observer\AssignCouponDataAfterOrderCustomerAssignObserver; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +/** + * Unit test for Magento\SalesRule\Observer\AssignCouponDataAfterOrderCustomerAssignObserver + */ +class AssignCouponDataAfterOrderCustomerAssignObserverTest extends TestCase +{ + /* + * Stub event key order + */ + private const STUB_EVENT_KEY_ORDER = 'order'; + + /* + * Stub customer ID + */ + private const STUB_CUSTOMER_ID = 1; + + /** + * Testable Object + * + * @var AssignCouponDataAfterOrderCustomerAssignObserver + */ + private $observer; + + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * @var Observer|MockObject + */ + private $observerMock; + + /** + * @var Event|MockObject + */ + private $eventMock; + + /** + * @var OrderInterface|MockObject + */ + private $orderMock; + + /** + * @var UpdateCouponUsages|MockObject + */ + private $updateCouponUsagesMock; + + protected function setUp(): void + { + $this->objectManager = new ObjectManager($this); + $this->observerMock = $this->createMock(Observer::class); + + $this->eventMock = $this->getMockBuilder(Event::class) + ->disableOriginalConstructor() + ->setMethods(['getData']) + ->getMock(); + + $this->orderMock = $this->getMockBuilder(OrderInterface::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->updateCouponUsagesMock = $this->getMockBuilder(UpdateCouponUsages::class) + ->disableOriginalConstructor() + ->setMethods(['execute']) + ->getMock(); + + $this->observer = $this->objectManager->getObject( + AssignCouponDataAfterOrderCustomerAssignObserver::class, + [ + 'updateCouponUsages' => $this->updateCouponUsagesMock + ] + ); + } + + /** + * Test for execute(), covers test case for assign coupon data after order customer + */ + public function testExecuteAssignCouponData(): void + { + $this->observerMock + ->expects($this->once()) + ->method('getEvent') + ->willReturn($this->eventMock); + + $this->eventMock + ->expects($this->once()) + ->method('getData') + ->with(self::STUB_EVENT_KEY_ORDER) + ->willReturn($this->orderMock); + + $this->orderMock + ->expects($this->once()) + ->method('getCustomerId') + ->willReturn(self::STUB_CUSTOMER_ID); + + $this->updateCouponUsagesMock + ->expects($this->once()) + ->method('execute') + ->with($this->orderMock, true); + + $this->observer->execute($this->observerMock); + } + + /** + * Test for execute(), covers test case for assign coupon data after order customer with empty customer ID + */ + public function testExecuteAssignCouponDataWithEmptyCustomerId(): void + { + $this->observerMock + ->expects($this->once()) + ->method('getEvent') + ->willReturn($this->eventMock); + + $this->eventMock + ->expects($this->once()) + ->method('getData') + ->with(self::STUB_EVENT_KEY_ORDER) + ->willReturn($this->orderMock); + + $this->orderMock + ->expects($this->once()) + ->method('getCustomerId') + ->willReturn(null); + + $this->updateCouponUsagesMock + ->expects($this->never()) + ->method('execute'); + + $this->observer->execute($this->observerMock); + } +} From 7c4be6a770ff543a6906b3d6f77b31d1988addf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Szubert?= <bartlomiejszubert@gmail.com> Date: Fri, 7 Feb 2020 23:30:25 +0100 Subject: [PATCH 147/229] Fix #17933 - Bank Transfer Payment instructions switch back to default --- .../BeforeOrderPaymentSaveObserver.php | 23 +++- .../BeforeOrderPaymentSaveObserverTest.php | 130 +++++++++++------- 2 files changed, 96 insertions(+), 57 deletions(-) diff --git a/app/code/Magento/OfflinePayments/Observer/BeforeOrderPaymentSaveObserver.php b/app/code/Magento/OfflinePayments/Observer/BeforeOrderPaymentSaveObserver.php index d7cad6b62e993..234bec96d46d1 100644 --- a/app/code/Magento/OfflinePayments/Observer/BeforeOrderPaymentSaveObserver.php +++ b/app/code/Magento/OfflinePayments/Observer/BeforeOrderPaymentSaveObserver.php @@ -3,9 +3,11 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\OfflinePayments\Observer; +use Magento\Framework\Event\Observer; use Magento\Framework\Event\ObserverInterface; use Magento\OfflinePayments\Model\Banktransfer; use Magento\OfflinePayments\Model\Cashondelivery; @@ -19,10 +21,10 @@ class BeforeOrderPaymentSaveObserver implements ObserverInterface /** * Sets current instructions for bank transfer account * - * @param \Magento\Framework\Event\Observer $observer + * @param Observer $observer * @return void */ - public function execute(\Magento\Framework\Event\Observer $observer) + public function execute(Observer $observer) { /** @var \Magento\Sales\Model\Order\Payment $payment */ $payment = $observer->getEvent()->getPayment(); @@ -34,15 +36,22 @@ public function execute(\Magento\Framework\Event\Observer $observer) && empty($payment->getAdditionalInformation('instructions'))) { $payment->setAdditionalInformation( 'instructions', - $payment->getMethodInstance()->getInstructions() + $payment->getMethodInstance()->getConfigData( + 'instructions', + $payment->getOrder()->getStoreId() + ) ); } elseif ($payment->getMethod() === Checkmo::PAYMENT_METHOD_CHECKMO_CODE) { $methodInstance = $payment->getMethodInstance(); - if (!empty($methodInstance->getPayableTo())) { - $payment->setAdditionalInformation('payable_to', $methodInstance->getPayableTo()); + $storeId = $payment->getOrder()->getStoreId(); + + $payableTo = $methodInstance->getConfigData('payable_to', $storeId); + if (!empty($payableTo)) { + $payment->setAdditionalInformation('payable_to', $payableTo); } - if (!empty($methodInstance->getMailingAddress())) { - $payment->setAdditionalInformation('mailing_address', $methodInstance->getMailingAddress()); + $mailingAddress = $methodInstance->getConfigData('mailing_address', $storeId); + if (!empty($mailingAddress)) { + $payment->setAdditionalInformation('mailing_address', $mailingAddress); } } } diff --git a/app/code/Magento/OfflinePayments/Test/Unit/Observer/BeforeOrderPaymentSaveObserverTest.php b/app/code/Magento/OfflinePayments/Test/Unit/Observer/BeforeOrderPaymentSaveObserverTest.php index 0b482a805175a..18f57269b616b 100644 --- a/app/code/Magento/OfflinePayments/Test/Unit/Observer/BeforeOrderPaymentSaveObserverTest.php +++ b/app/code/Magento/OfflinePayments/Test/Unit/Observer/BeforeOrderPaymentSaveObserverTest.php @@ -10,32 +10,44 @@ use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\OfflinePayments\Model\Banktransfer; use Magento\OfflinePayments\Model\Cashondelivery; +use Magento\OfflinePayments\Model\Checkmo; use Magento\OfflinePayments\Observer\BeforeOrderPaymentSaveObserver; +use Magento\Sales\Model\Order; use Magento\Sales\Model\Order\Payment; -use PHPUnit_Framework_MockObject_MockObject as MockObject; -use Magento\OfflinePayments\Model\Checkmo; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; -class BeforeOrderPaymentSaveObserverTest extends \PHPUnit\Framework\TestCase +/** + * Test class for \Magento\OfflinePayments\Observer\BeforeOrderPaymentSaveObserver + */ +class BeforeOrderPaymentSaveObserverTest extends TestCase { + private const STORE_ID = 1; + /** * @var BeforeOrderPaymentSaveObserver */ - protected $_model; + private $model; /** * @var Payment|MockObject */ - private $payment; + private $paymentMock; /** * @var Event|MockObject */ - private $event; + private $eventMock; /** * @var Observer|MockObject */ - private $observer; + private $observerMock; + + /** + * @var Order|MockObject + */ + private $orderMock; /** * @inheritdoc @@ -43,40 +55,50 @@ class BeforeOrderPaymentSaveObserverTest extends \PHPUnit\Framework\TestCase protected function setUp() { $objectManagerHelper = new ObjectManager($this); - $this->payment = $this->getMockBuilder(Payment::class) + $this->paymentMock = $this->getMockBuilder(Payment::class) ->disableOriginalConstructor() ->getMock(); - $this->event = $this->getMockBuilder(Event::class) + $this->eventMock = $this->getMockBuilder(Event::class) ->disableOriginalConstructor() ->setMethods(['getPayment']) ->getMock(); - $this->event->expects(self::once()) + $this->eventMock->expects(self::once()) ->method('getPayment') - ->willReturn($this->payment); + ->willReturn($this->paymentMock); - $this->observer = $this->getMockBuilder(Observer::class) + $this->observerMock = $this->getMockBuilder(Observer::class) ->disableOriginalConstructor() ->getMock(); - $this->observer->expects(self::once()) + $this->observerMock->expects(self::once()) ->method('getEvent') - ->willReturn($this->event); + ->willReturn($this->eventMock); + + $this->orderMock = $this->getMockBuilder(Order::class) + ->disableOriginalConstructor() + ->getMock(); + $this->orderMock->method('getStoreId') + ->willReturn(static::STORE_ID); - $this->_model = $objectManagerHelper->getObject(BeforeOrderPaymentSaveObserver::class); + $this->paymentMock->method('getOrder') + ->willReturn($this->orderMock); + + $this->model = $objectManagerHelper->getObject(BeforeOrderPaymentSaveObserver::class); } /** + * Checks a case when payment method is either bank transfer or cash on delivery * @param string $methodCode * @dataProvider dataProviderBeforeOrderPaymentSaveWithInstructions */ public function testBeforeOrderPaymentSaveWithInstructions($methodCode) { - $this->payment->expects(self::once()) + $this->paymentMock->expects(self::once()) ->method('getMethod') ->willReturn($methodCode); - $this->payment->expects(self::once()) + $this->paymentMock->expects(self::once()) ->method('setAdditionalInformation') ->with('instructions', 'payment configuration'); $method = $this->getMockBuilder(Banktransfer::class) @@ -84,13 +106,14 @@ public function testBeforeOrderPaymentSaveWithInstructions($methodCode) ->getMock(); $method->expects(self::once()) - ->method('getInstructions') + ->method('getConfigData') + ->with('instructions', static::STORE_ID) ->willReturn('payment configuration'); - $this->payment->expects(self::once()) + $this->paymentMock->expects(self::once()) ->method('getMethodInstance') ->willReturn($method); - $this->_model->execute($this->observer); + $this->model->execute($this->observerMock); } /** @@ -106,33 +129,37 @@ public function dataProviderBeforeOrderPaymentSaveWithInstructions() ]; } + /** + * Checks a case when payment method is Check Money + */ public function testBeforeOrderPaymentSaveWithCheckmo() { - $this->payment->expects(self::exactly(2)) + $this->paymentMock->expects(self::exactly(2)) ->method('getMethod') ->willReturn(Checkmo::PAYMENT_METHOD_CHECKMO_CODE); - $this->payment->expects(self::exactly(2)) + $this->paymentMock->expects(self::exactly(2)) ->method('setAdditionalInformation') ->willReturnMap( [ - ['payable_to', 'payable to', $this->payment], - ['mailing_address', 'mailing address', $this->payment], + ['payable_to', 'payable to', $this->paymentMock], + ['mailing_address', 'mailing address', $this->paymentMock], ] ); $method = $this->getMockBuilder(Checkmo::class) ->disableOriginalConstructor() ->getMock(); - $method->expects(self::exactly(2)) - ->method('getPayableTo') - ->willReturn('payable to'); - $method->expects(self::exactly(2)) - ->method('getMailingAddress') - ->willReturn('mailing address'); - $this->payment->expects(self::once()) + $method->method('getConfigData') + ->willReturnMap( + [ + ['payable_to', static::STORE_ID, 'payable to'], + ['mailing_address', static::STORE_ID, 'mailing address'] + ] + ); + $this->paymentMock->expects(self::once()) ->method('getMethodInstance') ->willReturn($method); - $this->_model->execute($this->observer); + $this->model->execute($this->observerMock); } /** @@ -141,36 +168,40 @@ public function testBeforeOrderPaymentSaveWithCheckmo() */ public function testBeforeOrderPaymentSaveWithCheckmoWithoutConfig() { - $this->payment->expects(self::exactly(2)) + $this->paymentMock->expects(self::exactly(2)) ->method('getMethod') ->willReturn(Checkmo::PAYMENT_METHOD_CHECKMO_CODE); - $this->payment->expects(self::never()) + $this->paymentMock->expects(self::never()) ->method('setAdditionalInformation'); $method = $this->getMockBuilder(Checkmo::class) ->disableOriginalConstructor() ->getMock(); - $method->expects(self::once()) - ->method('getPayableTo') - ->willReturn(null); - $method->expects(self::once()) - ->method('getMailingAddress') - ->willReturn(null); - $this->payment->expects(self::once()) + $method->method('getConfigData') + ->willReturnMap( + [ + ['payable_to', static::STORE_ID, null], + ['mailing_address', static::STORE_ID, null] + ] + ); + $this->paymentMock->expects(self::once()) ->method('getMethodInstance') ->willReturn($method); - $this->_model->execute($this->observer); + $this->model->execute($this->observerMock); } + /** + * Checks a case with payment method not handled by observer + */ public function testBeforeOrderPaymentSaveWithOthers() { - $this->payment->expects(self::exactly(2)) + $this->paymentMock->expects(self::exactly(2)) ->method('getMethod') ->willReturn('somepaymentmethod'); - $this->payment->expects(self::never()) + $this->paymentMock->expects(self::never()) ->method('setAdditionalInformation'); - $this->_model->execute($this->observer); + $this->model->execute($this->observerMock); } /** @@ -179,17 +210,16 @@ public function testBeforeOrderPaymentSaveWithOthers() */ public function testBeforeOrderPaymentSaveWithInstructionsAlreadySet($methodCode) { - $this->payment - ->method('getMethod') + $this->paymentMock->method('getMethod') ->willReturn($methodCode); - $this->payment->expects(self::once()) + $this->paymentMock->expects(self::once()) ->method('getAdditionalInformation') ->willReturn('Test'); - $this->payment->expects(self::never()) + $this->paymentMock->expects(self::never()) ->method('setAdditionalInformation'); - $this->_model->execute($this->observer); + $this->model->execute($this->observerMock); } } From d9938c529a2b979aac2350e187f476b119406883 Mon Sep 17 00:00:00 2001 From: Andrii Kasian <akasian@magento.com> Date: Thu, 20 Feb 2020 09:53:55 -0600 Subject: [PATCH 148/229] Move cache cleanup operation on state modification operation and make it granula --- .../Framework/Filesystem/Directory/Write.php | 2 +- .../Framework/Filesystem/Driver/File.php | 107 +- .../Framework/Filesystem/Driver/Http.php | 7 +- .../Filesystem/Driver/StatefulFile.php | 1010 +++++++++++++++++ 4 files changed, 1073 insertions(+), 53 deletions(-) create mode 100644 lib/internal/Magento/Framework/Filesystem/Driver/StatefulFile.php diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/Write.php b/lib/internal/Magento/Framework/Filesystem/Directory/Write.php index f23ed87971a39..484eed347be0f 100644 --- a/lib/internal/Magento/Framework/Filesystem/Directory/Write.php +++ b/lib/internal/Magento/Framework/Filesystem/Directory/Write.php @@ -67,8 +67,8 @@ protected function assertWritable($path) */ protected function assertIsFile($path) { - clearstatcache(); $absolutePath = $this->driver->getAbsolutePath($this->path, $path); + clearstatcache(true, $absolutePath); if (!$this->driver->isFile($absolutePath)) { throw new FileSystemException( new \Magento\Framework\Phrase('The "%1" file doesn\'t exist.', [$absolutePath]) diff --git a/lib/internal/Magento/Framework/Filesystem/Driver/File.php b/lib/internal/Magento/Framework/Filesystem/Driver/File.php index 4d5ba7a1918ce..6f110acc2b918 100644 --- a/lib/internal/Magento/Framework/Filesystem/Driver/File.php +++ b/lib/internal/Magento/Framework/Filesystem/Driver/File.php @@ -11,9 +11,11 @@ use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Filesystem\DriverInterface; use Magento\Framework\Filesystem\Glob; +use Magento\Framework\Phrase; /** - * Driver file class + * Filesystem driver that uses the local filesystem. + * Assumed that stat cache is cleanup before test filesystem * * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) */ @@ -47,11 +49,12 @@ protected function getWarningMessage() */ public function isExists($path) { - clearstatcache(); - $result = @file_exists($this->getScheme() . $path); + $filename = $this->getScheme() . $path; + clearstatcache(false, $filename); + $result = @file_exists($filename); if ($result === null) { throw new FileSystemException( - new \Magento\Framework\Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) + new Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) ); } return $result; @@ -66,11 +69,12 @@ public function isExists($path) */ public function stat($path) { - clearstatcache(); - $result = @stat($this->getScheme() . $path); + $filename = $this->getScheme() . $path; + clearstatcache(false, $filename); + $result = @stat($filename); if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase('Cannot gather stats! %1', [$this->getWarningMessage()]) + new Phrase('Cannot gather stats! %1', [$this->getWarningMessage()]) ); } return $result; @@ -85,11 +89,12 @@ public function stat($path) */ public function isReadable($path) { - clearstatcache(); - $result = @is_readable($this->getScheme() . $path); + $filename = $this->getScheme() . $path; + clearstatcache(false, $filename); + $result = @is_readable($filename); if ($result === null) { throw new FileSystemException( - new \Magento\Framework\Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) + new Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) ); } return $result; @@ -104,11 +109,12 @@ public function isReadable($path) */ public function isFile($path) { - clearstatcache(); - $result = @is_file($this->getScheme() . $path); + $filename = $this->getScheme() . $path; + clearstatcache(false, $filename); + $result = @is_file($filename); if ($result === null) { throw new FileSystemException( - new \Magento\Framework\Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) + new Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) ); } return $result; @@ -123,11 +129,12 @@ public function isFile($path) */ public function isDirectory($path) { - clearstatcache(); - $result = @is_dir($this->getScheme() . $path); + $filename = $this->getScheme() . $path; + clearstatcache(false, $filename); + $result = @is_dir($filename); if ($result === null) { throw new FileSystemException( - new \Magento\Framework\Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) + new Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) ); } return $result; @@ -144,11 +151,12 @@ public function isDirectory($path) */ public function fileGetContents($path, $flag = null, $context = null) { - clearstatcache(); - $result = @file_get_contents($this->getScheme() . $path, $flag, $context); + $filename = $this->getScheme() . $path; + clearstatcache(false, $filename); + $result = @file_get_contents($filename, $flag, $context); if (false === $result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'The contents from the "%1" file can\'t be read. %2', [$path, $this->getWarningMessage()] ) @@ -166,11 +174,12 @@ public function fileGetContents($path, $flag = null, $context = null) */ public function isWritable($path) { - clearstatcache(); - $result = @is_writable($this->getScheme() . $path); + $filename = $this->getScheme() . $path; + clearstatcache(false, $filename); + $result = @is_writable($filename); if ($result === null) { throw new FileSystemException( - new \Magento\Framework\Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) + new Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) ); } return $result; @@ -224,7 +233,7 @@ private function mkdirRecursive($path, $permissions = 0777) $result = true; } else { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'Directory "%1" cannot be created %2', [$path, $this->getWarningMessage()] ) @@ -254,7 +263,7 @@ public function readDirectory($path) sort($result); return $result; } catch (\Exception $e) { - throw new FileSystemException(new \Magento\Framework\Phrase($e->getMessage()), $e); + throw new FileSystemException(new Phrase($e->getMessage()), $e); } } @@ -297,7 +306,7 @@ public function rename($oldPath, $newPath, DriverInterface $targetDriver = null) } if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'The path "%1" cannot be renamed into "%2" %3', [$oldPath, $newPath, $this->getWarningMessage()] ) @@ -326,7 +335,7 @@ public function copy($source, $destination, DriverInterface $targetDriver = null } if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'The file or directory "%1" cannot be copied to "%2" %3', [ $source, @@ -356,7 +365,7 @@ public function symlink($source, $destination, DriverInterface $targetDriver = n } if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'A symlink for "%1" can\'t be created and placed to "%2". %3', [ $source, @@ -381,7 +390,7 @@ public function deleteFile($path) $result = @unlink($this->getScheme() . $path); if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'The "%1" file can\'t be deleted. %2', [$path, $this->getWarningMessage()] ) @@ -417,7 +426,7 @@ public function deleteDirectory($path) if (!empty($exceptionMessages)) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( \implode(' ', $exceptionMessages) ) ); @@ -431,7 +440,7 @@ public function deleteDirectory($path) } if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'The directory "%1" cannot be deleted %2', [$path, $this->getWarningMessage()] ) @@ -453,7 +462,7 @@ public function changePermissions($path, $permissions) $result = @chmod($this->getScheme() . $path, $permissions); if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'The permissions can\'t be changed for the "%1" path. %2.', [$path, $this->getWarningMessage()] ) @@ -481,7 +490,7 @@ public function changePermissionsRecursively($path, $dirPermissions, $filePermis } if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'The permissions can\'t be changed for the "%1" path. %2.', [$path, $this->getWarningMessage()] ) @@ -503,7 +512,7 @@ public function changePermissionsRecursively($path, $dirPermissions, $filePermis } if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'The permissions can\'t be changed for the "%1" path. %2.', [$path, $this->getWarningMessage()] ) @@ -530,7 +539,7 @@ public function touch($path, $modificationTime = null) } if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'The "%1" file or directory can\'t be touched. %2', [$path, $this->getWarningMessage()] ) @@ -553,7 +562,7 @@ public function filePutContents($path, $content, $mode = null) $result = @file_put_contents($this->getScheme() . $path, $content, $mode); if ($result === false) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'The specified "%1" file couldn\'t be written. %2', [$path, $this->getWarningMessage()] ) @@ -575,7 +584,7 @@ public function fileOpen($path, $mode) $result = @fopen($this->getScheme() . $path, $mode); if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase('File "%1" cannot be opened %2', [$path, $this->getWarningMessage()]) + new Phrase('File "%1" cannot be opened %2', [$path, $this->getWarningMessage()]) ); } return $result; @@ -597,7 +606,7 @@ public function fileReadLine($resource, $length, $ending = null) // phpcs:enable if (false === $result) { throw new FileSystemException( - new \Magento\Framework\Phrase('File cannot be read %1', [$this->getWarningMessage()]) + new Phrase('File cannot be read %1', [$this->getWarningMessage()]) ); } @@ -617,7 +626,7 @@ public function fileRead($resource, $length) $result = @fread($resource, $length); if ($result === false) { throw new FileSystemException( - new \Magento\Framework\Phrase('File cannot be read %1', [$this->getWarningMessage()]) + new Phrase('File cannot be read %1', [$this->getWarningMessage()]) ); } return $result; @@ -639,7 +648,7 @@ public function fileGetCsv($resource, $length = 0, $delimiter = ',', $enclosure $result = @fgetcsv($resource, $length, $delimiter, $enclosure, $escape); if ($result === null) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'The "%1" CSV handle is incorrect. Verify the handle and try again.', [$this->getWarningMessage()] ) @@ -660,7 +669,7 @@ public function fileTell($resource) $result = @ftell($resource); if ($result === null) { throw new FileSystemException( - new \Magento\Framework\Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) + new Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) ); } return $result; @@ -680,7 +689,7 @@ public function fileSeek($resource, $offset, $whence = SEEK_SET) $result = @fseek($resource, $offset, $whence); if ($result === -1) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'An error occurred during "%1" fileSeek execution.', [$this->getWarningMessage()] ) @@ -712,7 +721,7 @@ public function fileClose($resource) $result = @fclose($resource); if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'An error occurred during "%1" fileClose execution.', [$this->getWarningMessage()] ) @@ -758,7 +767,7 @@ public function fileWrite($resource, $data) */ private function fileSystemException($message, $arguments = []) { - throw new FileSystemException(new \Magento\Framework\Phrase($message, $arguments)); + throw new FileSystemException(new Phrase($message, $arguments)); } /** @@ -777,7 +786,7 @@ public function filePutCsv($resource, array $data, $delimiter = ',', $enclosure * Security enhancement for CSV data processing by Excel-like applications. * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1054702 * - * @var $value string|\Magento\Framework\Phrase + * @var $value string|Phrase */ foreach ($data as $key => $value) { if (!is_string($value)) { @@ -791,7 +800,7 @@ public function filePutCsv($resource, array $data, $delimiter = ',', $enclosure $result = @fputcsv($resource, $data, $delimiter, $enclosure); if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'An error occurred during "%1" filePutCsv execution.', [$this->getWarningMessage()] ) @@ -812,7 +821,7 @@ public function fileFlush($resource) $result = @fflush($resource); if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'An error occurred during "%1" fileFlush execution.', [$this->getWarningMessage()] ) @@ -834,7 +843,7 @@ public function fileLock($resource, $lockMode = LOCK_EX) $result = @flock($resource, $lockMode); if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'An error occurred during "%1" fileLock execution.', [$this->getWarningMessage()] ) @@ -855,7 +864,7 @@ public function fileUnlock($resource) $result = @flock($resource, LOCK_UN); if (!$result) { throw new FileSystemException( - new \Magento\Framework\Phrase( + new Phrase( 'An error occurred during "%1" fileUnlock execution.', [$this->getWarningMessage()] ) @@ -947,7 +956,7 @@ public function readDirectoryRecursively($path = null) $result[] = $file->getPathname(); } } catch (\Exception $e) { - throw new FileSystemException(new \Magento\Framework\Phrase($e->getMessage()), $e); + throw new FileSystemException(new Phrase($e->getMessage()), $e); } return $result; } diff --git a/lib/internal/Magento/Framework/Filesystem/Driver/Http.php b/lib/internal/Magento/Framework/Filesystem/Driver/Http.php index 0191d5d8a3040..273425183577e 100644 --- a/lib/internal/Magento/Framework/Filesystem/Driver/Http.php +++ b/lib/internal/Magento/Framework/Filesystem/Driver/Http.php @@ -11,7 +11,7 @@ use Magento\Framework\Exception\FileSystemException; /** - * Http driver file class. + * Allows interacting with http endpoint like with FileSystem */ class Http extends File { @@ -83,8 +83,9 @@ public function stat($path) */ public function fileGetContents($path, $flags = null, $context = null) { - clearstatcache(); - $result = @file_get_contents($this->getScheme() . $path, $flags, $context); + $fullPath = $this->getScheme() . $path; + clearstatcache(false, $fullPath); + $result = @file_get_contents($fullPath, $flags, $context); if (false === $result) { throw new FileSystemException( new \Magento\Framework\Phrase( diff --git a/lib/internal/Magento/Framework/Filesystem/Driver/StatefulFile.php b/lib/internal/Magento/Framework/Filesystem/Driver/StatefulFile.php new file mode 100644 index 0000000000000..d484ae7556c83 --- /dev/null +++ b/lib/internal/Magento/Framework/Filesystem/Driver/StatefulFile.php @@ -0,0 +1,1010 @@ +<?php +/** + * Origin filesystem driver + * + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Framework\Filesystem\Driver; + +use Magento\Framework\Exception\FileSystemException; +use Magento\Framework\Filesystem\DriverInterface; +use Magento\Framework\Filesystem\Glob; +use Magento\Framework\Phrase; + +/** + * Filesystem driver that uses the local filesystem. + * + * Assumed that stat cache is cleanup by data modification methods + * + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + */ +class StatefulFile implements DriverInterface +{ + /** + * @var string + */ + protected $scheme = ''; + + /** + * Returns last warning message string + * + * @return string + */ + protected function getWarningMessage() + { + $warning = error_get_last(); + if ($warning && $warning['type'] == E_WARNING) { + return 'Warning!' . $warning['message']; + } + return null; + } + + /** + * Is file or directory exist in file system + * + * @param string $path + * @return bool + * @throws FileSystemException + */ + public function isExists($path) + { + $result = @file_exists($this->getScheme() . $path); + if ($result === null) { + throw new FileSystemException( + new Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) + ); + } + return $result; + } + + /** + * Gathers the statistics of the given path + * + * @param string $path + * @return array + * @throws FileSystemException + */ + public function stat($path) + { + $result = @stat($this->getScheme() . $path); + if (!$result) { + throw new FileSystemException( + new Phrase('Cannot gather stats! %1', [$this->getWarningMessage()]) + ); + } + return $result; + } + + /** + * Check permissions for reading file or directory + * + * @param string $path + * @return bool + * @throws FileSystemException + */ + public function isReadable($path) + { + $result = @is_readable($this->getScheme() . $path); + if ($result === null) { + throw new FileSystemException( + new Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) + ); + } + return $result; + } + + /** + * Tells whether the filename is a regular file + * + * @param string $path + * @return bool + * @throws FileSystemException + */ + public function isFile($path) + { + $result = @is_file($this->getScheme() . $path); + if ($result === null) { + throw new FileSystemException( + new Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) + ); + } + return $result; + } + + /** + * Tells whether the filename is a regular directory + * + * @param string $path + * @return bool + * @throws FileSystemException + */ + public function isDirectory($path) + { + $result = @is_dir($this->getScheme() . $path); + if ($result === null) { + throw new FileSystemException( + new Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) + ); + } + return $result; + } + + /** + * Retrieve file contents from given path + * + * @param string $path + * @param string|null $flag + * @param resource|null $context + * @return string + * @throws FileSystemException + */ + public function fileGetContents($path, $flag = null, $context = null) + { + $result = @file_get_contents($this->getScheme() . $path, $flag, $context); + if (false === $result) { + throw new FileSystemException( + new Phrase( + 'The contents from the "%1" file can\'t be read. %2', + [$path, $this->getWarningMessage()] + ) + ); + } + return $result; + } + + /** + * Check if given path is writable + * + * @param string $path + * @return bool + * @throws FileSystemException + */ + public function isWritable($path) + { + $result = @is_writable($this->getScheme() . $path); + if ($result === null) { + throw new FileSystemException( + new Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) + ); + } + return $result; + } + + /** + * Returns parent directory's path + * + * @param string $path + * @return string + */ + public function getParentDirectory($path) + { + return dirname($this->getScheme() . $path); + } + + /** + * Create directory + * + * @param string $path + * @param int $permissions + * @return bool + * @throws FileSystemException + */ + public function createDirectory($path, $permissions = 0777) + { + clearstatcache(true, $path); + return $this->mkdirRecursive($path, $permissions); + } + + /** + * Create a directory recursively taking into account race conditions + * + * @param string $path + * @param int $permissions + * @return bool + * @throws FileSystemException + */ + private function mkdirRecursive($path, $permissions = 0777) + { + $path = $this->getScheme() . $path; + if (is_dir($path)) { + return true; + } + $parentDir = dirname($path); + while (!is_dir($parentDir)) { + $this->mkdirRecursive($parentDir, $permissions); + } + $result = @mkdir($path, $permissions); + clearstatcache(true, $path); + if (!$result) { + if (is_dir($path)) { + $result = true; + } else { + throw new FileSystemException( + new Phrase( + 'Directory "%1" cannot be created %2', + [$path, $this->getWarningMessage()] + ) + ); + } + } + return $result; + } + + /** + * Read directory + * + * @param string $path + * @return string[] + * @throws FileSystemException + */ + public function readDirectory($path) + { + try { + $flags = \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS; + $iterator = new \FilesystemIterator($path, $flags); + $result = []; + /** @var \FilesystemIterator $file */ + foreach ($iterator as $file) { + $result[] = $file->getPathname(); + } + sort($result); + return $result; + } catch (\Exception $e) { + throw new FileSystemException(new Phrase($e->getMessage()), $e); + } + } + + /** + * Search paths by given regex + * + * @param string $pattern + * @param string $path + * @return string[] + * @throws FileSystemException + */ + public function search($pattern, $path) + { + $globPattern = rtrim($path, '/') . '/' . ltrim($pattern, '/'); + $result = Glob::glob($globPattern, Glob::GLOB_BRACE); + return is_array($result) ? $result : []; + } + + /** + * Renames a file or directory + * + * @param string $oldPath + * @param string $newPath + * @param DriverInterface|null $targetDriver + * @return bool + * @throws FileSystemException + */ + public function rename($oldPath, $newPath, DriverInterface $targetDriver = null) + { + $result = false; + $targetDriver = $targetDriver ?: $this; + if (get_class($targetDriver) == get_class($this)) { + $result = @rename($this->getScheme() . $oldPath, $newPath); + clearstatcache(true, $this->getScheme() . $oldPath); + clearstatcache(true, $newPath); + } else { + $content = $this->fileGetContents($oldPath); + if (false !== $targetDriver->filePutContents($newPath, $content)) { + $result = $this->deleteFile($newPath); + } + } + if (!$result) { + throw new FileSystemException( + new Phrase( + 'The path "%1" cannot be renamed into "%2" %3', + [$oldPath, $newPath, $this->getWarningMessage()] + ) + ); + } + return $result; + } + + /** + * Copy source into destination + * + * @param string $source + * @param string $destination + * @param DriverInterface|null $targetDriver + * @return bool + * @throws FileSystemException + */ + public function copy($source, $destination, DriverInterface $targetDriver = null) + { + $targetDriver = $targetDriver ?: $this; + if (get_class($targetDriver) == get_class($this)) { + $result = @copy($this->getScheme() . $source, $destination); + clearstatcache(true, $destination); + } else { + $content = $this->fileGetContents($source); + $result = $targetDriver->filePutContents($destination, $content); + } + if (!$result) { + throw new FileSystemException( + new Phrase( + 'The file or directory "%1" cannot be copied to "%2" %3', + [ + $source, + $destination, + $this->getWarningMessage() + ] + ) + ); + } + return $result; + } + + /** + * Create symlink on source and place it into destination + * + * @param string $source + * @param string $destination + * @param DriverInterface|null $targetDriver + * @return bool + * @throws FileSystemException + */ + public function symlink($source, $destination, DriverInterface $targetDriver = null) + { + $result = false; + if ($targetDriver === null || get_class($targetDriver) == get_class($this)) { + $result = @symlink($this->getScheme() . $source, $destination); + clearstatcache(true, $destination); + } + if (!$result) { + throw new FileSystemException( + new Phrase( + 'A symlink for "%1" can\'t be created and placed to "%2". %3', + [ + $source, + $destination, + $this->getWarningMessage() + ] + ) + ); + } + return $result; + } + + /** + * Delete file + * + * @param string $path + * @return bool + * @throws FileSystemException + */ + public function deleteFile($path) + { + $result = @unlink($this->getScheme() . $path); + clearstatcache(true, $this->getScheme() . $path); + if (!$result) { + throw new FileSystemException( + new Phrase( + 'The "%1" file can\'t be deleted. %2', + [$path, $this->getWarningMessage()] + ) + ); + } + return $result; + } + + /** + * Recursive delete directory + * + * @param string $path + * @return bool + * @throws FileSystemException + */ + public function deleteDirectory($path) + { + $exceptionMessages = []; + $flags = \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS; + $iterator = new \FilesystemIterator($path, $flags); + /** @var \FilesystemIterator $entity */ + foreach ($iterator as $entity) { + try { + if ($entity->isDir()) { + $this->deleteDirectory($entity->getPathname()); + } else { + $this->deleteFile($entity->getPathname()); + } + } catch (FileSystemException $exception) { + $exceptionMessages[] = $exception->getMessage(); + } + } + + if (!empty($exceptionMessages)) { + throw new FileSystemException( + new Phrase( + \implode(' ', $exceptionMessages) + ) + ); + } + + $fullPath = $this->getScheme() . $path; + if (is_link($fullPath)) { + $result = @unlink($fullPath); + } else { + $result = @rmdir($fullPath); + } + clearstatcache(true, $fullPath); + if (!$result) { + throw new FileSystemException( + new Phrase( + 'The directory "%1" cannot be deleted %2', + [$path, $this->getWarningMessage()] + ) + ); + } + return $result; + } + + /** + * Change permissions of given path + * + * @param string $path + * @param int $permissions + * @return bool + * @throws FileSystemException + */ + public function changePermissions($path, $permissions) + { + $result = @chmod($this->getScheme() . $path, $permissions); + clearstatcache(true, $this->getScheme() . $path); + if (!$result) { + throw new FileSystemException( + new Phrase( + 'The permissions can\'t be changed for the "%1" path. %2.', + [$path, $this->getWarningMessage()] + ) + ); + } + return $result; + } + + /** + * Recursively change permissions of given path + * + * @param string $path + * @param int $dirPermissions + * @param int $filePermissions + * @return bool + * @throws FileSystemException + */ + public function changePermissionsRecursively($path, $dirPermissions, $filePermissions) + { + $result = true; + if ($this->isFile($path)) { + $result = @chmod($path, $filePermissions); + } else { + $result = @chmod($path, $dirPermissions); + } + clearstatcache(true, $this->getScheme() . $path); + + if (!$result) { + throw new FileSystemException( + new Phrase( + 'The permissions can\'t be changed for the "%1" path. %2.', + [$path, $this->getWarningMessage()] + ) + ); + } + + $flags = \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS; + + $iterator = new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($path, $flags), + \RecursiveIteratorIterator::CHILD_FIRST + ); + /** @var \FilesystemIterator $entity */ + foreach ($iterator as $entity) { + if ($entity->isDir()) { + $result = @chmod($entity->getPathname(), $dirPermissions); + } else { + $result = @chmod($entity->getPathname(), $filePermissions); + } + if (!$result) { + throw new FileSystemException( + new Phrase( + 'The permissions can\'t be changed for the "%1" path. %2.', + [$path, $this->getWarningMessage()] + ) + ); + } + } + return $result; + } + + /** + * Sets access and modification time of file. + * + * @param string $path + * @param int|null $modificationTime + * @return bool + * @throws FileSystemException + */ + public function touch($path, $modificationTime = null) + { + if (!$modificationTime) { + $result = @touch($this->getScheme() . $path); + } else { + $result = @touch($this->getScheme() . $path, $modificationTime); + } + clearstatcache(true, $this->getScheme() . $path); + if (!$result) { + throw new FileSystemException( + new Phrase( + 'The "%1" file or directory can\'t be touched. %2', + [$path, $this->getWarningMessage()] + ) + ); + } + return $result; + } + + /** + * Write contents to file in given path + * + * @param string $path + * @param string $content + * @param string|null $mode + * @return int The number of bytes that were written. + * @throws FileSystemException + */ + public function filePutContents($path, $content, $mode = null) + { + $result = @file_put_contents($this->getScheme() . $path, $content, $mode); + clearstatcache(true, $this->getScheme() . $path); + if (!$result) { + throw new FileSystemException( + new Phrase( + 'The specified "%1" file couldn\'t be written. %2', + [$path, $this->getWarningMessage()] + ) + ); + } + return $result; + } + + /** + * Open file + * + * @param string $path + * @param string $mode + * @return resource file + * @throws FileSystemException + */ + public function fileOpen($path, $mode) + { + $result = @fopen($this->getScheme() . $path, $mode); + clearstatcache(true, $this->getScheme() . $path); + if (!$result) { + throw new FileSystemException( + new Phrase('File "%1" cannot be opened %2', [$path, $this->getWarningMessage()]) + ); + } + return $result; + } + + /** + * Reads the line content from file pointer (with specified number of bytes from the current position). + * + * @param resource $resource + * @param int $length + * @param string $ending [optional] + * @return string + * @throws FileSystemException + */ + public function fileReadLine($resource, $length, $ending = null) + { + try { + $result = @stream_get_line($resource, $length, $ending); + } catch (\Exception $e) { + $result = false; + } + + if (false === $result) { + throw new FileSystemException( + new Phrase('File cannot be read %1', [$this->getWarningMessage()]) + ); + } + return $result; + } + + /** + * Reads the specified number of bytes from the current position. + * + * @param resource $resource + * @param int $length + * @return string + * @throws FileSystemException + */ + public function fileRead($resource, $length) + { + $result = @fread($resource, $length); + if ($result === false) { + throw new FileSystemException( + new Phrase('File cannot be read %1', [$this->getWarningMessage()]) + ); + } + return $result; + } + + /** + * Reads one CSV row from the file + * + * @param resource $resource + * @param int $length [optional] + * @param string $delimiter [optional] + * @param string $enclosure [optional] + * @param string $escape [optional] + * @return array|bool|null + * @throws FileSystemException + */ + public function fileGetCsv($resource, $length = 0, $delimiter = ',', $enclosure = '"', $escape = '\\') + { + $result = @fgetcsv($resource, $length, $delimiter, $enclosure, $escape); + if ($result === null) { + throw new FileSystemException( + new Phrase( + 'The "%1" CSV handle is incorrect. Verify the handle and try again.', + [$this->getWarningMessage()] + ) + ); + } + return $result; + } + + /** + * Returns position of read/write pointer + * + * @param resource $resource + * @return int + * @throws FileSystemException + */ + public function fileTell($resource) + { + $result = @ftell($resource); + if ($result === null) { + throw new FileSystemException( + new Phrase('An error occurred during "%1" execution.', [$this->getWarningMessage()]) + ); + } + return $result; + } + + /** + * Seeks to the specified offset + * + * @param resource $resource + * @param int $offset + * @param int $whence + * @return int + * @throws FileSystemException + */ + public function fileSeek($resource, $offset, $whence = SEEK_SET) + { + $result = @fseek($resource, $offset, $whence); + if ($result === -1) { + throw new FileSystemException( + new Phrase( + 'An error occurred during "%1" fileSeek execution.', + [$this->getWarningMessage()] + ) + ); + } + return $result; + } + + /** + * Returns true if pointer at the end of file or in case of exception + * + * @param resource $resource + * @return boolean + */ + public function endOfFile($resource) + { + return feof($resource); + } + + /** + * Close file + * + * @param resource $resource + * @return boolean + * @throws FileSystemException + */ + public function fileClose($resource) + { + $result = @fclose($resource); + if (!$result) { + throw new FileSystemException( + new Phrase( + 'An error occurred during "%1" fileClose execution.', + [$this->getWarningMessage()] + ) + ); + } + return $result; + } + + /** + * Writes data to file + * + * @param resource $resource + * @param string $data + * @return int + * @throws FileSystemException + */ + public function fileWrite($resource, $data) + { + $lenData = strlen($data); + for ($result = 0; $result < $lenData; $result += $fwrite) { + $fwrite = @fwrite($resource, substr($data, $result)); + if (0 === $fwrite) { + $this->fileSystemException('Unable to write'); + } + if (false === $fwrite) { + $this->fileSystemException( + 'An error occurred during "%1" fileWrite execution.', + [$this->getWarningMessage()] + ); + } + } + + return $result; + } + + /** + * Throw a FileSystemException with a Phrase of message and optional arguments + * + * @param string $message + * @param array $arguments + * @return void + * @throws FileSystemException + */ + private function fileSystemException($message, $arguments = []) + { + throw new FileSystemException(new Phrase($message, $arguments)); + } + + /** + * Writes one CSV row to the file. + * + * @param resource $resource + * @param array $data + * @param string $delimiter + * @param string $enclosure + * @return int + * @throws FileSystemException + */ + public function filePutCsv($resource, array $data, $delimiter = ',', $enclosure = '"') + { + /** + * Security enhancement for CSV data processing by Excel-like applications. + * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1054702 + * + * @var $value string|Phrase + */ + foreach ($data as $key => $value) { + if (!is_string($value)) { + $value = (string)$value; + } + if (isset($value[0]) && in_array($value[0], ['=', '+', '-'])) { + $data[$key] = ' ' . $value; + } + } + + $result = @fputcsv($resource, $data, $delimiter, $enclosure); + if (!$result) { + throw new FileSystemException( + new Phrase( + 'An error occurred during "%1" filePutCsv execution.', + [$this->getWarningMessage()] + ) + ); + } + return $result; + } + + /** + * Flushes the output + * + * @param resource $resource + * @return bool + * @throws FileSystemException + */ + public function fileFlush($resource) + { + $result = @fflush($resource); + if (!$result) { + throw new FileSystemException( + new Phrase( + 'An error occurred during "%1" fileFlush execution.', + [$this->getWarningMessage()] + ) + ); + } + return $result; + } + + /** + * Lock file in selected mode + * + * @param resource $resource + * @param int $lockMode + * @return bool + * @throws FileSystemException + */ + public function fileLock($resource, $lockMode = LOCK_EX) + { + $result = @flock($resource, $lockMode); + if (!$result) { + throw new FileSystemException( + new Phrase( + 'An error occurred during "%1" fileLock execution.', + [$this->getWarningMessage()] + ) + ); + } + return $result; + } + + /** + * Unlock file + * + * @param resource $resource + * @return bool + * @throws FileSystemException + */ + public function fileUnlock($resource) + { + $result = @flock($resource, LOCK_UN); + if (!$result) { + throw new FileSystemException( + new Phrase( + 'An error occurred during "%1" fileUnlock execution.', + [$this->getWarningMessage()] + ) + ); + } + return $result; + } + + /** + * Returns an absolute path for the given one. + * + * @param string $basePath + * @param string $path + * @param string|null $scheme + * @return string + */ + public function getAbsolutePath($basePath, $path, $scheme = null) + { + // check if the path given is already an absolute path containing the + // basepath. so if the basepath starts at position 0 in the path, we + // must not concatinate them again because path is already absolute. + if (0 === strpos($path, $basePath)) { + return $this->getScheme($scheme) . $path; + } + + return $this->getScheme($scheme) . $basePath . ltrim($this->fixSeparator($path), '/'); + } + + /** + * Retrieves relative path + * + * @param string $basePath + * @param string $path + * @return string + */ + public function getRelativePath($basePath, $path = null) + { + $path = $this->fixSeparator($path); + if (strpos($path, $basePath) === 0 || $basePath == $path . '/') { + $result = substr($path, strlen($basePath)); + } else { + $result = $path; + } + return $result; + } + + /** + * Fixes path separator. + * + * Utility method. + * + * @param string $path + * @return string + */ + protected function fixSeparator($path) + { + return str_replace('\\', '/', $path); + } + + /** + * Return path with scheme + * + * @param null|string $scheme + * @return string + */ + protected function getScheme($scheme = null) + { + return $scheme ? $scheme . '://' : ''; + } + + /** + * Read directory recursively + * + * @param string $path + * @return string[] + * @throws FileSystemException + */ + public function readDirectoryRecursively($path = null) + { + $result = []; + $flags = \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS; + try { + $iterator = new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($path, $flags), + \RecursiveIteratorIterator::CHILD_FIRST + ); + /** @var \FilesystemIterator $file */ + foreach ($iterator as $file) { + $result[] = $file->getPathname(); + } + } catch (\Exception $e) { + throw new FileSystemException(new Phrase($e->getMessage()), $e); + } + return $result; + } + + /** + * Get real path + * + * @param string $path + * + * @return string|bool + */ + public function getRealPath($path) + { + return realpath($path); + } + + /** + * Return correct path for link + * + * @param string $path + * @return mixed + */ + public function getRealPathSafety($path) + { + if (strpos($path, DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR) === false) { + return $path; + } + + //Removing redundant directory separators. + $path = preg_replace( + '/\\' . DIRECTORY_SEPARATOR . '\\' . DIRECTORY_SEPARATOR . '+/', + DIRECTORY_SEPARATOR, + $path + ); + $pathParts = explode(DIRECTORY_SEPARATOR, $path); + $realPath = []; + foreach ($pathParts as $pathPart) { + if ($pathPart == '.') { + continue; + } + if ($pathPart == '..') { + array_pop($realPath); + continue; + } + $realPath[] = $pathPart; + } + return implode(DIRECTORY_SEPARATOR, $realPath); + } +} From 48262c95232dcb280b64fc295ff0c0efd2cdd985 Mon Sep 17 00:00:00 2001 From: Andrii Kasian <akasian@magento.com> Date: Thu, 20 Feb 2020 10:09:47 -0600 Subject: [PATCH 149/229] Fix static test error massage --- .../Magento/Sniffs/Annotation/AnnotationFormatValidator.php | 2 +- .../_files/class_annotation_nospacingbetweenLines_errors.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tests/static/framework/Magento/Sniffs/Annotation/AnnotationFormatValidator.php b/dev/tests/static/framework/Magento/Sniffs/Annotation/AnnotationFormatValidator.php index 20442f9388235..cd4c8689ea004 100644 --- a/dev/tests/static/framework/Magento/Sniffs/Annotation/AnnotationFormatValidator.php +++ b/dev/tests/static/framework/Magento/Sniffs/Annotation/AnnotationFormatValidator.php @@ -94,7 +94,7 @@ private function validateSpacingBetweenShortAndLongDescriptions( && $tokens[$shortPtr]['line'] + 1 === $tokens[$shortPtrEnd]['line'] && $tokens[$shortPtrEnd]['code'] !== T_DOC_COMMENT_TAG ) { - $error = 'There must be exactly one blank line between lines'; + $error = 'There must be exactly one blank line between lines short and long descriptions'; $phpcsFile->addFixableError($error, $shortPtrEnd + 1, 'MethodAnnotation'); } if ($shortPtrEnd != $shortPtr) { diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_nospacingbetweenLines_errors.txt b/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_nospacingbetweenLines_errors.txt index 01c145ad6c29f..0102ca7f79a1f 100644 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_nospacingbetweenLines_errors.txt +++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/Sniffs/Annotation/_files/class_annotation_nospacingbetweenLines_errors.txt @@ -3,10 +3,10 @@ FILE: ...tation/_fixtures/ClassAnnotationNoSpacingBetweenLinesFixture.php\n ----------------------------------------------------------------------\n FOUND 1 ERROR AFFECTING 1 LINE\n ----------------------------------------------------------------------\n - 13 | ERROR | [x] There must be exactly one blank line between lines\n + 13 | ERROR | [x] There must be exactly one blank line between lines short and long descriptions\n ----------------------------------------------------------------------\n PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n ----------------------------------------------------------------------\n \n \n -' \ No newline at end of file +' From a0998fe8af37827e4dbb30e17ca4dd0febf8385a Mon Sep 17 00:00:00 2001 From: Andrii Kasian <akasian@magento.com> Date: Thu, 20 Feb 2020 10:15:52 -0600 Subject: [PATCH 150/229] Fix code format --- .../Magento/Framework/Filesystem/Driver/File.php | 1 + .../Framework/Filesystem/Driver/StatefulFile.php | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/internal/Magento/Framework/Filesystem/Driver/File.php b/lib/internal/Magento/Framework/Filesystem/Driver/File.php index 6f110acc2b918..27df19f66c7aa 100644 --- a/lib/internal/Magento/Framework/Filesystem/Driver/File.php +++ b/lib/internal/Magento/Framework/Filesystem/Driver/File.php @@ -15,6 +15,7 @@ /** * Filesystem driver that uses the local filesystem. + * * Assumed that stat cache is cleanup before test filesystem * * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) diff --git a/lib/internal/Magento/Framework/Filesystem/Driver/StatefulFile.php b/lib/internal/Magento/Framework/Filesystem/Driver/StatefulFile.php index d484ae7556c83..beeb1e928262c 100644 --- a/lib/internal/Magento/Framework/Filesystem/Driver/StatefulFile.php +++ b/lib/internal/Magento/Framework/Filesystem/Driver/StatefulFile.php @@ -454,7 +454,7 @@ public function deleteDirectory($path) public function changePermissions($path, $permissions) { $result = @chmod($this->getScheme() . $path, $permissions); - clearstatcache(true, $this->getScheme() . $path); + clearstatcache(false, $this->getScheme() . $path); if (!$result) { throw new FileSystemException( new Phrase( @@ -483,7 +483,7 @@ public function changePermissionsRecursively($path, $dirPermissions, $filePermis } else { $result = @chmod($path, $dirPermissions); } - clearstatcache(true, $this->getScheme() . $path); + clearstatcache(false, $this->getScheme() . $path); if (!$result) { throw new FileSystemException( @@ -601,12 +601,9 @@ public function fileOpen($path, $mode) */ public function fileReadLine($resource, $length, $ending = null) { - try { + // phpcs:disable $result = @stream_get_line($resource, $length, $ending); - } catch (\Exception $e) { - $result = false; - } - + // phpcs:enable if (false === $result) { throw new FileSystemException( new Phrase('File cannot be read %1', [$this->getWarningMessage()]) From e88833b0a4f27bb67a6dc35d21c47e1389593e96 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Thu, 20 Feb 2020 13:14:41 -0600 Subject: [PATCH 151/229] fixed static tests --- .../Product/Helper/Form/Gallery/Content.php | 12 +++++++---- .../Model/ResourceModel/Product/Gallery.php | 16 +++++++------- .../Test/Unit/Service/ImageResizeTest.php | 21 +++++++++---------- .../Storage/FileNotFoundException.php | 3 ++- .../Storage/RootViolationException.php | 5 ++++- 5 files changed, 33 insertions(+), 24 deletions(-) diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php index 6a3cf54fd363e..e13cc5ff81bd1 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php @@ -14,13 +14,13 @@ namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery; use Magento\Backend\Block\DataProviders\ImageUploadConfig as ImageUploadConfigDataProvider; -use Magento\Framework\Storage\FileNotFoundException; -use Magento\Framework\App\ObjectManager; use Magento\Backend\Block\Media\Uploader; -use Magento\Framework\Storage\StorageProvider; -use Magento\Framework\View\Element\AbstractBlock; use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Exception\FileSystemException; +use Magento\Framework\Storage\FileNotFoundException; +use Magento\Framework\Storage\StorageProvider; +use Magento\Framework\View\Element\AbstractBlock; use Magento\MediaStorage\Helper\File\Storage\Database; /** @@ -173,6 +173,8 @@ public function getAddImagesButton() } /** + * Sync images to database + * * @param string $fileName */ private function syncImageToDatabase(string $fileName): void @@ -187,6 +189,8 @@ private function syncImageToDatabase(string $fileName): void } /** + * Returns file metadata as an associative array + * * @param string $fileName * @return array * @throws FileNotFoundException diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php index 5b7c2f5fe5ef9..b83bbf89b5cc6 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php @@ -35,12 +35,13 @@ class Gallery extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb protected $metadata; /** - * Gallery constructor. - * @param \Magento\Framework\Model\ResourceModel\Db\Context $context - * @param \Magento\Framework\EntityManager\MetadataPool $metadataPool - * @param string $connectionName - * @throws \Exception - */ + * Gallery constructor. + * + * @param \Magento\Framework\Model\ResourceModel\Db\Context $context + * @param \Magento\Framework\EntityManager\MetadataPool $metadataPool + * @param null $connectionName + * @throws \Exception + */ public function __construct( \Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Framework\EntityManager\MetadataPool $metadataPool, @@ -49,7 +50,6 @@ public function __construct( $this->metadata = $metadataPool->getMetadata( \Magento\Catalog\Api\Data\ProductInterface::class ); - parent::__construct($context, $connectionName); } @@ -160,6 +160,8 @@ protected function createBaseLoadSelect($entityId, $storeId, $attributeId) } /** + * Returns media entries from database + * * @param int $storeId * @param array $entityIds * @param bool $preserveSortOrder diff --git a/app/code/Magento/MediaStorage/Test/Unit/Service/ImageResizeTest.php b/app/code/Magento/MediaStorage/Test/Unit/Service/ImageResizeTest.php index 8a15cd7316a57..74913b444e63a 100644 --- a/app/code/Magento/MediaStorage/Test/Unit/Service/ImageResizeTest.php +++ b/app/code/Magento/MediaStorage/Test/Unit/Service/ImageResizeTest.php @@ -6,27 +6,27 @@ namespace Magento\MediaStorage\Test\Unit\Service; use Magento\Catalog\Model\Product\Image\ParamsBuilder; -use Magento\Catalog\Model\View\Asset\ImageFactory as AssetImageFactory; +use Magento\Catalog\Model\Product\Media\ConfigInterface as MediaConfig; +use Magento\Catalog\Model\ResourceModel\Product\Image as ProductImage; use Magento\Catalog\Model\View\Asset\Image as AssetImage; +use Magento\Catalog\Model\View\Asset\ImageFactory as AssetImageFactory; +use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\App\State; +use Magento\Framework\Config\View; use Magento\Framework\DataObject; use Magento\Framework\Filesystem; -use Magento\Framework\Image\Factory as ImageFactory; use Magento\Framework\Image; -use Magento\Catalog\Model\Product\Media\ConfigInterface as MediaConfig; -use Magento\Framework\App\State; +use Magento\Framework\Image\Factory as ImageFactory; use Magento\Framework\Storage\StorageInterface; use Magento\Framework\View\ConfigInterface as ViewConfig; -use Magento\Framework\Config\View; -use Magento\Catalog\Model\ResourceModel\Product\Image as ProductImage; +use Magento\MediaStorage\Helper\File\Storage\Database; use Magento\MediaStorage\Service\ImageResize; use Magento\Store\Model\StoreManagerInterface; use Magento\Theme\Model\Config\Customization as ThemeCustomizationConfig; use Magento\Theme\Model\ResourceModel\Theme\Collection; -use Magento\MediaStorage\Helper\File\Storage\Database; -use Magento\Framework\App\Filesystem\DirectoryList; /** - * Class ImageResizeTest + * Class ImageResizeTest test for \Magento\MediaStorage\Service\ImageResize * * @SuppressWarnings(PHPMD.TooManyFields) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -215,8 +215,7 @@ protected function setUp() $this->viewMock->expects($this->any()) ->method('getMediaEntities') ->willReturn( - ['product_small_image' => - [ + ['product_small_image' => [ 'type' => 'small_image', 'width' => 75, 'height' => 75 diff --git a/lib/internal/Magento/Framework/Storage/FileNotFoundException.php b/lib/internal/Magento/Framework/Storage/FileNotFoundException.php index 1b8dc2d2c62b3..0d85176c3c297 100644 --- a/lib/internal/Magento/Framework/Storage/FileNotFoundException.php +++ b/lib/internal/Magento/Framework/Storage/FileNotFoundException.php @@ -8,7 +8,8 @@ namespace Magento\Framework\Storage; /** - * Class FileNotFoundException + * Exception: FileNotFoundException + * Exception to be thrown when the a requested file does not exists */ class FileNotFoundException extends \RuntimeException { diff --git a/lib/internal/Magento/Framework/Storage/RootViolationException.php b/lib/internal/Magento/Framework/Storage/RootViolationException.php index 996572e582ec0..b7183534075ee 100644 --- a/lib/internal/Magento/Framework/Storage/RootViolationException.php +++ b/lib/internal/Magento/Framework/Storage/RootViolationException.php @@ -7,7 +7,10 @@ namespace Magento\Framework\Storage; - +/** + * Exception: RootViolationException + * Exception to be thrown when the a directory root not specified + */ class RootViolationException extends \RuntimeException { From c86c88becaa7863f1e8e70edffe5cf80768876a6 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Thu, 20 Feb 2020 15:52:18 -0600 Subject: [PATCH 152/229] fixed static tests --- .../Magento/Catalog/Model/ResourceModel/Product/Gallery.php | 2 +- .../Magento/Framework/Storage/FileNotFoundException.php | 2 +- .../Magento/Framework/Storage/RootViolationException.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php index b83bbf89b5cc6..6acda0e574828 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Gallery.php @@ -39,7 +39,7 @@ class Gallery extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb * * @param \Magento\Framework\Model\ResourceModel\Db\Context $context * @param \Magento\Framework\EntityManager\MetadataPool $metadataPool - * @param null $connectionName + * @param string $connectionName * @throws \Exception */ public function __construct( diff --git a/lib/internal/Magento/Framework/Storage/FileNotFoundException.php b/lib/internal/Magento/Framework/Storage/FileNotFoundException.php index 0d85176c3c297..540fc332130e8 100644 --- a/lib/internal/Magento/Framework/Storage/FileNotFoundException.php +++ b/lib/internal/Magento/Framework/Storage/FileNotFoundException.php @@ -9,9 +9,9 @@ /** * Exception: FileNotFoundException + * * Exception to be thrown when the a requested file does not exists */ class FileNotFoundException extends \RuntimeException { - } diff --git a/lib/internal/Magento/Framework/Storage/RootViolationException.php b/lib/internal/Magento/Framework/Storage/RootViolationException.php index b7183534075ee..3ea41bfb57073 100644 --- a/lib/internal/Magento/Framework/Storage/RootViolationException.php +++ b/lib/internal/Magento/Framework/Storage/RootViolationException.php @@ -9,9 +9,9 @@ /** * Exception: RootViolationException + * * Exception to be thrown when the a directory root not specified */ class RootViolationException extends \RuntimeException { - } From f0a7dce30b80604a66b576df9c7c2b2de94316b3 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Thu, 20 Feb 2020 16:08:31 -0600 Subject: [PATCH 153/229] required suppresses --- .../Block/Adminhtml/Product/Helper/Form/Gallery/Content.php | 2 ++ app/code/Magento/Catalog/Helper/Image.php | 1 + app/code/Magento/Catalog/Model/ImageUploader.php | 1 + 3 files changed, 4 insertions(+) diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php index e13cc5ff81bd1..4cf67858fe287 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php @@ -25,6 +25,8 @@ /** * Block for gallery content. + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Content extends \Magento\Backend\Block\Widget { diff --git a/app/code/Magento/Catalog/Helper/Image.php b/app/code/Magento/Catalog/Helper/Image.php index dd2efb7ca22db..f220fa0ef0444 100644 --- a/app/code/Magento/Catalog/Helper/Image.php +++ b/app/code/Magento/Catalog/Helper/Image.php @@ -17,6 +17,7 @@ * * @api * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @since 100.0.2 */ class Image extends AbstractHelper implements ArgumentInterface diff --git a/app/code/Magento/Catalog/Model/ImageUploader.php b/app/code/Magento/Catalog/Model/ImageUploader.php index 00c15830c9510..d333ea589b997 100644 --- a/app/code/Magento/Catalog/Model/ImageUploader.php +++ b/app/code/Magento/Catalog/Model/ImageUploader.php @@ -92,6 +92,7 @@ class ImageUploader * @param string[] $allowedExtensions * @param StorageProvider $storageProvider * @param string[] $allowedMimeTypes + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\MediaStorage\Helper\File\Storage\Database $coreFileStorageDatabase, From 4b5b19fd677e513ef23b2f4e9d7e02b25b181f0e Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Thu, 20 Feb 2020 16:50:44 -0600 Subject: [PATCH 154/229] suppressed factories of external adapters --- .../Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php | 1 + .../Magento/Framework/Storage/AdapterFactory/AzureFactory.php | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/internal/Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php b/lib/internal/Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php index 719c85b6f7f9d..a00e1f2c58022 100644 --- a/lib/internal/Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php +++ b/lib/internal/Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php @@ -20,6 +20,7 @@ class AwsS3Factory implements AdapterFactoryInterface */ public function create(array $options): AdapterInterface { + // phpstan:ignore if (empty($options['client']) || empty($options['bucket'])) { throw new InvalidStorageConfigurationException( "Can't create AWS S3 adapter: required 'client' and/or 'bucket' options are absent" diff --git a/lib/internal/Magento/Framework/Storage/AdapterFactory/AzureFactory.php b/lib/internal/Magento/Framework/Storage/AdapterFactory/AzureFactory.php index 1d548151cb95a..56a7af610476c 100644 --- a/lib/internal/Magento/Framework/Storage/AdapterFactory/AzureFactory.php +++ b/lib/internal/Magento/Framework/Storage/AdapterFactory/AzureFactory.php @@ -20,6 +20,7 @@ class AzureFactory implements AdapterFactoryInterface */ public function create(array $options): AdapterInterface { + // phpstan:ignore if (empty($options['connection_string']) || empty($options['container_name'])) { throw new InvalidStorageConfigurationException( "Can't create Azure Blob storage adapter: " . From eda98746911812e96e4ff2c8c92e426c59867ac5 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" <engcom-vendorworker-charlie@adobe.com> Date: Fri, 21 Feb 2020 09:32:21 +0200 Subject: [PATCH 155/229] fix webapi-graphql tests falling --- .../Magento/Checkout/Model/ShippingInformationManagement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Model/ShippingInformationManagement.php b/app/code/Magento/Checkout/Model/ShippingInformationManagement.php index f2c87b545a47b..cbbbd9a9b4d01 100644 --- a/app/code/Magento/Checkout/Model/ShippingInformationManagement.php +++ b/app/code/Magento/Checkout/Model/ShippingInformationManagement.php @@ -244,7 +244,7 @@ private function validateAddress(?AddressInterface $address): void */ protected function validateQuote(Quote $quote): void { - if (0 === $quote->getItemsCount()) { + if (!$quote->getItemsCount()) { throw new InputException( __('The shipping method can\'t be set for an empty cart. Add an item to cart and try again.') ); From 63c82246b2c6ee9e5da5d86e98c163f5e98c9c70 Mon Sep 17 00:00:00 2001 From: "ivan.pletnyov" <ivan.pletnyov@transoftgroup.com> Date: Fri, 21 Feb 2020 14:37:31 +0200 Subject: [PATCH 156/229] MC-31747: Storefront: Create/update/delete customer addresses --- .../Address/Delete/DeleteAddressTest.php | 217 ++++++++++ .../Address/FormPost/CreateAddressTest.php | 391 +++++++++++++++++ .../Address/FormPost/UpdateAddressTest.php | 403 ++++++++++++++++++ 3 files changed, 1011 insertions(+) create mode 100644 dev/tests/integration/testsuite/Magento/Customer/Controller/Address/Delete/DeleteAddressTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Customer/Controller/Address/FormPost/CreateAddressTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Customer/Controller/Address/FormPost/UpdateAddressTest.php diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/Address/Delete/DeleteAddressTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Address/Delete/DeleteAddressTest.php new file mode 100644 index 0000000000000..86a443d7aa3e1 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Address/Delete/DeleteAddressTest.php @@ -0,0 +1,217 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Customer\Controller\Address\Delete; + +use Magento\Customer\Api\AddressRepositoryInterface; +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Api\Data\AddressInterface; +use Magento\Customer\Model\Session; +use Magento\Framework\App\Request\Http; +use Magento\Framework\Escaper; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Message\MessageInterface; +use Magento\TestFramework\TestCase\AbstractController; + +/** + * Test cases related to check that customer address correctly deleted on frontend + * or wasn't deleted and proper error message appears. + * + * @magentoAppArea frontend + * @magentoDbIsolation enabled + * + * @see \Magento\Customer\Controller\Address\Delete::execute + */ +class DeleteAddressTest extends AbstractController +{ + /** + * @var Escaper + */ + private $escaper; + + /** + * @var Session + */ + private $customerSession; + + /** + * @var AddressRepositoryInterface + */ + private $addressRepository; + + /** + * @var CustomerRepositoryInterface + */ + private $customerRepository; + + /** + * @inheritdoc + */ + protected function setUp() + { + parent::setUp(); + $this->escaper = $this->_objectManager->get(Escaper::class); + $this->customerSession = $this->_objectManager->get(Session::class); + $this->addressRepository = $this->_objectManager->get(AddressRepositoryInterface::class); + $this->customerRepository = $this->_objectManager->get(CustomerRepositoryInterface::class); + } + + /** + * Assert that customer address deleted successfully. + * + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + * + * @return void + */ + public function testSuccessDeleteExistCustomerAddress(): void + { + $customer = $this->customerRepository->get('customer@example.com'); + $customerAddresses = $customer->getAddresses() ?? []; + $this->assertCount(1, $customerAddresses); + /** @var AddressInterface $currentCustomerAddress */ + $currentCustomerAddress = reset($customerAddresses); + $this->customerSession->setCustomerId($customer->getId()); + $this->performAddressDeleteRequest((int)$currentCustomerAddress->getId()); + $this->checkRequestPerformedSuccessfully(); + $customer = $this->customerRepository->get('customer@example.com'); + $this->assertCount(0, $customer->getAddresses() ?? []); + try { + $this->addressRepository->getById((int)$currentCustomerAddress->getId()); + $this->fail('Customer address is not deleted.'); + } catch (LocalizedException $e) { + //Do nothing, this block mean that address deleted successfully from DB. + } + } + + /** + * Check that customer address will not be deleted if we don't pass address ID parameter. + * + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + * + * @return void + */ + public function testDeleteWithoutParam(): void + { + $customer = $this->customerRepository->get('customer@example.com'); + $customerAddresses = $customer->getAddresses() ?? []; + $this->assertCount(1, $customerAddresses); + /** @var AddressInterface $currentCustomerAddress */ + $currentCustomerAddress = reset($customerAddresses); + $this->customerSession->setCustomerId($customer->getId()); + $this->performAddressDeleteRequest(); + $this->assertRedirect($this->stringContains('customer/address/index')); + $customer = $this->customerRepository->get('customer@example.com'); + $this->assertCount(1, $customer->getAddresses() ?? []); + $this->checkAddressWasntDeleted((int)$currentCustomerAddress->getId()); + } + + /** + * Check that customer address will not be deleted if customer id in address and in session are not equals. + * + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + * @magentoDataFixture Magento/Customer/_files/customer_with_uk_address.php + * + * @return void + */ + public function testDeleteDifferentCustomerAddress(): void + { + $firstCustomer = $this->customerRepository->get('customer@example.com'); + $customerAddresses = $firstCustomer->getAddresses() ?? []; + $this->assertCount(1, $customerAddresses); + /** @var AddressInterface $currentCustomerAddress */ + $currentCustomerAddress = reset($customerAddresses); + $this->customerSession->setCustomerId('1'); + $secondCustomer = $this->customerRepository->get('customer_uk_address@test.com'); + $secondCustomerAddresses = $secondCustomer->getAddresses() ?? []; + /** @var AddressInterface $secondCustomerAddress */ + $secondCustomerAddress = reset($secondCustomerAddresses); + $this->performAddressDeleteRequest((int)$secondCustomerAddress->getId()); + $this->checkRequestPerformedWithError(true); + $firstCustomer = $this->customerRepository->get('customer@example.com'); + $this->assertCount(1, $firstCustomer->getAddresses() ?? []); + $this->checkAddressWasntDeleted((int)$currentCustomerAddress->getId()); + } + + /** + * Check that error message appear if we try to delete non-exits address. + * + * @magentoDataFixture Magento/Customer/_files/customer.php + * + * @return void + */ + public function testDeleteNonExistAddress(): void + { + $customer = $this->customerRepository->get('customer@example.com'); + $this->customerSession->setCustomerId($customer->getId()); + $this->performAddressDeleteRequest(999); + $this->checkRequestPerformedWithError(); + } + + /** + * Perform delete request by provided address id. + * + * @param int|null $processAddressId + * @return void + */ + private function performAddressDeleteRequest(?int $processAddressId = null): void + { + $this->getRequest()->setMethod(Http::METHOD_POST); + if (null !== $processAddressId) { + $this->getRequest()->setPostValue(['id' => $processAddressId]); + } + $this->dispatch('customer/address/delete'); + } + + /** + * Check that delete address request performed successfully + * (proper success message and redirect to customer/address/index are appear). + * + * @return void + */ + private function checkRequestPerformedSuccessfully(): void + { + $this->assertRedirect($this->stringContains('customer/address/index')); + $this->assertSessionMessages( + $this->equalTo([(string)__('You deleted the address.')]), + MessageInterface::TYPE_SUCCESS + ); + } + + /** + * Check that delete address request performed with error. + * (proper error messages and redirect to customer/address/edit are appear). + * + * @param bool $isNeedEscapeMessage + * @return void + */ + private function checkRequestPerformedWithError(bool $isNeedEscapeMessage = false): void + { + $message = (string)__("We can't delete the address right now."); + if ($isNeedEscapeMessage) { + $message = $this->escaper->escapeHtml($message); + } + $this->assertSessionMessages($this->contains($message), MessageInterface::TYPE_ERROR); + } + + /** + * Assert that customer address wasn't deleted. + * + * @param int $addressId + * @return void + */ + private function checkAddressWasntDeleted(int $addressId): void + { + try { + $this->addressRepository->getById($addressId); + } catch (LocalizedException $e) { + $this->fail('Expects that customer address will not be deleted.'); + } + } +} diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/Address/FormPost/CreateAddressTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Address/FormPost/CreateAddressTest.php new file mode 100644 index 0000000000000..1e152008043a7 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Address/FormPost/CreateAddressTest.php @@ -0,0 +1,391 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Customer\Controller\Address\FormPost; + +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Api\Data\AddressInterface; +use Magento\Customer\Api\Data\RegionInterface; +use Magento\Customer\Model\CustomerRegistry; +use Magento\Customer\Model\Session; +use Magento\Framework\App\Request\Http; +use Magento\Framework\Escaper; +use Magento\Framework\Message\MessageInterface; +use Magento\TestFramework\Directory\Model\GetRegionIdByName; +use Magento\TestFramework\TestCase\AbstractController; + +/** + * Test cases related to check that customer address correctly created from + * customer account page on frontend or wasn't create and proper error message appears. + * + * @magentoDataFixture Magento/Customer/_files/customer_no_address.php + * + * @magentoAppArea frontend + * @magentoDbIsolation enabled + * + * @see \Magento\Customer\Controller\Address\FormPost::execute + */ +class CreateAddressTest extends AbstractController +{ + /** + * POST static data for create customer address via controller on frontend. + */ + private const STATIC_POST_ADDRESS_DATA = [ + AddressInterface::TELEPHONE => '+380505282812', + AddressInterface::POSTCODE => 75477, + AddressInterface::COUNTRY_ID => 'US', + 'custom_region_name' => 'Alabama', + AddressInterface::CITY => 'CityM', + AddressInterface::STREET => [ + 'Green str, 67', + ], + AddressInterface::FIRSTNAME => 'John', + AddressInterface::LASTNAME => 'Smith', + ]; + + /** + * @var Escaper + */ + private $escaper; + + /** + * @var Session + */ + private $customerSession; + + /** + * @var CustomerRegistry + */ + private $customerRegistry; + + /** + * @var GetRegionIdByName + */ + private $getRegionIdByName; + + /** + * @var CustomerRepositoryInterface + */ + private $customerRepository; + + /** + * @inheritdoc + */ + protected function setUp() + { + parent::setUp(); + $this->escaper = $this->_objectManager->get(Escaper::class); + $this->customerSession = $this->_objectManager->get(Session::class); + $this->customerRegistry = $this->_objectManager->get(CustomerRegistry::class); + $this->getRegionIdByName = $this->_objectManager->get(GetRegionIdByName::class); + $this->customerRepository = $this->_objectManager->get(CustomerRepositoryInterface::class); + $this->customerSession->setCustomerId('5'); + } + + /** + * @inheritdoc + */ + protected function tearDown() + { + $this->customerSession->setCustomerId(null); + $this->customerRegistry->removeByEmail('customer5@example.com'); + parent::tearDown(); + } + + /** + * Assert that default or non-default customer address successfully created via controller on frontend. + * + * @dataProvider postDataForSuccessCreateDefaultAddressDataProvider + * + * @param array $postData + * @param bool $isShippingDefault + * @param bool $isBillingDefault + * @return void + */ + public function testAddressSuccessfullyCreatedAsDefaultForCustomer( + array $postData, + bool $isShippingDefault, + bool $isBillingDefault + ): void { + $customer = $this->customerRepository->get('customer5@example.com'); + $this->assertNull($customer->getDefaultShipping(), 'Customer already have default shipping address'); + $this->assertNull($customer->getDefaultBilling(), 'Customer already have default billing address'); + $this->assertEmpty($customer->getAddresses(), 'Customer already has address'); + $this->performRequestWithData($postData); + $this->checkRequestPerformedSuccessfully(); + $customer = $this->customerRepository->get('customer5@example.com'); + $customerAddresses = $customer->getAddresses(); + $this->assertCount(1, $customerAddresses); + /** @var AddressInterface $address */ + $address = reset($customerAddresses); + $expectedShippingId = $isShippingDefault ? $address->getId() : null; + $expectedBillingId = $isBillingDefault ? $address->getId() : null; + $this->assertEquals($expectedShippingId, $customer->getDefaultShipping()); + $this->assertEquals($expectedBillingId, $customer->getDefaultBilling()); + } + + /** + * Data provider which contain proper POST data for create default or non-default customer address. + * + * @return array + */ + public function postDataForSuccessCreateDefaultAddressDataProvider(): array + { + return [ + 'any_addresses_are_default' => [ + array_merge( + self::STATIC_POST_ADDRESS_DATA, + [AddressInterface::DEFAULT_SHIPPING => 0, AddressInterface::DEFAULT_BILLING => 0] + ), + false, + false, + ], + 'shipping_address_is_default' => [ + array_merge( + self::STATIC_POST_ADDRESS_DATA, + [AddressInterface::DEFAULT_SHIPPING => 1, AddressInterface::DEFAULT_BILLING => 0] + ), + true, + false, + ], + 'billing_address_is_default' => [ + array_merge( + self::STATIC_POST_ADDRESS_DATA, + [AddressInterface::DEFAULT_SHIPPING => 0, AddressInterface::DEFAULT_BILLING => 1] + ), + false, + true, + ], + 'all_addresses_are_default' => [ + array_merge( + self::STATIC_POST_ADDRESS_DATA, + [AddressInterface::DEFAULT_SHIPPING => 1, AddressInterface::DEFAULT_BILLING => 1] + ), + true, + true, + ], + ]; + } + + /** + * Assert that customer address successfully created via controller on frontend. + * + * @dataProvider postDataForSuccessCreateAddressDataProvider + * + * @param array $postData + * @param array $expectedData + * @return void + */ + public function testAddressSuccessfullyCreatedForCustomer(array $postData, array $expectedData): void + { + if (isset($expectedData['custom_region_name'])) { + $expectedData[AddressInterface::REGION_ID] = $this->getRegionIdByName->execute( + $expectedData['custom_region_name'], + $expectedData[AddressInterface::COUNTRY_ID] + ); + unset($expectedData['custom_region_name']); + } + $this->performRequestWithData($postData); + $this->checkRequestPerformedSuccessfully(); + $customer = $this->customerRepository->get('customer5@example.com'); + $customerAddresses = $customer->getAddresses(); + $this->assertCount(1, $customerAddresses); + /** @var AddressInterface $address */ + $address = reset($customerAddresses); + $createdAddressData = $address->__toArray(); + foreach ($expectedData as $fieldCode => $expectedValue) { + $this->assertArrayHasKey($fieldCode, $createdAddressData, "Field $fieldCode wasn't found."); + $this->assertEquals($expectedValue, $createdAddressData[$fieldCode]); + } + } + + /** + * Data provider which contain proper POST data for create customer address. + * + * @return array + */ + public function postDataForSuccessCreateAddressDataProvider(): array + { + return [ + 'required_fields_valid_data' => [ + self::STATIC_POST_ADDRESS_DATA, + [ + AddressInterface::TELEPHONE => '+380505282812', + AddressInterface::COUNTRY_ID => 'US', + AddressInterface::POSTCODE => 75477, + 'custom_region_name' => 'Alabama', + AddressInterface::FIRSTNAME => 'John', + AddressInterface::LASTNAME => 'Smith', + AddressInterface::STREET => ['Green str, 67'], + AddressInterface::CITY => 'CityM', + ], + ], + 'required_field_empty_postcode_for_uk' => [ + array_replace( + self::STATIC_POST_ADDRESS_DATA, + [AddressInterface::POSTCODE => '', AddressInterface::COUNTRY_ID => 'GB'] + ), + [ + AddressInterface::COUNTRY_ID => 'GB', + AddressInterface::POSTCODE => null, + ], + ], + 'required_field_empty_region_id_for_ua' => [ + array_replace( + self::STATIC_POST_ADDRESS_DATA, + [AddressInterface::REGION_ID => '', AddressInterface::COUNTRY_ID => 'UA'] + ), + [ + AddressInterface::COUNTRY_ID => 'UA', + AddressInterface::REGION => [ + RegionInterface::REGION => null, + RegionInterface::REGION_CODE => null, + RegionInterface::REGION_ID => 0, + ], + ], + ], + 'required_field_street_as_array' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::STREET => ['', 'Green str, 67']]), + [AddressInterface::STREET => ['Green str, 67']], + ], + 'field_company_name' => [ + array_merge(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::COMPANY => 'My company']), + [AddressInterface::COMPANY => 'My company'], + ], + 'field_vat_number' => [ + array_merge(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::VAT_ID => 'My VAT number']), + [AddressInterface::VAT_ID => 'My VAT number'], + ], + ]; + } + + /** + * Assert that customer address wasn't created via controller on frontend + * when POST data broken. + * + * @dataProvider postDataForCreateAddressWithErrorDataProvider + * + * @param array $postData + * @param array $expectedSessionMessages + * @return void + */ + public function testAddressWasntCreatedForCustomer(array $postData, array $expectedSessionMessages): void + { + $this->performRequestWithData($postData); + $this->checkRequestPerformedWithInputValidationErrors($expectedSessionMessages); + } + + /** + * Data provider which contain broken POST data for create customer address with error. + * + * @return array + */ + public function postDataForCreateAddressWithErrorDataProvider(): array + { + return [ + 'empty_post_data' => [ + [], + [ + 'One or more input exceptions have occurred.', + '"firstname" is required. Enter and try again.', + '"lastname" is required. Enter and try again.', + '"street" is required. Enter and try again.', + '"city" is required. Enter and try again.', + '"telephone" is required. Enter and try again.', + '"postcode" is required. Enter and try again.', + '"countryId" is required. Enter and try again.', + ] + ], + 'required_field_empty_telephone' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::TELEPHONE => '']), + ['"telephone" is required. Enter and try again.'], + ], + 'required_field_empty_postcode_for_us' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::POSTCODE => '']), + ['"postcode" is required. Enter and try again.'], + ], +// TODO: Uncomment this variation after fix issue https://jira.corp.magento.com/browse/MC-31031 +// 'required_field_empty_region_id_for_us' => [ +// array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::REGION_ID => '']), +// ['"regionId" is required. Enter and try again.'], +// ], + 'required_field_empty_firstname' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::FIRSTNAME => '']), + ['"firstname" is required. Enter and try again.'], + ], + 'required_field_empty_lastname' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::LASTNAME => '']), + ['"lastname" is required. Enter and try again.'], + ], + 'required_field_empty_street_as_string' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::STREET => '']), + ['"street" is required. Enter and try again.'], + ], + 'required_field_empty_street_as_array' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::STREET => []]), + ['"street" is required. Enter and try again.'], + ], + 'required_field_empty_city' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::CITY => '']), + ['"city" is required. Enter and try again.'], + ], + ]; + } + + /** + * Perform request with provided POST data. + * + * @param array $postData + * @return void + */ + private function performRequestWithData(array $postData): void + { + if (isset($postData['custom_region_name'])) { + $postData[AddressInterface::REGION_ID] = $this->getRegionIdByName->execute( + $postData['custom_region_name'], + $postData[AddressInterface::COUNTRY_ID] + ); + unset($postData['custom_region_name']); + } + + $this->getRequest()->setPostValue($postData)->setMethod(Http::METHOD_POST); + $this->dispatch('customer/address/formPost'); + } + + /** + * Check that save address request performed successfully + * (proper success message and redirect to customer/address/index are appear). + * + * @return void + */ + private function checkRequestPerformedSuccessfully(): void + { + $this->assertRedirect($this->stringContains('customer/address/index')); + $this->assertSessionMessages( + $this->equalTo([(string)__('You saved the address.')]), + MessageInterface::TYPE_SUCCESS + ); + } + + /** + * Check that save address request performed with input validation errors + * (proper error messages and redirect to customer/address/edit are appear). + * + * @param array $expectedSessionMessages + * @return void + */ + private function checkRequestPerformedWithInputValidationErrors(array $expectedSessionMessages): void + { + $this->assertRedirect($this->stringContains('customer/address/edit')); + foreach ($expectedSessionMessages as $expectedMessage) { + $this->assertSessionMessages( + $this->contains($this->escaper->escapeHtml((string)__($expectedMessage))), + MessageInterface::TYPE_ERROR + ); + } + } +} diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/Address/FormPost/UpdateAddressTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Address/FormPost/UpdateAddressTest.php new file mode 100644 index 0000000000000..fb18cc45511c8 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Address/FormPost/UpdateAddressTest.php @@ -0,0 +1,403 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Customer\Controller\Address\FormPost; + +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Api\Data\AddressInterface; +use Magento\Customer\Api\Data\RegionInterface; +use Magento\Customer\Model\AddressRegistry; +use Magento\Customer\Model\CustomerRegistry; +use Magento\Customer\Model\Session; +use Magento\Framework\App\Request\Http; +use Magento\Framework\Escaper; +use Magento\Framework\Message\MessageInterface; +use Magento\TestFramework\Directory\Model\GetRegionIdByName; +use Magento\TestFramework\TestCase\AbstractController; + +/** + * Test cases related to check that customer address correctly updated from + * customer account page on frontend or wasn't updated and proper error message appears. + * + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + * + * @magentoAppArea frontend + * @magentoDbIsolation enabled + * + * @see \Magento\Customer\Controller\Address\FormPost::execute + */ +class UpdateAddressTest extends AbstractController +{ + /** + * POST static data for update customer address via controller on frontend. + */ + private const STATIC_POST_ADDRESS_DATA = [ + AddressInterface::TELEPHONE => 9548642, + AddressInterface::POSTCODE => 95556, + AddressInterface::COUNTRY_ID => 'US', + 'custom_region_name' => 'Arkansas', + AddressInterface::CITY => 'Mukachevo', + AddressInterface::STREET => [ + 'Yellow str, 228', + ], + AddressInterface::FIRSTNAME => 'Foma', + AddressInterface::LASTNAME => 'Kiniaev', + ]; + + /** + * @var Escaper + */ + private $escaper; + + /** + * @var Session + */ + private $customerSession; + + /** + * @var AddressRegistry + */ + private $addressRegistry; + + /** + * @var CustomerRegistry + */ + private $customerRegistry; + + /** + * @var GetRegionIdByName + */ + private $getRegionIdByName; + + /** + * @var CustomerRepositoryInterface + */ + private $customerRepository; + + /** + * @var array + */ + private $processedAddressesIds = []; + + /** + * @inheritdoc + */ + protected function setUp() + { + parent::setUp(); + $this->escaper = $this->_objectManager->get(Escaper::class); + $this->customerSession = $this->_objectManager->get(Session::class); + $this->addressRegistry = $this->_objectManager->get(AddressRegistry::class); + $this->customerRegistry = $this->_objectManager->get(CustomerRegistry::class); + $this->getRegionIdByName = $this->_objectManager->get(GetRegionIdByName::class); + $this->customerRepository = $this->_objectManager->get(CustomerRepositoryInterface::class); + $this->customerSession->setCustomerId('1'); + $this->processedAddressesIds[] = 1; + } + + /** + * @inheritdoc + */ + protected function tearDown() + { + $this->customerSession->setCustomerId(null); + $this->customerRegistry->removeByEmail('customer@example.com'); + foreach ($this->processedAddressesIds as $addressesId) { + $this->addressRegistry->remove($addressesId); + } + parent::tearDown(); + } + + /** + * Assert that default customer address successfully changed via controller on frontend. + * + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_two_addresses.php + * + * @dataProvider postDataForSuccessCreateDefaultAddressDataProvider + * + * @param array $postData + * @param int $expectedShippingId + * @param int $expectedBillingId + * @return void + */ + public function testAddressSuccessfullyCreatedAsDefaultForCustomer( + array $postData, + int $expectedShippingId, + int $expectedBillingId + ): void { + $this->processedAddressesIds = [1, 2]; + $customer = $this->customerRepository->get('customer@example.com'); + $this->assertEquals(1, $customer->getDefaultShipping(), "Customer doesn't have shipping address"); + $this->assertEquals(1, $customer->getDefaultBilling(), "Customer doesn't have billing address"); + $this->performRequestWithData($postData, 2); + $this->checkRequestPerformedSuccessfully(); + $customer = $this->customerRepository->get('customer@example.com'); + $this->assertEquals($expectedShippingId, $customer->getDefaultShipping()); + $this->assertEquals($expectedBillingId, $customer->getDefaultBilling()); + } + + /** + * Data provider which contain proper POST data for change default customer address. + * + * @return array + */ + public function postDataForSuccessCreateDefaultAddressDataProvider(): array + { + return [ + 'any_addresses_are_default' => [ + array_merge( + self::STATIC_POST_ADDRESS_DATA, + [AddressInterface::DEFAULT_SHIPPING => 2, AddressInterface::DEFAULT_BILLING => 2] + ), + 2, + 2, + ], + 'shipping_address_is_default' => [ + array_merge( + self::STATIC_POST_ADDRESS_DATA, + [AddressInterface::DEFAULT_BILLING => 2] + ), + 1, + 2, + ], + 'billing_address_is_default' => [ + array_merge( + self::STATIC_POST_ADDRESS_DATA, + [AddressInterface::DEFAULT_SHIPPING => 2] + ), + 2, + 1, + ], + ]; + } + + /** + * Assert that customer address successfully updated via controller on frontend. + * + * @dataProvider postDataForSuccessUpdateAddressDataProvider + * + * @param array $postData + * @param array $expectedData + * @return void + */ + public function testAddressSuccessfullyUpdatedForCustomer(array $postData, array $expectedData): void + { + if (isset($expectedData['custom_region_name'])) { + $expectedData[AddressInterface::REGION_ID] = $this->getRegionIdByName->execute( + $expectedData['custom_region_name'], + $expectedData[AddressInterface::COUNTRY_ID] + ); + unset($expectedData['custom_region_name']); + } + $this->performRequestWithData($postData, 1); + $this->checkRequestPerformedSuccessfully(); + $customer = $this->customerRepository->get('customer@example.com'); + $customerAddresses = $customer->getAddresses(); + $this->assertCount(1, $customerAddresses); + /** @var AddressInterface $address */ + $address = reset($customerAddresses); + $createdAddressData = $address->__toArray(); + foreach ($expectedData as $fieldCode => $expectedValue) { + if (null === $expectedValue) { + $this->assertArrayNotHasKey($fieldCode, $createdAddressData); + continue; + } + $this->assertArrayHasKey($fieldCode, $createdAddressData, "Field $fieldCode wasn't found."); + $this->assertEquals($expectedValue, $createdAddressData[$fieldCode]); + } + } + + /** + * Data provider which contain proper POST data for update customer address. + * + * @return array + */ + public function postDataForSuccessUpdateAddressDataProvider(): array + { + return [ + 'required_fields_valid_data' => [ + self::STATIC_POST_ADDRESS_DATA, + [ + AddressInterface::TELEPHONE => 9548642, + AddressInterface::COUNTRY_ID => 'US', + AddressInterface::POSTCODE => 95556, + 'custom_region_name' => 'Arkansas', + AddressInterface::FIRSTNAME => 'Foma', + AddressInterface::LASTNAME => 'Kiniaev', + AddressInterface::STREET => ['Yellow str, 228'], + AddressInterface::CITY => 'Mukachevo', + ], + ], + 'required_field_empty_postcode_for_uk' => [ + array_replace( + self::STATIC_POST_ADDRESS_DATA, + [AddressInterface::POSTCODE => '', AddressInterface::COUNTRY_ID => 'GB'] + ), + [ + AddressInterface::COUNTRY_ID => 'GB', + AddressInterface::POSTCODE => null, + ], + ], + 'required_field_empty_region_id_for_ua' => [ + array_replace( + self::STATIC_POST_ADDRESS_DATA, + [AddressInterface::REGION_ID => '', AddressInterface::COUNTRY_ID => 'UA'] + ), + [ + AddressInterface::COUNTRY_ID => 'UA', + AddressInterface::REGION => [ + RegionInterface::REGION => null, + RegionInterface::REGION_CODE => null, + RegionInterface::REGION_ID => 0, + ], + ], + ], + 'required_field_street_as_array' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::STREET => ['', 'Green str, 67']]), + [AddressInterface::STREET => ['Green str, 67']], + ], + 'field_company_name' => [ + array_merge(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::COMPANY => 'My company']), + [AddressInterface::COMPANY => 'My company'], + ], + 'field_vat_number' => [ + array_merge(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::VAT_ID => 'My VAT number']), + [AddressInterface::VAT_ID => 'My VAT number'], + ], + ]; + } + + /** + * Assert that customer address wasn't updated via controller on frontend + * when POST data broken. + * + * @dataProvider postDataForUpdateAddressWithErrorDataProvider + * + * @param array $postData + * @param array $expectedSessionMessages + * @return void + */ + public function testAddressWasntUpdatedForCustomer(array $postData, array $expectedSessionMessages): void + { + $this->performRequestWithData($postData, 1); + $this->checkRequestPerformedWithInputValidationErrors($expectedSessionMessages); + } + + /** + * Data provider which contain broken POST data for update customer address with error. + * + * @return array + */ + public function postDataForUpdateAddressWithErrorDataProvider(): array + { + return [ + 'empty_post_data' => [ + [], + [ + 'One or more input exceptions have occurred.', + '"firstname" is required. Enter and try again.', + '"lastname" is required. Enter and try again.', + '"street" is required. Enter and try again.', + '"city" is required. Enter and try again.', + '"telephone" is required. Enter and try again.', + '"postcode" is required. Enter and try again.', + '"countryId" is required. Enter and try again.', + ] + ], + 'required_field_empty_telephone' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::TELEPHONE => '']), + ['"telephone" is required. Enter and try again.'], + ], + 'required_field_empty_postcode_for_us' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::POSTCODE => '']), + ['"postcode" is required. Enter and try again.'], + ], +// TODO: Uncomment this variation after fix issue https://jira.corp.magento.com/browse/MC-31031 +// 'required_field_empty_region_id_for_us' => [ +// array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::REGION_ID => '']), +// ['"regionId" is required. Enter and try again.'], +// ], + 'required_field_empty_firstname' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::FIRSTNAME => '']), + ['"firstname" is required. Enter and try again.'], + ], + 'required_field_empty_lastname' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::LASTNAME => '']), + ['"lastname" is required. Enter and try again.'], + ], + 'required_field_empty_street_as_string' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::STREET => '']), + ['"street" is required. Enter and try again.'], + ], + 'required_field_empty_street_as_array' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::STREET => []]), + ['"street" is required. Enter and try again.'], + ], + 'required_field_empty_city' => [ + array_replace(self::STATIC_POST_ADDRESS_DATA, [AddressInterface::CITY => '']), + ['"city" is required. Enter and try again.'], + ], + ]; + } + + /** + * Perform request with provided POST data. + * + * @param array $postData + * @param int $processAddressId + * @return void + */ + private function performRequestWithData(array $postData, int $processAddressId): void + { + $postData[AddressInterface::ID] = $processAddressId; + if (isset($postData['custom_region_name'])) { + $postData[AddressInterface::REGION_ID] = $this->getRegionIdByName->execute( + $postData['custom_region_name'], + $postData[AddressInterface::COUNTRY_ID] + ); + unset($postData['custom_region_name']); + } + + $this->getRequest()->setPostValue($postData)->setMethod(Http::METHOD_POST); + $this->dispatch('customer/address/formPost'); + } + + /** + * Check that save address request performed successfully + * (proper success message and redirect to customer/address/index are appear). + * + * @return void + */ + private function checkRequestPerformedSuccessfully(): void + { + $this->assertRedirect($this->stringContains('customer/address/index')); + $this->assertSessionMessages( + $this->equalTo([(string)__('You saved the address.')]), + MessageInterface::TYPE_SUCCESS + ); + } + + /** + * Check that save address request performed with input validation errors + * (proper error messages and redirect to customer/address/edit are appear). + * + * @param array $expectedSessionMessages + * @return void + */ + private function checkRequestPerformedWithInputValidationErrors(array $expectedSessionMessages): void + { + $this->assertRedirect($this->stringContains('customer/address/edit')); + foreach ($expectedSessionMessages as $expectedMessage) { + $this->assertSessionMessages( + $this->contains($this->escaper->escapeHtml((string)__($expectedMessage))), + MessageInterface::TYPE_ERROR + ); + } + } +} From d1d76b22d505a7fc83412d5112bb25740670b176 Mon Sep 17 00:00:00 2001 From: "ivan.pletnyov" <ivan.pletnyov@transoftgroup.com> Date: Fri, 21 Feb 2020 14:46:29 +0200 Subject: [PATCH 157/229] MC-31750: Admin: View orders in customer edit page --- .../Edit/Tab/Orders/RenderOrdersTabTest.php | 433 ++++++++++++++++++ .../Sales/_files/orders_with_customer.php | 10 +- 2 files changed, 437 insertions(+), 6 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders/RenderOrdersTabTest.php diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders/RenderOrdersTabTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders/RenderOrdersTabTest.php new file mode 100644 index 0000000000000..1d18814487bf8 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders/RenderOrdersTabTest.php @@ -0,0 +1,433 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Customer\Block\Adminhtml\Edit\Tab\Orders; + +use Magento\Customer\Block\Adminhtml\Edit\Tab\Orders; +use Magento\Customer\Controller\RegistryConstants; +use Magento\Directory\Model\Currency; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\Locale\CurrencyInterface; +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\Registry; +use Magento\Framework\Stdlib\DateTime\TimezoneInterface; +use Magento\Framework\View\Element\UiComponent\DataProvider\Document; +use Magento\Framework\View\LayoutInterface; +use Magento\Sales\Api\Data\OrderInterface; +use Magento\Store\Model\System\Store; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\Helper\Xpath; +use PHPUnit\Framework\TestCase; + +/** + * Test cases related to check that orders tab with customer orders + * grid correctly renders and contains all necessary data. + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @magentoAppArea adminhtml + * @magentoDbIsolation enabled + */ +class RenderOrdersTabTest extends TestCase +{ + private const PATHS_TO_TABLE_BODY = [ + "//div[contains(@data-grid-id, 'customer_orders_grid')]", + "//table[contains(@class, 'data-grid')]", + "//tbody", + ]; + + /** + * @var ObjectManagerInterface + */ + private $objectManager; + + /** + * @var Store + */ + private $store; + + /** + * @var LayoutInterface + */ + private $layout; + + /** + * @var CurrencyInterface + */ + private $currency; + + /** + * @var TimezoneInterface + */ + private $timezone; + + /** + * @var Registry + */ + private $registry; + + /** + * @var ScopeConfigInterface + */ + private $scopeConfig; + + /** + * @var Orders + */ + private $ordersGridBlock; + + /** + * @inheritdoc + */ + protected function setUp() + { + $this->objectManager = Bootstrap::getObjectManager(); + $this->store = $this->objectManager->get(Store::class); + $this->layout = $this->objectManager->get(LayoutInterface::class); + $this->currency = $this->objectManager->get(CurrencyInterface::class); + $this->timezone = $this->objectManager->get(TimezoneInterface::class); + $this->registry = $this->objectManager->get(Registry::class); + $this->scopeConfig = $this->objectManager->get(ScopeConfigInterface::class); + parent::setUp(); + } + + /** + * @inheritdoc + */ + protected function tearDown() + { + $this->registry->unregister(RegistryConstants::CURRENT_CUSTOMER_ID); + parent::tearDown(); + } + + /** + * Assert that customer orders tab renders with message "We couldn't find any records." + * when customer doesn't have any orders. + * + * @magentoDataFixture Magento/Customer/_files/customer.php + * + * @return void + */ + public function testRenderBlockWithoutOrders(): void + { + $this->processCheckOrdersGridByCustomerId(1, 0); + } + + /** + * Assert that customer orders tab renders without message "We couldn't find any records." + * and contains rendered order item when customer has one order. + * + * @magentoDataFixture Magento/Sales/_files/order_with_customer.php + * + * @return void + */ + public function testRenderBlockWithOneOrder(): void + { + $this->processCheckOrdersGridByCustomerId(1, 1); + } + + /** + * Assert that customer orders tab renders without message "We couldn't find any records." + * and contains rendered orders items when customer has few orders. + * + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Sales/_files/orders_with_customer.php + * + * @return void + */ + public function testRenderBlockWithFewOrders(): void + { + $this->processCheckOrdersGridByCustomerId(1, 5); + } + + /** + * Render orders grid and assert that all data rendered as expected. + * + * @param int $customerId + * @param int $expectedOrderCount + * @return void + */ + private function processCheckOrdersGridByCustomerId(int $customerId, int $expectedOrderCount): void + { + $this->registerCustomerId($customerId); + $ordersGridHtml = $this->getOrdersGridHtml(); + $orderItemsData = $this->getOrderGridItemsData(); + $this->assertOrdersCount($expectedOrderCount, $ordersGridHtml); + $this->assertIsEmptyGridMessageArrears($ordersGridHtml, $expectedOrderCount === 0); + $this->checkOrderItemsFields($orderItemsData, $ordersGridHtml); + } + + /** + * Add customer id to registry. + * + * @param int $customerId + * @return void + */ + private function registerCustomerId(int $customerId): void + { + $this->registry->unregister(RegistryConstants::CURRENT_CUSTOMER_ID); + $this->registry->register(RegistryConstants::CURRENT_CUSTOMER_ID, $customerId); + } + + /** + * Render customer orders tab. + * + * @return string + */ + private function getOrdersGridHtml(): string + { + $this->ordersGridBlock = $this->layout->createBlock(Orders::class); + + return $this->ordersGridBlock->toHtml(); + } + + /** + * Check that rendered html contains all provided order items. + * + * @param array $orderItemsData + * @param string $html + * @return void + */ + private function checkOrderItemsFields(array $orderItemsData, string $html): void + { + foreach ($orderItemsData as $itemOrder => $orderItemData) { + $this->assertViewOrderUrl($itemOrder, $orderItemData['order_id'], $html); + $this->assertReorderUrl($itemOrder, $orderItemData['order_id'], $html); + $this->assertStoreViewLabels($itemOrder, $orderItemData['store_view_labels'], $html); + unset($orderItemData['order_id'], $orderItemData['store_view_labels']); + $this->assertColumnsValues($itemOrder, $orderItemData, $html); + } + } + + /** + * Assert that field store_id contains all provided store codes. + * + * @param int $itemOrder + * @param array $storeViewLabels + * @param string $html + * @return void + */ + private function assertStoreViewLabels(int $itemOrder, array $storeViewLabels, string $html): void + { + if (empty($storeViewLabels)) { + return; + } + + $elementPaths = array_merge(self::PATHS_TO_TABLE_BODY, [ + "//tr[{$itemOrder}]", + "//td[contains(@class, 'store_id') and %s]", + ]); + $storeLabelsPaths = []; + foreach ($storeViewLabels as $labelIndex => $storeViewLabel) { + $storeLabelsPaths[] = "contains(text()[{$labelIndex}], '{$storeViewLabel}')"; + } + $checkStoreViewsXPath = sprintf(implode('', $elementPaths), implode(' and ', $storeLabelsPaths)); + $this->assertEquals( + 1, + Xpath::getElementsCountForXpath($checkStoreViewsXPath, $html), + sprintf("Some store view label not found. Labels: %s. Html: %s", implode(', ', $storeViewLabels), $html) + ); + } + + /** + * Assert that columns values as expected. + * + * @param int $itemOrder + * @param array $columnsData + * @param string $html + * @return void + */ + private function assertColumnsValues(int $itemOrder, array $columnsData, string $html): void + { + $elementPaths = array_merge(self::PATHS_TO_TABLE_BODY, [ + "//tr[{$itemOrder}]", + "//td[contains(@class, '%s') and contains(text(), '%s')]", + ]); + $elementXPathTemplate = implode('', $elementPaths); + foreach ($columnsData as $columnName => $columnValue) { + $preparedXPath = sprintf($elementXPathTemplate, $columnName, $columnValue); + $this->assertEquals( + 1, + Xpath::getElementsCountForXpath($preparedXPath, $html), + sprintf("Column %s doesn't have value %s. Html: %s", $columnName, $columnValue, $html) + ); + } + } + + /** + * Assert that rendered html contains URL to reorder by order id. + * + * @param int $itemOrder + * @param int $orderId + * @param string $html + * @return void + */ + private function assertReorderUrl(int $itemOrder, int $orderId, string $html): void + { + $urlLabel = (string)__('Reorder'); + $elementPaths = array_merge(self::PATHS_TO_TABLE_BODY, [ + "//tr[{$itemOrder}]", + "//td[contains(@class, 'action')]", + "//a[contains(@href, 'sales/order_create/reorder/order_id/$orderId') and contains(text(), '{$urlLabel}')]", + ]); + $reorderUrlXPath = implode('', $elementPaths); + $this->assertEquals( + 1, + Xpath::getElementsCountForXpath($reorderUrlXPath, $html), + sprintf('Reorder URL is not as expected. Html: %s', $html) + ); + } + + /** + * Assert that rendered html contains URL to order view by order id. + * + * @param int $itemOrder + * @param int $orderId + * @param string $html + * @return void + */ + private function assertViewOrderUrl(int $itemOrder, int $orderId, string $html): void + { + $elementPaths = array_merge(self::PATHS_TO_TABLE_BODY, [ + "//tr[{$itemOrder}][contains(@title, 'sales/order/view/order_id/{$orderId}')]", + ]); + $viewOrderUrlXPath = implode('', $elementPaths); + $this->assertEquals( + 1, + Xpath::getElementsCountForXpath($viewOrderUrlXPath, $html), + sprintf('URL to view order is not as expected. Html: %s', $html) + ); + } + + /** + * Assert that provided orders count and count in html are equals. + * + * @param int $expectedOrdersCount + * @param string $html + * @return void + */ + private function assertOrdersCount(int $expectedOrdersCount, string $html): void + { + $elementPaths = [ + "//div[contains(@data-grid-id, 'customer_orders_grid')]", + "//div[contains(@class, 'grid-header-row')]", + "//div[contains(@class, 'control-support-text')]", + sprintf("//span[contains(@id, 'grid-total-count') and contains(text(), '%s')]", $expectedOrdersCount), + ]; + $ordersCountXPath = implode('', $elementPaths); + $this->assertEquals( + 1, + Xpath::getElementsCountForXpath($ordersCountXPath, $html), + sprintf('Provided count and count in html are not equals. Html: %s', $html) + ); + } + + /** + * Assert that grid contains or not contains message "We couldn't find any records.". + * + * @param string $html + * @param bool $isMessageAppears + * @return void + */ + private function assertIsEmptyGridMessageArrears(string $html, bool $isMessageAppears = false): void + { + $gridText = (string)__("We couldn't find any records."); + $elementPaths = array_merge(self::PATHS_TO_TABLE_BODY, [ + "//tr[contains(@class, 'tr-no-data')]", + "//td[contains(@class, 'empty-text') and contains(text(), \"{$gridText}\")]", + ]); + $emptyTextXPath = implode('', $elementPaths); + $this->assertEquals( + $isMessageAppears ? 1 : 0, + Xpath::getElementsCountForXpath($emptyTextXPath, $html), + sprintf('Message "We couldn\'t find any records." not found in html. Html: %s', $html) + ); + } + + /** + * Build array with rendered orders for check that all contained data appears. + * + * @return array + */ + private function getOrderGridItemsData(): array + { + $orders = []; + $orderNumber = 1; + /** @var Document $order */ + foreach ($this->ordersGridBlock->getCollection() as $order) { + $orderGrandTotal = $this->prepareGrandTotal( + $order->getData('grand_total'), + $order->getData('order_currency_code') + ); + $orders[$orderNumber] = [ + 'order_id' => (int)$order->getData(OrderInterface::ENTITY_ID), + 'increment_id' => $order->getData(OrderInterface::INCREMENT_ID), + 'created_at' => $this->prepareCreatedAtDate($order->getData(OrderInterface::CREATED_AT)), + 'billing_name' => $order->getData('billing_name'), + 'shipping_name' => $order->getData('shipping_name'), + 'grand_total' => $orderGrandTotal, + 'store_view_labels' => $this->prepareStoreViewLabels([$order->getData(OrderInterface::STORE_ID)]), + ]; + $orderNumber++; + } + + return $orders; + } + + /** + * Normalize created at date. + * + * @param string $createdAt + * @return string + */ + private function prepareCreatedAtDate(string $createdAt): string + { + $date = new \DateTime($createdAt); + + return $this->timezone->formatDateTime($date, \IntlDateFormatter::MEDIUM, \IntlDateFormatter::MEDIUM); + } + + /** + * Normalize grand total. + * + * @param string $grandTotal + * @param string|null $orderCurrencyCode + * @return string + */ + private function prepareGrandTotal(string $grandTotal, ?string $orderCurrencyCode = null): string + { + $resultGrandTotal = sprintf("%f", (float)$grandTotal * 1.0); + $orderCurrencyCode = $orderCurrencyCode ?: + $this->scopeConfig->getValue(Currency::XML_PATH_CURRENCY_BASE, 'default'); + + return $this->currency->getCurrency($orderCurrencyCode)->toCurrency($resultGrandTotal); + } + + /** + * Normalize store ids. + * + * @param array $orderStoreIds + * @return array + */ + private function prepareStoreViewLabels(array $orderStoreIds): array + { + $result = []; + $storeStructure = $this->store->getStoresStructure(false, $orderStoreIds); + $textIndex = 0; + foreach ($storeStructure as $website) { + $textIndex++; + foreach ($website['children'] as $group) { + $textIndex++; + foreach ($group['children'] as $store) { + $textIndex++; + $result[$textIndex] = $store['label']; + } + } + } + + return $result; + } +} diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/orders_with_customer.php b/dev/tests/integration/testsuite/Magento/Sales/_files/orders_with_customer.php index 1a0a94b0ca951..4c962d5527c49 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/_files/orders_with_customer.php +++ b/dev/tests/integration/testsuite/Magento/Sales/_files/orders_with_customer.php @@ -24,7 +24,6 @@ 'base_grand_total' => 120.00, 'store_id' => 1, 'website_id' => 1, - 'payment' => $payment ], [ 'increment_id' => '100000003', @@ -36,7 +35,6 @@ 'total_paid' => 130.00, 'store_id' => 0, 'website_id' => 0, - 'payment' => $payment ], [ 'increment_id' => '100000004', @@ -47,7 +45,6 @@ 'subtotal' => 140.00, 'store_id' => 1, 'website_id' => 1, - 'payment' => $payment ], [ 'increment_id' => '100000005', @@ -59,7 +56,6 @@ 'total_paid' => 150.00, 'store_id' => 1, 'website_id' => 1, - 'payment' => $payment ], [ 'increment_id' => '100000006', @@ -71,7 +67,6 @@ 'total_paid' => 160.00, 'store_id' => 1, 'website_id' => 1, - 'payment' => $payment ], ]; @@ -79,6 +74,8 @@ $orderRepository = $objectManager->create(OrderRepositoryInterface::class); /** @var array $orderData */ foreach ($orders as $orderData) { + $newPayment = clone $payment; + $newPayment->setId(null); /** @var $order \Magento\Sales\Model\Order */ $order = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( \Magento\Sales\Model\Order::class @@ -108,7 +105,8 @@ ->setCustomerId(1) ->setCustomerEmail('customer@example.com') ->setBillingAddress($billingAddress) - ->setShippingAddress($shippingAddress); + ->setShippingAddress($shippingAddress) + ->setPayment($newPayment); $orderRepository->save($order); } From b6f49b9b7b511311ae6f9cbc33277dda96ddac25 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Fri, 21 Feb 2020 15:28:51 +0200 Subject: [PATCH 158/229] Cover mftf test, fix static --- .../Catalog/Test/Mftf/Data/ProductData.xml | 11 ++++++ .../Block/Adminhtml/Product/Lowstock/Grid.php | 31 ++++++++++----- ...LowStockReportFilterProductActionGroup.xml | 21 ++++++++++ ...AdminReportsLowStockDisableProductTest.xml | 39 +++++++++++++++++++ 4 files changed, 92 insertions(+), 10 deletions(-) create mode 100644 app/code/Magento/Reports/Test/Mftf/ActionGroup/AdminLowStockReportFilterProductActionGroup.xml create mode 100644 app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockDisableProductTest.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml index bc04b3b1dcd0b..47578e31ff4e5 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml @@ -211,6 +211,17 @@ <data key="quantity">1001</data> <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> </entity> + <entity name="SimpleProductDisabledStockQuantityZero" type="product"> + <data key="sku" unique="suffix">testSku</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="name" unique="suffix">Simple Product Disabled Quantity Zero</data> + <data key="price">123.00</data> + <data key="visibility">4</data> + <data key="status">2</data> + <data key="quantity">0</data> + <requiredEntity type="product_extension_attribute">EavStock0</requiredEntity> + </entity> <entity name="SimpleProductNotVisibleIndividually" type="product"> <data key="sku" unique="suffix">simple_product_not_visible_individually</data> <data key="type_id">simple</data> diff --git a/app/code/Magento/Reports/Block/Adminhtml/Product/Lowstock/Grid.php b/app/code/Magento/Reports/Block/Adminhtml/Product/Lowstock/Grid.php index 47019fb92e0e0..a7a79ff05640d 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Product/Lowstock/Grid.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Product/Lowstock/Grid.php @@ -3,8 +3,17 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Reports\Block\Adminhtml\Product\Lowstock; +use Magento\Backend\Block\Template\Context; +use Magento\Backend\Helper\Data; +use Magento\Catalog\Model\Product\Attribute\Source\Status; +use Magento\Framework\Data\Collection as DataCollection; +use Magento\Reports\Model\ResourceModel\Product\Lowstock\Collection; +use Magento\Reports\Model\ResourceModel\Product\Lowstock\CollectionFactory; + /** * Adminhtml low stock products report grid block * @@ -15,20 +24,20 @@ class Grid extends \Magento\Backend\Block\Widget\Grid { /** - * @var \Magento\Reports\Model\ResourceModel\Product\Lowstock\CollectionFactory + * @var CollectionFactory */ protected $_lowstocksFactory; /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Backend\Helper\Data $backendHelper - * @param \Magento\Reports\Model\ResourceModel\Product\Lowstock\CollectionFactory $lowstocksFactory + * @param Context $context + * @param Data $backendHelper + * @param CollectionFactory $lowstocksFactory * @param array $data */ public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Backend\Helper\Data $backendHelper, - \Magento\Reports\Model\ResourceModel\Product\Lowstock\CollectionFactory $lowstocksFactory, + Context $context, + Data $backendHelper, + CollectionFactory $lowstocksFactory, array $data = [] ) { $this->_lowstocksFactory = $lowstocksFactory; @@ -36,6 +45,8 @@ public function __construct( } /** + * @inheritDoc + * * @return \Magento\Backend\Block\Widget\Grid */ protected function _prepareCollection() @@ -56,7 +67,7 @@ protected function _prepareCollection() $storeId = null; } - /** @var $collection \Magento\Reports\Model\ResourceModel\Product\Lowstock\Collection */ + /** @var $collection Collection */ $collection = $this->_lowstocksFactory->create()->addAttributeToSelect( '*' )->filterByIsQtyProductTypes()->joinInventoryItem( @@ -67,10 +78,10 @@ protected function _prepareCollection() $storeId )->setOrder( 'qty', - \Magento\Framework\Data\Collection::SORT_ORDER_ASC + DataCollection::SORT_ORDER_ASC )->addAttributeToFilter( 'status', - \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED + Status::STATUS_ENABLED ); if ($storeId) { diff --git a/app/code/Magento/Reports/Test/Mftf/ActionGroup/AdminLowStockReportFilterProductActionGroup.xml b/app/code/Magento/Reports/Test/Mftf/ActionGroup/AdminLowStockReportFilterProductActionGroup.xml new file mode 100644 index 0000000000000..e77502497d83a --- /dev/null +++ b/app/code/Magento/Reports/Test/Mftf/ActionGroup/AdminLowStockReportFilterProductActionGroup.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="AdminLowStockReportFilterProductActionGroup"> + <annotations> + <description>Filter in "Low Stock" report with by product SKU.</description> + </annotations> + <arguments> + <argument name="sku" type="string" defaultValue="{{_defaultProduct.sku}}"/> + </arguments> + + <fillField selector="{{LowStockReportFilterSection.productSku}}" userInput="{{sku}}" stepKey="fillSkuFilterField" /> + <click selector="{{LowStockReportFilterSection.searchButton}}" stepKey="clickSearch"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockDisableProductTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockDisableProductTest.xml new file mode 100644 index 0000000000000..841ba89b643bf --- /dev/null +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockDisableProductTest.xml @@ -0,0 +1,39 @@ +<?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="AdminReportsLowStockDisableProductTest"> + <annotations> + <features value="Reports"/> + <group value="reports"/> + <title value="The disabled product doesn't present on 'Low Stock' report."/> + <description value="A product must don't presents on 'Low Stock' report if the product is disabled."/> + </annotations> + <before> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + + <!-- Created disabled simple product with stock quantity zero --> + <createData entity="SimpleProductDisabledStockQuantityZero" stepKey="createProduct"/> + </before> + <after> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <actionGroup ref="logout" stepKey="logout"/> + </after> + + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsLowStockPage"> + <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> + <argument name="submenuUiId" value="{{AdminMenuReportsProductsLowStock.dataUiId}}"/> + </actionGroup> + <actionGroup ref="AdminLowStockReportFilterProductActionGroup" stepKey="assertProductInReport"> + <argument name="sku" value="{{SimpleProductDisabledStockQuantityZero.sku}}"/> + </actionGroup> + + <!-- Verify doesn't present in the report --> + <dontSeeElement selector="{{LowStockProductGridSection.productSku}}" stepKey="assertSelector"/> + </test> +</tests> From 5f14e0e07234b798d776637884907327cc4453af Mon Sep 17 00:00:00 2001 From: Oleh Usik <o.usik@atwix.com> Date: Fri, 21 Feb 2020 20:29:25 +0200 Subject: [PATCH 159/229] Added assertions for MFTF test --- .../Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml | 1 + .../Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml b/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml index f18de49761533..629599eba84fe 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Section/AdminManageSwatchSection.xml @@ -18,6 +18,7 @@ <element name="nthIsDefault" type="input" selector="(//input[@name='defaultvisual[]'])[{{var}}]" parameterized="true"/> <element name="nthSwatchAdminDescription" type="input" selector="#swatch-text-options-panel table tbody tr:nth-of-type({{var}}) td:nth-of-type(4) input" parameterized="true"/> <element name="nthVisualSwatch" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) .swatches-visual-col" parameterized="true"/> + <element name="chooserBlock" type="block" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) .swatches-visual-col .swatch_sub-menu_container" parameterized="true"/> <!-- Selector for Admin Description input where the index is zero-based --> <element name="swatchAdminDescriptionByIndex" type="input" selector="input[name='optiontext[value][option_{{index}}][0]']" parameterized="true"/> <element name="nthChooseColor" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) .swatch_row_name.colorpicker_handler" parameterized="true"/> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml index 7582444671f92..ca46b30014296 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml @@ -28,6 +28,8 @@ <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch3"/> <click selector="{{AdminManageSwatchSection.nthVisualSwatch('3')}}" stepKey="clickSwatch3"/> <click selector="{{AdminManageSwatchSection.nthVisualSwatch('2')}}" stepKey="clickSwatch2"/> + <dontSeeElement selector="{{AdminManageSwatchSection.chooserBlock('3')}}" stepKey="dontSeeSwatch3"/> <click selector="{{AdminManageSwatchSection.nthVisualSwatch('1')}}" stepKey="clickSwatch1"/> + <dontSeeElement selector="{{AdminManageSwatchSection.chooserBlock('2')}}" stepKey="dontSeeSwatch2"/> </test> </tests> From bbb95551726f0608395783b2558a9828e8f8a2b8 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Fri, 21 Feb 2020 14:05:34 -0600 Subject: [PATCH 160/229] ignored factories of external adapters --- .../Magento/Test/Php/_files/phpstan/blacklist/common.txt | 2 ++ .../Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php | 1 - .../Magento/Framework/Storage/AdapterFactory/AzureFactory.php | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/blacklist/common.txt index f54defbd57604..6a7c814f50524 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/blacklist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/blacklist/common.txt @@ -14,3 +14,5 @@ dev/tests/api-functional/testsuite/Magento/Customer/Api/AddressRepositoryTest.ph dev/tests/api-functional/testsuite/Magento/Framework/Model/Entity/HydratorTest.php dev/tests/api-functional/testsuite/Magento/Integration/Model/AdminTokenServiceTest.php dev/tests/api-functional/testsuite/Magento/Integration/Model/CustomerTokenServiceTest.php +lib/internal/Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php +lib/internal/Magento/Framework/Storage/AdapterFactory/AzureFactory.php diff --git a/lib/internal/Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php b/lib/internal/Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php index a00e1f2c58022..719c85b6f7f9d 100644 --- a/lib/internal/Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php +++ b/lib/internal/Magento/Framework/Storage/AdapterFactory/AwsS3Factory.php @@ -20,7 +20,6 @@ class AwsS3Factory implements AdapterFactoryInterface */ public function create(array $options): AdapterInterface { - // phpstan:ignore if (empty($options['client']) || empty($options['bucket'])) { throw new InvalidStorageConfigurationException( "Can't create AWS S3 adapter: required 'client' and/or 'bucket' options are absent" diff --git a/lib/internal/Magento/Framework/Storage/AdapterFactory/AzureFactory.php b/lib/internal/Magento/Framework/Storage/AdapterFactory/AzureFactory.php index 56a7af610476c..1d548151cb95a 100644 --- a/lib/internal/Magento/Framework/Storage/AdapterFactory/AzureFactory.php +++ b/lib/internal/Magento/Framework/Storage/AdapterFactory/AzureFactory.php @@ -20,7 +20,6 @@ class AzureFactory implements AdapterFactoryInterface */ public function create(array $options): AdapterInterface { - // phpstan:ignore if (empty($options['connection_string']) || empty($options['container_name'])) { throw new InvalidStorageConfigurationException( "Can't create Azure Blob storage adapter: " . From e6254970ee6db389714c4c5854644e4bf0c14631 Mon Sep 17 00:00:00 2001 From: Nazar Klovanych <nazarn96@gmail.com> Date: Fri, 21 Feb 2020 22:30:10 +0200 Subject: [PATCH 161/229] use full qualified name in annotaion for methods --- app/code/Magento/Catalog/Model/Product/Type.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/Type.php b/app/code/Magento/Catalog/Model/Product/Type.php index 4c2919147944c..d7dc74e0d0cc3 100644 --- a/app/code/Magento/Catalog/Model/Product/Type.php +++ b/app/code/Magento/Catalog/Model/Product/Type.php @@ -5,9 +5,7 @@ */ namespace Magento\Catalog\Model\Product; -use Magento\Catalog\Api\Data\ProductInterface; use Magento\Catalog\Model\Product; -use Magento\Catalog\Model\Product\Type\AbstractType; use Magento\Catalog\Model\Product\Type\Pool; use Magento\Catalog\Model\Product\Type\Price; use Magento\Catalog\Model\Product\Type\Price\Factory as PriceFactory; @@ -15,7 +13,6 @@ use Magento\Catalog\Model\ProductTypes\ConfigInterface; use Magento\Framework\Data\OptionSourceInterface; use Magento\Framework\Pricing\PriceInfo\Factory as PriceInfoFactory; -use Magento\Framework\Pricing\PriceInfoInterface; /** * Product type model @@ -113,8 +110,8 @@ public function __construct( /** * Factory to product singleton product type instances * - * @param ProductInterface $product - * @return AbstractType + * @param \Magento\Catalog\Api\Data\ProductInterface $product + * @return \Magento\Catalog\Model\Product\Type\AbstractType */ public function factory($product) { @@ -137,7 +134,7 @@ public function factory($product) * Product type price model factory * * @param string $productType - * @return Price + * @return \Magento\Catalog\Model\Product\Type\Price */ public function priceFactory($productType) { @@ -161,7 +158,7 @@ public function priceFactory($productType) * Get Product Price Info object * * @param Product $saleableItem - * @return PriceInfoInterface + * @return \Magento\Framework\Pricing\PriceInfoInterface */ public function getPriceInfo(Product $saleableItem) { From 806b4f9dfa63b5319fa3891c9bab911516b21747 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Sat, 22 Feb 2020 00:44:52 +0100 Subject: [PATCH 162/229] #26973 Fatal error when Image params does not contain width and height. --- app/code/Magento/Catalog/Block/Product/ImageFactory.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/Block/Product/ImageFactory.php b/app/code/Magento/Catalog/Block/Product/ImageFactory.php index 172cd794edfb9..0c69a40b246bb 100644 --- a/app/code/Magento/Catalog/Block/Product/ImageFactory.php +++ b/app/code/Magento/Catalog/Block/Product/ImageFactory.php @@ -123,7 +123,7 @@ private function getLabel(Product $product, string $imageType): string if (empty($label)) { $label = $product->getName(); } - return (string) $label; + return (string)$label; } /** @@ -161,7 +161,7 @@ public function create(Product $product, string $imageId, array $attributes = nu } $attributes = $attributes === null ? [] : $attributes; - + $data = [ 'data' => [ 'template' => 'Magento_Catalog::product/image_with_borders.phtml', @@ -169,7 +169,7 @@ public function create(Product $product, string $imageId, array $attributes = nu 'width' => $imageMiscParams['image_width'], 'height' => $imageMiscParams['image_height'], 'label' => $this->getLabel($product, $imageMiscParams['image_type']), - 'ratio' => $this->getRatio($imageMiscParams['image_width'], $imageMiscParams['image_height']), + 'ratio' => $this->getRatio($imageMiscParams['image_width'] ?? 0, $imageMiscParams['image_height'] ?? 0), 'custom_attributes' => $this->getStringCustomAttributes($attributes), 'class' => $this->getClass($attributes), 'product_id' => $product->getId() From 74a03861375b1b1e8fa974b2eceb7677c691fcb7 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Sat, 22 Feb 2020 00:51:46 +0100 Subject: [PATCH 163/229] #26973 Add test coverage for fixed case --- .../Unit/Block/Product/ImageFactoryTest.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Product/ImageFactoryTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Product/ImageFactoryTest.php index 95b06e40602bf..9a15a5c6c7243 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Product/ImageFactoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Product/ImageFactoryTest.php @@ -95,6 +95,7 @@ public function createDataProvider(): array return [ $this->getTestDataWithoutAttributes(), $this->getTestDataWithAttributes(), + $this->getTestDataWithoutDimensions() ]; } @@ -209,4 +210,21 @@ private function getTestDataWithAttributes(): array ], ]; } + + /** + * @return array + */ + private function getTestDataWithoutDimensions(): array + { + $data = $this->getTestDataWithoutAttributes(); + + $data['data']['imageParamsBuilder']['image_width'] = null; + $data['data']['imageParamsBuilder']['image_height'] = null; + + $data['expected']['data']['width'] = null; + $data['expected']['data']['height'] = null; + $data['expected']['data']['ratio'] = 1.0; + + return $data; + } } From 7cd12dd62b71f642ff07cdb2f5745953dd3a6f47 Mon Sep 17 00:00:00 2001 From: Oleh Usik <o.usik@atwix.com> Date: Sat, 22 Feb 2020 11:02:26 +0200 Subject: [PATCH 164/229] Added some changes to MFTF test --- .../Test/AdminCheckColorUploadChooserVisualSwatchTest.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml index ca46b30014296..65ac017072917 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCheckColorUploadChooserVisualSwatchTest.xml @@ -27,9 +27,13 @@ <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch2"/> <click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch3"/> <click selector="{{AdminManageSwatchSection.nthVisualSwatch('3')}}" stepKey="clickSwatch3"/> + <click selector="{{AdminManageSwatchSection.nthVisualSwatch('2')}}" stepKey="clickSwatch2"/> + <seeElement selector="{{AdminManageSwatchSection.chooserBlock('2')}}" stepKey="seeSwatch2"/> <dontSeeElement selector="{{AdminManageSwatchSection.chooserBlock('3')}}" stepKey="dontSeeSwatch3"/> + <click selector="{{AdminManageSwatchSection.nthVisualSwatch('1')}}" stepKey="clickSwatch1"/> + <seeElement selector="{{AdminManageSwatchSection.chooserBlock('1')}}" stepKey="seeSwatch1"/> <dontSeeElement selector="{{AdminManageSwatchSection.chooserBlock('2')}}" stepKey="dontSeeSwatch2"/> </test> </tests> From 84eb1fcb8b51763a3d65933a54440a05b1f17d37 Mon Sep 17 00:00:00 2001 From: Sathish <srsathish92@gmail.com> Date: Sat, 22 Feb 2020 21:47:49 +0530 Subject: [PATCH 165/229] #26800 Fixed Undefined variable in ProductLink/Management --- .../Api/ProductLinkManagementInterface.php | 15 +- .../Catalog/Model/ProductLink/Management.php | 61 ++- .../Unit/Model/ProductLink/ManagementTest.php | 411 ++++++++++++------ 3 files changed, 320 insertions(+), 167 deletions(-) diff --git a/app/code/Magento/Catalog/Api/ProductLinkManagementInterface.php b/app/code/Magento/Catalog/Api/ProductLinkManagementInterface.php index 8286175123fe2..c3cec823ec9f7 100644 --- a/app/code/Magento/Catalog/Api/ProductLinkManagementInterface.php +++ b/app/code/Magento/Catalog/Api/ProductLinkManagementInterface.php @@ -6,6 +6,11 @@ namespace Magento\Catalog\Api; +use Magento\Catalog\Api\Data\ProductLinkInterface; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Exception\CouldNotSaveException; +use Magento\Framework\Exception\InputException; + /** * @api * @since 100.0.2 @@ -17,7 +22,8 @@ interface ProductLinkManagementInterface * * @param string $sku * @param string $type - * @return \Magento\Catalog\Api\Data\ProductLinkInterface[] + * @throws NoSuchEntityException + * @return ProductLinkInterface[] */ public function getLinkedItemsByType($sku, $type); @@ -25,9 +31,10 @@ public function getLinkedItemsByType($sku, $type); * Assign a product link to another product * * @param string $sku - * @param \Magento\Catalog\Api\Data\ProductLinkInterface[] $items - * @throws \Magento\Framework\Exception\NoSuchEntityException - * @throws \Magento\Framework\Exception\CouldNotSaveException + * @param ProductLinkInterface[] $items + * @throws NoSuchEntityException + * @throws CouldNotSaveException + * @throws InputException * @return bool */ public function setProductLinks($sku, array $items); diff --git a/app/code/Magento/Catalog/Model/ProductLink/Management.php b/app/code/Magento/Catalog/Model/ProductLink/Management.php index 066549274b07c..b61adb016b99b 100644 --- a/app/code/Magento/Catalog/Model/ProductLink/Management.php +++ b/app/code/Magento/Catalog/Model/ProductLink/Management.php @@ -6,30 +6,32 @@ namespace Magento\Catalog\Model\ProductLink; -use Magento\Catalog\Api\Data; use Magento\Framework\Exception\CouldNotSaveException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Exception\InputException; +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Catalog\Model\Product\LinkTypeProvider; +use Magento\Catalog\Api\ProductLinkManagementInterface; -class Management implements \Magento\Catalog\Api\ProductLinkManagementInterface +class Management implements ProductLinkManagementInterface { /** - * @var \Magento\Catalog\Api\ProductRepositoryInterface + * @var ProductRepositoryInterface */ protected $productRepository; /** - * @var \Magento\Catalog\Model\Product\LinkTypeProvider + * @var LinkTypeProvider */ protected $linkTypeProvider; /** - * @param \Magento\Catalog\Api\ProductRepositoryInterface $productRepository - * @param \Magento\Catalog\Model\Product\LinkTypeProvider $linkTypeProvider + * @param ProductRepositoryInterface $productRepository + * @param LinkTypeProvider $linkTypeProvider */ public function __construct( - \Magento\Catalog\Api\ProductRepositoryInterface $productRepository, - \Magento\Catalog\Model\Product\LinkTypeProvider $linkTypeProvider + ProductRepositoryInterface $productRepository, + LinkTypeProvider $linkTypeProvider ) { $this->productRepository = $productRepository; $this->linkTypeProvider = $linkTypeProvider; @@ -67,43 +69,38 @@ public function getLinkedItemsByType($sku, $type) */ public function setProductLinks($sku, array $items) { + + if (empty($items)) { + throw InputException::invalidFieldValue('items', 'empty array'); + } + $linkTypes = $this->linkTypeProvider->getLinkTypes(); // Check if product link type is set and correct - if (!empty($items)) { - foreach ($items as $newLink) { - $type = $newLink->getLinkType(); - if ($type == null) { - throw InputException::requiredField("linkType"); - } - if (!isset($linkTypes[$type])) { - throw new NoSuchEntityException( - __('The "%1" link type wasn\'t found. Verify the type and try again.', $type) - ); - } + foreach ($items as $newLink) { + $type = $newLink->getLinkType(); + if ($type == null) { + throw InputException::requiredField("linkType"); + } + if (!isset($linkTypes[$type])) { + throw new NoSuchEntityException( + __('The "%1" link type wasn\'t found. Verify the type and try again.', $type) + ); } } $product = $this->productRepository->get($sku); - // Replace only links of the specified type $existingLinks = $product->getProductLinks(); - $newLinks = []; - if (!empty($existingLinks)) { - foreach ($existingLinks as $link) { - if ($link->getLinkType() != $type) { - $newLinks[] = $link; - } - } - $newLinks = array_merge($newLinks, $items); - } else { - $newLinks = $items; - } + $newLinks = array_merge($existingLinks, $items); + $product->setProductLinks($newLinks); try { $this->productRepository->save($product); } catch (\Exception $exception) { - throw new CouldNotSaveException(__('The linked products data is invalid. Verify the data and try again.')); + throw new CouldNotSaveException( + __('The linked products data is invalid. Verify the data and try again.') + ); } return true; diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductLink/ManagementTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductLink/ManagementTest.php index ab52d87f56291..1090b6c779e74 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ProductLink/ManagementTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductLink/ManagementTest.php @@ -7,45 +7,66 @@ namespace Magento\Catalog\Test\Unit\Model\ProductLink; use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\CouldNotSaveException; +use Magento\Catalog\Model\ProductLink\Management; +use Magento\Catalog\Model\ProductRepository; +use Magento\Catalog\Model\Product; +use Magento\Catalog\Model\Product\LinkTypeProvider; +use Magento\Catalog\Model\ProductLink\Link; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; -class ManagementTest extends \PHPUnit\Framework\TestCase +/** + * Unit Test for Magento\Catalog\Model\ProductLink\Management + */ +class ManagementTest extends TestCase { + + const STUB_PRODUCT_SKU_1 = 'Simple Product 1'; + const STUB_PRODUCT_SKU_2 = 'Simple Product 2'; + const STUB_PRODUCT_TYPE = 'simple'; + const STUB_LINK_TYPE = 'related'; + const STUB_BAD_TYPE = 'bad type'; + /** - * @var \Magento\Catalog\Model\ProductLink\Management + * @var Management */ protected $model; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var ProductRepository|MockObject */ - protected $productRepositoryMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var Product|MockObject */ protected $productMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var LinkTypeProvider|MockObject */ protected $linkTypeProviderMock; /** - * @var \Magento\Framework\ObjectManagerInterface + * @var ObjectManagerHelper */ protected $objectManager; - protected function setUp() + /** + * @inheritDoc + */ + protected function setUp(): void { - $this->productRepositoryMock = $this->createMock(\Magento\Catalog\Model\ProductRepository::class); - $this->productMock = $this->createMock(\Magento\Catalog\Model\Product::class); - - $this->linkTypeProviderMock = $this->createMock(\Magento\Catalog\Model\Product\LinkTypeProvider::class); + $this->productRepositoryMock = $this->createMock(ProductRepository::class); + $this->productMock = $this->createMock(Product::class); + $this->linkTypeProviderMock = $this->createMock(LinkTypeProvider::class); - $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); + $this->objectManager = new ObjectManagerHelper($this); $this->model = $this->objectManager->getObject( - \Magento\Catalog\Model\ProductLink\Management::class, + Management::class, [ 'productRepository' => $this->productRepositoryMock, 'linkTypeProvider' => $this->linkTypeProviderMock @@ -53,193 +74,321 @@ protected function setUp() ); } - public function testGetLinkedItemsByType() + /** + * Test getLinkedItemsByType() + * + * @return void + */ + public function testGetLinkedItemsByType(): void { - $productSku = 'Simple Product 1'; - $linkType = 'related'; - $this->productRepositoryMock->expects($this->once())->method('get')->with($productSku) + $productSku = self::STUB_PRODUCT_SKU_1; + $linkType = self::STUB_LINK_TYPE; + + $this->productRepositoryMock->expects($this->once()) + ->method('get') + ->with($productSku) ->willReturn($this->productMock); - $inputRelatedLink = $this->objectManager->getObject(\Magento\Catalog\Model\ProductLink\Link::class); - $inputRelatedLink->setProductSku($productSku); - $inputRelatedLink->setLinkType($linkType); - $inputRelatedLink->setData("sku", "Simple Product 2"); - $inputRelatedLink->setData("type_id", "simple"); - $inputRelatedLink->setPosition(0); - $links = [$inputRelatedLink]; + $links = $this->getInputRelatedLinkMock( + $productSku, + $linkType, + self::STUB_PRODUCT_SKU_2, + self::STUB_PRODUCT_TYPE + ); - $linkTypes = ['related' => 1, 'upsell' => 4, 'crosssell' => 5, 'associated' => 3]; - $this->linkTypeProviderMock->expects($this->once()) - ->method('getLinkTypes') - ->willReturn($linkTypes); + $this->getLinkTypesMock(); + + $this->productMock->expects($this->once()) + ->method('getProductLinks') + ->willReturn($links); - $this->productMock->expects($this->once())->method('getProductLinks')->willReturn($links); - $this->assertEquals($links, $this->model->getLinkedItemsByType($productSku, $linkType)); + $this->assertEquals( + $links, + $this->model->getLinkedItemsByType($productSku, $linkType) + ); } /** - * @expectedException \Magento\Framework\Exception\NoSuchEntityException - * @expectedExceptionMessage The "bad type" link type is unknown. Verify the type and try again. + * Test for GetLinkedItemsByType() with wrong type + * + * @return void + * @throws NoSuchEntityException */ - public function testGetLinkedItemsByTypeWithWrongType() + public function testGetLinkedItemsByTypeWithWrongType(): void { - $productSku = 'Simple Product 1'; - $linkType = 'bad type'; - $this->productRepositoryMock->expects($this->never())->method('get')->with($productSku) + $productSku = self::STUB_PRODUCT_SKU_1; + $linkType = self::STUB_BAD_TYPE; + + $this->productRepositoryMock->expects($this->never()) + ->method('get') + ->with($productSku) ->willReturn($this->productMock); - $inputRelatedLink = $this->objectManager->getObject(\Magento\Catalog\Model\ProductLink\Link::class); - $inputRelatedLink->setProductSku($productSku); - $inputRelatedLink->setLinkType($linkType); - $inputRelatedLink->setData("sku", "Simple Product 2"); - $inputRelatedLink->setData("type_id", "simple"); - $inputRelatedLink->setPosition(0); - $links = [$inputRelatedLink]; + $links = $this->getInputRelatedLinkMock( + $productSku, + $linkType, + self::STUB_PRODUCT_SKU_2, + self::STUB_PRODUCT_TYPE + ); - $linkTypes = ['related' => 1, 'upsell' => 4, 'crosssell' => 5, 'associated' => 3]; - $this->linkTypeProviderMock->expects($this->once()) - ->method('getLinkTypes') - ->willReturn($linkTypes); + $this->getLinkTypesMock(); + + $this->productMock->expects($this->never()) + ->method('getProductLinks') + ->willReturn($links); + + $this->expectException(NoSuchEntityException::class); + $this->expectExceptionMessage( + 'The "bad type" link type is unknown. Verify the type and try again.' + ); - $this->productMock->expects($this->never())->method('getProductLinks')->willReturn($links); $this->model->getLinkedItemsByType($productSku, $linkType); } - public function testSetProductLinks() + /** + * Test for setProductLinks() + * + * @return void + */ + public function testSetProductLinks(): void { - $productSku = 'Simple Product 1'; - $linkType = 'related'; - $this->productRepositoryMock->expects($this->once())->method('get')->with($productSku) + $productSku = self::STUB_PRODUCT_SKU_1; + $linkType = self::STUB_LINK_TYPE; + + $this->productRepositoryMock->expects($this->once()) + ->method('get') + ->with($productSku) ->willReturn($this->productMock); - $inputRelatedLink = $this->objectManager->getObject(\Magento\Catalog\Model\ProductLink\Link::class); - $inputRelatedLink->setProductSku($productSku); - $inputRelatedLink->setLinkType($linkType); - $inputRelatedLink->setData("sku", "Simple Product 1"); - $inputRelatedLink->setData("type_id", "related"); - $inputRelatedLink->setPosition(0); - $links = [$inputRelatedLink]; + $links = $this->getInputRelatedLinkMock( + $productSku, + $linkType, + self::STUB_PRODUCT_SKU_2, + self::STUB_PRODUCT_TYPE + ); - $linkTypes = ['related' => 1, 'upsell' => 4, 'crosssell' => 5, 'associated' => 3]; - $this->linkTypeProviderMock->expects($this->once()) - ->method('getLinkTypes') - ->willReturn($linkTypes); + $this->getLinkTypesMock(); + + $this->productMock->expects($this->once()) + ->method('getProductLinks') + ->willReturn([]); + $this->productMock->expects($this->once()) + ->method('setProductLinks') + ->with($links); - $this->productMock->expects($this->once())->method('getProductLinks')->willReturn([]); - $this->productMock->expects($this->once())->method('setProductLinks')->with($links); $this->assertTrue($this->model->setProductLinks($productSku, $links)); } /** - * @expectedException \Magento\Framework\Exception\InputException - * @expectedExceptionMessage "linkType" is required. Enter and try again. + * Test for SetProductLinks without link type in link object + * + * @return void + * @throws InputException */ - public function testSetProductLinksWithoutLinkTypeInLink() + public function testSetProductLinksWithoutLinkTypeInLink(): void { - $productSku = 'Simple Product 1'; + $productSku = self::STUB_PRODUCT_SKU_1; - $inputRelatedLink = $this->objectManager->getObject(\Magento\Catalog\Model\ProductLink\Link::class); + $inputRelatedLink = $this->objectManager->getObject(Link::class); $inputRelatedLink->setProductSku($productSku); - $inputRelatedLink->setData("sku", "Simple Product 1"); + $inputRelatedLink->setData("sku", self::STUB_PRODUCT_SKU_2); $inputRelatedLink->setPosition(0); $links = [$inputRelatedLink]; - $linkTypes = ['related' => 1, 'upsell' => 4, 'crosssell' => 5, 'associated' => 3]; - $this->linkTypeProviderMock->expects($this->once()) - ->method('getLinkTypes') - ->willReturn($linkTypes); + $this->getLinkTypesMock(); + + $this->expectException(InputException::class); + $this->expectExceptionMessage( + '"linkType" is required. Enter and try again.' + ); $this->assertTrue($this->model->setProductLinks($productSku, $links)); } + /** - * @expectedException \Magento\Framework\Exception\NoSuchEntityException - * @expectedExceptionMessage The "bad type" link type wasn't found. Verify the type and try again. + * Test for SetProductLinks with empty array of items + * + * @return void + * @throws InputException + */ + public function testSetProductLinksWithEmptyArrayItems(): void + { + $productSku = self::STUB_PRODUCT_SKU_1; + + $this->productRepositoryMock->expects($this->never()) + ->method('get') + ->with($productSku) + ->willReturn($this->productMock); + + $this->linkTypeProviderMock->expects($this->never()) + ->method('getLinkTypes') + ->willReturn([]); + + $this->expectException(InputException::class); + $this->expectExceptionMessage( + 'Invalid value of "empty array" provided for the items field.' + ); + + $this->assertTrue($this->model->setProductLinks($productSku, [])); + } + + /** + * Test setProductLinks() throw exception if product link type not exist + * + * @return void + * @throws NoSuchEntityException */ public function testSetProductLinksThrowExceptionIfProductLinkTypeDoesNotExist() { - $productSku = 'Simple Product 1'; - $linkType = 'bad type'; - $this->productRepositoryMock->expects($this->never())->method('get')->with($productSku) + $productSku = self::STUB_PRODUCT_SKU_1; + $linkType = self::STUB_BAD_TYPE; + + $this->productRepositoryMock->expects($this->never()) + ->method('get') + ->with($productSku) ->willReturn($this->productMock); - $inputRelatedLink = $this->objectManager->getObject(\Magento\Catalog\Model\ProductLink\Link::class); - $inputRelatedLink->setProductSku($productSku); - $inputRelatedLink->setLinkType($linkType); - $inputRelatedLink->setData("sku", "Simple Product 2"); - $inputRelatedLink->setData("type_id", "simple"); - $inputRelatedLink->setPosition(0); - $links = [$inputRelatedLink]; + $links = $this->getInputRelatedLinkMock( + $productSku, + $linkType, + self::STUB_PRODUCT_SKU_2, + self::STUB_PRODUCT_TYPE + ); - $linkTypes = ['related' => 1, 'upsell' => 4, 'crosssell' => 5, 'associated' => 3]; - $this->linkTypeProviderMock->expects($this->once()) - ->method('getLinkTypes') - ->willReturn($linkTypes); + $this->getLinkTypesMock(); + + $this->expectException(NoSuchEntityException::class); + $this->expectExceptionMessage( + 'The "bad type" link type wasn\'t found. Verify the type and try again.' + ); $this->assertTrue($this->model->setProductLinks('', $links)); } /** - * @expectedException \Magento\Framework\Exception\NoSuchEntityException - * @expectedExceptionMessage The product that was requested doesn't exist. Verify the product and try again. + * Test for setProductLinks() with no product exception + * + * @return void + * @throws NoSuchEntityException */ public function testSetProductLinksNoProductException() { - $productSku = 'Simple Product 1'; - $linkType = 'related'; - - $inputRelatedLink = $this->objectManager->getObject(\Magento\Catalog\Model\ProductLink\Link::class); - $inputRelatedLink->setProductSku($productSku); - $inputRelatedLink->setLinkType($linkType); - $inputRelatedLink->setData("sku", "Simple Product 2"); - $inputRelatedLink->setData("type_id", "simple"); - $inputRelatedLink->setPosition(0); - $links = [$inputRelatedLink]; + $productSku = self::STUB_PRODUCT_SKU_1; + $linkType = self::STUB_LINK_TYPE; + + $links = $this->getInputRelatedLinkMock( + $productSku, + $linkType, + self::STUB_PRODUCT_SKU_2, + self::STUB_PRODUCT_TYPE + ); - $linkTypes = ['related' => 1, 'upsell' => 4, 'crosssell' => 5, 'associated' => 3]; - $this->linkTypeProviderMock->expects($this->once()) - ->method('getLinkTypes') - ->willReturn($linkTypes); + $this->getLinkTypesMock(); $this->productRepositoryMock->expects($this->once()) ->method('get') - ->will( - $this->throwException( - new \Magento\Framework\Exception\NoSuchEntityException( - __("The product that was requested doesn't exist. Verify the product and try again.") - ) + ->willThrowException( + new NoSuchEntityException( + __("The product that was requested doesn't exist. Verify the product and try again.") ) ); + + $this->expectException(NoSuchEntityException::class); + $this->expectExceptionMessage( + "The product that was requested doesn't exist. Verify the product and try again." + ); + $this->model->setProductLinks($productSku, $links); } /** - * @expectedException \Magento\Framework\Exception\CouldNotSaveException - * @expectedExceptionMessage The linked products data is invalid. Verify the data and try again. + * Test setProductLnks() with invliad data exception + * + * @return void + * @throws CouldNotSaveException */ - public function testSetProductLinksInvalidDataException() + public function testSetProductLinksInvalidDataException(): void { - $productSku = 'Simple Product 1'; - $linkType = 'related'; - $this->productRepositoryMock->expects($this->once())->method('get')->with($productSku) + $productSku = self::STUB_PRODUCT_SKU_1; + $linkType = self::STUB_LINK_TYPE; + + $this->productRepositoryMock->expects($this->once()) + ->method('get') + ->with($productSku) ->willReturn($this->productMock); - $inputRelatedLink = $this->objectManager->getObject(\Magento\Catalog\Model\ProductLink\Link::class); - $inputRelatedLink->setProductSku($productSku); - $inputRelatedLink->setLinkType($linkType); - $inputRelatedLink->setData("sku", "bad sku"); - $inputRelatedLink->setData("type_id", "bad type"); - $inputRelatedLink->setPosition(0); - $links = [$inputRelatedLink]; + $links = $this->getInputRelatedLinkMock( + $productSku, + $linkType, + self::STUB_PRODUCT_SKU_2, + self::STUB_PRODUCT_TYPE + ); + + $this->getLinkTypesMock(); + + $this->productMock->expects($this->once()) + ->method('getProductLinks') + ->willReturn([]); + + $this->productRepositoryMock->expects($this->once()) + ->method('save') + ->willThrowException( + new CouldNotSaveException( + __("The linked products data is invalid. Verify the data and try again.") + ) + ); + + $this->expectException(CouldNotSaveException::class); + $this->expectExceptionMessage( + "The linked products data is invalid. Verify the data and try again." + ); + + $this->model->setProductLinks($productSku, $links); + } + + /** + * Mock for getLinkTypesMock + * + * @return void + */ + private function getLinkTypesMock(): void + { + $linkTypes = [ + 'related' => 1, + 'upsell' => 4, + 'crosssell' => 5, + 'associated' => 3 + ]; - $linkTypes = ['related' => 1, 'upsell' => 4, 'crosssell' => 5, 'associated' => 3]; $this->linkTypeProviderMock->expects($this->once()) ->method('getLinkTypes') ->willReturn($linkTypes); + } - $this->productMock->expects($this->once())->method('getProductLinks')->willReturn([]); - - $this->productRepositoryMock->expects($this->once())->method('save')->willThrowException(new \Exception()); - $this->model->setProductLinks($productSku, $links); + /** + * get inputRelatedLinkMock + * + * @param string $productSku1 + * @param string $linkType + * @param string $productSku2 + * @param string $typeId + * @return array + */ + private function getInputRelatedLinkMock( + string $productSku1, + string $linkType, + string $productSku2, + string $typeId + ) { + + $inputRelatedLinkMock = $this->objectManager->getObject(Link::class); + $inputRelatedLinkMock->setProductSku($productSku1); + $inputRelatedLinkMock->setLinkType($linkType); + $inputRelatedLinkMock->setData("sku", $productSku2); + $inputRelatedLinkMock->setData("type_id", $typeId); + $inputRelatedLinkMock->setPosition(0); + + return [$inputRelatedLinkMock]; } } From 01cae336ef3e975f8099231aeb3bb3b7e604c6bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Szubert?= <bartlomiejszubert@gmail.com> Date: Sun, 23 Feb 2020 00:24:53 +0100 Subject: [PATCH 166/229] Remove app/functions.php --- app/functions.php | 30 ------------------- .../testFromCreateProject/composer.lock | 4 --- .../_files/testSkeleton/composer.lock | 4 --- .../Model/_files/testSkeleton/composer.lock | 4 --- 4 files changed, 42 deletions(-) delete mode 100644 app/functions.php diff --git a/app/functions.php b/app/functions.php deleted file mode 100644 index 6b3dae71c42c6..0000000000000 --- a/app/functions.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Create value-object \Magento\Framework\Phrase - * @deprecated The global function __() is now loaded via Magento Framework, the below require is only - * for backwards compatibility reasons and this file will be removed in a future version - * @see Magento\Framework\Phrase\__.php - * @SuppressWarnings(PHPMD.ShortMethodName) - * @return \Magento\Framework\Phrase - */ -if (!function_exists('__')) { - /** - * @return \Magento\Framework\Phrase - */ - function __() - { - $argc = func_get_args(); - - $text = array_shift($argc); - if (!empty($argc) && is_array($argc[0])) { - $argc = $argc[0]; - } - - return new \Magento\Framework\Phrase($text, $argc); - } -} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock index 4fb998ab77b34..d9da3edf3d209 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock +++ b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock @@ -2460,10 +2460,6 @@ "app/etc/registration_globlist.php", "app/etc/registration_globlist.php" ], - [ - "app/functions.php", - "app/functions.php" - ], [ "auth.json.sample", "auth.json.sample" diff --git a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock index 36a98e6cd9596..d755bfa0479e6 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock +++ b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock @@ -2460,10 +2460,6 @@ "app/etc/registration_globlist.php", "app/etc/registration_globlist.php" ], - [ - "app/functions.php", - "app/functions.php" - ], [ "auth.json.sample", "auth.json.sample" diff --git a/dev/tests/integration/testsuite/Magento/Setup/Model/_files/testSkeleton/composer.lock b/dev/tests/integration/testsuite/Magento/Setup/Model/_files/testSkeleton/composer.lock index 48fa6d0d0cd34..c5529f75b9d05 100644 --- a/dev/tests/integration/testsuite/Magento/Setup/Model/_files/testSkeleton/composer.lock +++ b/dev/tests/integration/testsuite/Magento/Setup/Model/_files/testSkeleton/composer.lock @@ -887,10 +887,6 @@ "app/.htaccess", "app/.htaccess" ], - [ - "app/functions.php", - "app/functions.php" - ], [ "app/autoload.php", "app/autoload.php" From 55d1f18446affc4e4861ea9e5d85024e14f2c9e6 Mon Sep 17 00:00:00 2001 From: Sathish <srsathish92@gmail.com> Date: Sun, 23 Feb 2020 11:30:35 +0530 Subject: [PATCH 167/229] #26800 fix static test --- app/code/Magento/Catalog/Model/ProductLink/Management.php | 7 +++++-- .../Catalog/Test/Unit/Model/ProductLink/ManagementTest.php | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ProductLink/Management.php b/app/code/Magento/Catalog/Model/ProductLink/Management.php index b61adb016b99b..017985e3f549f 100644 --- a/app/code/Magento/Catalog/Model/ProductLink/Management.php +++ b/app/code/Magento/Catalog/Model/ProductLink/Management.php @@ -13,6 +13,9 @@ use Magento\Catalog\Model\Product\LinkTypeProvider; use Magento\Catalog\Api\ProductLinkManagementInterface; +/** + * Manage product links from api + */ class Management implements ProductLinkManagementInterface { /** @@ -38,7 +41,7 @@ public function __construct( } /** - * {@inheritdoc} + * @inheritdoc */ public function getLinkedItemsByType($sku, $type) { @@ -65,7 +68,7 @@ public function getLinkedItemsByType($sku, $type) } /** - * {@inheritdoc} + * @inheritdoc */ public function setProductLinks($sku, array $items) { diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ProductLink/ManagementTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ProductLink/ManagementTest.php index 1090b6c779e74..69bd7dc059022 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ProductLink/ManagementTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ProductLink/ManagementTest.php @@ -205,7 +205,6 @@ public function testSetProductLinksWithoutLinkTypeInLink(): void $this->assertTrue($this->model->setProductLinks($productSku, $links)); } - /** * Test for SetProductLinks with empty array of items * From eadc2f4988d8dd3af8f3fbcfc1a0dabbca8adee9 Mon Sep 17 00:00:00 2001 From: Nandhini Nagaraj <nandhini.nagaraj@ziffity.com> Date: Mon, 24 Feb 2020 12:01:11 +0530 Subject: [PATCH 168/229] Renamed the Action Group --- ...dminSaveAndDuplicateCMSPageWithSplitButtonActionGroup.xml} | 2 +- ...p.xml => AssertAdminCmsPageSaveSplitButtonActionGroup.xml} | 2 +- .../Cms/Test/Mftf/Test/AdminCreateDuplicatedCmsPageTest.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename app/code/Magento/Cms/Test/Mftf/ActionGroup/{SaveAndDuplicateCMSPageWithSplitButtonActionGroup.xml => AdminSaveAndDuplicateCMSPageWithSplitButtonActionGroup.xml} (93%) rename app/code/Magento/Cms/Test/Mftf/ActionGroup/{VerifyCmsPageSaveSplitButtonActionGroup.xml => AssertAdminCmsPageSaveSplitButtonActionGroup.xml} (93%) diff --git a/app/code/Magento/Cms/Test/Mftf/ActionGroup/SaveAndDuplicateCMSPageWithSplitButtonActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminSaveAndDuplicateCMSPageWithSplitButtonActionGroup.xml similarity index 93% rename from app/code/Magento/Cms/Test/Mftf/ActionGroup/SaveAndDuplicateCMSPageWithSplitButtonActionGroup.xml rename to app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminSaveAndDuplicateCMSPageWithSplitButtonActionGroup.xml index 255e2a2192296..43c0fc9ff3a45 100644 --- a/app/code/Magento/Cms/Test/Mftf/ActionGroup/SaveAndDuplicateCMSPageWithSplitButtonActionGroup.xml +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminSaveAndDuplicateCMSPageWithSplitButtonActionGroup.xml @@ -8,7 +8,7 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="SaveAndDuplicateCMSPageWithSplitButtonActionGroup"> + <actionGroup name="AdminSaveAndDuplicateCMSPageWithSplitButtonActionGroup"> <annotations> <description>Clicks on the Save and Duplicate button.</description> </annotations> diff --git a/app/code/Magento/Cms/Test/Mftf/ActionGroup/VerifyCmsPageSaveSplitButtonActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertAdminCmsPageSaveSplitButtonActionGroup.xml similarity index 93% rename from app/code/Magento/Cms/Test/Mftf/ActionGroup/VerifyCmsPageSaveSplitButtonActionGroup.xml rename to app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertAdminCmsPageSaveSplitButtonActionGroup.xml index 5e2219f4758e4..6ea87aeae5998 100644 --- a/app/code/Magento/Cms/Test/Mftf/ActionGroup/VerifyCmsPageSaveSplitButtonActionGroup.xml +++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertAdminCmsPageSaveSplitButtonActionGroup.xml @@ -8,7 +8,7 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="VerifyCmsPageSaveSplitButtonActionGroup"> + <actionGroup name="AssertAdminCmsPageSaveSplitButtonActionGroup"> <annotations> <description>Verify Save and Duplicate and Save and Close button.</description> </annotations> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDuplicatedCmsPageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDuplicatedCmsPageTest.xml index c8a1b4af88a4e..cf02767d03ca5 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDuplicatedCmsPageTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDuplicatedCmsPageTest.xml @@ -26,11 +26,11 @@ <actionGroup ref="logout" stepKey="logout"/> </after> <!-- Navigate to create a CMS page and Verify Save&Duplicate - Save&Close button --> - <actionGroup ref="VerifyCmsPageSaveSplitButtonActionGroup" stepKey="verifyCmsPageSaveButton" /> + <actionGroup ref="AssertAdminCmsPageSaveSplitButtonActionGroup" stepKey="verifyCmsPageSaveButton" /> <!-- Filled out Content --> <actionGroup ref="FillOutCMSPageContent" stepKey="FillOutPageContent"/> <!-- Click save and duplicate action --> - <actionGroup ref="SaveAndDuplicateCMSPageWithSplitButtonActionGroup" stepKey="clickSaveAndDuplicateButton"/> + <actionGroup ref="AdminSaveAndDuplicateCMSPageWithSplitButtonActionGroup" stepKey="clickSaveAndDuplicateButton"/> <!--Verify duplicated CMS Page--> <seeElement selector="{{BlockNewPageBasicFieldsSection.isActive('0')}}" stepKey="seeBlockNotEnable" /> <actionGroup ref="AssertCMSPageContentActionGroup" stepKey="assertContent"/> From c94087edf498e1180643218f3f7717c503526b93 Mon Sep 17 00:00:00 2001 From: "rostyslav.hymon" <rostyslav.hymon@transoftgroup.com> Date: Mon, 24 Feb 2020 09:54:49 +0200 Subject: [PATCH 169/229] MC-31481: [Magento Cloud] Customer Import - File passes data check then returns error 'Invalid data for insert' --- .../Magento/Customer/Model/Indexer/Processor.php | 16 ++++++++++++++++ .../Model/Import/CustomerComposite.php | 16 +++++++++++++--- .../Unit/Model/Import/CustomerCompositeTest.php | 10 +++++++++- 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 app/code/Magento/Customer/Model/Indexer/Processor.php diff --git a/app/code/Magento/Customer/Model/Indexer/Processor.php b/app/code/Magento/Customer/Model/Indexer/Processor.php new file mode 100644 index 0000000000000..6b44b674b405a --- /dev/null +++ b/app/code/Magento/Customer/Model/Indexer/Processor.php @@ -0,0 +1,16 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Customer\Model\Indexer; + +use Magento\Customer\Model\Customer; + +/** + * Customer indexer + */ +class Processor extends \Magento\Framework\Indexer\AbstractProcessor +{ + const INDEXER_ID = Customer::CUSTOMER_GRID_INDEXER_ID; +} diff --git a/app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php b/app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php index 0f4c5f82bfe1d..4a22dc83a1f31 100644 --- a/app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php +++ b/app/code/Magento/CustomerImportExport/Model/Import/CustomerComposite.php @@ -6,6 +6,7 @@ namespace Magento\CustomerImportExport\Model\Import; use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface; +use Magento\Customer\Model\Indexer\Processor; /** * Import entity customer combined model @@ -148,6 +149,11 @@ class CustomerComposite extends \Magento\ImportExport\Model\Import\AbstractEntit */ protected $masterAttributeCode = 'email'; + /** + * @var Processor + */ + private $indexerProcessor; + /** * @param \Magento\Framework\Stdlib\StringUtils $string * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig @@ -158,6 +164,7 @@ class CustomerComposite extends \Magento\ImportExport\Model\Import\AbstractEntit * @param \Magento\CustomerImportExport\Model\ResourceModel\Import\CustomerComposite\DataFactory $dataFactory * @param \Magento\CustomerImportExport\Model\Import\CustomerFactory $customerFactory * @param \Magento\CustomerImportExport\Model\Import\AddressFactory $addressFactory + * @param Processor $indexerProcessor * @param array $data * @throws \Magento\Framework\Exception\LocalizedException * @@ -173,6 +180,7 @@ public function __construct( \Magento\CustomerImportExport\Model\ResourceModel\Import\CustomerComposite\DataFactory $dataFactory, \Magento\CustomerImportExport\Model\Import\CustomerFactory $customerFactory, \Magento\CustomerImportExport\Model\Import\AddressFactory $addressFactory, + Processor $indexerProcessor, array $data = [] ) { parent::__construct($string, $scopeConfig, $importFactory, $resourceHelper, $resource, $errorAggregator, $data); @@ -230,6 +238,7 @@ public function __construct( } else { $this->_nextCustomerId = $resourceHelper->getNextAutoincrement($this->_customerEntity->getEntityTable()); } + $this->indexerProcessor = $indexerProcessor; } /** @@ -273,11 +282,12 @@ protected function _importData() $this->countItemsCreated += $this->_customerEntity->getCreatedItemsCount(); $this->countItemsUpdated += $this->_customerEntity->getUpdatedItemsCount(); $this->countItemsDeleted += $this->_customerEntity->getDeletedItemsCount(); - if ($this->getBehavior() != \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE) { - return $result && $this->_addressEntity->setCustomerAttributes($this->_customerAttributes)->importData(); + $result = $result && $this->_addressEntity->setCustomerAttributes($this->_customerAttributes)->importData(); + } + if ($result) { + $this->indexerProcessor->markIndexerAsInvalid(); } - return $result; } diff --git a/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/CustomerCompositeTest.php b/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/CustomerCompositeTest.php index 1b900c2139588..7aff0f911c2b0 100644 --- a/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/CustomerCompositeTest.php +++ b/app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/CustomerCompositeTest.php @@ -15,7 +15,7 @@ use Magento\ImportExport\Model\Import\Source\Csv; /** - * Customer composite test + * The test for Customer composite model * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ @@ -88,6 +88,12 @@ class CustomerCompositeTest extends \PHPUnit\Framework\TestCase */ protected $errorFactory; + /** + * @var \Magento\Customer\Model\Indexer\Processor + * |\PHPUnit\Framework\MockObject\MockObject + */ + private $indexerProcessor; + /** * Expected prepared data after method CustomerComposite::_prepareRowForDb * @@ -141,6 +147,7 @@ protected function setUp() ->getMock(); $this->_scopeConfigMock = $this->createMock(\Magento\Framework\App\Config\ScopeConfigInterface::class); + $this->indexerProcessor = $this->createMock(\Magento\Customer\Model\Indexer\Processor::class); } /** @@ -159,6 +166,7 @@ protected function _createModelMock($data) $this->_dataFactory, $this->_customerFactory, $this->_addressFactory, + $this->indexerProcessor, $data ); } From 2f8e42bd70c8b0e7b9f1c5e4eda6140487de29f5 Mon Sep 17 00:00:00 2001 From: Nazar Klovanych <nazarn96@gmail.com> Date: Mon, 24 Feb 2020 10:29:33 +0200 Subject: [PATCH 170/229] Static test fix --- .../Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php index 56f75887d83a8..6099d329571e8 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php @@ -7,6 +7,8 @@ namespace Magento\Eav\Model\Entity\Attribute\Backend; /** + * Prepare date for save in DB + * * @api * @since 100.0.2 */ @@ -61,7 +63,7 @@ public function beforeSave($object) /** * Prepare date for save in DB * - * string format is used in input fields (all date input fields need apply locale settings) + * String format is used in input fields (all date input fields need apply locale settings) * int (Unix) format can be used in other parts of the code * * @param string|int|\DateTimeInterface $date From ff45a23bcad5b7c9c17a4831bedf2c83bc0f58ba Mon Sep 17 00:00:00 2001 From: Sathish <srsathish92@gmail.com> Date: Mon, 24 Feb 2020 16:36:38 +0530 Subject: [PATCH 171/229] .class moved to block from phtml --- app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php | 7 ++++++- .../Magento/Tax/view/adminhtml/templates/rate/form.phtml | 2 +- .../backend/Magento_Tax/web/css/source/_module.less | 8 +++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php index 29ce7e6d4b0aa..1884b247e530a 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php @@ -211,7 +211,12 @@ protected function _prepareForm() $fieldset->addField( 'zip_is_range', 'checkbox', - ['name' => 'zip_is_range', 'label' => __('Zip/Post is Range'), 'value' => '1'] + [ + 'name' => 'zip_is_range', + 'label' => __('Zip/Post is Range'), + 'value' => '1', + 'class' => 'zip-is-range-checkbox' + ] ); if (!isset($formData['tax_postcode'])) { diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml index a28d794ed7f1f..304020c3af279 100644 --- a/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml +++ b/app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ ?> -<div class="entry-edit form-inline tax-rate-form"> +<div class="entry-edit form-inline"> <?= $block->getFormHtml() ?> </div> <?= $block->getChildHtml('form_after') ?> diff --git a/app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/_module.less b/app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/_module.less index 21100deb8e027..2377f7c9a9c11 100644 --- a/app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/_module.less +++ b/app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/_module.less @@ -26,10 +26,8 @@ } } -.tax-rate-form { - .admin__fieldset > .admin__field > .admin__field-control { - input[type='checkbox'] { - margin: 8px 0 0 0; - } +.admin__fieldset > .admin__field > .admin__field-control { + input.zip-is-range-checkbox { + margin: 8px 0 0 0; } } From 811097da79b9bcd65c2b8e260715aa77f56beaaf Mon Sep 17 00:00:00 2001 From: Yurii Sapiha <yurasapiga93@gmail.com> Date: Mon, 24 Feb 2020 15:02:24 +0200 Subject: [PATCH 172/229] MC-31752: Admin: Unsubscribe/subscribe newsletter email --- .../Customer/_files/unconfirmed_customer.php | 2 +- .../Newsletter/Model/SubscriberTest.php | 165 +++++++++++++----- .../newsletter_unconfirmed_customer.php | 14 ++ ...wsletter_unconfirmed_customer_rollback.php | 8 + 4 files changed, 141 insertions(+), 48 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Newsletter/_files/newsletter_unconfirmed_customer.php create mode 100644 dev/tests/integration/testsuite/Magento/Newsletter/_files/newsletter_unconfirmed_customer_rollback.php diff --git a/dev/tests/integration/testsuite/Magento/Customer/_files/unconfirmed_customer.php b/dev/tests/integration/testsuite/Magento/Customer/_files/unconfirmed_customer.php index 3aad592ad34ef..e27010dc042ca 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/_files/unconfirmed_customer.php +++ b/dev/tests/integration/testsuite/Magento/Customer/_files/unconfirmed_customer.php @@ -7,7 +7,7 @@ use Magento\Customer\Api\AccountManagementInterface; use Magento\Customer\Api\CustomerMetadataInterface; -use \Magento\Customer\Model\Data\CustomerFactory; +use Magento\Customer\Model\Data\CustomerFactory; use Magento\Eav\Model\AttributeRepository; use Magento\Framework\Math\Random; use Magento\Store\Api\WebsiteRepositoryInterface; diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/SubscriberTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/SubscriberTest.php index bdcbdc035d2b0..06c8902f45897 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Model/SubscriberTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/SubscriberTest.php @@ -3,104 +3,175 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Newsletter\Model; +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Framework\ObjectManagerInterface; +use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\Mail\Template\TransportBuilderMock; +use PHPUnit\Framework\TestCase; /** - * \Magento\Newsletter\Model\Subscriber tests + * Class checks subscription behavior. + * + * @see \Magento\Newsletter\Model\Subscriber */ -class SubscriberTest extends \PHPUnit\Framework\TestCase +class SubscriberTest extends TestCase { + /** @var ObjectManagerInterface */ + private $objectManager; + + /** @var SubscriberFactory */ + private $subscriberFactory; + + /** @var TransportBuilderMock */ + private $transportBuilder; + + /** @var CustomerRepositoryInterface */ + private $customerRepository; + /** - * @var Subscriber + * @inheritdoc */ - private $model; - protected function setUp() { - $this->model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - \Magento\Newsletter\Model\Subscriber::class - ); + $this->objectManager = Bootstrap::getObjectManager(); + $this->subscriberFactory = $this->objectManager->get(SubscriberFactory::class); + $this->transportBuilder = $this->objectManager->get(TransportBuilderMock::class); + $this->customerRepository = $this->objectManager->get(CustomerRepositoryInterface::class); } /** - * @magentoDataFixture Magento/Newsletter/_files/subscribers.php * @magentoConfigFixture current_store newsletter/subscription/confirm 1 + * + * @magentoDataFixture Magento/Newsletter/_files/subscribers.php + * + * @return void */ - public function testEmailConfirmation() + public function testEmailConfirmation(): void { - $this->model->subscribe('customer_confirm@example.com'); - /** @var TransportBuilderMock $transportBuilder */ - $transportBuilder = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get(\Magento\TestFramework\Mail\Template\TransportBuilderMock::class); + $subscriber = $this->subscriberFactory->create(); + $subscriber->subscribe('customer_confirm@example.com'); // confirmationCode 'ysayquyajua23iq29gxwu2eax2qb6gvy' is taken from fixture $this->assertContains( - '/newsletter/subscriber/confirm/id/' . $this->model->getSubscriberId() + '/newsletter/subscriber/confirm/id/' . $subscriber->getSubscriberId() . '/code/ysayquyajua23iq29gxwu2eax2qb6gvy', - $transportBuilder->getSentMessage()->getBody()->getParts()[0]->getRawContent() + $this->transportBuilder->getSentMessage()->getBody()->getParts()[0]->getRawContent() ); - $this->assertEquals(Subscriber::STATUS_NOT_ACTIVE, $this->model->getSubscriberStatus()); + $this->assertEquals(Subscriber::STATUS_NOT_ACTIVE, $subscriber->getSubscriberStatus()); } /** * @magentoDataFixture Magento/Newsletter/_files/subscribers.php + * + * @return void */ - public function testLoadByCustomerId() + public function testLoadByCustomerId(): void { - $this->assertSame($this->model, $this->model->loadByCustomerId(1)); - $this->assertEquals('customer@example.com', $this->model->getSubscriberEmail()); + $subscriber = $this->subscriberFactory->create(); + $this->assertSame($subscriber, $subscriber->loadByCustomerId(1)); + $this->assertEquals('customer@example.com', $subscriber->getSubscriberEmail()); } /** * @magentoDataFixture Magento/Newsletter/_files/subscribers.php - * @magentoAppArea frontend + * + * @magentoAppArea frontend + * + * @return void */ - public function testUnsubscribeSubscribe() + public function testUnsubscribeSubscribe(): void { - // Unsubscribe and verify - $this->assertSame($this->model, $this->model->loadByCustomerId(1)); - $this->assertEquals($this->model, $this->model->unsubscribe()); - $this->assertEquals(Subscriber::STATUS_UNSUBSCRIBED, $this->model->getSubscriberStatus()); - + $subscriber = $this->subscriberFactory->create(); + $this->assertSame($subscriber, $subscriber->loadByCustomerId(1)); + $this->assertEquals($subscriber, $subscriber->unsubscribe()); + $this->assertContains( + 'You have been unsubscribed from the newsletter.', + $this->transportBuilder->getSentMessage()->getRawMessage() + ); + $this->assertEquals(Subscriber::STATUS_UNSUBSCRIBED, $subscriber->getSubscriberStatus()); // Subscribe and verify - $this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $this->model->subscribe('customer@example.com')); - $this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $this->model->getSubscriberStatus()); + $this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $subscriber->subscribe('customer@example.com')); + $this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $subscriber->getSubscriberStatus()); + $this->assertContains( + 'You have been successfully subscribed to our newsletter.', + $this->transportBuilder->getSentMessage()->getRawMessage() + ); } /** * @magentoDataFixture Magento/Newsletter/_files/subscribers.php - * @magentoAppArea frontend + * + * @magentoAppArea frontend + * + * @return void */ - public function testUnsubscribeSubscribeByCustomerId() + public function testUnsubscribeSubscribeByCustomerId(): void { + $subscriber = $this->subscriberFactory->create(); // Unsubscribe and verify - $this->assertSame($this->model, $this->model->unsubscribeCustomerById(1)); - $this->assertEquals(Subscriber::STATUS_UNSUBSCRIBED, $this->model->getSubscriberStatus()); - + $this->assertSame($subscriber, $subscriber->unsubscribeCustomerById(1)); + $this->assertEquals(Subscriber::STATUS_UNSUBSCRIBED, $subscriber->getSubscriberStatus()); + $this->assertContains( + 'You have been unsubscribed from the newsletter.', + $this->transportBuilder->getSentMessage()->getRawMessage() + ); // Subscribe and verify - $this->assertSame($this->model, $this->model->subscribeCustomerById(1)); - $this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $this->model->getSubscriberStatus()); + $this->assertSame($subscriber, $subscriber->subscribeCustomerById(1)); + $this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $subscriber->getSubscriberStatus()); + $this->assertContains( + 'You have been successfully subscribed to our newsletter.', + $this->transportBuilder->getSentMessage()->getRawMessage() + ); } /** - * @magentoDataFixture Magento/Newsletter/_files/subscribers.php * @magentoConfigFixture current_store newsletter/subscription/confirm 1 + * + * @magentoDataFixture Magento/Newsletter/_files/subscribers.php + * + * @return void */ - public function testConfirm() + public function testConfirm(): void { + $subscriber = $this->subscriberFactory->create(); $customerEmail = 'customer_confirm@example.com'; - $this->model->subscribe($customerEmail); - $this->model->loadByEmail($customerEmail); - $this->model->confirm($this->model->getSubscriberConfirmCode()); - - $transportBuilder = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - \Magento\TestFramework\Mail\Template\TransportBuilderMock::class - ); - + $subscriber->subscribe($customerEmail); + $subscriber->loadByEmail($customerEmail); + $subscriber->confirm($subscriber->getSubscriberConfirmCode()); $this->assertContains( 'You have been successfully subscribed to our newsletter.', - $transportBuilder->getSentMessage()->getBody()->getParts()[0]->getRawContent() + $this->transportBuilder->getSentMessage()->getRawMessage() ); } + + /** + * @magentoDataFixture Magento/Customer/_files/customer_confirmation_config_enable.php + * @magentoDataFixture Magento/Newsletter/_files/newsletter_unconfirmed_customer.php + * + * @return void + */ + public function testSubscribeUnconfirmedCustomerWithSubscription(): void + { + $customer = $this->customerRepository->get('unconfirmedcustomer@example.com'); + $subscriber = $this->subscriberFactory->create(); + $subscriber->subscribeCustomerById($customer->getId()); + $this->assertEquals(Subscriber::STATUS_SUBSCRIBED, $subscriber->getStatus()); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer_confirmation_config_enable.php + * @magentoDataFixture Magento/Customer/_files/unconfirmed_customer.php + * + * @return void + */ + public function testSubscribeUnconfirmedCustomerWithoutSubscription(): void + { + $customer = $this->customerRepository->get('unconfirmedcustomer@example.com'); + $subscriber = $this->subscriberFactory->create(); + $subscriber->subscribeCustomerById($customer->getId()); + $this->assertEquals(Subscriber::STATUS_UNCONFIRMED, $subscriber->getStatus()); + } } diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/_files/newsletter_unconfirmed_customer.php b/dev/tests/integration/testsuite/Magento/Newsletter/_files/newsletter_unconfirmed_customer.php new file mode 100644 index 0000000000000..405ac1c67bd7b --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Newsletter/_files/newsletter_unconfirmed_customer.php @@ -0,0 +1,14 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\Newsletter\Model\SubscriberFactory; + +require __DIR__ . '/../../../Magento/Customer/_files/unconfirmed_customer.php'; + +/** @var SubscriberFactory $subscriberFactory */ +$subscriberFactory = $objectManager->get(SubscriberFactory::class); +$subscriberFactory->create()->subscribe('unconfirmedcustomer@example.com'); diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/_files/newsletter_unconfirmed_customer_rollback.php b/dev/tests/integration/testsuite/Magento/Newsletter/_files/newsletter_unconfirmed_customer_rollback.php new file mode 100644 index 0000000000000..5742526988187 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Newsletter/_files/newsletter_unconfirmed_customer_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__ . '/../../../Magento/Customer/_files/unconfirmed_customer_rollback.php'; From 0f0c56777a1d69b50efc1b2c1484666a2dc17548 Mon Sep 17 00:00:00 2001 From: Petar Borisovski <borisovski-petar@hotmail.com> Date: Mon, 24 Feb 2020 14:32:59 +0100 Subject: [PATCH 173/229] Fix typo in description node. --- .../NavigateToNewOrderPageExistingCustomerActionGroup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/NavigateToNewOrderPageExistingCustomerActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/NavigateToNewOrderPageExistingCustomerActionGroup.xml index a8f9d61ad6803..220d47e0495f9 100644 --- a/app/code/Magento/Sales/Test/Mftf/ActionGroup/NavigateToNewOrderPageExistingCustomerActionGroup.xml +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/NavigateToNewOrderPageExistingCustomerActionGroup.xml @@ -10,7 +10,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> <actionGroup name="NavigateToNewOrderPageExistingCustomerActionGroup"> <annotations> - <description>Goes tot he Admin Orders grid page. Clicks on 'Create New Order'. Filters the grid for the provided Customer. Clicks on the Customer. Selects the provided Store View, if present. Validates that the Page Title is present and correct.</description> + <description>Goes to the Admin Orders grid page. Clicks on 'Create New Order'. Filters the grid for the provided Customer. Clicks on the Customer. Selects the provided Store View, if present. Validates that the Page Title is present and correct.</description> </annotations> <arguments> <argument name="customer"/> From df48d3e69fc17c7b54ddf2e33840da3ca3af2460 Mon Sep 17 00:00:00 2001 From: Nazar Klovanych <nazarn96@gmail.com> Date: Mon, 24 Feb 2020 15:33:25 +0200 Subject: [PATCH 174/229] refactore per review comment --- .../Ui/frontend/js/model/messages.test.js | 181 ++++++++---------- 1 file changed, 81 insertions(+), 100 deletions(-) diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js index d2efbe0bac040..e9dcebfe9018e 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js @@ -10,120 +10,101 @@ define([ 'use strict'; describe('Magento_Ui/js/model/messages', function () { - var obj = new Constr({ - provider: 'provName', - name: '', - index: '' - }); - - registry.set('provName', { - /** Stub */ - on: function () { - }, - /** Stub */ - get: function () { - }, - - /** Stub */ - set: function () { - } - }); - - describe('initialize method', function () { - it('check for existing', function () { - expect(obj).toBeDefined(); + var obj, + errorMessageText, + successMessageText, + messageObj; + + beforeEach(function () { + obj = new Constr( + { + provider: 'provName', + name: '', + index: '' + }); + errorMessageText = 'Error message test'; + successMessageText = 'Success message test'; + + registry.set('provName', { + /** Stub */ + on: function () { + }, + + /** Stub */ + get: function () { + }, + + /** Stub */ + set: function () { + } }); }); - describe('add method', function () { - it('simple message', function () { - var messageObj = { - message: 'Message test' - }, - type = [], - returnedObj = ['Message test']; - - expect(obj.add(messageObj, type)).toEqual(true); - expect(type).toEqual(returnedObj); - }); - - it('message with parameters', function () { - var messageObj = { - message: 'Message test case %1, case %2 and case %3', - parameters: [ - 'one', - 'two', - 'three' - ] - }, - type = [], - returnedObj = ['Message test case ' + messageObj.parameters[0] + ', case ' + - messageObj.parameters[1] + ' and case ' + messageObj.parameters[2]]; - - expect(obj.add(messageObj, type)).toEqual(true); - expect(type).toEqual(returnedObj); - }); - }); - - describe('check methods: hasMessages, addErrorMessage, getErrorMessages', function () { - var errorMessageText = 'Error message test'; - - it('hasMessages method before adding messages', function () { - expect(obj.hasMessages()).toEqual(false); - }); - - it('check addErrorMessage method', function () { - var messageObj = { - message: errorMessageText - }; - - expect(obj.addErrorMessage(messageObj)).toEqual(true); - }); + it('simple message', function () { + var messageObj = + { + message: 'Message test' + }, + type = []; - it('check getErrorMessage method', function () { - expect(obj.getErrorMessages()()).toEqual([errorMessageText]); - }); - - it('hasMessages method after adding Error messages', function () { - expect(obj.hasMessages()).toEqual(true); - }); + expect(obj.add(messageObj, type)).toEqual(true); + expect(type).toEqual([messageObj.message]); }); - describe('check clean method for Error messages', function () { - it('check for cleaning messages', function () { - obj.clear(); - expect(obj.getErrorMessages()()).toEqual([]); - expect(obj.hasMessages()).toEqual(false); - }); + it('message with parameters', function () { + var returnedObj, + type = []; + + messageObj = { + message: 'Message test case %1, case %2 and case %3', + parameters: [ + 'one', + 'two', + 'three' + ] + }; + returnedObj = ['Message test case ' + messageObj.parameters[0] + ', case ' + + messageObj.parameters[1] + ' and case ' + messageObj.parameters[2]]; + + expect(obj.add(messageObj, type)).toEqual(true); + expect(type).toEqual(returnedObj); }); - describe('check methods: hasMessages, addSuccessMessage, getSuccessMessages', function () { - var successMessageText = 'Success message test'; + it('check addErrorMessage && getErrorMessage && hasMessages', function () { + messageObj = { + message: errorMessageText + }; - it('check addSuccessMessage and getSuccessMessage', function () { - var messageObj = { - message: successMessageText - }; - - expect(obj.addSuccessMessage(messageObj)).toEqual(true); - }); + expect(obj.hasMessages()).toEqual(false); + expect(obj.addErrorMessage(messageObj)).toEqual(true); + expect(obj.getErrorMessages()()).toEqual([errorMessageText]); + expect(obj.hasMessages()).toEqual(true); + }); - it('check method getSuccessMessage', function () { - expect(obj.getSuccessMessages()()).toEqual([successMessageText]); - }); + it('check addSuccessMessage && getSuccessMessage && hasMessages', function () { + messageObj = { + message: successMessageText + }; - it('hasMessages method after adding Success messages', function () { - expect(obj.hasMessages()).toEqual(true); - }); + expect(obj.addSuccessMessage(messageObj)).toEqual(true); + expect(obj.getSuccessMessages()()).toEqual([successMessageText]); + expect(obj.hasMessages()).toEqual(true); }); - describe('check clean method for Success messages', function () { - it('check for cleaning messages', function () { - obj.clear(); - expect(obj.getSuccessMessages()()).toEqual([]); - expect(obj.hasMessages()).toEqual(false); - }); + it('check for cleaning messages', function () { + messageObj = { + message: 'Message test case %1, case %2 and case %3', + parameters: [ + 'one', + 'two', + 'three' + ] + }; + expect(obj.addErrorMessage(messageObj)).toEqual(true); + obj.clear(); + expect(obj.getErrorMessages()()).toEqual([]); + expect(obj.hasMessages()).toEqual(false); }); }); }); From 9ccac04ff5908efd749c42187bc2ab79798f0d6f Mon Sep 17 00:00:00 2001 From: Nazar Klovanych <nazarn96@gmail.com> Date: Mon, 24 Feb 2020 15:37:36 +0200 Subject: [PATCH 175/229] static test fix --- .../code/Magento/Ui/frontend/js/model/messages.test.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js index e9dcebfe9018e..b0a8f952806a4 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js @@ -42,12 +42,11 @@ define([ }); it('simple message', function () { - var messageObj = - { - message: 'Message test' - }, - type = []; + var type = []; + messageObj = { + message: 'Message test' + }; expect(obj.add(messageObj, type)).toEqual(true); expect(type).toEqual([messageObj.message]); }); From 030176ffd56f3b2a75338cafa87801e11cda1f79 Mon Sep 17 00:00:00 2001 From: Yurii Sapiha <yurasapiga93@gmail.com> Date: Mon, 24 Feb 2020 15:50:21 +0200 Subject: [PATCH 176/229] MC-31754: Storefront: Subscribe/unsubscribe to email newsletter --- .../Magento/Customer/Block/NewsletterTest.php | 82 ++++++ .../Magento/Customer/_files/new_customer.php | 44 +++ .../Customer/_files/new_customer_rollback.php | 33 +++ .../Newsletter/Block/Account/LinkTest.php | 79 ++++++ .../Newsletter/Controller/Manage/SaveTest.php | 157 +++++++++++ .../Newsletter/Controller/ManageTest.php | 98 ------- .../Controller/Subscriber/NewActionTest.php | 255 ++++++++++++++++++ .../Newsletter/Controller/SubscriberTest.php | 67 ----- .../_files/customer_with_subscription.php | 13 + .../customer_with_subscription_rollback.php | 8 + 10 files changed, 671 insertions(+), 165 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Customer/Block/NewsletterTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Customer/_files/new_customer.php create mode 100644 dev/tests/integration/testsuite/Magento/Customer/_files/new_customer_rollback.php create mode 100644 dev/tests/integration/testsuite/Magento/Newsletter/Block/Account/LinkTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Newsletter/Controller/Manage/SaveTest.php delete mode 100644 dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Newsletter/Controller/Subscriber/NewActionTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Newsletter/_files/customer_with_subscription.php create mode 100644 dev/tests/integration/testsuite/Magento/Newsletter/_files/customer_with_subscription_rollback.php diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/NewsletterTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/NewsletterTest.php new file mode 100644 index 0000000000000..e66988a130296 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/NewsletterTest.php @@ -0,0 +1,82 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Customer\Block; + +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\View\LayoutInterface; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\Helper\Xpath; +use PHPUnit\Framework\TestCase; + +/** + * Class check newsletter subscription block behavior + * + * @see \Magento\Customer\Block\Newsletter + * @magentoAppArea frontend + * @magentoDbIsolation enabled + */ +class NewsletterTest extends TestCase +{ + private const LABEL_XPATH = "//form[contains(@class, 'form-newsletter-manage')]" + . "//span[contains(text(), 'Subscription option')]"; + private const CHECKBOX_XPATH = "//form[contains(@class, 'form-newsletter-manage')]" + . "//input[@type='checkbox' and @name='is_subscribed']"; + private const CHECKBOX_TITLE_XPATH = "//form[contains(@class, 'form-newsletter-manage')]" + . "//label/span[contains(text(), 'General Subscription')]"; + private const SAVE_BUTTON_XPATH = "//form[contains(@class, 'form-newsletter-manage')]" + . "//button[@type='submit']/span[contains(text(), 'Save')]"; + + /** @var ObjectManagerInterface */ + private $objectManager; + + /** @var LayoutInterface */ + private $layout; + + /** @var Newsletter */ + private $block; + + /** + * @inheritdoc + */ + protected function setUp() + { + parent::setUp(); + + $this->objectManager = Bootstrap::getObjectManager(); + $this->layout = $this->objectManager->get(LayoutInterface::class); + $this->block = $this->layout->createBlock(Newsletter::class); + } + + /** + * @return void + */ + public function testSubscriptionCheckbox(): void + { + $html = $this->block->toHtml(); + $this->assertEquals( + 1, + Xpath::getElementsCountForXpath(self::LABEL_XPATH, $html), + 'Subscription label is not present on the page' + ); + $this->assertEquals( + 1, + Xpath::getElementsCountForXpath(self::CHECKBOX_XPATH, $html), + 'Subscription checkbox is not present on the page' + ); + $this->assertEquals( + 1, + Xpath::getElementsCountForXpath(self::CHECKBOX_TITLE_XPATH, $html), + 'Subscription checkbox label is not present on the page' + ); + $this->assertEquals( + 1, + Xpath::getElementsCountForXpath(self::SAVE_BUTTON_XPATH, $html), + 'Subscription save button is not present on the page' + ); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Customer/_files/new_customer.php b/dev/tests/integration/testsuite/Magento/Customer/_files/new_customer.php new file mode 100644 index 0000000000000..2e298a7e508a3 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/_files/new_customer.php @@ -0,0 +1,44 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\Customer\Api\AccountManagementInterface; +use Magento\Customer\Api\CustomerMetadataInterface; +use Magento\Customer\Model\Data\CustomerFactory; +use Magento\Customer\Model\GroupManagement; +use Magento\Eav\Model\AttributeRepository; +use Magento\Store\Model\StoreManagerInterface; +use Magento\TestFramework\Helper\Bootstrap; + +$objectManager = Bootstrap::getObjectManager(); +/** @var AccountManagementInterface $accountManagement */ +$accountManagement = $objectManager->get(AccountManagementInterface::class); +$customerFactory = $objectManager->get(CustomerFactory::class); +$customerFactory->create(); +/** @var StoreManagerInterface $storeManager */ +$storeManager = $objectManager->get(StoreManagerInterface::class); +$website = $storeManager->getWebsite('base'); +/** @var GroupManagement $groupManagement */ +$groupManagement = $objectManager->get(GroupManagement::class); +$defaultStoreId = $website->getDefaultStore()->getId(); +/** @var AttributeRepository $attributeRepository */ +$attributeRepository = $objectManager->get(AttributeRepository::class); +$gender = $attributeRepository->get(CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER, 'gender') + ->getSource()->getOptionId('Male'); +$customer = $customerFactory->create(); +$customer->setWebsiteId($website->getId()) + ->setEmail('new_customer@example.com') + ->setGroupId($groupManagement->getDefaultGroup($defaultStoreId)->getId()) + ->setStoreId($defaultStoreId) + ->setPrefix('Mr.') + ->setFirstname('John') + ->setMiddlename('A') + ->setLastname('Smith') + ->setSuffix('Esq.') + ->setDefaultBilling(1) + ->setDefaultShipping(1) + ->setGender($gender); +$accountManagement->createAccount($customer, 'Qwert12345'); diff --git a/dev/tests/integration/testsuite/Magento/Customer/_files/new_customer_rollback.php b/dev/tests/integration/testsuite/Magento/Customer/_files/new_customer_rollback.php new file mode 100644 index 0000000000000..48da309f6878f --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/_files/new_customer_rollback.php @@ -0,0 +1,33 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Registry; +use Magento\Store\Api\WebsiteRepositoryInterface; +use Magento\TestFramework\Helper\Bootstrap; + +$objectManager = Bootstrap::getObjectManager(); +/** @var Registry $registry */ +$registry = $objectManager->get(Registry::class); +/** @var CustomerRepositoryInterface $customerRepository */ +$customerRepository = $objectManager->get(CustomerRepositoryInterface::class); +/** @var WebsiteRepositoryInterface $websiteRepository */ +$websiteRepository = $objectManager->get(WebsiteRepositoryInterface::class); +$websiteId = $websiteRepository->get('base')->getId(); +$registry->unregister('isSecureArea'); +$registry->register('isSecureArea', true); + +try { + $customer = $customerRepository->get('new_customer@example.com', $websiteId); + $customerRepository->delete($customer); +} catch (NoSuchEntityException $e) { + //customer already deleted +} + +$registry->unregister('isSecureArea'); +$registry->register('isSecureArea', false); diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Block/Account/LinkTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Block/Account/LinkTest.php new file mode 100644 index 0000000000000..6dac22bd49384 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Block/Account/LinkTest.php @@ -0,0 +1,79 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Newsletter\Block\Account; + +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\View\Result\Page; +use Magento\TestFramework\Helper\Bootstrap; +use PHPUnit\Framework\TestCase; + +/** + * Checks Newsletter Subscriptions link displaying in account dashboard + * + * @magentoAppArea frontend + * @magentoDbIsolation enabled + * @magentoAppIsolation enabled + */ +class LinkTest extends TestCase +{ + /** @var ObjectManagerInterface */ + private $objectManager; + + /** @var Page */ + private $page; + + /** + * @inheritdoc + */ + protected function setUp() + { + parent::setUp(); + + $this->objectManager = Bootstrap::getObjectManager(); + $this->page = $this->objectManager->create(Page::class); + } + + /** + * @return void + */ + public function testNewsletterLink(): void + { + $this->preparePage(); + $block = $this->page->getLayout()->getBlock('customer-account-navigation-newsletter-subscriptions-link'); + $this->assertNotFalse($block); + $html = $block->toHtml(); + $this->assertContains('newsletter/manage/', $html); + $this->assertEquals('Newsletter Subscriptions', strip_tags($html)); + } + + /** + * @magentoConfigFixture current_store newsletter/general/active 0 + * + * @return void + */ + public function testNewsletterLinkDisabled(): void + { + $this->preparePage(); + $block = $this->page->getLayout()->getBlock('customer-account-navigation-newsletter-subscriptions-link'); + $this->assertFalse($block); + } + + /** + * Prepare page before render + * + * @return void + */ + private function preparePage(): void + { + $this->page->addHandle([ + 'default', + 'customer_account', + ]); + $this->page->getLayout()->generateXml(); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Manage/SaveTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Manage/SaveTest.php new file mode 100644 index 0000000000000..87b022c942318 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Manage/SaveTest.php @@ -0,0 +1,157 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Newsletter\Controller\Manage; + +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Model\CustomerRegistry; +use Magento\Customer\Model\Session; +use Magento\Framework\Data\Form\FormKey; +use Magento\Framework\Message\MessageInterface; +use Magento\Newsletter\Model\Plugin\CustomerPlugin; +use Magento\TestFramework\TestCase\AbstractController; + +/** + * Class checks customer subscription + * + * @magentoDbIsolation enabled + */ +class SaveTest extends AbstractController +{ + /** @var Session */ + protected $customerSession; + + /** @var CustomerRepositoryInterface */ + private $customerRepository; + + /** @var FormKey */ + private $formKey; + + /** @var CustomerRegistry */ + private $customerRegistry; + + /** + * @inheritdoc + */ + protected function setUp() + { + parent::setUp(); + + $this->customerSession = $this->_objectManager->get(Session::class); + $this->customerRepository = $this->_objectManager->get(CustomerRepositoryInterface::class); + $this->formKey = $this->_objectManager->get(FormKey::class); + $this->customerRegistry = $this->_objectManager->get(CustomerRegistry::class); + } + + /** + * @inheritdoc + */ + protected function tearDown() + { + $this->customerSession->logout(); + + parent::tearDown(); + } + + /** + * @magentoDataFixture Magento/Customer/_files/new_customer.php + * + * @dataProvider subscriptionDataProvider + * + * @param bool $isSubscribed + * @param string $expectedMessage + * @return void + */ + public function testSaveAction(bool $isSubscribed, string $expectedMessage): void + { + $this->loginCustomer('new_customer@example.com'); + $this->_objectManager->removeSharedInstance(CustomerPlugin::class); + $this->dispatchSaveAction($isSubscribed); + $this->assertSuccessSubscription($expectedMessage); + } + + /** + * @return array + */ + public function subscriptionDataProvider(): array + { + return [ + 'subscribe_customer' => [ + 'is_subscribed' => true, + 'expected_message' => 'We have saved your subscription.', + ], + 'unsubscribe_customer' => [ + 'is_subscribed' => false, + 'expected_message' => 'We have updated your subscription.', + ], + ]; + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer_confirmation_config_enable.php + * @magentoDataFixture Magento/Customer/_files/new_customer.php + * + * @return void + */ + public function testSubscribeWithEnabledConfirmation(): void + { + $this->loginCustomer('new_customer@example.com'); + $this->dispatchSaveAction(true); + $this->assertSuccessSubscription('A confirmation request has been sent.'); + } + + /** + * @magentoDataFixture Magento/Newsletter/_files/customer_with_subscription.php + * + * @return void + */ + public function testUnsubscribeSubscribedCustomer(): void + { + $this->loginCustomer('new_customer@example.com'); + $this->_objectManager->removeSharedInstance(CustomerPlugin::class); + $this->dispatchSaveAction(false); + $this->assertSuccessSubscription('We have removed your newsletter subscription.'); + } + + /** + * Dispatch save action with parameters + * + * @param string $isSubscribed + * @return void + */ + private function dispatchSaveAction(bool $isSubscribed): void + { + $this->_objectManager->removeSharedInstance(CustomerPlugin::class); + $this->getRequest()->setParam('form_key', $this->formKey->getFormKey()) + ->setParam('is_subscribed', $isSubscribed); + $this->dispatch('newsletter/manage/save'); + } + + /** + * Login customer by email + * + * @param string $email + * @return void + */ + private function loginCustomer(string $email): void + { + $customer = $this->customerRepository->get($email); + $this->customerSession->loginById($customer->getId()); + } + + /** + * Assert that action was successfully done + * + * @param string $expectedMessage + * @return void + */ + private function assertSuccessSubscription(string $expectedMessage): void + { + $this->assertRedirect($this->stringContains('customer/account/')); + $this->assertSessionMessages($this->equalTo([(string)__($expectedMessage)]), MessageInterface::TYPE_SUCCESS); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php deleted file mode 100644 index 175c1c7c6c668..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php -/** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Newsletter\Controller; - -/** - * @magentoDbIsolation enabled - */ -class ManageTest extends \Magento\TestFramework\TestCase\AbstractController -{ - /** - * @var \Magento\Customer\Model\Session - */ - protected $customerSession; - - /** - * @var \Magento\Framework\Session\Generic - */ - protected $coreSession; - - /** - * Test setup - */ - protected function setUp() - { - parent::setUp(); - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->customerSession = $objectManager->get(\Magento\Customer\Model\Session::class); - $this->customerSession->setCustomerId(1); - $this->coreSession = $objectManager->get(\Magento\Framework\Session\Generic::class); - $this->coreSession->setData('_form_key', 'formKey'); - } - - /** - * test tearDown - */ - protected function tearDown() - { - $this->customerSession->setCustomerId(null); - $this->coreSession->unsetData('_form_key'); - } - - /** - * @magentoDataFixture Magento/Customer/_files/customer.php - */ - public function testSaveAction() - { - $this->getRequest() - ->setParam('form_key', 'formKey') - ->setParam('is_subscribed', '1'); - $this->dispatch('newsletter/manage/save'); - - $this->assertRedirect($this->stringContains('customer/account/')); - - /** - * Check that errors - */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); - - /** - * Check that success message - */ - $this->assertSessionMessages( - $this->equalTo(['We have saved your subscription.']), - \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS - ); - } - - /** - * @magentoDataFixture Magento/Customer/_files/customer.php - */ - public function testSaveActionRemoveSubscription() - { - - $this->getRequest() - ->setParam('form_key', 'formKey') - ->setParam('is_subscribed', '0'); - $this->dispatch('newsletter/manage/save'); - - $this->assertRedirect($this->stringContains('customer/account/')); - - /** - * Check that errors - */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); - - /** - * Check that success message - */ - $this->assertSessionMessages( - $this->equalTo(['We have updated your subscription.']), - \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS - ); - } -} diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Subscriber/NewActionTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Subscriber/NewActionTest.php new file mode 100644 index 0000000000000..0f07d8b31d13b --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Subscriber/NewActionTest.php @@ -0,0 +1,255 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Newsletter\Controller\Subscriber; + +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Model\Session; +use Magento\Customer\Model\Url; +use Magento\Framework\App\Request\Http as HttpRequest; +use Magento\Newsletter\Model\ResourceModel\Subscriber as SubscriberResource; +use Magento\Newsletter\Model\ResourceModel\Subscriber\CollectionFactory; +use Magento\TestFramework\TestCase\AbstractController; +use Zend\Stdlib\Parameters; + +/** + * Class checks subscription behaviour from frontend + * + * @magentoDbIsolation enabled + * @see \Magento\Newsletter\Controller\Subscriber\NewAction + */ +class NewActionTest extends AbstractController +{ + /** @var Session */ + private $session; + + /** @var CollectionFactory */ + private $subscriberCollectionFactory; + + /** @var SubscriberResource */ + private $subscriberResource; + + /** @var string|null */ + private $subscriberToDelete; + + /** @var CustomerRepositoryInterface */ + private $customerRepository; + + /** @var Url */ + private $customerUrl; + + /** + * @inheritdoc + */ + protected function setUp() + { + parent::setUp(); + + $this->session = $this->_objectManager->get(Session::class); + $this->subscriberCollectionFactory = $this->_objectManager->get(CollectionFactory::class); + $this->subscriberResource = $this->_objectManager->get(SubscriberResource::class); + $this->customerRepository = $this->_objectManager->get(CustomerRepositoryInterface::class); + $this->customerUrl = $this->_objectManager->get(Url::class); + } + + /** + * @inheritdoc + */ + protected function tearDown() + { + if ($this->subscriberToDelete) { + $this->deleteSubscriber($this->subscriberToDelete); + } + + parent::tearDown(); + } + + /** + * @dataProvider subscribersDataProvider + * + * @param string $email + * @param string $expectedMessage + * @return void + */ + public function testNewAction(string $email, string $expectedMessage): void + { + $this->subscriberToDelete = $email ? $email : null; + $this->prepareRequest($email); + $this->dispatch('newsletter/subscriber/new'); + + $this->performAsserts($expectedMessage); + } + + /** + * @return array + */ + public function subscribersDataProvider(): array + { + return [ + 'without_email' => [ + 'email' => '', + 'message' => '', + ], + 'with_unused_email' => [ + 'email' => 'not_used@example.com', + 'message' => 'Thank you for your subscription.', + ], + 'with_invalid_email' => [ + 'email' => 'invalid_email.com', + 'message' => 'Please enter a valid email address.' + ], + ]; + } + + /** + * @magentoDataFixture Magento/Customer/_files/new_customer.php + * + * @return void + */ + public function testNewActionUsedEmail(): void + { + $this->prepareRequest('new_customer@example.com'); + $this->dispatch('newsletter/subscriber/new'); + + $this->performAsserts('Thank you for your subscription.'); + } + + /** + * @magentoDataFixture Magento/Customer/_files/new_customer.php + * + * @return void + */ + public function testNewActionOwnerEmail(): void + { + $this->prepareRequest('new_customer@example.com'); + $this->session->loginById(1); + $this->dispatch('newsletter/subscriber/new'); + + $this->performAsserts('Thank you for your subscription.'); + } + + /** + * @magentoDataFixture Magento/Newsletter/_files/customer_with_subscription.php + * + * @return void + */ + public function testAlreadyExistEmail(): void + { + $this->prepareRequest('new_customer@example.com'); + $this->dispatch('newsletter/subscriber/new'); + + $this->performAsserts('This email address is already subscribed.'); + } + + /** + * @magentoConfigFixture current_store newsletter/subscription/allow_guest_subscribe 0 + * + * @return void + */ + public function testWithNotAllowedGuestSubscription(): void + { + $message = sprintf( + 'Sorry, but the administrator denied subscription for guests. Please <a href="%s">register</a>.', + $this->customerUrl->getRegisterUrl() + ); + $this->subscriberToDelete = 'guest@example.com'; + $this->prepareRequest('guest@example.com'); + $this->dispatch('newsletter/subscriber/new'); + + $this->performAsserts($message); + } + + /** + * @magentoConfigFixture current_store newsletter/subscription/allow_guest_subscribe 0 + * + * @magentoDataFixture Magento/Customer/_files/new_customer.php + * + * @return void + */ + public function testCustomerSubscribeUnrelatedEmailWithNotAllowedGuestSubscription(): void + { + $this->markTestSkipped('Blocked by MC-31662'); + $this->subscriberToDelete = 'guest@example.com'; + $this->session->loginById($this->customerRepository->get('new_customer@example.com')->getId()); + $this->prepareRequest('guest@example.com'); + $this->dispatch('newsletter/subscriber/new'); + //ToDo message need to be specified after bug MC-31662 fixing + $this->performAsserts(''); + } + + /** + * @magentoConfigFixture current_store newsletter/subscription/confirm 1 + * + * @return void + */ + public function testWithRequiredConfirmation(): void + { + $this->subscriberToDelete = 'guest@example.com'; + $this->prepareRequest('guest@example.com'); + $this->dispatch('newsletter/subscriber/new'); + + $this->performAsserts('The confirmation request has been sent.'); + } + + /** + * @magentoDataFixture Magento/Newsletter/_files/three_subscribers.php + * + * @return void + */ + public function testWithEmailAssignedToAnotherCustomer(): void + { + $this->session->loginById(1); + $this->prepareRequest('customer2@search.example.com'); + $this->dispatch('newsletter/subscriber/new'); + + $this->performAsserts('This email address is already assigned to another user.'); + } + + /** + * Prepare request + * + * @param string $email + * @return void + */ + private function prepareRequest(string $email): void + { + $parameters = $this->_objectManager->create(Parameters::class); + $parameters->set('HTTP_REFERER', 'http://localhost/testRedirect'); + $this->getRequest()->setServer($parameters); + $this->getRequest()->setMethod(HttpRequest::METHOD_POST); + $this->getRequest()->setPostValue(['email' => $email]); + } + + /** + * Assert session message and expected redirect + * + * @param string $message + * @return void + */ + private function performAsserts(string $message): void + { + if ($message) { + $this->assertSessionMessages($this->equalTo([(string)__($message)])); + } + $this->assertRedirect($this->equalTo('http://localhost/testRedirect')); + } + + /** + * Delete subscribers by email + * + * @param string $email + * @return void + */ + private function deleteSubscriber(string $email): void + { + $collection = $this->subscriberCollectionFactory->create(); + $item = $collection->addFieldToFilter('subscriber_email', $email)->setPageSize(1)->getFirstItem(); + if ($item->getId()) { + $this->subscriberResource->delete($item); + } + } +} diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/SubscriberTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/SubscriberTest.php index bf19d6ddefc36..ec6ae77c385fd 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/SubscriberTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/SubscriberTest.php @@ -23,59 +23,6 @@ */ class SubscriberTest extends AbstractController { - public function testNewAction() - { - $this->getRequest()->setMethod('POST'); - - $this->dispatch('newsletter/subscriber/new'); - - $this->assertSessionMessages($this->isEmpty()); - $this->assertRedirect($this->anything()); - } - - /** - * @magentoDbIsolation enabled - */ - public function testNewActionUnusedEmail() - { - $this->getRequest()->setMethod('POST'); - $this->getRequest()->setPostValue(['email' => 'not_used@example.com']); - - $this->dispatch('newsletter/subscriber/new'); - - $this->assertSessionMessages($this->equalTo(['Thank you for your subscription.'])); - $this->assertRedirect($this->anything()); - } - - /** - * @magentoDataFixture Magento/Customer/_files/customer.php - */ - public function testNewActionUsedEmail() - { - $this->getRequest()->setMethod('POST'); - $this->getRequest()->setPostValue(['email' => 'customer@example.com']); - - $this->dispatch('newsletter/subscriber/new'); - - $this->assertSessionMessages($this->equalTo(['Thank you for your subscription.'])); - $this->assertRedirect($this->anything()); - } - - /** - * @magentoDataFixture Magento/Customer/_files/customer.php - */ - public function testNewActionOwnerEmail() - { - $this->getRequest()->setMethod('POST'); - $this->getRequest()->setPostValue(['email' => 'customer@example.com']); - $this->login(1); - - $this->dispatch('newsletter/subscriber/new'); - - $this->assertSessionMessages($this->equalTo(['Thank you for your subscription.'])); - $this->assertRedirect($this->anything()); - } - /** * Check that Customer still subscribed for newsletters emails after registration. * @@ -149,18 +96,4 @@ private function fillRequestWithAccountDataAndFormKey($email) ->setPostValue('create_address', true) ->setParam('form_key', Bootstrap::getObjectManager()->get(FormKey::class)->getFormKey()); } - - /** - * Login the user - * - * @param string $customerId Customer to mark as logged in for the session - * @return void - */ - protected function login($customerId) - { - /** @var \Magento\Customer\Model\Session $session */ - $session = Bootstrap::getObjectManager() - ->get(\Magento\Customer\Model\Session::class); - $session->loginById($customerId); - } } diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/_files/customer_with_subscription.php b/dev/tests/integration/testsuite/Magento/Newsletter/_files/customer_with_subscription.php new file mode 100644 index 0000000000000..f700889881e8d --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Newsletter/_files/customer_with_subscription.php @@ -0,0 +1,13 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\Newsletter\Model\SubscriberFactory; + +require __DIR__ . '/../../../Magento/Customer/_files/new_customer.php'; + +$subscriberFactory = $objectManager->get(SubscriberFactory::class); +$subscriberFactory->create()->subscribe('new_customer@example.com'); diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/_files/customer_with_subscription_rollback.php b/dev/tests/integration/testsuite/Magento/Newsletter/_files/customer_with_subscription_rollback.php new file mode 100644 index 0000000000000..145f6a9b43bbb --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Newsletter/_files/customer_with_subscription_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__ . '/../../../Magento/Customer/_files/new_customer_rollback.php'; From 66f8cbc83844e376c83b87116c4212d16cfacd66 Mon Sep 17 00:00:00 2001 From: Stas Puga <stas.puga@transoftgroup.com> Date: Mon, 24 Feb 2020 16:19:49 +0200 Subject: [PATCH 177/229] MC-24241: [MFTF Test] Uploading a Transactional Emails logo --- .../AdminUploadTransactionEmailsImageActionGroup.xml | 8 ++++---- .../Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml | 9 +++++---- .../Theme/Test/Mftf/Section/AdminDesignConfigSection.xml | 2 ++ .../AdminGridFilterSearchResultsBySelectActionGroup.xml | 8 ++++---- .../Ui/Test/Mftf/Section/AdminDataGridFilterSection.xml | 2 +- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/Email/Test/Mftf/ActionGroup/AdminUploadTransactionEmailsImageActionGroup.xml b/app/code/Magento/Email/Test/Mftf/ActionGroup/AdminUploadTransactionEmailsImageActionGroup.xml index 8bcc2c4ddaa92..a34736a71163e 100644 --- a/app/code/Magento/Email/Test/Mftf/ActionGroup/AdminUploadTransactionEmailsImageActionGroup.xml +++ b/app/code/Magento/Email/Test/Mftf/ActionGroup/AdminUploadTransactionEmailsImageActionGroup.xml @@ -14,15 +14,15 @@ </annotations> <arguments> <argument name="image" type="string" defaultValue="{{MagentoLogo.file}}"/> - <argument name="width" type="string"/> - <argument name="height" type="string"/> + <argument name="width" type="string" defaultValue="200"/> + <argument name="height" type="string" defaultValue="100"/> </arguments> - <conditionalClick selector="{{AdminDesignConfigSection.logoSectionHeader}}" dependentSelector="{{AdminDesignConfigSection.logoWrapperOpen}}" visible="true" stepKey="openTab"/> + <conditionalClick selector="{{AdminDesignConfigSection.transactionalEmailSectionHeader}}" dependentSelector="{{AdminDesignConfigSection.transactionalEmailSectionBody}}" visible="false" stepKey="openTransactionalEmailSection"/> <waitForElementVisible selector="{{AdminDesignConfigSection.logoImageAlt}}" stepKey="waitVisibleUploadLogo"/> <attachFile selector="{{AdminDesignConfigSection.logoUpload}}" userInput="{{image}}" stepKey="attachLogo"/> <waitForElementVisible selector="{{AdminDesignConfigSection.logoPreview}}" stepKey="waitingForLogoToUpload"/> - <seeElement selector="{{AdminDesignConfigSection.logoPreview}}" stepKey="LogoPreviewIsVisible"/> + <seeElement selector="{{AdminDesignConfigSection.logoPreview}}" stepKey="logoPreviewIsVisible"/> <fillField selector="{{AdminDesignConfigSection.logoImageAlt}}" userInput="{{image}}" stepKey="fillFieldImageAlt"/> <fillField selector="{{AdminDesignConfigSection.logoImageWidth}}" userInput="{{width}}" stepKey="fillFieldImageWidth"/> <fillField selector="{{AdminDesignConfigSection.logoImageHeight}}" userInput="{{height}}" stepKey="fillFieldImageHeight"/> diff --git a/app/code/Magento/Email/Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml b/app/code/Magento/Email/Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml index 88bfe995d4af1..7492589c8a38f 100644 --- a/app/code/Magento/Email/Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml +++ b/app/code/Magento/Email/Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml @@ -16,8 +16,9 @@ <description value="Transactional Emails Logo should be able to be uploaded in the admin and previewed"/> <severity value="CRITICAL"/> <testCaseId value="MC-27620"/> - <useCaseId value="MC-24241"/> - <group value="logoUpload"/> + <useCaseId value="MC-10932"/> + <group value="theme"/> + <group value="email"/> </annotations> <before> <!--Login to Admin Area--> @@ -35,8 +36,8 @@ <amOnPage url="{{DesignConfigPage.url}}" stepKey="navigateToDesignConfigPage" /> <waitForPageLoad stepKey="waitForPageLoadToViewDesignConfigPage"/> <actionGroup ref="AdminGridFilterSearchResultsBySelectActionGroup" stepKey="filterThemeDesignConfiguration"> - <argument name="selectorAttr" value="store_id"/> - <argument name="store" value="{{_defaultStore.name}}"/> + <argument name="attributeSelector" value="store_id"/> + <argument name="attributeValue" value="{{_defaultStore.name}}"/> </actionGroup> <click selector="{{AdminDesignConfigSection.scopeRow('1')}}" stepKey="editStoreView"/> <waitForPageLoad stepKey="waitForPageLoadToOpenStoreViewEditPage"/> diff --git a/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml b/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml index d073173bc98a1..820917661b2ce 100644 --- a/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml +++ b/app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml @@ -37,5 +37,7 @@ <element name="imageWatermarkType" type="text" selector="//div[contains(@class, 'fieldset-wrapper-title')]//span[contains(text(), '{{watermarkType}}')]" parameterized="true"/> <element name="appliedTheme" type="select" selector="select[name='theme_theme_id']"/> <element name="scopeEditLinkByName" type="button" selector="//tr//td[count(//div[@data-role='grid-wrapper']//tr//th[normalize-space(.)= '{{scope}}']/preceding-sibling::th)+1][contains(.,'{{scopeName}}')]/..//a[contains(@class, 'action-menu-item')]" timeout="30" parameterized="true"/> + <element name="transactionalEmailSectionHeader" type="button" selector="[data-index='email'] .fieldset-wrapper-title" timeout="30"/> + <element name="transactionalEmailSectionBody" type="block" selector="[data-index='email'] .admin__fieldset-wrapper-content" timeout="30"/> </section> </sections> diff --git a/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsBySelectActionGroup.xml b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsBySelectActionGroup.xml index 9ead85283c81f..1f577940b1182 100644 --- a/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsBySelectActionGroup.xml +++ b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsBySelectActionGroup.xml @@ -13,14 +13,14 @@ <description>Filters an Admin Grid page using the provided Filter Selector and Search Value.</description> </annotations> <arguments> - <argument name="selectorAttr" type="string"/> - <argument name="store" type="string"/> + <argument name="attributeSelector" type="string"/> + <argument name="attributeValue" type="string"/> </arguments> <conditionalClick selector="{{AdminGridFilterControls.clearAll}}" dependentSelector="{{AdminGridFilterControls.clearAll}}" visible="true" stepKey="clearTheFiltersIfPresent"/> - <waitForPageLoad time="30" stepKey="waitForPageLoad"/> + <waitForPageLoad time="30" stepKey="waitForFilterApplied"/> <click selector="{{AdminGridFilterControls.filters}}" stepKey="clickOnFilters"/> - <selectOption selector="{{AdminDataGridFilterSection.selectFieldByNameAttrInGrid(selectorAttr)}}" userInput="{{store}}" stepKey="selectStoreView"/> + <selectOption selector="{{AdminDataGridFilterSection.filterSelectFieldByName(attributeSelector)}}" userInput="{{attributeValue}}" stepKey="selectFieldByName"/> <click selector="{{AdminGridFilterControls.applyFilters}}" stepKey="clickOnApplyFilters"/> </actionGroup> </actionGroups> diff --git a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridFilterSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridFilterSection.xml index a2b768af5587e..e93df2d26ffc4 100644 --- a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridFilterSection.xml +++ b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridFilterSection.xml @@ -13,7 +13,7 @@ <element name="filterExpand" type="button" selector="//div[@class='admin__data-grid-header'][(not(ancestor::*[@class='sticky-header']) and not(contains(@style,'visibility: hidden'))) or (ancestor::*[@class='sticky-header' and not(contains(@style,'display: none'))])]//button[@data-action='grid-filter-expand']" /> <element name="inputFieldByNameAttr" type="input" selector="//*[@data-part='filter-form']//input[@name='{{inputNameAttr}}']" parameterized="true" /> <element name="inputFieldByNameAttrInGrid" type="input" selector="//*[@data-role='filter-form']//input[@name='{{inputNameAttr}}']" parameterized="true"/> - <element name="selectFieldByNameAttrInGrid" type="select" selector="//*[@data-part='filter-form']//select[@name='{{selectNameAttr}}']" parameterized="true"/> + <element name="filterSelectFieldByName" type="select" selector="//*[@data-part='filter-form']//select[@name='{{fieldName}}']" parameterized="true"/> <element name="apply" type="button" selector="//*[@data-part='filter-form']//button[@data-action='grid-filter-apply']" /> <element name="clear" type="button" selector=".admin__data-grid-header [data-action='grid-filter-reset']" /> </section> From 769a61baacb64d79e2f5442fda81809c20b06013 Mon Sep 17 00:00:00 2001 From: Petar <petar@customgento.com> Date: Mon, 24 Feb 2020 15:28:38 +0100 Subject: [PATCH 178/229] Fixed typo in description node. --- .../Mftf/ActionGroup/AdminAssertProductQtyInGridActionGroup.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminAssertProductQtyInGridActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminAssertProductQtyInGridActionGroup.xml index cffda5665549e..48cbd803470aa 100644 --- a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminAssertProductQtyInGridActionGroup.xml +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminAssertProductQtyInGridActionGroup.xml @@ -10,7 +10,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminAssertProductQtyInGridActionGroup"> <annotations> - <description>Goes tot he Admin Catalog Product grid page. Filters the grid based on the provided Product SKU. Validates that the provided Product Qty is present.</description> + <description>Goes to the Admin Catalog Product grid page. Filters the grid based on the provided Product SKU. Validates that the provided Product Qty is present.</description> </annotations> <arguments> <argument name="productSku" type="string"/> From 480f779954d9d04355935e3e5763c07041097cbb Mon Sep 17 00:00:00 2001 From: Yurii Sapiha <yurasapiga93@gmail.com> Date: Mon, 24 Feb 2020 20:19:58 +0200 Subject: [PATCH 179/229] MC-31754: Storefront: Subscribe/unsubscribe to email newsletter --- .../testsuite/Magento/Customer/Block/NewsletterTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/NewsletterTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/NewsletterTest.php index e66988a130296..8778a00e81499 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/NewsletterTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/NewsletterTest.php @@ -7,6 +7,7 @@ namespace Magento\Customer\Block; +use Magento\Customer\Model\Session; use Magento\Framework\ObjectManagerInterface; use Magento\Framework\View\LayoutInterface; use Magento\TestFramework\Helper\Bootstrap; @@ -19,6 +20,7 @@ * @see \Magento\Customer\Block\Newsletter * @magentoAppArea frontend * @magentoDbIsolation enabled + * @magentoDataFixture Magento/Customer/_files/customer.php */ class NewsletterTest extends TestCase { @@ -40,6 +42,9 @@ class NewsletterTest extends TestCase /** @var Newsletter */ private $block; + /** @var Session */ + private $customerSession; + /** * @inheritdoc */ @@ -50,6 +55,7 @@ protected function setUp() $this->objectManager = Bootstrap::getObjectManager(); $this->layout = $this->objectManager->get(LayoutInterface::class); $this->block = $this->layout->createBlock(Newsletter::class); + $this->customerSession = $this->objectManager->get(Session::class); } /** @@ -57,6 +63,7 @@ protected function setUp() */ public function testSubscriptionCheckbox(): void { + $this->customerSession->loginById(1); $html = $this->block->toHtml(); $this->assertEquals( 1, From 4d46d794990e63f147a7253cf6d4a66b3e3a82fa Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Mon, 24 Feb 2020 19:48:39 +0100 Subject: [PATCH 180/229] Deprecate Action class --- lib/internal/Magento/Framework/App/Action/Action.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/App/Action/Action.php b/lib/internal/Magento/Framework/App/Action/Action.php index 3ae0bbac44f8a..a6c5bb5674ee8 100644 --- a/lib/internal/Magento/Framework/App/Action/Action.php +++ b/lib/internal/Magento/Framework/App/Action/Action.php @@ -23,7 +23,8 @@ * It contains standard action behavior (event dispatching, flag checks) * Action classes that do not extend from this class will lose this behavior and might not function correctly * - * TODO: Remove this class. Allow implementation of Action Controllers by just implementing Action Interface. + * @TODO: Remove this class. Allow implementation of Action Controllers by just implementing Action Interface. + * @deprecated Use \Magento\Framework\App\ActionInterface instead * * phpcs:disable Magento2.Classes.AbstractApi * @api From 657e597318e82c2e8c48c74f63b6efd1a86c0df2 Mon Sep 17 00:00:00 2001 From: Yevhen Sentiabov <sentiabo@adobe.com> Date: Thu, 20 Feb 2020 10:48:54 -0600 Subject: [PATCH 181/229] ECP-356: class_alias function causes DI compilation failure - Fixed issue with class_alias usage in the class file - Made performance optimizations --- ...ted_class_not_in_constructor_whitelist.php | 3 +- .../Module/Di/Code/Reader/ClassesScanner.php | 32 +-- .../Di/Code/Reader/FileClassScanner.php | 59 +++-- .../Di/Code/Reader/FileClassScannerTest.php | 230 +++++++++++------- 4 files changed, 193 insertions(+), 131 deletions(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/autogenerated_class_not_in_constructor_whitelist.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/autogenerated_class_not_in_constructor_whitelist.php index ba8f7e3dd1420..f8979ef6ab15e 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/autogenerated_class_not_in_constructor_whitelist.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/autogenerated_class_not_in_constructor_whitelist.php @@ -9,5 +9,6 @@ 'Symfony\Component\Console\Application', 'Customer\Address\Attributes', 'Order\Address\Type', - 'Order\Address\Attributes' + 'Order\Address\Attributes', + 'This\Is\Another\Ns', ]; diff --git a/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php b/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php index b3a2f14aa922a..ae957adb09d17 100644 --- a/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php +++ b/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Setup\Module\Di\Code\Reader; @@ -12,8 +13,6 @@ /** * Class ClassesScanner - * - * @package Magento\Setup\Module\Di\Code\Reader */ class ClassesScanner implements ClassesScannerInterface { @@ -100,7 +99,7 @@ public function getList($path) */ private function extract(\RecursiveIteratorIterator $recursiveIterator) { - $classes = [[]]; + $classes = []; foreach ($recursiveIterator as $fileItem) { /** @var $fileItem \SplFileInfo */ if ($fileItem->isDir() || $fileItem->getExtension() !== 'php' || $fileItem->getBasename()[0] == '.') { @@ -113,28 +112,29 @@ private function extract(\RecursiveIteratorIterator $recursiveIterator) } } $fileScanner = new FileClassScanner($fileItemPath); - $classNames = $fileScanner->getClassNames(); - $this->includeClasses($classNames, $fileItemPath); - $classes [] = $classNames; + $className = $fileScanner->getClassName(); + if (!empty($className)) { + $this->includeClass($className, $fileItemPath); + $classes[] = $className; + } } - return array_merge(...$classes); + + return $classes; } /** - * Include classes from file path + * Include class from file path. * - * @param array $classNames + * @param string $className * @param string $fileItemPath * @return bool Whether the class is included or not */ - private function includeClasses(array $classNames, $fileItemPath) + private function includeClass(string $className, string $fileItemPath): bool { - foreach ($classNames as $className) { - if (!class_exists($className)) { - // phpcs:ignore - require_once $fileItemPath; - return true; - } + if (!class_exists($className)) { + // phpcs:ignore + require_once $fileItemPath; + return true; } return false; } diff --git a/setup/src/Magento/Setup/Module/Di/Code/Reader/FileClassScanner.php b/setup/src/Magento/Setup/Module/Di/Code/Reader/FileClassScanner.php index 9a91006564d7f..c5e5230d253cc 100644 --- a/setup/src/Magento/Setup/Module/Di/Code/Reader/FileClassScanner.php +++ b/setup/src/Magento/Setup/Module/Di/Code/Reader/FileClassScanner.php @@ -3,13 +3,12 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Setup\Module\Di\Code\Reader; /** * Class FileClassScanner - * - * @package Magento\Setup\Module\Di\Code\Reader */ class FileClassScanner { @@ -20,9 +19,10 @@ class FileClassScanner ]; private const ALLOWED_OPEN_BRACES_TOKENS = [ - T_CURLY_OPEN => true, + T_CURLY_OPEN => true, T_DOLLAR_OPEN_CURLY_BRACES => true, - T_STRING_VARNAME => true]; + T_STRING_VARNAME => true + ]; /** * The filename of the file to introspect @@ -32,11 +32,11 @@ class FileClassScanner private $filename; /** - * The list of classes found in the file. + * The class name found in the file. * * @var bool */ - private $classNames = false; + private $className = false; /** * @var array @@ -75,6 +75,19 @@ public function getFileContents() return file_get_contents($this->filename); } + /** + * Retrieves the first class found in a class file. + * + * @return string + */ + public function getClassName(): string + { + if ($this->className === false) { + $this->className = $this->extract(); + } + return $this->className; + } + /** * Extracts the fully qualified class name from a file. * @@ -85,11 +98,10 @@ public function getFileContents() * * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) - * @return array + * @return string */ - private function extract() + private function extract(): string { - $classes = []; $namespaceParts = []; $class = ''; $triggerClass = false; @@ -117,6 +129,9 @@ private function extract() } $namespaceParts[] = $token[1]; + // `class` token is not used with a valid class name + } elseif ($triggerClass && !$tokenIsArray) { + $triggerClass = false; // The class keyword was found in the last loop } elseif ($triggerClass && $token[0] === T_STRING) { $triggerClass = false; @@ -125,27 +140,26 @@ private function extract() switch ($token[0]) { case T_NAMESPACE: - // Current loop contains the namespace keyword. Between this and the semicolon is the namespace + // Current loop contains the namespace keyword. Between this and the semicolon is the namespace $triggerNamespace = true; $namespaceParts = []; $bracedNamespace = $this->isBracedNamespace($index); break; case T_CLASS: - // Current loop contains the class keyword. Next loop will have the class name itself. + // Current loop contains the class keyword. Next loop will have the class name itself. if ($braceLevel == 0 || ($bracedNamespace && $braceLevel == 1)) { $triggerClass = true; } break; } - // We have a class name, let's concatenate and store it! + // We have a class name, let's concatenate and return it! if ($class !== '') { $fqClassName = trim(join('', $namespaceParts)) . trim($class); - $classes[] = $fqClassName; - $class = ''; + return $fqClassName; } } - return $classes; + return $class; } /** @@ -173,19 +187,4 @@ private function isBracedNamespace($index) } throw new InvalidFileException('Could not find namespace termination'); } - - /** - * Retrieves the first class found in a class file. - * - * The return value is in an array format so it retains the same usage as the FileScanner. - * - * @return array - */ - public function getClassNames() - { - if ($this->classNames === false) { - $this->classNames = $this->extract(); - } - return $this->classNames; - } } diff --git a/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/FileClassScannerTest.php b/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/FileClassScannerTest.php index 5bc7fd82b3251..c50c024aefe8f 100644 --- a/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/FileClassScannerTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/FileClassScannerTest.php @@ -7,23 +7,22 @@ use Magento\Setup\Module\Di\Code\Reader\FileClassScanner; use Magento\Setup\Module\Di\Code\Reader\InvalidFileException; +use PHPUnit\Framework\MockObject\MockObject; class FileClassScannerTest extends \PHPUnit\Framework\TestCase { - public function testInvalidFileThrowsException() { $this->expectException(InvalidFileException::class); - new FileClassScanner(false); + new FileClassScanner(''); } public function testEmptyArrayForFileWithoutNamespaceOrClass() { - $scanner = $this->getMockBuilder(FileClassScanner::class)->disableOriginalConstructor()->setMethods([ - 'getFileContents' - ])->getMock(); - $scanner->expects(self::once())->method('getFileContents')->willReturn( - <<<PHP + $scanner = $this->getScannerMockObject(); + $scanner->expects(self::once()) + ->method('getFileContents') + ->willReturn(<<<PHP <?php echo 'hello world'; @@ -35,17 +34,16 @@ public function testEmptyArrayForFileWithoutNamespaceOrClass() ); /** @var $scanner FileClassScanner */ - $result = $scanner->getClassNames(); - self::assertCount(0, $result); + $result = $scanner->getClassName(); + self::assertEmpty($result); } public function testGetClassName() { - $scanner = $this->getMockBuilder(FileClassScanner::class)->disableOriginalConstructor()->setMethods([ - 'getFileContents' - ])->getMock(); - $scanner->expects(self::once())->method('getFileContents')->willReturn( - <<<PHP + $scanner = $this->getScannerMockObject(); + $scanner->expects(self::once()) + ->method('getFileContents') + ->willReturn(<<<PHP <?php class ThisIsATest { @@ -53,21 +51,18 @@ class ThisIsATest { } PHP ); - /** @var $scanner FileClassScanner */ - - $result = $scanner->getClassNames(); - self::assertCount(1, $result); - self::assertContains('ThisIsATest', $result); + /** @var $scanner FileClassScanner */ + $result = $scanner->getClassName(); + self::assertEquals('ThisIsATest', $result); } public function testGetClassNameAndSingleNamespace() { - $scanner = $this->getMockBuilder(FileClassScanner::class)->disableOriginalConstructor()->setMethods([ - 'getFileContents' - ])->getMock(); - $scanner->expects(self::once())->method('getFileContents')->willReturn( - <<<PHP + $scanner = $this->getScannerMockObject(); + $scanner->expects(self::once()) + ->method('getFileContents') + ->willReturn(<<<PHP <?php namespace NS; @@ -77,21 +72,18 @@ class ThisIsMyTest { } PHP ); - /** @var $scanner FileClassScanner */ - $result = $scanner->getClassNames(); - - self::assertCount(1, $result); - self::assertContains('NS\ThisIsMyTest', $result); + /** @var $scanner FileClassScanner */ + $result = $scanner->getClassName(); + self::assertEquals('NS\ThisIsMyTest', $result); } public function testGetClassNameAndMultiNamespace() { - $scanner = $this->getMockBuilder(FileClassScanner::class)->disableOriginalConstructor()->setMethods([ - 'getFileContents' - ])->getMock(); - $scanner->expects(self::once())->method('getFileContents')->willReturn( - <<<PHP + $scanner = $this->getScannerMockObject(); + $scanner->expects(self::once()) + ->method('getFileContents') + ->willReturn(<<<PHP <?php namespace This\Is\My\Ns; @@ -102,29 +94,26 @@ public function __construct() { \This\Is\Another\Ns::class; } - + public function test() { - + } } PHP ); - /** @var $scanner FileClassScanner */ - - $result = $scanner->getClassNames(); - self::assertCount(1, $result); - self::assertContains('This\Is\My\Ns\ThisIsMyTest', $result); + /** @var $scanner FileClassScanner */ + $result = $scanner->getClassName(); + self::assertEquals('This\Is\My\Ns\ThisIsMyTest', $result); } public function testGetMultiClassNameAndMultiNamespace() { - $scanner = $this->getMockBuilder(FileClassScanner::class)->disableOriginalConstructor()->setMethods([ - 'getFileContents' - ])->getMock(); - $scanner->expects(self::once())->method('getFileContents')->willReturn( - <<<PHP + $scanner = $this->getScannerMockObject(); + $scanner->expects(self::once()) + ->method('getFileContents') + ->willReturn(<<<PHP <?php namespace This\Is\My\Ns; @@ -136,10 +125,10 @@ public function __construct() \$this->get(\This\Is\Another\Ns::class)->method(); self:: class; } - + public function test() { - + } } @@ -149,37 +138,34 @@ class ThisIsForBreaking { PHP ); - /** @var $scanner FileClassScanner */ - $result = $scanner->getClassNames(); - - self::assertCount(2, $result); - self::assertContains('This\Is\My\Ns\ThisIsMyTest', $result); - self::assertContains('This\Is\My\Ns\ThisIsForBreaking', $result); + /** @var $scanner FileClassScanner */ + $result = $scanner->getClassName(); + // only a single class should be in the file + self::assertEquals('This\Is\My\Ns\ThisIsMyTest', $result); } public function testBracketedNamespacesAndClasses() { - $scanner = $this->getMockBuilder(FileClassScanner::class)->disableOriginalConstructor()->setMethods([ - 'getFileContents' - ])->getMock(); - $scanner->expects(self::once())->method('getFileContents')->willReturn( - <<<PHP + $scanner = $this->getScannerMockObject(); + $scanner->expects(self::once()) + ->method('getFileContents') + ->willReturn(<<<PHP <?php namespace This\Is\My\Ns { class ThisIsMyTest { - + public function __construct() { \This\Is\Another\Ns::class; self:: class; } - + } - + class ThisIsForBreaking { } @@ -189,27 +175,24 @@ class ThisIsForBreaking class ThisIsNotMyTest { - } + } } PHP ); - /** @var $scanner FileClassScanner */ - - $result = $scanner->getClassNames(); - self::assertCount(3, $result); - self::assertContains('This\Is\My\Ns\ThisIsMyTest', $result); - self::assertContains('This\Is\My\Ns\ThisIsForBreaking', $result); - self::assertContains('This\Is\Not\My\Ns\ThisIsNotMyTest', $result); + /** @var $scanner FileClassScanner */ + $result = $scanner->getClassName(); + // only a single class should in the file + self::assertEquals('This\Is\My\Ns\ThisIsMyTest', $result); } public function testMultipleClassKeywordsInMiddleOfFileWithStringVariableParsing() { - $scanner = $this->getMockBuilder(FileClassScanner::class)->disableOriginalConstructor()->setMethods([ - 'getFileContents' - ])->getMock(); - $scanner->expects(self::once())->method('getFileContents')->willReturn(<<<'PHP' + $scanner = $this->getScannerMockObject(); + $scanner->expects(self::once()) + ->method('getFileContents') + ->willReturn(<<<'PHP' <?php namespace This\Is\My\Ns; @@ -236,22 +219,20 @@ protected function secondMethod() ); /* @var $scanner FileClassScanner */ - $result = $scanner->getClassNames(); - - self::assertCount(1, $result); + $result = $scanner->getClassName(); + self::assertEquals('This\Is\My\Ns\ThisIsMyTest', $result); } public function testInvalidPHPCodeThrowsExceptionWhenCannotDetermineBraceOrSemiColon() { $this->expectException(InvalidFileException::class); - $scanner = $this->getMockBuilder(FileClassScanner::class)->disableOriginalConstructor()->setMethods([ - 'getFileContents' - ])->getMock(); - $scanner->expects(self::once())->method('getFileContents')->willReturn( - <<<PHP + $scanner = $this->getScannerMockObject(); + $scanner->expects(self::once()) + ->method('getFileContents') + ->willReturn(<<<PHP <?php -namespace This\Is\My\Ns +namespace This\Is\My\Ns class ThisIsMyTest { @@ -259,8 +240,89 @@ class ThisIsMyTest PHP ); + /** @var $scanner FileClassScanner */ + $scanner->getClassName(); + } + + /** + * Checks a case when file with class also contains `class_alias` function for backward compatibility. + */ + public function testFileContainsClassAliasFunction(): void + { + $scanner = $this->getScannerMockObject(); + $scanner->expects(self::once()) + ->method('getFileContents') + ->willReturn(<<<'PHP' +<?php + +namespace This\Is\My\Ns; + +use stdClass; + +class ThisIsMyTest +{ + public function doMethod() + { + $className = stdClass::class; + return $className; + } + + public function secondMethod() + { + $this->doMethod(); + } +} + +class_alias(\This\Is\My\Ns\ThisIsMyTest::class, stdClass::class); + +PHP + ); + + /* @var $scanner FileClassScanner */ + $result = $scanner->getClassName(); + self::assertEquals('This\Is\My\Ns\ThisIsMyTest', $result); + } + + /** + * Checks a case when file with class also contains `class_exists` function. + */ + public function testFileContainsClassExistsFunction(): void + { + $scanner = $this->getScannerMockObject(); + $scanner->expects(self::once()) + ->method('getFileContents') + ->willReturn(<<<PHP +<?php + +namespace This\Is\My\Ns; + +if (false) { + class ThisIsMyTest {} +} + +class_exists(\This\Is\My\Ns\ThisIsMySecondTest::class); +trigger_error('This class is does not supported'); +PHP + ); + + /* @var $scanner FileClassScanner */ + $result = $scanner->getClassName(); + self::assertEmpty($result); + } + + /** + * Creates file class scanner mock object. + * + * @return MockObject + */ + private function getScannerMockObject(): MockObject + { + $scanner = $this->getMockBuilder(FileClassScanner::class) + ->disableOriginalConstructor() + ->setMethods(['getFileContents']) + ->getMock(); - $scanner->getClassNames(); + return $scanner; } } From 472e808b54b1af1baed3b47955faa51379493f75 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Mon, 24 Feb 2020 23:42:03 +0100 Subject: [PATCH 182/229] Adjust Unit Tests to follow Request fetched on Constructor --- .../CheckUserForgotPasswordBackendObserverTest.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Captcha/Test/Unit/Observer/CheckUserForgotPasswordBackendObserverTest.php b/app/code/Magento/Captcha/Test/Unit/Observer/CheckUserForgotPasswordBackendObserverTest.php index 584e7eb2e215f..9d3aa88ed9be4 100644 --- a/app/code/Magento/Captcha/Test/Unit/Observer/CheckUserForgotPasswordBackendObserverTest.php +++ b/app/code/Magento/Captcha/Test/Unit/Observer/CheckUserForgotPasswordBackendObserverTest.php @@ -101,6 +101,7 @@ protected function setUp() ->getMockForAbstractClass(); $this->actionFlagMock = $this->createMock(ActionFlag::class); $this->messageManagerMock = $this->createMock(ManagerInterface::class); + $this->requestMock = $this->createMock(HttpRequest::class); $objectManager = new ObjectManagerHelper($this); $this->observer = $objectManager->getObject( @@ -110,7 +111,8 @@ protected function setUp() 'captchaStringResolver' => $this->captchaStringResolverMock, '_session' => $this->sessionMock, '_actionFlag' => $this->actionFlagMock, - 'messageManager' => $this->messageManagerMock + 'messageManager' => $this->messageManagerMock, + 'request' => $this->requestMock ] ); @@ -122,16 +124,12 @@ protected function setUp() ->with($formId) ->willReturn($this->captchaMock); - $this->requestMock = $this->createMock(HttpRequest::class); $this->httpResponseMock = $this->createMock(HttpResponse::class); $this->controllerMock = $this->getMockBuilder(Action::class) ->disableOriginalConstructor() - ->setMethods(['getUrl', 'getRequest', 'getResponse']) + ->setMethods(['getUrl', 'getResponse']) ->getMockForAbstractClass(); - $this->controllerMock->expects($this->any()) - ->method('getRequest') - ->willReturn($this->requestMock); $this->controllerMock->expects($this->any()) ->method('getResponse') ->willReturn($this->httpResponseMock); From c6c52d63f9db8c48ec6795d1278c1dbf333e80d4 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Tue, 25 Feb 2020 03:22:33 +0100 Subject: [PATCH 183/229] Fix issue with failing Customer tests for B2B --- .../ActionGroup/_Deprecated_ActionGroup.xml | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml index 5ae521b3604cd..5efcfc0e79b0d 100644 --- a/app/code/Magento/Customer/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml @@ -12,7 +12,7 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore --> <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="AdminCreateCustomerWithWebSiteAndGroup"> + <actionGroup name="AdminCreateCustomerWithWebSiteAndGroup" deprecated="Use `AdminCreateCustomerWithWebSiteAndGroupActionGroup` instead"> <annotations> <description>Goes to the Customer grid page. Click on 'Add New Customer'. Fills provided Customer Data. Fill provided Customer Address data. Assigns Product to Website and Store View. Clicks on Save.</description> </annotations> @@ -22,7 +22,6 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore <argument name="storeView" type="string" defaultValue="{{_defaultStore.name}}"/> </arguments> - <!-- NOTICE: This ActionGroup is DEPRECATED! Use `AdminCreateCustomerWithWebSiteAndGroupActionGroup` instead --> <amOnPage url="{{AdminCustomerPage.url}}" stepKey="goToCustomersPage"/> <click stepKey="addNewCustomer" selector="{{AdminCustomerGridMainActionsSection.addNewCustomer}}"/> <selectOption stepKey="selectWebSite" selector="{{AdminCustomerAccountInformationSection.associateToWebsite}}" userInput="{{website}}"/> @@ -37,29 +36,27 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore <see stepKey="seeSuccessMessage" userInput="You saved the customer."/> </actionGroup> - <actionGroup name="AdminEditCustomerAddressNoZipNoState" extends="AdminEditCustomerAddressesFrom"> + <actionGroup name="AdminEditCustomerAddressNoZipNoState" extends="AdminEditCustomerAddressesFrom" deprecated="Use `AdminEditCustomerAddressNoZipNoStateActionGroup` instead"> <annotations> <description>EXTENDS: AdminEditCustomerAddressesFrom. Removes 'selectState' and 'fillZipCode'. Clicks on 'Set Default' for Billing/Shipping.</description> </annotations> - <!-- NOTICE: This ActionGroup is DEPRECATED! Use `AdminEditCustomerAddressNoZipNoStateActionGroup` instead --> <remove keyForRemoval="selectState"/> <remove keyForRemoval="fillZipCode"/> <click selector="{{AdminEditCustomerAddressesSection.defaultBillingAddressButton}}" stepKey="setDefaultBilling" before="setDefaultShipping"/> <click selector="{{AdminEditCustomerAddressesSection.defaultShippingAddressButton}}" stepKey="setDefaultShipping" before="fillPrefixName"/> </actionGroup> - <actionGroup name="AdminEditCustomerAddressSetDefaultShippingAndBilling" extends="AdminEditCustomerAddressesFrom"> + <actionGroup name="AdminEditCustomerAddressSetDefaultShippingAndBilling" extends="AdminEditCustomerAddressesFrom" deprecated="Use `AdminEditCustomerAddressSetDefaultShippingAndBillingActionGroup` instead"> <annotations> <description>EXTENDS: AdminEditCustomerAddressesFrom. Removes 'selectState' and 'fillZipCode'.</description> </annotations> - <!-- NOTICE: This ActionGroup is DEPRECATED! Use `AdminEditCustomerAddressSetDefaultShippingAndBillingActionGroup` instead --> <click selector="{{AdminEditCustomerAddressesSection.defaultBillingAddressButton}}" stepKey="setDefaultBilling" before="setDefaultShipping"/> <click selector="{{AdminEditCustomerAddressesSection.defaultShippingAddressButton}}" stepKey="setDefaultShipping" before="fillPrefixName"/> </actionGroup> - <actionGroup name="EnterCustomerAddressInfo"> + <actionGroup name="EnterCustomerAddressInfo" deprecated="Use `EnterCustomerAddressInfoActionGroup` instead"> <annotations> <description>Fills in the provided Customer details (First/Last Name, Company, Phone # and Address) on the Admin Customer creation/edit page. Clicks on the Save button.</description> </annotations> @@ -67,7 +64,6 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore <argument name="Address"/> </arguments> - <!-- NOTICE: This ActionGroup is DEPRECATED! Use `EnterCustomerAddressInfoActionGroup` instead --> <amOnPage url="customer/address/new/" stepKey="goToAddressPage"/> <waitForPageLoad stepKey="waitForAddressPage"/> <fillField stepKey="fillFirstName" selector="{{StorefrontCustomerAddressSection.firstName}}" userInput="{{Address.firstname}}"/> @@ -84,16 +80,15 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore </actionGroup> <!-- Fills State Field instead of selecting it--> - <actionGroup name="EnterCustomerAddressInfoFillState" extends="EnterCustomerAddressInfo"> + <actionGroup name="EnterCustomerAddressInfoFillState" extends="EnterCustomerAddressInfo" deprecated="Use `CreateSystemBackupActionGroup` instead"> <annotations> <description>EXTENDS: EnterCustomerAddressInfo. Fills the State field.</description> </annotations> - <!-- NOTICE: This ActionGroup is DEPRECATED! Use `CreateSystemBackupActionGroup` instead --> <fillField stepKey="selectState" selector="{{StorefrontCustomerAddressSection.stateProvinceFill}}" userInput="{{Address.state}}"/> </actionGroup> - <actionGroup name="VerifyCustomerBillingAddress"> + <actionGroup name="VerifyCustomerBillingAddress" deprecated="Use `VerifyCustomerBillingAddressActionGroup` instead"> <annotations> <description>Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Billing Address is present and correct on the Storefront Customer Dashboard Address section.</description> </annotations> @@ -104,7 +99,6 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore <amOnPage url="customer/address/index/" stepKey="goToAddressPage"/> <waitForPageLoad stepKey="waitForAddressPageLoad"/> - <!-- NOTICE: This ActionGroup is DEPRECATED! Use `VerifyCustomerBillingAddressActionGroup` instead --> <see selector="{{StorefrontCustomerAddressesSection.defaultBillingAddress}}" userInput="{{address.firstname}} {{address.lastname}}" stepKey="seeAssertCustomerDefaultBillingAddressFirstnameAndLastname"/> <see selector="{{StorefrontCustomerAddressesSection.defaultBillingAddress}}" userInput="{{address.company}}" stepKey="seeAssertCustomerDefaultBillingAddressCompany"/> <see selector="{{StorefrontCustomerAddressesSection.defaultBillingAddress}}" userInput="{{address.street[0]}}" stepKey="seeAssertCustomerDefaultBillingAddressStreet"/> @@ -114,7 +108,7 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore <see selector="{{StorefrontCustomerAddressesSection.defaultBillingAddress}}" userInput="{{address.telephone}}" stepKey="seeAssertCustomerDefaultBillingAddressTelephone"/> </actionGroup> - <actionGroup name="VerifyCustomerShippingAddress"> + <actionGroup name="VerifyCustomerShippingAddress" deprecated="Use `VerifyCustomerShippingAddressActionGroup` instead"> <annotations> <description>Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Shipping Address is present and correct.</description> </annotations> @@ -122,7 +116,6 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore <argument name="address"/> </arguments> - <!-- NOTICE: This ActionGroup is DEPRECATED! Use `VerifyCustomerShippingAddressActionGroup` instead --> <amOnPage url="customer/address/index/" stepKey="goToAddressPage"/> <waitForPageLoad stepKey="waitForAddressPageLoad"/> <see selector="{{StorefrontCustomerAddressesSection.defaultShippingAddress}}" userInput="{{address.firstname}} {{address.lastname}}" stepKey="seeAssertCustomerDefaultShippingAddressFirstnameAndLastname"/> @@ -134,7 +127,7 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore <see selector="{{StorefrontCustomerAddressesSection.defaultShippingAddress}}" userInput="{{address.telephone}}" stepKey="seeAssertCustomerDefaultShippingAddressTelephone"/> </actionGroup> - <actionGroup name="VerifyCustomerBillingAddressWithState"> + <actionGroup name="VerifyCustomerBillingAddressWithState" deprecated="Use `VerifyCustomerBillingAddressWithStateActionGroup` instead"> <annotations> <description>Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Billing Address, including the State, is present and correct.</description> </annotations> @@ -142,7 +135,6 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore <argument name="address"/> </arguments> - <!-- NOTICE: This ActionGroup is DEPRECATED! Use `VerifyCustomerBillingAddressWithStateActionGroup` instead --> <amOnPage url="customer/address/index/" stepKey="goToAddressPage"/> <waitForPageLoad stepKey="waitForAddressPageLoad"/> <see selector="{{StorefrontCustomerAddressesSection.defaultBillingAddress}}" userInput="{{address.firstname}} {{address.lastname}}" stepKey="seeAssertCustomerDefaultBillingAddressFirstnameAndLastname"/> @@ -154,7 +146,7 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore <see selector="{{StorefrontCustomerAddressesSection.defaultBillingAddress}}" userInput="{{address.telephone}}" stepKey="seeAssertCustomerDefaultBillingAddressTelephone"/> </actionGroup> - <actionGroup name="VerifyCustomerShippingAddressWithState"> + <actionGroup name="VerifyCustomerShippingAddressWithState" deprecated="Use `VerifyCustomerShippingAddressWithStateActionGroup` instead"> <annotations> <description>Goes to the Storefront Customer Dashboard Address area. Validates that the provided Customer Shipping Address, including the State, is present and correct.</description> </annotations> @@ -162,7 +154,6 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore <argument name="address"/> </arguments> - <!-- NOTICE: This ActionGroup is DEPRECATED! Use `VerifyCustomerShippingAddressWithStateActionGroup` instead --> <amOnPage url="customer/address/index/" stepKey="goToAddressPage"/> <waitForPageLoad stepKey="waitForAddressPageLoad"/> <see selector="{{StorefrontCustomerAddressesSection.defaultShippingAddress}}" userInput="{{address.firstname}} {{address.lastname}}" stepKey="seeAssertCustomerDefaultShippingAddressFirstnameAndLastname"/> @@ -174,7 +165,7 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore <see selector="{{StorefrontCustomerAddressesSection.defaultShippingAddress}}" userInput="{{address.telephone}}" stepKey="seeAssertCustomerDefaultShippingAddressTelephone"/> </actionGroup> - <actionGroup name="VerifyCustomerNameOnFrontend"> + <actionGroup name="VerifyCustomerNameOnFrontend" deprecated="Use `VerifyCustomerNameOnFrontendActionGroup` instead"> <annotations> <description>Goes to the Storefront Customer Dashboard page. Validates that the Customer First/Last Name is present and correct.</description> </annotations> @@ -182,7 +173,6 @@ NOTICE: Action Groups in this file are DEPRECATED and SHOULD NOT BE USED anymore <argument name="customer"/> </arguments> - <!-- NOTICE: This ActionGroup is DEPRECATED! Use `VerifyCustomerNameOnFrontendActionGroup` instead --> <amOnPage url="customer/account/edit/" stepKey="goToAddressPage"/> <waitForPageLoad stepKey="waitForAddressPageLoad"/> <click selector="{{StorefrontCustomerSidebarSection.sidebarCurrentTab('Account Information')}}" stepKey="clickAccountInformationFromSidebarCurrentTab"/> From fbbe8c040cc740b0f9e37f7c4c58251398d80717 Mon Sep 17 00:00:00 2001 From: Serhiy Yelahin <serhiy.yelahin@transoftgroup.com> Date: Tue, 25 Feb 2020 09:38:13 +0200 Subject: [PATCH 184/229] MC-31171: Recently viewed products widget shows only one product --- .../ProductFrontendAction/Synchronizer.php | 10 +++++++--- .../ProductFrontendAction/SynchronizerTest.php | 6 +++--- .../ProductFrontendAction/SynchronizerTest.php | 15 +++++++++++---- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/ProductFrontendAction/Synchronizer.php b/app/code/Magento/Catalog/Model/Product/ProductFrontendAction/Synchronizer.php index ec2e697ccc849..b736700a4481d 100644 --- a/app/code/Magento/Catalog/Model/Product/ProductFrontendAction/Synchronizer.php +++ b/app/code/Magento/Catalog/Model/Product/ProductFrontendAction/Synchronizer.php @@ -20,6 +20,8 @@ * * Service which allows to sync product widget information, such as product id with db. In order to reuse this info * on different devices + * + * @SuppressWarnings(PHPMD.CookieAndSessionMisuse) */ class Synchronizer { @@ -94,6 +96,7 @@ public function __construct( * * @param string $namespace * @return int + * @throws \Magento\Framework\Exception\LocalizedException */ private function getLifeTimeByNamespace($namespace) { @@ -119,6 +122,7 @@ private function getLifeTimeByNamespace($namespace) * @param array $productsData (product action data, that came from frontend) * @param string $typeId namespace (type of action) * @return array + * @throws \Magento\Framework\Exception\LocalizedException */ private function filterNewestActions(array $productsData, $typeId) { @@ -166,6 +170,7 @@ private function getProductIdsByActions(array $actions) * @param array $productsData * @param string $typeId * @return void + * @throws \Exception */ public function syncActions(array $productsData, $typeId) { @@ -189,8 +194,7 @@ public function syncActions(array $productsData, $typeId) foreach ($collection as $item) { $this->entityManager->delete($item); } - - foreach ($productsData as $productId => $productData) { + foreach ($productsData as $productData) { /** @var ProductFrontendActionInterface $action */ $action = $this->productFrontendActionFactory->create( [ @@ -198,7 +202,7 @@ public function syncActions(array $productsData, $typeId) 'visitor_id' => $customerId ? null : $visitorId, 'customer_id' => $this->session->getCustomerId(), 'added_at' => $productData['added_at'], - 'product_id' => $productId, + 'product_id' => $productData['product_id'], 'type_id' => $typeId ] ] diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/ProductFrontendAction/SynchronizerTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/ProductFrontendAction/SynchronizerTest.php index 38bed83cb9504..8b70899cd26d3 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/ProductFrontendAction/SynchronizerTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/ProductFrontendAction/SynchronizerTest.php @@ -82,15 +82,15 @@ public function testFilterProductActions() { $typeId = 'recently_compared_product'; $productsData = [ - 1 => [ + 'website-1-1' => [ 'added_at' => 12, 'product_id' => 1, ], - 2 => [ + 'website-1-2' => [ 'added_at' => 13, 'product_id' => '2', ], - 3 => [ + 'website-2-3' => [ 'added_at' => 14, 'product_id' => 3, ] diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ProductFrontendAction/SynchronizerTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ProductFrontendAction/SynchronizerTest.php index 3ea30005e9f6c..5cf53349480f1 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ProductFrontendAction/SynchronizerTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ProductFrontendAction/SynchronizerTest.php @@ -40,20 +40,24 @@ protected function setUp() * @magentoDataFixture Magento/Catalog/_files/second_product_simple.php * * @return void + * @throws \Magento\Framework\Exception\LocalizedException + * @throws \Magento\Framework\Exception\NoSuchEntityException */ public function testSyncActions(): void { $actionsType = 'recently_viewed_product'; + $productScope = 'website'; + $scopeId = 1; $product1 = $this->productRepository->get('simple'); $product2 = $this->productRepository->get('simple2'); $product1Id = $product1->getId(); $product2Id = $product2->getId(); $productsData = [ - $product1Id => [ + $productScope . '-' . $scopeId . '-' . $product1Id => [ 'added_at' => '1576582660', 'product_id' => $product1Id, ], - $product2Id => [ + $productScope . '-' . $scopeId . '-' . $product2Id => [ 'added_at' => '1576587153', 'product_id' => $product2Id, ], @@ -71,8 +75,9 @@ public function testSyncActions(): void ); foreach ($synchronizedCollection as $item) { - $this->assertArrayHasKey($item->getProductId(), $productsData); - $this->assertEquals($productsData[$item->getProductId()]['added_at'], $item->getAddedAt()); + $productScopeId = $productScope . '-' . $scopeId . '-' . $item->getProductId(); + $this->assertArrayHasKey($productScopeId, $productsData); + $this->assertEquals($productsData[$productScopeId]['added_at'], $item->getAddedAt()); } } @@ -81,6 +86,8 @@ public function testSyncActions(): void * @magentoDataFixture Magento/Catalog/_files/second_product_simple.php * * @return void + * @throws \Magento\Framework\Exception\LocalizedException + * @throws \Magento\Framework\Exception\NoSuchEntityException */ public function testSyncActionsWithoutActionsType(): void { From ce191710acfaaf8457d2bb66c192d8d3bb984844 Mon Sep 17 00:00:00 2001 From: Nazar Klovanych <nazarn96@gmail.com> Date: Tue, 25 Feb 2020 10:37:15 +0200 Subject: [PATCH 185/229] added more clear tests names --- .../code/Magento/Ui/frontend/js/model/messages.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js index b0a8f952806a4..54134c5b3166c 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/frontend/js/model/messages.test.js @@ -41,7 +41,7 @@ define([ }); }); - it('simple message', function () { + it('adds massage without parameters', function () { var type = []; messageObj = { @@ -51,7 +51,7 @@ define([ expect(type).toEqual([messageObj.message]); }); - it('message with parameters', function () { + it('add message with parameters', function () { var returnedObj, type = []; @@ -70,7 +70,7 @@ define([ expect(type).toEqual(returnedObj); }); - it('check addErrorMessage && getErrorMessage && hasMessages', function () { + it('add error message, get error message, verify has error message', function () { messageObj = { message: errorMessageText }; @@ -81,7 +81,7 @@ define([ expect(obj.hasMessages()).toEqual(true); }); - it('check addSuccessMessage && getSuccessMessage && hasMessages', function () { + it('add success message, get success message, verify has success message', function () { messageObj = { message: successMessageText }; @@ -91,7 +91,7 @@ define([ expect(obj.hasMessages()).toEqual(true); }); - it('check for cleaning messages', function () { + it('cleaning messages', function () { messageObj = { message: 'Message test case %1, case %2 and case %3', parameters: [ From 714154d3204c18731f63f45d57dfeaddf868b882 Mon Sep 17 00:00:00 2001 From: "rostyslav.hymon" <rostyslav.hymon@transoftgroup.com> Date: Tue, 25 Feb 2020 11:07:48 +0200 Subject: [PATCH 186/229] MC-31432: [Page Builder] Conditions "Price" does not work for Configurable products --- .../ResourceModel/Product/Collection.php | 17 ++-- .../Model/Rule/Condition/Product.php | 77 ++++++++++--------- .../Block/Product/ProductListTest.php | 76 ++++++++++++++++++ 3 files changed, 127 insertions(+), 43 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php index afbe279045a38..14daac0147abf 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php @@ -1904,6 +1904,7 @@ protected function _productLimitationJoinPrice() * @see \Magento\Catalog\Model\ResourceModel\Product\Collection::_productLimitationJoinPrice() * @param bool $joinLeft * @return $this + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _productLimitationPrice($joinLeft = false) { @@ -1922,14 +1923,14 @@ protected function _productLimitationPrice($joinLeft = false) $connection = $this->getConnection(); $select = $this->getSelect(); - $joinCond = join( - ' AND ', - [ - 'price_index.entity_id = e.entity_id', - $connection->quoteInto('price_index.website_id = ?', $filters['website_id']), - $connection->quoteInto('price_index.customer_group_id = ?', $filters['customer_group_id']) - ] - ); + $joinCondArray = []; + $joinCondArray[] = 'price_index.entity_id = e.entity_id'; + $joinCondArray[] = $connection->quoteInto('price_index.customer_group_id = ?', $filters['customer_group_id']); + // Add website condition only if it's different from admin scope + if (((int) $filters['website_id']) !== Store::DEFAULT_STORE_ID) { + $joinCondArray[] = $connection->quoteInto('price_index.website_id = ?', $filters['website_id']); + } + $joinCond = join(' AND ', $joinCondArray); $fromPart = $select->getPart(\Magento\Framework\DB\Select::FROM); if (!isset($fromPart['price_index'])) { diff --git a/app/code/Magento/CatalogWidget/Model/Rule/Condition/Product.php b/app/code/Magento/CatalogWidget/Model/Rule/Condition/Product.php index eca994de0892f..f9340a495de65 100644 --- a/app/code/Magento/CatalogWidget/Model/Rule/Condition/Product.php +++ b/app/code/Magento/CatalogWidget/Model/Rule/Condition/Product.php @@ -11,6 +11,7 @@ use Magento\Catalog\Api\Data\ProductInterface; use Magento\Catalog\Model\ProductCategoryList; +use Magento\Catalog\Model\ResourceModel\Product\Collection; use Magento\Store\Model\Store; /** @@ -122,46 +123,34 @@ protected function _addSpecialAttributes(array &$attributes) /** * Add condition to collection * - * @param \Magento\Catalog\Model\ResourceModel\Product\Collection $collection + * @param Collection $collection * @return $this */ public function addToCollection($collection) { $attribute = $this->getAttributeObject(); + $attributeCode = $attribute->getAttributeCode(); + if ($attributeCode !== 'price' || !$collection->getLimitationFilters()->isUsingPriceIndex()) { + if ($collection->isEnabledFlat()) { + if ($attribute->isEnabledInFlat()) { + $alias = array_keys($collection->getSelect()->getPart('from'))[0]; + $this->joinedAttributes[$attributeCode] = $alias . '.' . $attributeCode; + } else { + $alias = 'at_' . $attributeCode; + if (!in_array($alias, array_keys($collection->getSelect()->getPart('from')))) { + $collection->joinAttribute($attributeCode, "catalog_product/$attributeCode", 'entity_id'); + } - if ($collection->isEnabledFlat()) { - if ($attribute->isEnabledInFlat()) { - $alias = array_keys($collection->getSelect()->getPart('from'))[0]; - $this->joinedAttributes[$attribute->getAttributeCode()] = $alias . '.' . $attribute->getAttributeCode(); - } else { - $alias = 'at_' . $attribute->getAttributeCode(); - if (!in_array($alias, array_keys($collection->getSelect()->getPart('from')))) { - $collection->joinAttribute( - $attribute->getAttributeCode(), - 'catalog_product/'.$attribute->getAttributeCode(), - 'entity_id' - ); + $this->joinedAttributes[$attributeCode] = $alias . '.value'; } - - $this->joinedAttributes[$attribute->getAttributeCode()] = $alias . '.value'; + } elseif ($attributeCode !== 'category_ids' && !$attribute->isStatic()) { + $this->addAttributeToCollection($attribute, $collection); + $attributes = $this->getRule()->getCollectedAttributes(); + $attributes[$attributeCode] = true; + $this->getRule()->setCollectedAttributes($attributes); } - return $this; } - if ('category_ids' == $attribute->getAttributeCode() || $attribute->isStatic()) { - return $this; - } - - if ($attribute->getBackend() && $attribute->isScopeGlobal()) { - $this->addGlobalAttribute($attribute, $collection); - } else { - $this->addNotGlobalAttribute($attribute, $collection); - } - - $attributes = $this->getRule()->getCollectedAttributes(); - $attributes[$attribute->getAttributeCode()] = true; - $this->getRule()->setCollectedAttributes($attributes); - return $this; } @@ -169,12 +158,12 @@ public function addToCollection($collection) * Adds Attributes that belong to Global Scope * * @param \Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute - * @param \Magento\Catalog\Model\ResourceModel\Product\Collection $collection + * @param Collection $collection * @return $this */ protected function addGlobalAttribute( \Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute, - \Magento\Catalog\Model\ResourceModel\Product\Collection $collection + Collection $collection ) { switch ($attribute->getBackendType()) { case 'decimal': @@ -207,12 +196,12 @@ protected function addGlobalAttribute( * Adds Attributes that don't belong to Global Scope * * @param \Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute - * @param \Magento\Catalog\Model\ResourceModel\Product\Collection $collection + * @param Collection $collection * @return $this */ protected function addNotGlobalAttribute( \Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute, - \Magento\Catalog\Model\ResourceModel\Product\Collection $collection + Collection $collection ) { $storeId = $this->storeManager->getStore()->getId(); $values = $collection->getAllAttributeValues($attribute); @@ -255,6 +244,8 @@ public function getMappedSqlField() $result = parent::getMappedSqlField(); } elseif (isset($this->joinedAttributes[$this->getAttribute()])) { $result = $this->joinedAttributes[$this->getAttribute()]; + } elseif ($this->getAttribute() === 'price') { + $result = 'price_index.min_price'; } elseif ($this->getAttributeObject()->isStatic()) { $result = $this->getAttributeObject()->getAttributeCode(); } elseif ($this->getValueParsed()) { @@ -267,11 +258,27 @@ public function getMappedSqlField() /** * @inheritdoc * - * @param \Magento\Catalog\Model\ResourceModel\Product\Collection $productCollection + * @param Collection $productCollection * @return $this */ public function collectValidatedAttributes($productCollection) { return $this->addToCollection($productCollection); } + + /** + * Add attribute to collection based on scope + * + * @param \Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute + * @param Collection $collection + * @return void + */ + private function addAttributeToCollection($attribute, $collection): void + { + if ($attribute->getBackend() && $attribute->isScopeGlobal()) { + $this->addGlobalAttribute($attribute, $collection); + } else { + $this->addNotGlobalAttribute($attribute, $collection); + } + } } diff --git a/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php b/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php index f11083dd2ba91..8bcd0001b8119 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product/ProductListTest.php @@ -256,4 +256,80 @@ public function testCreateAnchorCollection() "Anchor root category does not contain products of it's children." ); } + + /** + * Test that price rule condition works correctly + * + * @magentoDbIsolation disabled + * @magentoDataFixture Magento/Catalog/_files/category_with_different_price_products.php + * @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php + * @param string $operator + * @param int $value + * @param array $matches + * @dataProvider priceFilterDataProvider + */ + public function testPriceFilter(string $operator, int $value, array $matches) + { + $encodedConditions = '^[`1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Combine`, + `aggregator`:`all`,`value`:`1`,`new_child`:``^], + `1--1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Product`, + `attribute`:`price`, + `operator`:`' . $operator . '`,`value`:`' . $value . '`^]^]'; + + $this->block->setData('conditions_encoded', $encodedConditions); + + $productCollection = $this->block->createCollection(); + $productCollection->load(); + $skus = array_map( + function ($item) { + return $item['sku']; + }, + $productCollection->getItems() + ); + $this->assertEquals($matches, $skus, '', 0.0, 10, true); + } + + public function priceFilterDataProvider(): array + { + return [ + [ + '>', + 10, + [ + 'simple1001', + ] + ], + [ + '>=', + 10, + [ + 'simple1000', + 'simple1001', + 'configurable', + ] + ], + [ + '<', + 10, + [] + ], + [ + '<', + 20, + [ + 'simple1000', + 'configurable', + ] + ], + [ + '<=', + 20, + [ + 'simple1000', + 'simple1001', + 'configurable', + ] + ], + ]; + } } From 150c268cf761ef454ea76dff6599faba27a6ec72 Mon Sep 17 00:00:00 2001 From: "rostyslav.hymon" <rostyslav.hymon@transoftgroup.com> Date: Tue, 25 Feb 2020 13:14:59 +0200 Subject: [PATCH 187/229] MC-31728: Magento Admin order creation Downloading Blank.html File --- .../Test/Legacy/_files/copyright/blacklist.php | 1 + lib/internal/Magento/Framework/File/Mime.php | 18 +++++++++++++++++- .../Framework/File/Test/Unit/MimeTest.php | 9 ++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/copyright/blacklist.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/copyright/blacklist.php index 242e4ebb22a54..48eb64ffea27e 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/copyright/blacklist.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/copyright/blacklist.php @@ -10,4 +10,5 @@ '/setup\/src\/Zend\/Mvc\/Controller\/LazyControllerAbstractFactory\.php/', '/app\/code\/(?!Magento)[^\/]*/', '#dev/tests/setup-integration/testsuite/Magento/Developer/_files/\S*\.xml$#', + '/lib\/internal\/Magento\/Framework\/File\/Test\/Unit\/_files\/blank.html$/' ]; diff --git a/lib/internal/Magento/Framework/File/Mime.php b/lib/internal/Magento/Framework/File/Mime.php index ed370b1beae54..148f43d47cfd4 100644 --- a/lib/internal/Magento/Framework/File/Mime.php +++ b/lib/internal/Magento/Framework/File/Mime.php @@ -78,6 +78,18 @@ class Mime 'svg' => 'image/svg+xml', ]; + /** + * List of generic MIME types + * + * The file mime type should be detected by the file's extension if the native mime type is one of the listed below. + * + * @var array + */ + private $genericMimeTypes = [ + 'application/x-empty', + 'inode/x-empty', + ]; + /** * Get mime type of a file * @@ -120,7 +132,11 @@ private function getNativeMimeType(string $file): string $extension = $this->getFileExtension($file); $result = mime_content_type($file); if (isset($this->mimeTypes[$extension], $this->defineByExtensionList[$extension]) - && (strpos($result, 'text/') === 0 || strpos($result, 'image/svg') === 0) + && ( + strpos($result, 'text/') === 0 + || strpos($result, 'image/svg') === 0 + || in_array($result, $this->genericMimeTypes, true) + ) ) { $result = $this->mimeTypes[$extension]; } diff --git a/lib/internal/Magento/Framework/File/Test/Unit/MimeTest.php b/lib/internal/Magento/Framework/File/Test/Unit/MimeTest.php index 1a964c141dd34..0ae1542a2c0e1 100644 --- a/lib/internal/Magento/Framework/File/Test/Unit/MimeTest.php +++ b/lib/internal/Magento/Framework/File/Test/Unit/MimeTest.php @@ -5,6 +5,9 @@ */ namespace Magento\Framework\File\Test\Unit; +/** + * Test mime type utility for correct + */ class MimeTest extends \PHPUnit\Framework\TestCase { /** @@ -12,6 +15,9 @@ class MimeTest extends \PHPUnit\Framework\TestCase */ private $object; + /** + * @inheritDoc + */ protected function setUp() { $this->object = new \Magento\Framework\File\Mime(); @@ -42,12 +48,13 @@ public function testGetMimeType($file, $expectedType) /** * @return array */ - public function getMimeTypeDataProvider() + public function getMimeTypeDataProvider(): array { return [ 'javascript' => [__DIR__ . '/_files/javascript.js', 'application/javascript'], 'weird extension' => [__DIR__ . '/_files/file.weird', 'application/octet-stream'], 'weird uppercase extension' => [__DIR__ . '/_files/UPPERCASE.WEIRD', 'application/octet-stream'], + 'generic mime type' => [__DIR__ . '/_files/blank.html', 'text/html'], ]; } } From bb150058b5cf74ccd9f9325a0e1aa18f96f2e46d Mon Sep 17 00:00:00 2001 From: Sathish <srsathish92@gmail.com> Date: Tue, 25 Feb 2020 17:03:49 +0530 Subject: [PATCH 188/229] Updated class namespace in api php doc --- .../Api/ProductLinkManagementInterface.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/app/code/Magento/Catalog/Api/ProductLinkManagementInterface.php b/app/code/Magento/Catalog/Api/ProductLinkManagementInterface.php index c3cec823ec9f7..84cb853ad5982 100644 --- a/app/code/Magento/Catalog/Api/ProductLinkManagementInterface.php +++ b/app/code/Magento/Catalog/Api/ProductLinkManagementInterface.php @@ -6,11 +6,6 @@ namespace Magento\Catalog\Api; -use Magento\Catalog\Api\Data\ProductLinkInterface; -use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Framework\Exception\CouldNotSaveException; -use Magento\Framework\Exception\InputException; - /** * @api * @since 100.0.2 @@ -22,8 +17,8 @@ interface ProductLinkManagementInterface * * @param string $sku * @param string $type - * @throws NoSuchEntityException - * @return ProductLinkInterface[] + * @throws \Magento\Framework\Exception\NoSuchEntityException + * @return \Magento\Catalog\Api\Data\ProductLinkInterface[] */ public function getLinkedItemsByType($sku, $type); @@ -31,10 +26,10 @@ public function getLinkedItemsByType($sku, $type); * Assign a product link to another product * * @param string $sku - * @param ProductLinkInterface[] $items - * @throws NoSuchEntityException - * @throws CouldNotSaveException - * @throws InputException + * @param \Magento\Catalog\Api\Data\ProductLinkInterface[] $items + * @throws \Magento\Framework\Exception\NoSuchEntityException + * @throws \Magento\Framework\Exception\CouldNotSaveException + * @throws \Magento\Framework\Exception\InputException * @return bool */ public function setProductLinks($sku, array $items); From d94ef847543f919b746a2d059d74f3a227a42fe5 Mon Sep 17 00:00:00 2001 From: "rostyslav.hymon" <rostyslav.hymon@transoftgroup.com> Date: Tue, 25 Feb 2020 14:30:14 +0200 Subject: [PATCH 189/229] MC-31728: Magento Admin order creation Downloading Blank.html File --- lib/internal/Magento/Framework/File/Test/Unit/_files/blank.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 lib/internal/Magento/Framework/File/Test/Unit/_files/blank.html diff --git a/lib/internal/Magento/Framework/File/Test/Unit/_files/blank.html b/lib/internal/Magento/Framework/File/Test/Unit/_files/blank.html new file mode 100644 index 0000000000000..e69de29bb2d1d From fd7d1203f6b0f0925271fa2a9fa4a46a6bf92f69 Mon Sep 17 00:00:00 2001 From: OlgaVasyltsun <olga.vasyltsun@gmail.com> Date: Tue, 25 Feb 2020 14:34:55 +0200 Subject: [PATCH 190/229] =?UTF-8?q?MC-31862:=20[=D0=9CFTF=20=D0=A2=D0=95ST?= =?UTF-8?q?]=20[2.4.0]Category=20rules=20should=20apply=20to=20grouped=20p?= =?UTF-8?q?roduct=20with=20invisible=20individual=20products?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dApplyToGroupedProductWithInvisibleIndividualProductTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml index 13b2661dcb9d0..90c88e1b15c65 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml @@ -14,7 +14,7 @@ <title value="Category rules should apply to grouped product with invisible individual products"/> <description value="Category rules should apply to grouped product with invisible individual products"/> <severity value="CRITICAL"/> - <testCaseId value="MC-13608"/> + <testCaseId value="MC-31863"/> <group value="SalesRule"/> </annotations> <before> From c7eb80bd3f55de7d5b4e53348b18c8e8321496f5 Mon Sep 17 00:00:00 2001 From: Myroslav Dobra <dmaraptor@gmail.com> Date: Tue, 25 Feb 2020 14:55:08 +0200 Subject: [PATCH 191/229] MC-31854: [FT] [MFTF] [2.4.0] Fix flaky test AdminCreateCreditMemoConfigurableProductTest (MC-15865) --- ...reateCreditMemoConfigurableProductTest.xml | 37 +++++++------------ 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoConfigurableProductTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoConfigurableProductTest.xml index 766839a50a862..157f2fa6ef7d8 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoConfigurableProductTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoConfigurableProductTest.xml @@ -14,17 +14,12 @@ <title value="Create Credit Memo for Offline Payment Methods"/> <description value="Create CreditMemo return to stock only one unit of configurable product"/> <severity value="CRITICAL"/> - <testCaseId value="MC-15865"/> + <testCaseId value="MC-28444"/> <group value="sales"/> <group value="mtf_migrated"/> </annotations> <before> - <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> - - <!-- Create Data --> <createData entity="Simple_US_Customer" stepKey="createCustomer"/> - - <!-- Create the category --> <createData entity="ApiCategory" stepKey="createCategory"/> <!-- Create the configurable product and add it to the category --> @@ -88,6 +83,7 @@ <!-- Enable payment method one of "Check/Money Order" and shipping method one of "Flat Rate" --> <magentoCLI command="config:set {{enabledCheckMoneyOrder.label}} {{enabledCheckMoneyOrder.value}}" stepKey="enableCheckMoneyOrder"/> <createData entity="FlatRateShippingMethodConfig" stepKey="enableFlatRate"/> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> <!-- Delete data --> @@ -97,8 +93,10 @@ <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> <deleteData createDataKey="createCategory" stepKey="deleteApiCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductGridFilters"/> + <actionGroup ref="logout" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> </after> @@ -109,9 +107,9 @@ <!--Add configurable product to order--> <actionGroup ref="AddConfigurableProductToOrderFromAdminActionGroup" stepKey="addConfigurableProductToOrder"> - <argument name="product" value="$$createConfigProduct$$"/> - <argument name="attribute" value="$$createConfigProductAttribute$$"/> - <argument name="option" value="$$getConfigAttributeOption1$$"/> + <argument name="product" value="$createConfigProduct$"/> + <argument name="attribute" value="$createConfigProductAttribute$"/> + <argument name="option" value="$getConfigAttributeOption1$"/> </actionGroup> <actionGroup ref="FillOrderCustomerInformationActionGroup" stepKey="fillCustomerInfo"> @@ -121,19 +119,16 @@ <actionGroup ref="OrderSelectFlatRateShippingActionGroup" stepKey="selectFlatRate"/> <click selector="{{OrdersGridSection.submitOrder}}" stepKey="submitOrder"/> <waitForPageLoad stepKey="waitForSubmitOrderPage"/> - <see stepKey="seeSuccessMessageForOrder" userInput="You created the order."/> + <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessageForOrderAppears"/> + <see selector="{{AdminMessagesSection.success}}" userInput="You created the order." stepKey="seeSuccessMessageForOrder"/> <!-- Create Invoice --> <actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="startInvoice"/> - <click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice"/> - <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForMessageAppears"/> - <see selector="{{AdminMessagesSection.success}}" userInput="The invoice has been created." stepKey="seeInvoiceCreateSuccess"/> + <actionGroup ref="SubmitInvoiceActionGroup" stepKey="clickSubmitInvoice"/> <!-- Go to Sales > Orders > find out placed order and open --> - <grabTextFrom selector="|Order # (\d+)|" stepKey="grabOrderId" /> - <assertNotEmpty actual="$grabOrderId" stepKey="assertOrderIdIsNotEmpty" after="grabOrderId"/> - <actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrder"> - <argument name="orderId" value="{$grabOrderId}"/> + <actionGroup ref="AdminOpenOrderByEntityIdActionGroup" stepKey="openOrder"> + <argument name="entityId" value="{$grabOrderIdClickSubmitInvoice}"/> </actionGroup> <!-- Click 'Credit Memo' button and fill data from dataset: partial refund --> @@ -143,11 +138,7 @@ </actionGroup> <!-- On order's page click 'Refund offline' button --> - <click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickRefundOffline"/> - <waitForPageLoad stepKey="waitForResultPage"/> - - <!-- Perform all assertions: assert refund success create message --> - <see selector="{{AdminIndexManagementSection.successMessage}}" userInput="You created the credit memo." stepKey="assertRefundSuccessCreateMessage"/> + <actionGroup ref="SubmitCreditMemoActionGroup" stepKey="clickRefundOffline"/> <!-- Assert product Qty decreased after CreditMemo --> <actionGroup ref="AdminAssertProductQtyInGridActionGroup" stepKey="assertQtyDecreased"> From 8c89e2a0363ece37a50031e05481562a6657c43d Mon Sep 17 00:00:00 2001 From: Myroslav Dobra <dmaraptor@gmail.com> Date: Tue, 25 Feb 2020 15:52:00 +0200 Subject: [PATCH 192/229] MC-25026: MFTF TASK FOR MC-6080 (MC-25681) --- .../Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml index bf8844b2cc7ab..b96779ea63c56 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml @@ -11,20 +11,21 @@ <test name="EndToEndB2CLoggedInUserTest"> <annotations> <features value="End to End scenarios"/> - <stories value="B2C logged in user - MAGETWO-72524"/> + <stories value="B2C logged in user - MC-25681"/> <group value="e2e"/> <title value="You should be able to pass End to End B2C Logged In User scenario"/> <description value="New user signup and 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-87653"/> - <skip> - <issueId value="MC-17140"/> - </skip> + <testCaseId value="MC-25681"/> + <group value="SearchEngineMysql"/> </annotations> <before> <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> </before> <after> + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + <actionGroup ref="DeleteCustomerFromAdminActionGroup" stepKey="deleteCustomerFromAdmin"/> <actionGroup ref="logout" stepKey="adminLogout"/> </after> <!-- Step 0: User signs up an account --> From 7448fd3a7b973518563e0a64df31d8077c8f063f Mon Sep 17 00:00:00 2001 From: "m.mezhensky" <m.mezhensky@atwix.com> Date: Tue, 25 Feb 2020 18:15:18 +0200 Subject: [PATCH 193/229] Unit test for Magento\Weee\Observer\UpdateElementTypesObserver --- .../UpdateElementTypesObserverTest.php | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 app/code/Magento/Weee/Test/Unit/Observer/UpdateElementTypesObserverTest.php diff --git a/app/code/Magento/Weee/Test/Unit/Observer/UpdateElementTypesObserverTest.php b/app/code/Magento/Weee/Test/Unit/Observer/UpdateElementTypesObserverTest.php new file mode 100644 index 0000000000000..bcdbfe1d6f03f --- /dev/null +++ b/app/code/Magento/Weee/Test/Unit/Observer/UpdateElementTypesObserverTest.php @@ -0,0 +1,105 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\Weee\Test\Unit\Observer; + +use Magento\Framework\DataObject; +use Magento\Framework\Event\Observer; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Reports\Model\Event; +use Magento\Weee\Block\Element\Weee\Tax; +use Magento\Weee\Observer\UpdateElementTypesObserver; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +/** + * Unit test for Magento\Weee\Observer\UpdateElementTypesObserver + */ +class UpdateElementTypesObserverTest extends TestCase +{ + /* + * Stub response type + */ + const STUB_RESPONSE_TYPE = []; + + /** + * Testable Object + * + * @var UpdateElementTypesObserver + */ + private $observer; + + /** + * @var ObjectManager + */ + private $objectManager; + + /** + * @var Observer|MockObject + */ + private $observerMock; + + /** + * @var Event|MockObject + */ + private $eventMock; + + /** + * @var DataObject|MockObject + */ + private $responseMock; + + /** + * @inheritDoc + */ + protected function setUp(): void + { + $this->objectManager = new ObjectManager($this); + $this->observerMock = $this->createMock(Observer::class); + + $this->eventMock = $this->getMockBuilder(Event::class) + ->disableOriginalConstructor() + ->setMethods(['getResponse']) + ->getMock(); + + $this->responseMock = $this->getMockBuilder(DataObject::class) + ->disableOriginalConstructor() + ->setMethods(['getTypes', 'setTypes']) + ->getMock(); + + $this->observer = $this->objectManager->getObject(UpdateElementTypesObserver::class); + } + + /** + * Test for execute(), covers test case to adding custom element type for attributes form + */ + public function testRemoveProductUrlsFromStorage(): void + { + $this->observerMock + ->expects($this->once()) + ->method('getEvent') + ->willReturn($this->eventMock); + + $this->eventMock + ->expects($this->once()) + ->method('getResponse') + ->willReturn($this->responseMock); + + $this->responseMock + ->expects($this->once()) + ->method('getTypes') + ->willReturn(self::STUB_RESPONSE_TYPE); + + $this->responseMock + ->expects($this->once()) + ->method('setTypes') + ->with(['weee' => Tax::class]); + + $this->observer->execute($this->observerMock); + } +} From e48c617295e3510e24e5111153d5799210673a74 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Tue, 25 Feb 2020 23:04:07 +0100 Subject: [PATCH 194/229] Replace all the existing ActionGroups and it's references to the one that follows `{Area}{Action}ActionGroup` pattern. Old ones marked as `deprecated=""`. Use `extends=""` where applicable. --- ...ionGroup.xml => AdminLoginActionGroup.xml} | 2 +- ...nGroup.xml => _Deprecated_ActionGroup.xml} | 5 +- ...dminSystemNotificationNavigateMenuTest.xml | 2 +- .../Test/AdminAdvancedReportingButtonTest.xml | 4 +- ...AdminAdvancedReportingNavigateMenuTest.xml | 2 +- .../AdminConfigurationBlankIndustryTest.xml | 4 +- ...onfigurationEnableDisableAnalyticsTest.xml | 4 +- .../Test/AdminConfigurationIndustryTest.xml | 2 +- .../Test/AdminConfigurationPermissionTest.xml | 6 +- .../AdminConfigurationTimeToSendDataTest.xml | 4 +- ...ionGroup.xml => AdminLoginActionGroup.xml} | 10 +- .../Mftf/ActionGroup/LoginActionGroup.xml | 22 - .../LoginAdminWithCredentialsActionGroup.xml | 26 - .../Mftf/ActionGroup/LogoutActionGroup.xml | 18 - .../ActionGroup/_Deprecated_ActionGroup.xml | 38 +- ...minAttributeTextSwatchesCanBeFiledTest.xml | 2 +- .../AdminContentScheduleNavigateMenuTest.xml | 2 +- .../Test/AdminDashboardNavigateMenuTest.xml | 2 +- .../Test/AdminDashboardWithChartsChart.xml | 2 +- .../Test/AdminExpireCustomerSessionTest.xml | 2 +- .../AdminLoginAfterChangeCookieDomainTest.xml | 2 +- .../AdminLoginAfterJSMinificationTest.xml | 2 +- .../Backend/Test/Mftf/Test/AdminLoginTest.xml | 2 +- .../AdminLoginWithRestrictPermissionTest.xml | 4 +- .../AdminMenuNavigationWithSecretKeysTest.xml | 2 +- .../AdminStoresAllStoresNavigateMenuTest.xml | 2 +- ...minStoresConfigurationNavigateMenuTest.xml | 2 +- ...nSystemCacheManagementNavigateMenuTest.xml | 2 +- .../Test/AdminCreateAndDeleteBackupsTest.xml | 2 +- ...AnAdminOrderUsingBraintreePaymentTest1.xml | 2 +- ...thOnlinePaymentIncludingTaxAndDiscount.xml | 2 +- .../Mftf/Test/AdminAddBundleItemsTest.xml | 2 +- ...undleProductToCartFromWishListPageTest.xml | 2 +- ...inAssociateBundleProductToWebsitesTest.xml | 2 +- ...CreateAndEditBundleProductSettingsTest.xml | 4 +- .../AdminDeleteBundleDynamicProductTest.xml | 2 +- .../AdminDeleteBundleFixedProductTest.xml | 2 +- .../Test/AdminProductBundleCreationTest.xml | 2 +- ...sUpdateAttributesForBundleProductsTest.xml | 2 +- .../Test/BundleProductFixedPricingTest.xml | 2 +- .../EnableDisableBundleProductStatusTest.xml | 2 +- .../StorefrontAddBundleOptionsToCartTest.xml | 2 +- ...ProductWithZeroPriceToShoppingCartTest.xml | 2 +- .../StorefrontBundleProductDetailsTest.xml | 2 +- ...rontCheckBundleProductOptionTierPrices.xml | 2 +- ...oductPricesForCombinationOfOptionsTest.xml | 2 +- ...dminCardinalCommerceSettingsHiddenTest.xml | 2 +- .../AddOutOfStockProductToCompareListTest.xml | 2 +- .../Test/Mftf/Test/AddToCartCrossSellTest.xml | 2 +- .../Test/AdminAddImageForCategoryTest.xml | 2 +- .../AdminAddImageToWYSIWYGCatalogTest.xml | 4 +- .../AdminAddImageToWYSIWYGProductTest.xml | 4 +- .../AdminAddInStockProductToTheCartTest.xml | 2 +- .../Test/AdminApplyTierPriceToProductTest.xml | 4 +- ...signProductAttributeToAttributeSetTest.xml | 2 +- ...AdminCatalogCategoriesNavigateMenuTest.xml | 2 +- .../AdminCatalogProductsNavigateMenuTest.xml | 2 +- ...oductPriceWithDisabledChildProductTest.xml | 2 +- ...tomAttributeValuesAfterProductSaveTest.xml | 2 +- ...ubcategoryIsNotVisibleInNavigationTest.xml | 2 +- ...tegoryIsNotVisibleInNavigationMenuTest.xml | 2 +- ...ubcategoryIsNotVisibleInNavigationTest.xml | 2 +- ...StockProductIsNotVisibleInCategoryTest.xml | 2 +- ...tOfStockProductIsVisibleInCategoryTest.xml | 2 +- .../AdminCheckPaginationInStorefrontTest.xml | 2 +- ...tegoryIsNotVisibleInNavigationMenuTest.xml | 2 +- .../AdminCloneProductWithDuplicateUrlTest.xml | 2 +- ...CreateAndEditSimpleProductSettingsTest.xml | 2 +- ...reateAndEditVirtualProductSettingsTest.xml | 2 +- .../Mftf/Test/AdminCreateCategoryTest.xml | 6 +- ...AdminCreateCategoryWithAnchorFieldTest.xml | 2 +- ...eateCategoryWithCustomRootCategoryTest.xml | 2 +- ...AdminCreateCategoryWithFiveNestingTest.xml | 2 +- ...CreateCategoryWithInactiveCategoryTest.xml | 2 +- ...eCategoryWithInactiveIncludeInMenuTest.xml | 2 +- ...minCreateCategoryWithNoAnchorFieldTest.xml | 2 +- ...inCreateCategoryWithProductsGridFilter.xml | 2 +- ...inCreateCategoryWithRequiredFieldsTest.xml | 2 +- ...mProductAttributeWithDropdownFieldTest.xml | 2 +- ...dminCreateDatetimeProductAttributeTest.xml | 2 +- ...dminCreateDropdownProductAttributeTest.xml | 2 +- ...ibleInStorefrontAdvancedSearchFormTest.xml | 2 +- .../Test/AdminCreateDuplicateCategoryTest.xml | 2 +- .../Test/AdminCreateDuplicateProductTest.xml | 2 +- ...iveFlatCategoryAndUpdateAsInactiveTest.xml | 2 +- .../AdminCreateInactiveFlatCategoryTest.xml | 2 +- ...inCreateInactiveInMenuFlatCategoryTest.xml | 2 +- ...ibleInStorefrontAdvancedSearchFormTest.xml | 2 +- ...nCreateNewAttributeFromProductPageTest.xml | 2 +- ...AdminCreateNewAttributeFromProductTest.xml | 2 +- ...AdminCreateNewGroupForAttributeSetTest.xml | 2 +- ...ateProductAttributeFromProductPageTest.xml | 2 +- ...eProductAttributeRequiredTextFieldTest.xml | 2 +- .../AdminCreateProductDuplicateUrlkeyTest.xml | 4 +- ...CreateRootCategoryAndSubcategoriesTest.xml | 4 +- ...inCreateRootCategoryRequiredFieldsTest.xml | 2 +- .../Test/AdminCreateSimpleProductTest.xml | 2 +- ...untryOfManufactureAttributeSKUMaskTest.xml | 2 +- ...SimpleProductWithDatetimeAttributeTest.xml | 2 +- ...dminCreateSimpleProductWithUnicodeTest.xml | 2 +- ...inCreateTextEditorProductAttributeTest.xml | 2 +- ...alProductFillingRequiredFieldsOnlyTest.xml | 2 +- ...tualProductOutOfStockWithTierPriceTest.xml | 2 +- ...CustomOptionsSuiteAndImportOptionsTest.xml | 2 +- ...roductWithTierPriceForGeneralGroupTest.xml | 2 +- ...nCreateVirtualProductWithTierPriceTest.xml | 2 +- ...teVirtualProductWithoutManageStockTest.xml | 2 +- .../Mftf/Test/AdminDeleteAttributeSetTest.xml | 2 +- ...minDeleteConfigurableChildProductsTest.xml | 2 +- ...wnProductAttributeFromAttributeSetTest.xml | 2 +- .../Test/AdminDeleteProductAttributeTest.xml | 2 +- ...AdminDeleteProductWithCustomOptionTest.xml | 2 +- ...roductsImageInCaseOfMultipleStoresTest.xml | 2 +- ...nDeleteRootCategoryAssignedToStoreTest.xml | 4 +- .../Mftf/Test/AdminDeleteRootCategoryTest.xml | 4 +- .../Test/AdminDeleteRootSubCategoryTest.xml | 4 +- .../Test/AdminDeleteSimpleProductTest.xml | 2 +- .../AdminDeleteSystemProductAttributeTest.xml | 2 +- ...ldProductAttributeFromAttributeSetTest.xml | 2 +- .../Test/AdminDeleteVirtualProductTest.xml | 2 +- ...sableProductOnChangingAttributeSetTest.xml | 2 +- ...dminEditTextEditorProductAttributeTest.xml | 4 +- ...lterByNameByStoreViewOnProductGridTest.xml | 2 +- ...CategoryProductsUsingScopeSelectorTest.xml | 2 +- ...dPageNumberAfterSaveAndCloseActionTest.xml | 2 +- ...CustomizableOptionToProductWithSKUTest.xml | 2 +- .../Test/AdminMassProductPriceUpdateTest.xml | 2 +- ...UpdateProductAttributesGlobalScopeTest.xml | 2 +- ...sUpdateProductStatusStoreViewScopeTest.xml | 8 +- .../Test/AdminMoveAnchoredCategoryTest.xml | 2 +- ...eAnchoredCategoryToDefaultCategoryTest.xml | 2 +- ...minMoveCategoryAndCheckUrlRewritesTest.xml | 2 +- ...CategoryFromParentAnchoredCategoryTest.xml | 2 +- ...oryToAnotherPositionInCategoryTreeTest.xml | 2 +- .../AdminMoveProductBetweenCategoriesTest.xml | 4 +- ...inMultipleWebsitesUseDefaultValuesTest.xml | 6 +- ...dminNavigateMultipleUpSellProductsTest.xml | 2 +- ...egoryIndexerInUpdateOnScheduleModeTest.xml | 2 +- ...nAssignedToCategoryWithoutCustomURLKey.xml | 2 +- ...ductGridFilteringByCustomAttributeTest.xml | 2 +- ...roductGridFilteringByDateAttributeTest.xml | 2 +- ...ctImageAssignmentForMultipleStoresTest.xml | 2 +- ...ctStatusAttributeDisabledByDefaultTest.xml | 4 +- ...AdminProductTypeSwitchingOnEditingTest.xml | 2 +- ...dminRemoveCustomOptionsFromProductTest.xml | 2 +- .../AdminRemoveImageAffectsAllScopesTest.xml | 2 +- .../Test/AdminRemoveImageFromCategoryTest.xml | 2 +- ...edFieldsHaveRequiredFieldIndicatorTest.xml | 2 +- ...ctedUserAddCategoryFromProductPageTest.xml | 6 +- ...ToAssociateSimpleProductToWebsitesTest.xml | 2 +- .../Test/AdminSimpleProductImagesTest.xml | 4 +- .../AdminSimpleProductSetEditContentTest.xml | 2 +- .../Mftf/Test/AdminSortingByWebsitesTest.xml | 2 +- ...dminStoresAttributeSetNavigateMenuTest.xml | 2 +- .../AdminStoresProductNavigateMenuTest.xml | 2 +- ...eForProductOptionsWithoutTierPriceTest.xml | 2 +- ...gnProductAttributeFromAttributeSetTest.xml | 2 +- ...ryAndCheckDefaultUrlKeyOnStoreViewTest.xml | 2 +- ...AdminUpdateCategoryAndMakeInactiveTest.xml | 2 +- ...minUpdateCategoryNameWithStoreViewTest.xml | 2 +- .../AdminUpdateCategoryStoreUrlKeyTest.xml | 2 +- ...nUpdateCategoryUrlKeyWithStoreViewTest.xml | 2 +- ...eCategoryWithInactiveIncludeInMenuTest.xml | 2 +- .../AdminUpdateCategoryWithProductsTest.xml | 2 +- ...inUpdateFlatCategoryAndAddProductsTest.xml | 2 +- ...ateFlatCategoryIncludeInNavigationTest.xml | 2 +- ...dateFlatCategoryNameAndDescriptionTest.xml | 2 +- ...rifyDataOverridingOnStoreViewLevelTest.xml | 2 +- ...rifyDataOverridingOnStoreViewLevelTest.xml | 2 +- ...dminUpdateSimpleProductTieredPriceTest.xml | 2 +- ...RegularPriceInStockDisabledProductTest.xml | 2 +- ...WithRegularPriceInStockEnabledFlatTest.xml | 2 +- ...PriceInStockNotVisibleIndividuallyTest.xml | 2 +- ...arPriceInStockUnassignFromCategoryTest.xml | 2 +- ...ceInStockVisibleInCatalogAndSearchTest.xml | 2 +- ...arPriceInStockVisibleInCatalogOnlyTest.xml | 2 +- ...larPriceInStockVisibleInSearchOnlyTest.xml | 2 +- ...gularPriceInStockWithCustomOptionsTest.xml | 2 +- ...eProductWithRegularPriceOutOfStockTest.xml | 2 +- ...UpdateTopCategoryUrlWithNoRedirectTest.xml | 4 +- ...inUpdateTopCategoryUrlWithRedirectTest.xml | 4 +- ...rPriceInStockVisibleInCategoryOnlyTest.xml | 2 +- ...thCustomOptionsVisibleInSearchOnlyTest.xml | 2 +- ...tOfStockVisibleInCategoryAndSearchTest.xml | 2 +- ...iceOutOfStockVisibleInCategoryOnlyTest.xml | 2 +- ...PriceOutOfStockVisibleInSearchOnlyTest.xml | 2 +- ...eInStockVisibleInCategoryAndSearchTest.xml | 2 +- ...tOfStockVisibleInCategoryAndSearchTest.xml | 2 +- ...eInStockVisibleInCategoryAndSearchTest.xml | 2 +- ...rPriceInStockVisibleInCategoryOnlyTest.xml | 2 +- ...tOfStockVisibleInCategoryAndSearchTest.xml | 2 +- .../Mftf/Test/AdminVerifyProductOrderTest.xml | 2 +- .../AdvanceCatalogSearchSimpleProductTest.xml | 4 +- .../Test/CheckTierPricingOfProductsTest.xml | 2 +- .../Test/CreateProductAttributeEntityTest.xml | 12 +- .../Test/Mftf/Test/DeleteCategoriesTest.xml | 2 +- ...UsedInConfigurableProductAttributeTest.xml | 2 +- ...cheAfterChangingCategoryPageLayoutTest.xml | 2 +- .../Test/Mftf/Test/EndToEndB2CAdminTest.xml | 2 +- ...AttributeWithoutValueInCompareListTest.xml | 2 +- ...vailableAfterEnablingSubCategoriesTest.xml | 2 +- ...ductWithCustomOptionsSecondWebsiteTest.xml | 2 +- ...tProductsDisplayUsingElasticSearchTest.xml | 2 +- ...rontCatalogNavigationMenuUIDesktopTest.xml | 2 +- ...goryHighlightedAndProductDisplayedTest.xml | 2 +- ...heckDefaultNumberProductsToDisplayTest.xml | 2 +- .../Test/StorefrontFotoramaArrowsTest.xml | 2 +- ...torefrontProductWithEmptyAttributeTest.xml | 2 +- ...tProductsCompareWithEmptyAttributeTest.xml | 2 +- ...ctCustomOptionsDifferentStoreViewsTest.xml | 2 +- ...ntPurchaseProductWithCustomOptionsTest.xml | 2 +- ...ctWithCustomOptionsWithLongValuesTitle.xml | 2 +- ...ceForDifferentTimezonesForWebsitesTest.xml | 2 +- ...ctAndProductCategoryPartialReindexTest.xml | 2 +- ...ldCategoriesShouldNotIncludeInMenuTest.xml | 2 +- ...rifyDefaultWYSIWYGToolbarOnProductTest.xml | 8 +- ...yTinyMCEv4IsNativeWYSIWYGOnCatalogTest.xml | 4 +- ...yTinyMCEv4IsNativeWYSIWYGOnProductTest.xml | 4 +- .../Test/AdminExportBundleProductTest.xml | 2 +- ...portGroupedProductWithSpecialPriceTest.xml | 2 +- ...mportConfigurableProductWithImagesTest.xml | 2 +- ...figurableProductsWithCustomOptionsTest.xml | 2 +- ...igurableProductsWithAssignedImagesTest.xml | 2 +- ...ableProductAssignedToCustomWebsiteTest.xml | 2 +- ...rtSimpleProductWithCustomAttributeTest.xml | 2 +- ...eroMaximumQtyAllowedInShoppingCartTest.xml | 2 +- ...tedProductToConfigurableOutOfStockTest.xml | 2 +- ...nfigurableProductWithSpecialPricesTest.xml | 2 +- ...dminCreateInactiveCatalogPriceRuleTest.xml | 2 +- .../AdminDeleteCatalogPriceRuleEntityTest.xml | 4 +- .../Test/AdminDeleteCatalogPriceRuleTest.xml | 2 +- ...tributeIsUndefinedCatalogPriceRuleTest.xml | 2 +- ...ketingCatalogPriceRuleNavigateMenuTest.xml | 2 +- ...CatalogPriceRuleByProductAttributeTest.xml | 2 +- ...uleForSimpleAndConfigurableProductTest.xml | 2 +- ...RuleForSimpleProductAndFixedMethodTest.xml | 2 +- ...orSimpleProductForNewCustomerGroupTest.xml | 2 +- ...eForSimpleProductWithCustomOptionsTest.xml | 2 +- ...hipArePersistedUnderLongTermCookieTest.xml | 2 +- .../StorefrontInactiveCatalogRuleTest.xml | 2 +- ...ProductWithAssignedSimpleProducts2Test.xml | 2 +- ...eProductWithAssignedSimpleProductsTest.xml | 2 +- ...ForConfigurableProductWithOptions2Test.xml | 2 +- ...eForConfigurableProductWithOptionsTest.xml | 2 +- .../Test/AdminCreateSearchTermEntityTest.xml | 2 +- .../Mftf/Test/AdminDeleteSearchTermTest.xml | 2 +- ...inMarketingSearchTermsNavigateMenuTest.xml | 2 +- ...dminReportsSearchTermsNavigateMenuTest.xml | 2 +- .../LayerNavigationOfCatalogSearchTest.xml | 2 +- ...MinimalQueryLengthForCatalogSearchTest.xml | 2 +- .../Mftf/Test/SearchEntityResultsTest.xml | 8 +- ...tAdvancedSearchEntitySimpleProductTest.xml | 2 +- ...ontQuickSearchConfigurableChildrenTest.xml | 2 +- .../StorefrontUpdateSearchTermEntityTest.xml | 2 +- ...goryWithRestrictedUrlKeyNotCreatedTest.xml | 2 +- ...minUrlForProductRewrittenCorrectlyTest.xml | 2 +- ...iteStoreLevelUrlKeyOfChildCategoryTest.xml | 2 +- .../CatalogProductListWidgetOperatorsTest.xml | 2 +- .../CatalogProductListWidgetOrderTest.xml | 2 +- ...frontProductGridUIUpdatesOnDesktopTest.xml | 2 +- ...sNotAffectedStartedCheckoutProcessTest.xml | 2 +- .../Test/CheckCheckoutSuccessPageTest.xml | 4 +- .../Test/CheckoutSpecificDestinationsTest.xml | 2 +- ...guringInstantPurchaseFunctionalityTest.xml | 2 +- ...ckoutAsCustomerUsingDefaultAddressTest.xml | 2 +- ...eCheckoutAsCustomerUsingNewAddressTest.xml | 2 +- ...utAsCustomerUsingNonDefaultAddressTest.xml | 2 +- .../OnePageCheckoutUsingSignInLinkTest.xml | 2 +- ...ontCheckCustomerInfoCreatedByGuestTest.xml | 2 +- ...gRecalculationAfterCouponCodeAddedTest.xml | 2 +- ...dDownloadableProductToShoppingCartTest.xml | 2 +- ...efrontApplyPromoCodeDuringCheckoutTest.xml | 2 +- ...ingAddressAndProductWithTierPricesTest.xml | 2 +- ...ssAndRegisterCustomerAfterCheckoutTest.xml | 2 +- ...ntCheckoutWithSpecialPriceProductsTest.xml | 2 +- ...OnLoginWhenGuestCheckoutIsDisabledTest.xml | 2 +- .../Test/StorefrontCustomerCheckoutTest.xml | 4 +- ...egistrationAndDisableGuestCheckoutTest.xml | 2 +- ...frontCustomerCheckoutWithoutRegionTest.xml | 2 +- ...refrontCustomerLoginDuringCheckoutTest.xml | 2 +- ...eBundleProductFromMiniShoppingCartTest.xml | 2 +- ...gurableProductFromMiniShoppingCartTest.xml | 2 +- ...oadableProductFromMiniShoppingCartTest.xml | 2 +- ...aultLimitationFromMiniShoppingCartTest.xml | 2 +- ...VirtualProductFromMiniShoppingCartTest.xml | 2 +- ...eSimpleProductFromMiniShoppingCartTest.xml | 2 +- .../Mftf/Test/StorefrontGuestCheckoutTest.xml | 4 +- ...tCheckoutUsingFreeShippingAndTaxesTest.xml | 2 +- ...tCheckoutWithCouponAndZeroSubtotalTest.xml | 2 +- ...ippingMethodInReviewAndPaymentStepTest.xml | 2 +- ...tOnCheckoutPageDifferentStoreViewsTest.xml | 2 +- ...ngesInBackendAfterCustomerCheckoutTest.xml | 2 +- ...rontRefreshPageDuringGuestCheckoutTest.xml | 2 +- ...efrontUKCustomerCheckoutWithCouponTest.xml | 2 +- ...uctQuantityEqualsToOrderedQuantityTest.xml | 2 +- ...CouponAndBankTransferPaymentMethodTest.xml | 2 +- ...riceInShoppingCartAfterProductSaveTest.xml | 2 +- ...SubtotalOrdersWithProcessingStatusTest.xml | 2 +- .../AdminCreateActiveHtmlTermEntityTest.xml | 2 +- .../AdminCreateActiveTextTermEntityTest.xml | 2 +- .../AdminCreateDisabledTextTermEntityTest.xml | 2 +- ...abledTextTermOnMultishippingEntityTest.xml | 2 +- ...oresTermsAndConditionsNavigateMenuTest.xml | 2 +- .../AdminAddImageToCMSPageTinyMCE3Test.xml | 2 +- .../Test/AdminAddImageToWYSIWYGBlockTest.xml | 4 +- .../Test/AdminAddImageToWYSIWYGCMSTest.xml | 4 +- .../AdminAddVariableToWYSIWYGBlockTest.xml | 4 +- .../Test/AdminAddVariableToWYSIWYGCMSTest.xml | 4 +- .../Test/AdminAddWidgetToWYSIWYGBlockTest.xml | 4 +- ...WidgetToWYSIWYGWithCMSPageLinkTypeTest.xml | 4 +- ...getToWYSIWYGWithCMSStaticBlockTypeTest.xml | 4 +- ...WYSIWYGWithCatalogCategoryLinkTypeTest.xml | 4 +- ...oWYSIWYGWithCatalogProductLinkTypeTest.xml | 4 +- ...oWYSIWYGWithCatalogProductListTypeTest.xml | 4 +- ...YGWithRecentlyComparedProductsTypeTest.xml | 4 +- ...IWYGWithRecentlyViewedProductsTypeTest.xml | 4 +- .../AdminCMSPageCreateDisabledPageTest.xml | 2 +- ...inCMSPageCreatePageForDefaultStoreTest.xml | 2 +- ...CMSPageCreatePageInSingleStoreModeTest.xml | 2 +- .../Mftf/Test/AdminCMSPageCreatePageTest.xml | 2 +- .../AdminCMSPageCreatePageWithBlockTest.xml | 2 +- .../Mftf/Test/AdminCmsPageMassActionTest.xml | 2 +- ...PageLayoutFromConfigurationSettingTest.xml | 2 +- .../AdminContentBlocksNavigateMenuTest.xml | 2 +- .../AdminContentPagesNavigateMenuTest.xml | 2 +- .../Mftf/Test/AdminCreateCmsBlockTest.xml | 4 +- .../Test/Mftf/Test/AdminCreateCmsPageTest.xml | 4 +- .../Test/AdminCreateDuplicatedCmsPageTest.xml | 4 +- ...lleryPopupUploadImagesWithoutErrorTest.xml | 4 +- .../Test/AdminSaveAndCloseCmsBlockTest.xml | 2 +- ...CheckOrderOfProdsInWidgetOnCMSPageTest.xml | 2 +- .../StoreViewLanguageCorrectSwitchTest.xml | 2 +- ...ifyTinyMCEv4IsNativeWYSIWYGOnBlockTest.xml | 4 +- ...yTinyMCEv4IsNativeWYSIWYGOnCMSPageTest.xml | 4 +- ...untryDropDownWithOneAllowedCountryTest.xml | 2 +- .../Test/Mftf/Test/ConfigurationTest.xml | 2 +- ...agesAndPricesToConfigurableProductTest.xml | 2 +- ...hangedWhenSavingProductWithSameSkuTest.xml | 2 +- ...bleProductAttributeValueUniquenessTest.xml | 2 +- ...CheckResultsOfColorAndOtherFiltersTest.xml | 2 +- ...nCheckValidatorConfigurableProductTest.xml | 2 +- .../AdminConfigurableProductCreateTest.xml | 4 +- .../AdminConfigurableProductDeleteTest.xml | 4 +- .../AdminConfigurableProductLongSkuTest.xml | 2 +- ...AdminConfigurableProductOutOfStockTest.xml | 6 +- .../AdminConfigurableProductSearchTest.xml | 4 +- ...ConfigurableProductUpdateAttributeTest.xml | 4 +- .../AdminConfigurableProductUpdateTest.xml | 6 +- ...AndEditConfigurableProductSettingsTest.xml | 2 +- .../Test/AdminCreateAndSwitchProductType.xml | 2 +- ...onfigurableProductBasedOnParentSkuTest.xml | 2 +- ...ctWithCreatingCategoryAndAttributeTest.xml | 2 +- ...roductWithDisabledChildrenProductsTest.xml | 2 +- ...reateConfigurableProductWithImagesTest.xml | 2 +- ...eeProductDisplayOutOfStockProductsTest.xml | 2 +- ...oductDontDisplayOutOfStockProductsTest.xml | 2 +- ...ableProductWithTierPriceForOneItemTest.xml | 2 +- ...ctWithTwoOptionsAssignedToCategoryTest.xml | 2 +- ...woOptionsWithoutAssignedToCategoryTest.xml | 2 +- .../AdminDeleteConfigurableProductTest.xml | 2 +- ...AdminProductTypeSwitchingOnEditingTest.xml | 4 +- ...bleProductPriceAdditionalStoreViewTest.xml | 2 +- .../Test/NoErrorForMiniCartItemEditTest.xml | 2 +- ...vailableToConfigureDisabledProductTest.xml | 2 +- .../ProductsQtyReturnAfterOrderCancelTest.xml | 2 +- ...rontConfigurableProductChildSearchTest.xml | 2 +- ...orefrontConfigurableProductDetailsTest.xml | 10 +- .../StorefrontConfigurableProductViewTest.xml | 6 +- ...gurableProductWithFileCustomOptionTest.xml | 2 +- ...uctChildAssignedToSeparateCategoryTest.xml | 2 +- ...ConfigurableWithCatalogRuleAppliedTest.xml | 2 +- ...nfigurableProductLayeredNavigationTest.xml | 2 +- ...efrontVisibilityOfDuplicateProductTest.xml | 2 +- ...nCurrencyConverterAPIConfigurationTest.xml | 2 +- ...nDefaultCurrencySymbolsAreDisabledTest.xml | 2 +- ...ayWhenChooseThreeAllowedCurrenciesTest.xml | 2 +- .../AdminOrderRateDisplayedInOneLineTest.xml | 2 +- ...minStoresCurrencyRatesNavigateMenuTest.xml | 2 +- ...nStoresCurrencySymbolsNavigateMenuTest.xml | 2 +- ...aultBillingShippingCustomerAddressTest.xml | 2 +- ...hangeCustomerGenderInCustomersGridTest.xml | 2 +- ...inChangeSingleCustomerGroupViaGridTest.xml | 2 +- ...ultValueDisableAutoGroupChangeIsNoTest.xml | 2 +- ...ltValueDisableAutoGroupChangeIsYesTest.xml | 2 +- ...inCreateCustomerGroupAlreadyExistsTest.xml | 2 +- ...eateCustomerRetailerWithoutAddressTest.xml | 2 +- .../Mftf/Test/AdminCreateCustomerTest.xml | 2 +- ...minCreateCustomerWithCountryPolandTest.xml | 2 +- .../AdminCreateCustomerWithCountryUSATest.xml | 2 +- ...AdminCreateCustomerWithCustomGroupTest.xml | 2 +- .../AdminCreateCustomerWithPrefixTest.xml | 2 +- .../AdminCreateCustomerWithoutAddressTest.xml | 2 +- ...stomerOnStorefrontSignupNewsletterTest.xml | 4 +- ...AdminCreateNewCustomerOnStorefrontTest.xml | 4 +- .../Mftf/Test/AdminCreateNewCustomerTest.xml | 2 +- .../AdminCreateRetailCustomerGroupTest.xml | 2 +- .../AdminCreateTaxClassCustomerGroupTest.xml | 2 +- ...tomerSubscribeNewsletterPerWebsiteTest.xml | 4 +- ...nCustomersAllCustomersNavigateMenuTest.xml | 2 +- ...ustomersCustomerGroupsNavigateMenuTest.xml | 2 +- ...dminCustomersNowOnlineNavigateMenuTest.xml | 2 +- ...DeleteCustomerAddressesFromTheGridTest.xml | 2 +- ...AddressesFromTheGridViaMassActionsTest.xml | 2 +- .../Mftf/Test/AdminDeleteCustomerTest.xml | 2 +- ...eleteDefaultBillingCustomerAddressTest.xml | 2 +- ...aultBillingShippingCustomerAddressTest.xml | 2 +- ...dminExactMatchSearchInCustomerGridTest.xml | 2 +- ...fStorefrontIsOpenedViaCustomerViewTest.xml | 2 +- .../Test/AdminResetCustomerPasswordTest.xml | 2 +- ...dminSearchCustomerAddressByKeywordTest.xml | 4 +- ...inSetCustomerDefaultBillingAddressTest.xml | 2 +- ...nSetCustomerDefaultShippingAddressTest.xml | 2 +- .../Mftf/Test/AdminUpdateCustomerTest.xml | 6 +- ...VerifyCreateCustomerRequiredFieldsTest.xml | 2 +- ...erifyCustomerAddressRequiredFieldsTest.xml | 2 +- ...tomerAddressStateContainValuesOnceTest.xml | 2 +- ...CountriesRestrictionApplyOnBackendTest.xml | 4 +- .../Mftf/Test/ChangeCustomerGroupTest.xml | 2 +- .../Mftf/Test/DeleteCustomerGroupTest.xml | 2 +- .../Mftf/Test/EndToEndB2CLoggedInUserTest.xml | 2 +- .../Test/SearchByEmailInCustomerGridTest.xml | 2 +- .../Test/StorefrontAddCustomerAddressTest.xml | 6 +- ...StorefrontCheckTaxAddingValidVATIdTest.xml | 2 +- .../StorefrontClearAllCompareProductsTest.xml | 2 +- .../Test/StorefrontCreateCustomerTest.xml | 4 +- ...efrontUpdateCustomerAddressBelgiumTest.xml | 2 +- ...orefrontUpdateCustomerAddressChinaTest.xml | 2 +- ...refrontUpdateCustomerAddressFranceTest.xml | 4 +- .../StorefrontUpdateCustomerAddressUKTest.xml | 4 +- ...pdateCustomerInformationAddAddressTest.xml | 4 +- ...AdminScheduledImportSettingsHiddenTest.xml | 2 +- ...AndEditDownloadableProductSettingsTest.xml | 2 +- ...bleProductAndAssignItToCustomStoreTest.xml | 2 +- ...wnloadableProductWithCustomOptionsTest.xml | 2 +- ...loadableProductWithDefaultSetLinksTest.xml | 2 +- ...eDownloadableProductWithGroupPriceTest.xml | 2 +- ...nCreateDownloadableProductWithLinkTest.xml | 2 +- ...DownloadableProductWithManageStockTest.xml | 2 +- ...oadableProductWithOutOfStockStatusTest.xml | 2 +- ...ownloadableProductWithSpecialPriceTest.xml | 2 +- ...ductWithoutFillingQuantityAndStockTest.xml | 2 +- ...wnloadableProductWithoutTaxClassIdTest.xml | 2 +- .../AdminDeleteDownloadableProductTest.xml | 2 +- ...AdminProductTypeSwitchingOnEditingTest.xml | 2 +- ...leProductWithSeparateLinksFromCartTest.xml | 2 +- ...wnloadableLinksDownloadableProductTest.xml | 2 +- ...wnloadableLinksDownloadableProductTest.xml | 2 +- ...ableProductSamplesAreNotAccessibleTest.xml | 2 +- ...oductQuickSearchUsingElasticSearchTest.xml | 4 +- ...CheckAdvancedSearchOnElasticSearchTest.xml | 2 +- ...frontElasticSearchForChineseLocaleTest.xml | 2 +- ...ntElasticsearch6SearchInvalidValueTest.xml | 2 +- .../Test/AdminEmailTemplatePreviewTest.xml | 2 +- ...arketingEmailTemplatesNavigateMenuTest.xml | 2 +- .../TransactionalEmailsLogoUploadTest.xml | 2 +- .../AdminEncryptionKeyAutoGenerateKeyTest.xml | 2 +- ...dminEncryptionKeyManualGenerateKeyTest.xml | 2 +- .../Test/AdminCreatingShippingLabelTest.xml | 2 +- .../AdminValidateConversionIdConfigTest.xml | 2 +- ...nAssociateGroupedProductToWebsitesTest.xml | 2 +- ...reateAndEditGroupedProductSettingsTest.xml | 2 +- .../Test/AdminDeleteGroupedProductTest.xml | 2 +- .../Test/AdminGroupedProductsListTest.xml | 2 +- .../AdminSortingAssociatedProductsTest.xml | 2 +- ...utesChangedValueToEmptyAfterImportTest.xml | 2 +- .../Test/AdminExportPageNavigateMenuTest.xml | 2 +- .../Mftf/Test/AdminExportPagerGridTest.xml | 2 +- ...gesFileDirectoryCorrectExplanationTest.xml | 2 +- ...dminImportCSVWithSpecialCharactersTest.xml | 2 +- ...mportProductsWithAddUpdateBehaviorTest.xml | 2 +- ...inImportProductsWithDeleteBehaviorTest.xml | 2 +- ...dminImportProductsWithErrorEntriesTest.xml | 2 +- ...ImportCSVFileCorrectDifferentFilesTest.xml | 2 +- ...lityDifferentStoreViewsAfterImportTest.xml | 2 +- .../AdminSystemImportNavigateMenuTest.xml | 2 +- ...UpdatingProductThroughImportingCSVTest.xml | 2 +- ...nSystemIndexManagementNavigateMenuTest.xml | 2 +- ...ntegrationEntityWithDuplicatedNameTest.xml | 4 +- .../Test/AdminDeleteIntegrationEntityTest.xml | 2 +- ...dminSystemIntegrationsNavigateMenuTest.xml | 2 +- ...pecifyLayerNavigationConfigurationTest.xml | 4 +- .../Test/Mftf/Test/ShopByButtonInMobile.xml | 2 +- ...hMapAssignedConfigProductIsCorrectTest.xml | 2 +- ...toreFrontCheckingWithMultishipmentTest.xml | 2 +- ...oreFrontCheckingWithSingleShipmentTest.xml | 2 +- ...toreFrontMinicartWithMultishipmentTest.xml | 2 +- ...oreFrontMyAccountWithMultishipmentTest.xml | 2 +- ...frontCheckoutWithMultipleAddressesTest.xml | 2 +- .../StorefrontOrderWithMultishippingTest.xml | 2 +- ...utWhenCartPageIsOpenedInAnotherTabTest.xml | 2 +- ...heckNewRelicSystemConfigDependencyTest.xml | 2 +- .../AdminAddImageToWYSIWYGNewsletterTest.xml | 4 +- ...dminAddVariableToWYSIWYGNewsletterTest.xml | 4 +- .../AdminAddWidgetToWYSIWYGNewsletterTest.xml | 4 +- ...rketingNewsletterQueueNavigateMenuTest.xml | 2 +- ...gNewsletterSubscribersNavigateMenuTest.xml | 2 +- ...tingNewsletterTemplateNavigateMenuTest.xml | 2 +- .../Mftf/Test/AdminNameEmptyForGuestTest.xml | 4 +- ...wsletterProblemReportsNavigateMenuTest.xml | 2 +- ...erifySubscribedNewsletterDisplayedTest.xml | 4 +- ...nyMCEv4IsNativeWYSIWYGOnNewsletterTest.xml | 4 +- ...dAreaSessionMustNotAffectAdminAreaTest.xml | 4 +- ...efaultValueOfPayPalCustomizeButtonTest.xml | 4 +- ...figPaymentsConflictResolutionForPayPal.xml | 2 +- .../Test/AdminConfigPaymentsSectionState.xml | 2 +- ...ayPalSolutionsEnabledAtTheSameTimeTest.xml | 2 +- ...eportsPayPalSettlementNavigateMenuTest.xml | 2 +- ...SalesBillingAgreementsNavigateMenuTest.xml | 2 +- ...rontCheckCreditButtonConfigurationTest.xml | 4 +- ...ontPaypalSmartButtonInCheckoutPageTest.xml | 4 +- .../ShippingQuotePersistedForGuestTest.xml | 2 +- ...CartPersistenceUnderLongTermCookieTest.xml | 2 +- ...listIsPersistedUnderLongTermCookieTest.xml | 2 +- ...inValidateUrlOnGetVideoInformationTest.xml | 2 +- .../YoutubeVideoWindowOnProductPageTest.xml | 2 +- ...nReportsAbandonedCartsNavigateMenuTest.xml | 2 +- ...dminReportsBestsellersNavigateMenuTest.xml | 2 +- .../AdminReportsCouponsNavigateMenuTest.xml | 2 +- .../AdminReportsDownloadsNavigateMenuTest.xml | 2 +- .../AdminReportsInvoicedNavigateMenuTest.xml | 2 +- .../AdminReportsLowStockNavigateMenuTest.xml | 2 +- .../Test/AdminReportsNewNavigateMenuTest.xml | 2 +- ...AdminReportsOrderCountNavigateMenuTest.xml | 2 +- ...AdminReportsOrderTotalNavigateMenuTest.xml | 2 +- .../AdminReportsOrderedGroupedBySkuTest.xml | 2 +- .../AdminReportsOrderedNavigateMenuTest.xml | 2 +- .../AdminReportsOrdersNavigateMenuTest.xml | 2 +- ...nReportsProductsInCartNavigateMenuTest.xml | 2 +- ...portsRefreshStatisticsNavigateMenuTest.xml | 2 +- .../Test/AdminReportsTaxNavigateMenuTest.xml | 2 +- .../AdminReportsViewsNavigateMenuTest.xml | 2 +- .../CancelOrdersInOrderSalesReportTest.xml | 2 +- .../AdminMarketingReviewsNavigateMenuTest.xml | 2 +- ...dminReportsByCustomersNavigateMenuTest.xml | 2 +- ...AdminReportsByProductsNavigateMenuTest.xml | 2 +- .../AdminStoresRatingNavigateMenuTest.xml | 2 +- ...rifyNewRatingFormSingleStoreModeNoTest.xml | 2 +- ...ifyNewRatingFormSingleStoreModeYesTest.xml | 2 +- ...avascriptErrorOnAddYourReviewClickTest.xml | 2 +- ...ableProductToOrderFromShoppingCartTest.xml | 2 +- ...mpleProductToOrderFromShoppingCartTest.xml | 2 +- ...vailabilityCreditMemoWithNoPaymentTest.xml | 2 +- ...OrderWithBankTransferPaymentMethodTest.xml | 2 +- ...derWithCashOnDeliveryPaymentMethodTest.xml | 2 +- ...erWithCheckMoneyOrderPaymentMethodTest.xml | 2 +- ...WithProductQtyWithoutStockDecreaseTest.xml | 2 +- ...rderWithPurchaseOrderPaymentMethodTest.xml | 2 +- ...eatedOrderWithZeroSubtotalCheckoutTest.xml | 2 +- .../AdminChangeCustomerGroupInNewOrder.xml | 2 +- ...dminCheckingCreditMemoUpdateTotalsTest.xml | 2 +- ...kingDateAfterChangeInterfaceLocaleTest.xml | 2 +- ...ectnessInvoicedItemInBundleProductTest.xml | 2 +- ...reateCreditMemoBankTransferPaymentTest.xml | 2 +- ...reateCreditMemoConfigurableProductTest.xml | 2 +- ...AdminCreateCreditMemoPartialRefundTest.xml | 2 +- ...CreateCreditMemoWithCashOnDeliveryTest.xml | 2 +- ...nCreateCreditMemoWithPurchaseOrderTest.xml | 2 +- .../Test/Mftf/Test/AdminCreateInvoiceTest.xml | 2 +- ...AdminCreateOrderAddProductCheckboxTest.xml | 2 +- ...AdminCreateOrderAndCheckTheReorderTest.xml | 2 +- ...thTwoAddressesTaxableAndNonTaxableTest.xml | 2 +- ...inCreateOrderStatusDuplicatingCodeTest.xml | 2 +- ...nCreateOrderStatusDuplicatingLabelTest.xml | 2 +- .../Mftf/Test/AdminCreateOrderStatusTest.xml | 2 +- .../AdminCreateOrderWithBundleProductTest.xml | 2 +- ...minCreateOrderWithDateTimeOptionUITest.xml | 2 +- ...OrderWithSelectedShoppingCartItemsTest.xml | 2 +- ...rWithSimpleProductCustomOptionFileTest.xml | 2 +- .../AdminCreateOrderWithSimpleProductTest.xml | 2 +- ...nimumOrderAmountNotMatchOrderTotalTest.xml | 2 +- .../Mftf/Test/AdminHoldCreatedOrderTest.xml | 2 +- ...nMassOrdersCancelCompleteAndClosedTest.xml | 2 +- ...assOrdersCancelProcessingAndClosedTest.xml | 2 +- .../AdminMassOrdersHoldOnCompleteTest.xml | 2 +- ...ssOrdersHoldOnPendingAndProcessingTest.xml | 2 +- ...AdminMassOrdersReleasePendingOrderTest.xml | 2 +- ...MassOrdersUpdateCancelPendingOrderTest.xml | 2 +- .../AdminOrdersReleaseInUnholdStatusTest.xml | 2 +- ...rderCreationWithMultiWebsiteConfigTest.xml | 2 +- ...eorderWithCatalogPriceRuleDiscountTest.xml | 2 +- .../AdminSalesCreditMemosNavigateMenuTest.xml | 2 +- .../AdminSalesInvoicesNavigateMenuTest.xml | 2 +- .../Test/AdminSalesOrdersNavigateMenuTest.xml | 2 +- .../AdminSalesShipmentsNavigateMenuTest.xml | 2 +- ...AdminSalesTransactionsNavigateMenuTest.xml | 2 +- ...dminSaveInAddressBookCheckboxStateTest.xml | 4 +- ...AdminStoresOrderStatusNavigateMenuTest.xml | 2 +- ...dminSubmitConfigurableProductOrderTest.xml | 2 +- ...ubmitsOrderPaymentMethodValidationTest.xml | 2 +- ...minSubmitsOrderWithAndWithoutEmailTest.xml | 2 +- ...rderWithAndWithoutFieldsValidationTest.xml | 2 +- .../AdminUnassignCustomOrderStatusTest.xml | 2 +- ...mOrderStatusNotVisibleOnStorefrontTest.xml | 2 +- ...SSVulnerabilityDuringOrderCreationTest.xml | 2 +- .../CreateInvoiceAndCheckInvoiceOrderTest.xml | 2 +- ...iceWithCashOnDeliveryPaymentMethodTest.xml | 2 +- ...eWithShipmentAndCheckInvoicedOrderTest.xml | 2 +- ...ateInvoiceWithZeroSubtotalCheckoutTest.xml | 2 +- .../CreateOrderFromEditCustomerPageTest.xml | 2 +- ...editMemoTotalAfterShippingDiscountTest.xml | 6 +- ...rableProductsInComparedOnOrderPageTest.xml | 2 +- ...eredConfigurableProductOnOrderPageTest.xml | 2 +- ...astOrderedSimpleProductOnOrderPageTest.xml | 2 +- ...iewedBundleFixedProductOnOrderPageTest.xml | 2 +- ...ewedConfigurableProductOnOrderPageTest.xml | 2 +- ...impleProductsInComparedOnOrderPageTest.xml | 2 +- .../StorefrontOrderPagerDisplayedTest.xml | 2 +- .../Test/StorefrontOrderPagerIsAbsentTest.xml | 2 +- .../Test/StorefrontPrintOrderGuestTest.xml | 2 +- ...inCartRulesAppliedForProductInCartTest.xml | 2 +- .../Mftf/Test/AdminCreateBuyXGetYFreeTest.xml | 2 +- ...eConditionAndFreeShippingIsAppliedTest.xml | 2 +- ...AndVerifyRuleConditionIsNotAppliedTest.xml | 2 +- ...inCreateCartPriceRuleEmptyFromDateTest.xml | 2 +- ...inCreateCartPriceRuleForCouponCodeTest.xml | 2 +- ...ateCartPriceRuleForGeneratedCouponTest.xml | 2 +- ...talAndVerifyRuleConditionIsAppliedTest.xml | 2 +- ...oryAndVerifyRuleConditionIsAppliedTest.xml | 2 +- ...ghtAndVerifyRuleConditionIsAppliedTest.xml | 2 +- .../AdminCreateFixedAmountDiscountTest.xml | 2 +- ...CreateFixedAmountWholeCartDiscountTest.xml | 2 +- .../Mftf/Test/AdminCreateInvalidRuleTest.xml | 2 +- .../AdminCreatePercentOfProductPriceTest.xml | 2 +- ...exConditionsAndVerifyDeleteMessageTest.xml | 2 +- ...PercentPriceAndVerifyDeleteMessageTest.xml | 2 +- ...iveSalesRuleAndVerifyDeleteMessageTest.xml | 2 +- ...arketingCartPriceRulesNavigateMenuTest.xml | 2 +- ...artPriceRuleForConfigurableProductTest.xml | 2 +- .../StorefrontAutoGeneratedCouponCodeTest.xml | 2 +- ...frontCartRuleCouponForFreeShippingTest.xml | 2 +- ...ValueWithFullDiscountUsingCartRuleTest.xml | 2 +- ...yRulesShouldApplyToComplexProductsTest.xml | 2 +- ...ductWithInvisibleIndividualProductTest.xml | 2 +- .../AdminGlobalSearchOnProductPageTest.xml | 2 +- .../AdminMassDeleteSearchTermEntityTest.xml | 2 +- ...ngElasticSearchWithWeightAttributeTest.xml | 2 +- ...archSuggestionByProductDescriptionTest.xml | 2 +- ...erifySearchSuggestionByProductNameTest.xml | 2 +- ...uggestionByProductShortDescriptionTest.xml | 2 +- ...VerifySearchSuggestionByProductSkuTest.xml | 2 +- .../Test/AdminUserLockWhenEditingUserTest.xml | 2 +- ...utFieldsDisabledAfterAppConfigDumpTest.xml | 2 +- .../AdminCheckTheConfirmationPopupTest.xml | 2 +- ...ustomStoreShippingMethodTableRatesTest.xml | 2 +- .../AdminCreatePartialShipmentEntityTest.xml | 2 +- .../Test/AdminCreateShipmentEntityTest.xml | 2 +- ...dminValidateShippingTrackingNumberTest.xml | 2 +- ...splayTableRatesShippingMethodForAETest.xml | 2 +- ...esShippingMethodForDifferentStatesTest.xml | 2 +- ...gnifydConfigDependentOnActiveFieldTest.xml | 2 +- .../AdminMarketingSiteMapCreateNewTest.xml | 2 +- .../AdminMarketingSiteMapNavigateMenuTest.xml | 2 +- ...atusDisabledVerifyErrorSaveMessageTest.xml | 4 +- ...EnabledVerifyAbsenceOfDeleteButtonTest.xml | 2 +- ...tusEnabledVerifyBackendAndFrontendTest.xml | 2 +- ...NewLocalizedStoreViewStatusEnabledTest.xml | 2 +- ...ithCustomWebsiteAndDefaultCategoryTest.xml | 2 +- ...upWithCustomWebsiteAndRootCategoryTest.xml | 2 +- ...thDefaultWebsiteAndDefaultCategoryTest.xml | 2 +- ...usDisabledVerifyBackendAndFrontendTest.xml | 2 +- ...tusEnabledVerifyBackendAndFrontendTest.xml | 2 +- .../Mftf/Test/AdminCreateStoreViewTest.xml | 4 +- .../Test/Mftf/Test/AdminCreateWebsiteTest.xml | 2 +- .../Test/AdminDeleteDefaultStoreViewTest.xml | 2 +- .../Mftf/Test/AdminDeleteStoreGroupTest.xml | 2 +- .../Mftf/Test/AdminDeleteStoreViewTest.xml | 2 +- ...inMoveStoreToOtherGroupSameWebsiteTest.xml | 2 +- ...pAcceptAlertAndVerifyStoreViewFormTest.xml | 2 +- ...teStoreGroupAndVerifyStoreViewFormTest.xml | 2 +- .../Mftf/Test/AdminUpdateStoreViewTest.xml | 2 +- .../Test/Mftf/Test/AdminUpdateWebsiteTest.xml | 2 +- .../Mftf/Test/AdminCreateImageSwatchTest.xml | 2 +- .../Mftf/Test/AdminCreateTextSwatchTest.xml | 2 +- .../Mftf/Test/AdminCreateVisualSwatchTest.xml | 2 +- ...ateVisualSwatchWithNonValidOptionsTest.xml | 2 +- .../Test/AdminDisablingSwatchTooltipsTest.xml | 2 +- ...uctWithAttributesImagesAndSwatchesTest.xml | 2 +- .../AdminSetUpWatermarkForSwatchImageTest.xml | 2 +- ...figurableProductSwatchMinimumPriceTest.xml | 2 +- .../StorefrontFilterByImageSwatchTest.xml | 2 +- .../Test/StorefrontFilterByTextSwatchTest.xml | 2 +- .../StorefrontFilterByVisualSwatchTest.xml | 2 +- ...tImageColorWhenFilterByColorFilterTest.xml | 2 +- ...oductImagesMatchingProductSwatchesTest.xml | 2 +- ...SwatchAttributesDisplayInWidgetCMSTest.xml | 4 +- ...tSwatchProductWithFileCustomOptionTest.xml | 2 +- .../Test/AdminCheckCreditMemoTotalsTest.xml | 2 +- .../AdminStoresTaxRulesNavigateMenuTest.xml | 2 +- ...StoresTaxZonesAndRatesNavigateMenuTest.xml | 2 +- ...emImportExportTaxRatesNavigateMenuTest.xml | 2 +- .../AdminTaxCalcWithApplyTaxOnSettingTest.xml | 4 +- .../Test/Mftf/Test/AdminTaxReportGridTest.xml | 2 +- .../Mftf/Test/AdminContentThemeSortTest.xml | 2 +- .../AdminContentThemesNavigateMenuTest.xml | 2 +- ...esignConfigMediaGalleryImageUploadTest.xml | 2 +- .../Mftf/Test/AdminWatermarkUploadTest.xml | 2 +- .../Theme/Test/Mftf/Test/ThemeTest.xml | 2 +- .../Test/AdminSwitchWYSIWYGOptionsTest.xml | 4 +- .../AdminInlineTranslationOnCheckoutTest.xml | 2 +- ...dFilterDeleteAndVerifyErrorMessageTest.xml | 2 +- .../Mftf/Test/DefaultConfigForUPSTypeTest.xml | 2 +- ...ateURLRewriteWhenCategoryIsDeletedTest.xml | 2 +- ...tipleStoreviewsDuringProductImportTest.xml | 4 +- ...lKeyForStoreViewAndMovingCategory2Test.xml | 2 +- ...rlKeyForStoreViewAndMovingCategoryTest.xml | 2 +- ...CategoryUrlRewriteAndAddNoRedirectTest.xml | 2 +- ...yUrlRewriteAndAddPermanentRedirectTest.xml | 2 +- ...yUrlRewriteAndAddTemporaryRedirectTest.xml | 2 +- ...eUrlRewriteAndAddPermanentRedirectTest.xml | 2 +- ...eUrlRewriteAndAddTemporaryRedirectTest.xml | 2 +- ...yUrlRewriteAndAddPermanentRedirectTest.xml | 2 +- ...tUrlRewriteAndAddTemporaryRedirectTest.xml | 2 +- ...eProductURLRewriteAndAddNoRedirectTest.xml | 2 +- ...ithCategoryAndAddTemporaryRedirectTest.xml | 2 +- ...tUrLRewriteAndAddPermanentRedirectTest.xml | 2 +- ...tUrLRewriteAndAddTemporaryRedirectTest.xml | 2 +- ...SeveralWebsitesAndCheckURLRewritesTest.xml | 2 +- ...nDeleteCMSPageNoRedirectUrlRewriteTest.xml | 2 +- ...CMSPagePermanentRedirectUrlRewriteTest.xml | 2 +- ...CMSPageTemporaryRedirectUrlRewriteTest.xml | 2 +- ...tegoryUrlRewriteHypenAsRequestPathTest.xml | 2 +- .../AdminDeleteCategoryUrlRewriteTest.xml | 2 +- ...eCategoryUrlRewriteWithRequestPathTest.xml | 2 +- ...teCmsPageUrlRewriteWithNoRedirectsTest.xml | 2 +- ...ageUrlRewriteWithPermanentRedirectTest.xml | 2 +- ...ageUrlRewriteWithTemporaryRedirectTest.xml | 2 +- .../Test/AdminDeleteCustomUrlRewriteTest.xml | 2 +- ...AdminDeleteProductURLRewriteEntityTest.xml | 2 +- .../Test/AdminDeleteProductUrlRewriteTest.xml | 2 +- ...tesForProductInCategoriesSwitchOffTest.xml | 2 +- ...inMarketingUrlRewritesNavigateMenuTest.xml | 2 +- ...CreateUrlRewriteForCustomStoreViewTest.xml | 2 +- ...oryUrlRewriteAndAddAspxRequestPathTest.xml | 2 +- ...CategoryUrlRewriteAndAddNoRedirectTest.xml | 2 +- ...yUrlRewriteAndAddPermanentRedirectTest.xml | 2 +- ...yUrlRewriteAndAddTemporaryRedirectTest.xml | 2 +- ...CmsPageRewriteEntityWithNoRedirectTest.xml | 2 +- ...eRewriteEntityWithPermanentReirectTest.xml | 2 +- ...RewriteEntityWithTemporaryRedirectTest.xml | 2 +- ...eCmsPageUrlRewriteAndAddNoRedirectTest.xml | 2 +- ...eUrlRewriteAndAddPermanentRedirectTest.xml | 2 +- ...eUrlRewriteAndAddTemporaryRedirectTest.xml | 2 +- ...inUpdateCustomURLRewritesPermanentTest.xml | 2 +- ...inUpdateCustomURLRewritesTemporaryTest.xml | 2 +- ...tUrlRewriteAndAddTemporaryRedirectTest.xml | 2 +- ...sibleForAdminUserWithLimitedAccessTest.xml | 8 +- .../Test/AdminCreateActiveUserEntityTest.xml | 4 +- .../AdminCreateInactiveUserEntityTest.xml | 2 +- .../Test/AdminLockAdminUserEntityTest.xml | 4 +- .../AdminSystemAllUsersNavigateMenuTest.xml | 2 +- ...AdminSystemLockedUsersNavigateMenuTest.xml | 2 +- ...temManageEncryptionKeyNavigateMenuTest.xml | 2 +- .../AdminSystemUserRolesNavigateMenuTest.xml | 2 +- .../Test/Mftf/Test/AdminUpdateUserTest.xml | 6 +- .../AdminCreateCustomVariableEntityTest.xml | 2 +- ...nSystemCustomVariablesNavigateMenuTest.xml | 2 +- ...FixedTaxValSavedForSpecificWebsiteTest.xml | 2 +- ...inRemoveProductWeeeAttributeOptionTest.xml | 2 +- ...oppingCartForCustomerPhysicalQuoteTest.xml | 2 +- ...hoppingCartForCustomerVirtualQuoteTest.xml | 2 +- ...nShoppingCartForGuestPhysicalQuoteTest.xml | 2 +- ...InShoppingCartForGuestVirtualQuoteTest.xml | 2 +- .../AdminContentWidgetsNavigateMenuTest.xml | 2 +- .../Mftf/Test/NewProductsListWidgetTest.xml | 2 +- .../Test/Mftf/Test/ProductsListWidgetTest.xml | 4 +- ...ddToCartWishListWithUnselectedAttrTest.xml | 2 +- ...tChildImageShouldBeShownOnWishListTest.xml | 2 +- ...AddMultipleStoreProductsToWishlistTest.xml | 2 +- ...teBundleDynamicProductFromWishlistTest.xml | 2 +- ...leteBundleFixedProductFromWishlistTest.xml | 2 +- ...eteConfigurableProductFromWishlistTest.xml | 2 +- .../StorefrontDeletePersistedWishlistTest.xml | 2 +- ...eProductFromShoppingCartToWishlistTest.xml | 2 +- ...eProductFromShoppingCartToWishlistTest.xml | 2 +- ...eProductFromShoppingCartToWishlistTest.xml | 2 +- ...lProductFromShoppingCartToWishlistTest.xml | 2 +- .../Test/WishListWithDisabledProductTest.xml | 2 +- composer.json | 16 +- composer.lock | 2181 ++++++++++++++++- 779 files changed, 3075 insertions(+), 1033 deletions(-) rename app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/{LoginAsAdminActionGroup.xml => AdminLoginActionGroup.xml} (92%) rename app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/{LoginAdminWithCredentialsActionGroup.xml => _Deprecated_ActionGroup.xml} (56%) rename app/code/Magento/Backend/Test/Mftf/ActionGroup/{LoginAsAdminActionGroup.xml => AdminLoginActionGroup.xml} (72%) delete mode 100644 app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginActionGroup.xml delete mode 100644 app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginAdminWithCredentialsActionGroup.xml delete mode 100644 app/code/Magento/Backend/Test/Mftf/ActionGroup/LogoutActionGroup.xml diff --git a/app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/LoginAsAdminActionGroup.xml b/app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/AdminLoginActionGroup.xml similarity index 92% rename from app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/LoginAsAdminActionGroup.xml rename to app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/AdminLoginActionGroup.xml index 5cf7be8a6fe11..89896d05bbe42 100644 --- a/app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/LoginAsAdminActionGroup.xml +++ b/app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/AdminLoginActionGroup.xml @@ -8,7 +8,7 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="LoginAsAdmin"> + <actionGroup name="AdminLoginActionGroup"> <conditionalClick selector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" dependentSelector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" visible="true" stepKey="clickDontAllowButtonIfVisible" before="closeAdminNotification"/> </actionGroup> </actionGroups> diff --git a/app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/LoginAdminWithCredentialsActionGroup.xml b/app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml similarity index 56% rename from app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/LoginAdminWithCredentialsActionGroup.xml rename to app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml index d9f5e5dbcb106..fc66f9fb0ef74 100644 --- a/app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/LoginAdminWithCredentialsActionGroup.xml +++ b/app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml @@ -8,7 +8,10 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="LoginAdminWithCredentialsActionGroup"> + <actionGroup name="LoginAdminWithCredentialsActionGroup" deprecated="Use AdminLoginActionGroup instead"> + <conditionalClick selector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" dependentSelector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" visible="true" stepKey="clickDontAllowButtonIfVisible" before="closeAdminNotification"/> + </actionGroup> + <actionGroup name="LoginAsAdmin" deprecated="Use AdminLoginActionGroup instead"> <conditionalClick selector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" dependentSelector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" visible="true" stepKey="clickDontAllowButtonIfVisible" before="closeAdminNotification"/> </actionGroup> </actionGroups> diff --git a/app/code/Magento/AdminNotification/Test/Mftf/Test/AdminSystemNotificationNavigateMenuTest.xml b/app/code/Magento/AdminNotification/Test/Mftf/Test/AdminSystemNotificationNavigateMenuTest.xml index 75dceb4028622..81ad2858d5901 100644 --- a/app/code/Magento/AdminNotification/Test/Mftf/Test/AdminSystemNotificationNavigateMenuTest.xml +++ b/app/code/Magento/AdminNotification/Test/Mftf/Test/AdminSystemNotificationNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSystemNotificationPage"> <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> diff --git a/app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingButtonTest.xml b/app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingButtonTest.xml index e660a2eb8d428..5da7ccd3c9823 100644 --- a/app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingButtonTest.xml +++ b/app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingButtonTest.xml @@ -25,7 +25,7 @@ <actionGroup ref = "LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Navigate through Advanced Reporting button on dashboard to Sign Up page--> @@ -35,4 +35,4 @@ <switchToNextTab stepKey="switchToNewTab"/> <seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingNavigateMenuTest.xml b/app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingNavigateMenuTest.xml index d400bcf5f22fc..c742248b32cc3 100644 --- a/app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingNavigateMenuTest.xml +++ b/app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateAdvancedReportingPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationBlankIndustryTest.xml b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationBlankIndustryTest.xml index 914cb59b64e4e..17d463030d91c 100644 --- a/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationBlankIndustryTest.xml +++ b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationBlankIndustryTest.xml @@ -18,9 +18,9 @@ <group value="analytics"/> </annotations> <after> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> - <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/> <selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/> <see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/> diff --git a/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationEnableDisableAnalyticsTest.xml b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationEnableDisableAnalyticsTest.xml index 1c1a3b27b06af..b03488c240604 100644 --- a/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationEnableDisableAnalyticsTest.xml +++ b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationEnableDisableAnalyticsTest.xml @@ -18,9 +18,9 @@ <group value="analytics"/> </annotations> <after> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> - <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/> <see selector="{{AdminConfigAdvancedReportingSection.advancedReportingServiceLabel}}" userInput="Advanced Reporting Service" stepKey="seeAdvancedReportingServiceLabelEnabled"/> <selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/> diff --git a/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationIndustryTest.xml b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationIndustryTest.xml index bb682c4468012..c19fddc6aa0ce 100644 --- a/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationIndustryTest.xml +++ b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationIndustryTest.xml @@ -19,7 +19,7 @@ <group value="analytics"/> </annotations> - <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/> <selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/> <see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/> diff --git a/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationPermissionTest.xml b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationPermissionTest.xml index 58e809ec45c4a..93ee464a17efa 100644 --- a/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationPermissionTest.xml +++ b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationPermissionTest.xml @@ -21,10 +21,10 @@ <before> <createData entity="adminNoReportRole" stepKey="noReportUserRole"/> <createData entity="adminNoReport" stepKey="noReportUser"/> - <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <amOnPage url="{{AdminUsersPage.url}}" stepKey="amOnAdminUsersPage"/> <fillField selector="{{AdminUserGridSection.usernameFilterTextField}}" userInput="$$noReportUser.username$$" stepKey="fillUsernameSearch"/> @@ -51,7 +51,7 @@ <scrollTo selector="{{AdminConfigAdvancedReportingSection.advancedReportingMenuItem}}" stepKey="scrollToMenuItem"/> <!--<see stepKey="seeAdvancedReportingConfigMenuItem" selector="{{AdminConfigAdvancedReportingSection.advancedReportingMenuItem}}" userInput="Advanced Reporting"/>--> <seeElementInDOM selector="{{AdminConfigAdvancedReportingSection.advancedReportingMenuItem}}" stepKey="seeAdvancedReportingConfigMenuItem"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin2"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin2"/> <amOnPage url="{{AdminLoginPage.url}}" stepKey="amOnAdminLoginPage"/> <fillField selector="{{AdminLoginFormSection.username}}" userInput="$$noReportUser.username$$" stepKey="fillUsernameNoReport"/> diff --git a/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationTimeToSendDataTest.xml b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationTimeToSendDataTest.xml index 8ebd8cb594bee..6231b17c17b02 100644 --- a/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationTimeToSendDataTest.xml +++ b/app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationTimeToSendDataTest.xml @@ -19,9 +19,9 @@ <group value="analytics"/> </annotations> <after> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> - <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/> <selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/> <selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="Apps and Games" stepKey="selectAdvancedReportingIndustry"/> diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginAsAdminActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminLoginActionGroup.xml similarity index 72% rename from app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginAsAdminActionGroup.xml rename to app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminLoginActionGroup.xml index 7e1dfe4cf381b..0320862b99e63 100644 --- a/app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginAsAdminActionGroup.xml +++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminLoginActionGroup.xml @@ -8,18 +8,20 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="LoginAsAdmin"> + <actionGroup name="AdminLoginActionGroup"> <annotations> <description>Login to Backend Admin using provided User Data. PLEASE NOTE: This Action Group does NOT validate that you are Logged In.</description> </annotations> <arguments> - <argument name="adminUser" type="entity" defaultValue="DefaultAdminUser"/> + <argument name="username" type="string" defaultValue="{{_ENV.MAGENTO_ADMIN_USERNAME}}"/> + <argument name="password" type="string" defaultValue="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> </arguments> <amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/> - <fillField selector="{{AdminLoginFormSection.username}}" userInput="{{adminUser.username}}" stepKey="fillUsername"/> - <fillField selector="{{AdminLoginFormSection.password}}" userInput="{{adminUser.password}}" stepKey="fillPassword"/> + <fillField selector="{{AdminLoginFormSection.username}}" userInput="{{username}}" stepKey="fillUsername"/> + <fillField selector="{{AdminLoginFormSection.password}}" userInput="{{password}}" stepKey="fillPassword"/> <click selector="{{AdminLoginFormSection.signIn}}" stepKey="clickLogin"/> + <closeAdminNotification stepKey="closeAdminNotification"/> </actionGroup> </actionGroups> diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginActionGroup.xml deleted file mode 100644 index 8f61a0a06dd5e..0000000000000 --- a/app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginActionGroup.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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="LoginActionGroup"> - <annotations> - <description>DEPRECATED. Please use LoginAsAdmin instead. - Login to Backend Admin using ENV Admin credentials. PLEASE NOTE: This Action Group does NOT validate that you are Logged In.</description> - </annotations> - - <amOnPage url="{{_ENV.MAGENTO_BACKEND_NAME}}" stepKey="navigateToAdmin"/> - <fillField userInput="{{_ENV.MAGENTO_ADMIN_USERNAME}}" selector="{{AdminLoginFormSection.username}}" stepKey="fillUsername"/> - <fillField userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}" selector="{{AdminLoginFormSection.password}}" stepKey="fillPassword"/> - <click selector="{{AdminLoginFormSection.signIn}}" stepKey="clickLogin"/> - </actionGroup> -</actionGroups> diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginAdminWithCredentialsActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginAdminWithCredentialsActionGroup.xml deleted file mode 100644 index 995a5e7130e0a..0000000000000 --- a/app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginAdminWithCredentialsActionGroup.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?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="LoginAdminWithCredentialsActionGroup"> - <annotations> - <description>Login to Backend Admin using provided Admin credentials. PLEASE NOTE: This Action Group does NOT validate that you are Logged In.</description> - </annotations> - <arguments> - <argument name="adminUser" type="string"/> - <argument name="adminPassword" type="string"/> - </arguments> - - <amOnPage url="{{_ENV.MAGENTO_BACKEND_NAME}}" stepKey="navigateToAdmin"/> - <fillField selector="{{AdminLoginFormSection.username}}" userInput="{{adminUser}}" stepKey="fillUsername"/> - <fillField selector="{{AdminLoginFormSection.password}}" userInput="{{adminPassword}}" stepKey="fillPassword"/> - <click selector="{{AdminLoginFormSection.signIn}}" stepKey="clickLogin"/> - <closeAdminNotification stepKey="closeAdminNotification"/> - </actionGroup> -</actionGroups> diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/LogoutActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/LogoutActionGroup.xml deleted file mode 100644 index 4c265d08dd041..0000000000000 --- a/app/code/Magento/Backend/Test/Mftf/ActionGroup/LogoutActionGroup.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?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="logout"> - <annotations> - <description>Logout of the Backend Admin. PLEASE NOTE: This Action Group does NOT validate that you are Logged Out.</description> - </annotations> - - <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/> - </actionGroup> -</actionGroups> diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml index b6daddd1a6216..d2f4496c8cd4e 100644 --- a/app/code/Magento/Backend/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml +++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml @@ -8,15 +8,49 @@ <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> - <actionGroup name="LoginAsAnyUser"> + <actionGroup name="LoginAsAnyUser" deprecated="Use LoginAdminWithCredentialsActionGroup instead"> <arguments> <argument name="uname" type="string" defaultValue="{{_ENV.MAGENTO_ADMIN_USERNAME}}"/> <argument name="passwd" type="string" defaultValue="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> </arguments> - <!-- This ActionGroup is deprecated. Use `LoginAdminWithCredentialsActionGroup` instead --> <amOnPage url="{{_ENV.MAGENTO_BACKEND_NAME}}" stepKey="navigateToAdmin"/> <fillField userInput="{{uname}}" selector="{{LoginFormSection.username}}" stepKey="fillUsername"/> <fillField userInput="{{passwd}}" selector="{{LoginFormSection.password}}" stepKey="fillPassword"/> <click selector="{{LoginFormSection.signIn}}" stepKey="clickLogin"/> </actionGroup> + + <actionGroup name="logout" deprecated="Use AdminLogoutActionGroup instead" extends="AdminLogoutActionGroup"/> + + <actionGroup name="LoginAsAdmin" deprecated="Use AdminLoginActionGroup instead"> + <annotations> + <description>Login to Backend Admin using provided User Data. PLEASE NOTE: This Action Group does NOT validate that you are Logged In.</description> + </annotations> + <arguments> + <argument name="adminUser" type="entity" defaultValue="DefaultAdminUser"/> + </arguments> + + <amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/> + <fillField selector="{{AdminLoginFormSection.username}}" userInput="{{adminUser.username}}" stepKey="fillUsername"/> + <fillField selector="{{AdminLoginFormSection.password}}" userInput="{{adminUser.password}}" stepKey="fillPassword"/> + <click selector="{{AdminLoginFormSection.signIn}}" stepKey="clickLogin"/> + <closeAdminNotification stepKey="closeAdminNotification"/> + </actionGroup> + + <actionGroup name="LoginActionGroup" deprecated="Use AdminLoginActionGroup instead" extends="AdminLoginActionGroup"/> + + <actionGroup name="LoginAdminWithCredentialsActionGroup" deprecated="Use AdminLoginActionGroup"> + <annotations> + <description>Login to Backend Admin using provided Admin credentials. PLEASE NOTE: This Action Group does NOT validate that you are Logged In.</description> + </annotations> + <arguments> + <argument name="adminUser" type="string"/> + <argument name="adminPassword" type="string"/> + </arguments> + + <amOnPage url="{{_ENV.MAGENTO_BACKEND_NAME}}" stepKey="navigateToAdmin"/> + <fillField selector="{{AdminLoginFormSection.username}}" userInput="{{adminUser}}" stepKey="fillUsername"/> + <fillField selector="{{AdminLoginFormSection.password}}" userInput="{{adminPassword}}" stepKey="fillPassword"/> + <click selector="{{AdminLoginFormSection.signIn}}" stepKey="clickLogin"/> + <closeAdminNotification stepKey="closeAdminNotification"/> + </actionGroup> </actionGroups> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminAttributeTextSwatchesCanBeFiledTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminAttributeTextSwatchesCanBeFiledTest.xml index 2c061e54f5509..32201e03f92ec 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminAttributeTextSwatchesCanBeFiledTest.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminAttributeTextSwatchesCanBeFiledTest.xml @@ -58,7 +58,7 @@ <argument name="customStore" value="storeViewData7"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create 10 store views --> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminContentScheduleNavigateMenuTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminContentScheduleNavigateMenuTest.xml index bead59653eee8..091e441559d78 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminContentScheduleNavigateMenuTest.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminContentScheduleNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToContentSchedulePage"> <argument name="menuUiId" value="{{AdminMenuContent.dataUiId}}"/> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardNavigateMenuTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardNavigateMenuTest.xml index 6434d74b28754..60118202dbef2 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardNavigateMenuTest.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <waitForPageLoad stepKey="waitForPageLoad"/> <click selector="{{AdminMenuSection.menuItem(AdminMenuDashboard.dataUiId)}}" stepKey="clickOnMenuItem"/> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardWithChartsChart.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardWithChartsChart.xml index 3ba965f746722..e82d54280d4e1 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardWithChartsChart.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardWithChartsChart.xml @@ -37,7 +37,7 @@ <magentoCLI command="config:set admin/dashboard/enable_charts 0" stepKey="setDisableChartsAsDefault"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Login as admin --> <comment userInput="Login as admin" stepKey="adminLogin"/> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminExpireCustomerSessionTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminExpireCustomerSessionTest.xml index 88646401e3a99..d932da6ec0fad 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminExpireCustomerSessionTest.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminExpireCustomerSessionTest.xml @@ -24,7 +24,7 @@ <magentoCLI command="config:set {{DefaultWebCookieLifetimeConfigData.path}} {{DefaultWebCookieLifetimeConfigData.value}}" stepKey="setDefaultCookieLifetime"/> <!-- Delete data --> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- 1. Login to Admin. --> <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterChangeCookieDomainTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterChangeCookieDomainTest.xml index 93d411c8827ed..f75f3b2e3f15e 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterChangeCookieDomainTest.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterChangeCookieDomainTest.xml @@ -29,6 +29,6 @@ </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> <actionGroup ref="AssertAdminDashboardPageIsVisibleActionGroup" stepKey="seeDashboardPage"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </test> </tests> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.xml index 5550e3b317b0d..0aa31bb21b6f7 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.xml @@ -26,7 +26,7 @@ </before> <after> <magentoCLI command="config:set {{MinifyJavaScriptFilesDisableConfigData.path}} {{MinifyJavaScriptFilesDisableConfigData.value}}" stepKey="disableJsMinification"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <see userInput="Dashboard" selector="{{AdminHeaderSection.pageTitle}}" stepKey="seeDashboardTitle"/> <waitForPageLoad stepKey="waitForPageLoadOnDashboard"/> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml index 960e77db7194f..566328e075600 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml @@ -22,6 +22,6 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> <seeInCurrentUrl url="{{AdminLoginPage.url}}" stepKey="seeAdminLoginUrl"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </test> </tests> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginWithRestrictPermissionTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginWithRestrictPermissionTest.xml index e664a4a5f3e2f..a9706d902ff34 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginWithRestrictPermissionTest.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginWithRestrictPermissionTest.xml @@ -39,7 +39,7 @@ </actionGroup> </before> <after> - <actionGroup ref="logout" stepKey="logoutAsSaleRoleUser"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsSaleRoleUser"/> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> <!--Delete created data--> <actionGroup ref="AdminUserOpenAdminRolesPageActionGroup" stepKey="navigateToUserRoleGrid"/> @@ -52,7 +52,7 @@ </actionGroup> </after> <!--Log out of admin and login with newly created user--> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> <actionGroup ref="LoginAsAdmin" stepKey="loginAsNewUser"> <argument name="adminUser" value="admin2"/> </actionGroup> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminMenuNavigationWithSecretKeysTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminMenuNavigationWithSecretKeysTest.xml index c9a3b8089cc1d..db81a7829160d 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminMenuNavigationWithSecretKeysTest.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminMenuNavigationWithSecretKeysTest.xml @@ -26,7 +26,7 @@ <after> <magentoCLI command="config:set admin/security/use_form_key 0" stepKey="disableUrlSecretKeys"/> <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches2"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <click selector="{{AdminMenuSection.stores}}" stepKey="clickStoresMenuOption1"/> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresAllStoresNavigateMenuTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresAllStoresNavigateMenuTest.xml index 7758b387e393b..0ff1e817ac0ea 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresAllStoresNavigateMenuTest.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresAllStoresNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToStoresAllStoresPage"> <argument name="menuUiId" value="{{AdminMenuStores.dataUiId}}"/> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresConfigurationNavigateMenuTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresConfigurationNavigateMenuTest.xml index a54269b186ba0..94bf5c6b8993a 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresConfigurationNavigateMenuTest.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminStoresConfigurationNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToStoresConfigurationPage"> <argument name="menuUiId" value="{{AdminMenuStores.dataUiId}}"/> diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminSystemCacheManagementNavigateMenuTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminSystemCacheManagementNavigateMenuTest.xml index 516631c1bd166..3aae643ccc36b 100644 --- a/app/code/Magento/Backend/Test/Mftf/Test/AdminSystemCacheManagementNavigateMenuTest.xml +++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminSystemCacheManagementNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSystemCacheManagementPage"> <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> diff --git a/app/code/Magento/Backup/Test/Mftf/Test/AdminCreateAndDeleteBackupsTest.xml b/app/code/Magento/Backup/Test/Mftf/Test/AdminCreateAndDeleteBackupsTest.xml index 778c6d5112b6a..383c1122ee07f 100644 --- a/app/code/Magento/Backup/Test/Mftf/Test/AdminCreateAndDeleteBackupsTest.xml +++ b/app/code/Magento/Backup/Test/Mftf/Test/AdminCreateAndDeleteBackupsTest.xml @@ -23,7 +23,7 @@ </annotations> <!--Login to admin area--> - <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <!--Go to backup index page--> <amOnPage url="{{BackupIndexPage.url}}" stepKey="goToBackupPage"/> diff --git a/app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml b/app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml index 16c8c93e94cbe..c45a8aece5ffc 100644 --- a/app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml +++ b/app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml @@ -53,7 +53,7 @@ </actionGroup> <!--SignOut--> - <actionGroup ref="logout" stepKey="signOutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="signOutFromAdmin"/> <!--Log in as new user--> <actionGroup ref="LoginNewUser" stepKey="signInNewUser"/> diff --git a/app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscount.xml b/app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscount.xml index 371b59418e4a9..d2b0479f2bba6 100644 --- a/app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscount.xml +++ b/app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscount.xml @@ -70,7 +70,7 @@ <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> <!--Log Out--> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create a cart price rule with 10% discount for whole cart --> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleItemsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleItemsTest.xml index bf428440a24eb..2b6b139520f97 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleItemsTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleItemsTest.xml @@ -36,7 +36,7 @@ <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> <deleteData createDataKey="simpleProduct3" stepKey="deleteSimpleProduct3"/> <!--Logging out--> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Go to bundle product creation page--> <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleProductToCartFromWishListPageTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleProductToCartFromWishListPageTest.xml index b2d3c376d9b5a..1498e52850fd5 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleProductToCartFromWishListPageTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleProductToCartFromWishListPageTest.xml @@ -60,7 +60,7 @@ <deleteData createDataKey="createProduct" stepKey="deleteProduct" /> <!-- Log out --> <comment userInput="Log out" stepKey="commentLogOut"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Login to the Storefront as created customer --> <comment userInput="Login to the Storefront as created customer" stepKey="commentLoginAsCustomer"/> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAssociateBundleProductToWebsitesTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAssociateBundleProductToWebsitesTest.xml index b58637cf2e81d..823ad303c5455 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAssociateBundleProductToWebsitesTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAssociateBundleProductToWebsitesTest.xml @@ -82,7 +82,7 @@ <actionGroup ref="NavigateToAndResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridFilter"/> <!-- Admin logout --> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Open product page and assign grouped project to second website --> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml index a80d5f040f825..b143bd63280ea 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml @@ -38,7 +38,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create new bundle product --> @@ -180,7 +180,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create new bundle product --> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleDynamicProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleDynamicProductTest.xml index 51821b136ba26..a3e9a8af40a34 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleDynamicProductTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleDynamicProductTest.xml @@ -29,7 +29,7 @@ </before> <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteBundleProductFilteredBySkuAndName"> <argument name="product" value="$$createDynamicBundleProduct$$"/> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleFixedProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleFixedProductTest.xml index dcd53fff6f6dd..0c26fb1775bff 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleFixedProductTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteBundleFixedProductTest.xml @@ -26,7 +26,7 @@ </before> <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteBundleProductFilteredBySkuAndName"> <argument name="product" value="$$createFixedBundleProduct$$"/> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminProductBundleCreationTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminProductBundleCreationTest.xml index 78bc85da6f69b..7d82c6e5b43ad 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminProductBundleCreationTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminProductBundleCreationTest.xml @@ -33,7 +33,7 @@ <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndexPage"/> <actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteAllProducts"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- go to bundle product creation page--> <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage" /> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml index 994a10ae02692..173319affe53b 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml @@ -43,7 +43,7 @@ <!-- Clear Filter --> <actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductFilter"/> <!--Log Out Admin--> - <actionGroup ref="logout" stepKey="logoutAsAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/> </after> <!-- Login as Admin --> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml index 2b36458caa182..80920c2e6d851 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml @@ -35,7 +35,7 @@ <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteBundleProduct"> <argument name="sku" value="{{BundleProduct.sku}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Go to bundle product creation page--> <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage" /> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml index f73818a86a025..f1124e5446b58 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml @@ -31,7 +31,7 @@ <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Go to bundle product creation page--> <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage" /> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleOptionsToCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleOptionsToCartTest.xml index 7ad97a8991349..38926ccfbb7d6 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleOptionsToCartTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleOptionsToCartTest.xml @@ -48,7 +48,7 @@ </actionGroup> <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Start creating a bundle product --> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleProductWithZeroPriceToShoppingCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleProductWithZeroPriceToShoppingCartTest.xml index 64b786ac4ed7c..7ff88c49f0bc7 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleProductWithZeroPriceToShoppingCartTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleProductWithZeroPriceToShoppingCartTest.xml @@ -48,7 +48,7 @@ <deleteData createDataKey="apiBundleProduct" stepKey="deleteBundleProduct"/> <deleteData createDataKey="createSubCategory" stepKey="deleteCategory"/> <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearFilters"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open category page--> <amOnPage url="{{StorefrontCategoryPage.url($$createSubCategory.custom_attributes[url_key]$$)}}" stepKey="amOnCategoryPage"/> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductDetailsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductDetailsTest.xml index cc0064e87c3c1..b174ee2ee3c70 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductDetailsTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductDetailsTest.xml @@ -34,7 +34,7 @@ <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndexPage"/> <actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteAllProducts"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- go to bundle product creation page--> <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage" /> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPrices.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPrices.xml index 6c6cc9185380b..4bb54436e8729 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPrices.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCheckBundleProductOptionTierPrices.xml @@ -42,7 +42,7 @@ <argument name="price" value="Discount"/> <argument name="amount" value="25"/> </actionGroup> - <actionGroup ref="logout" stepKey="logoutAsAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/> <magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/> </before> diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontVerifyDynamicBundleProductPricesForCombinationOfOptionsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontVerifyDynamicBundleProductPricesForCombinationOfOptionsTest.xml index c78796d2fd8b4..896c4f8f25fec 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontVerifyDynamicBundleProductPricesForCombinationOfOptionsTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontVerifyDynamicBundleProductPricesForCombinationOfOptionsTest.xml @@ -192,7 +192,7 @@ <waitForPageLoad stepKey="waitForTaxSaved"/> <see userInput="You saved the configuration." selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccess"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="createSubCategory" stepKey="deleteSubCategory1"/> <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> diff --git a/app/code/Magento/CardinalCommerce/Test/Mftf/Test/AdminCardinalCommerceSettingsHiddenTest.xml b/app/code/Magento/CardinalCommerce/Test/Mftf/Test/AdminCardinalCommerceSettingsHiddenTest.xml index c891a578cdcca..bf96069d09864 100644 --- a/app/code/Magento/CardinalCommerce/Test/Mftf/Test/AdminCardinalCommerceSettingsHiddenTest.xml +++ b/app/code/Magento/CardinalCommerce/Test/Mftf/Test/AdminCardinalCommerceSettingsHiddenTest.xml @@ -21,7 +21,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <magentoCLI command="config:set three_d_secure/cardinal/enabled_authorizenet 0" stepKey="disableCardinalCommerce"/> </after> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AddOutOfStockProductToCompareListTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AddOutOfStockProductToCompareListTest.xml index 9991bc882e5be..b34e73a7ede9f 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AddOutOfStockProductToCompareListTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AddOutOfStockProductToCompareListTest.xml @@ -33,7 +33,7 @@ <magentoCLI command="cache:flush" stepKey="flushCache"/> <deleteData createDataKey="product" stepKey="deleteProduct"/> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open product page--> <comment userInput="Open product page" stepKey="openProdPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AddToCartCrossSellTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AddToCartCrossSellTest.xml index 7c0161d443df6..9abad132d32db 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AddToCartCrossSellTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AddToCartCrossSellTest.xml @@ -33,7 +33,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="logInAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <deleteData createDataKey="simpleProduct1" stepKey="deleteSimp1"/> <deleteData createDataKey="simpleProduct2" stepKey="deleteSimp2"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageForCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageForCategoryTest.xml index ed9eb686d2c86..690f2440b2f3b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageForCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageForCategoryTest.xml @@ -25,7 +25,7 @@ <actionGroup ref="DeleteCategoryActionGroup" stepKey="DeleteCategory"> <argument name="categoryEntity" value="SimpleSubCategory"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to create a new category with image --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGCatalogTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGCatalogTest.xml index b3e6fcd3bfb55..1850faebd16c6 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGCatalogTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGCatalogTest.xml @@ -9,7 +9,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> <test name="AdminAddImageToWYSIWYGCatalogTest"> <before> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -55,7 +55,7 @@ <argument name="categoryEntity" value="SimpleSubCategory"/> </actionGroup> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGProductTest.xml index edf37542fd830..d86a696880bae 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGProductTest.xml @@ -18,13 +18,13 @@ <testCaseId value="MAGETWO-84375"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> <after> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'simple')}}" stepKey="navigateToNewProduct"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml index b98ca3a375a17..9ee5e9138d764 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml @@ -31,7 +31,7 @@ <!--Delete created entity --> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Product Index Page and filter the product--> <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest.xml index 4f1618e076642..bdb2293bed9bc 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest.xml @@ -33,7 +33,7 @@ <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex1"/> <waitForPageLoad time="30" stepKey="waitForProductIndexPageLoad"/> <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetGridToDefaultKeywordSearch"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> <!--Case: Group Price--> @@ -292,7 +292,7 @@ <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> <waitForPageLoad time="30" stepKey="waitForProductIndexPageLoad"/> <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetGridToDefaultKeywordSearch"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct"> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml index bcb8af7209d8f..01a1b26a1f034 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml @@ -32,7 +32,7 @@ </before> <after> <deleteData createDataKey="attribute" stepKey="deleteAttribute"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogCategoriesNavigateMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogCategoriesNavigateMenuTest.xml index a51df86d0327a..03331b0d75cc5 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogCategoriesNavigateMenuTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogCategoriesNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToCategoriesPage"> <argument name="menuUiId" value="{{AdminMenuCatalog.dataUiId}}"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogProductsNavigateMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogProductsNavigateMenuTest.xml index 1d9400bf81e4d..23c9513c7ab49 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogProductsNavigateMenuTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCatalogProductsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToCatalogProductsPage"> <argument name="menuUiId" value="{{AdminMenuCatalog.dataUiId}}"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckConfigurableProductPriceWithDisabledChildProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckConfigurableProductPriceWithDisabledChildProductTest.xml index 6a3ff738f1846..bc2efacfcbece 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckConfigurableProductPriceWithDisabledChildProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckConfigurableProductPriceWithDisabledChildProductTest.xml @@ -117,7 +117,7 @@ <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> <deleteData createDataKey="createConfigChildProduct3" stepKey="deleteConfigChildProduct3"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteAttribute"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckCustomAttributeValuesAfterProductSaveTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckCustomAttributeValuesAfterProductSaveTest.xml index 4aa9474aba6fe..c9a7bae1753b4 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckCustomAttributeValuesAfterProductSaveTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckCustomAttributeValuesAfterProductSaveTest.xml @@ -42,7 +42,7 @@ <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <deleteData createDataKey="createMultiSelectProductAttribute" stepKey="deleteMultiSelectProductAttribute"/> <!-- Logout from Admin page --> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveAndNotIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveAndNotIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml index fd22142fcb097..9b95ef726a617 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveAndNotIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveAndNotIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml @@ -27,7 +27,7 @@ <after> <!--Delete created data--> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Category Page--> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveCategoryAndSubcategoryIsNotVisibleInNavigationMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveCategoryAndSubcategoryIsNotVisibleInNavigationMenuTest.xml index b6c76d6577210..3f180939bc7ea 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveCategoryAndSubcategoryIsNotVisibleInNavigationMenuTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveCategoryAndSubcategoryIsNotVisibleInNavigationMenuTest.xml @@ -26,7 +26,7 @@ <after> <!--Delete created data--> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Category Page--> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml index c9cd9acd9708c..3edd82e060e2e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckInactiveIncludeInMenuCategoryAndSubcategoryIsNotVisibleInNavigationTest.xml @@ -27,7 +27,7 @@ <after> <!--Delete created data--> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Category Page--> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsNotVisibleInCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsNotVisibleInCategoryTest.xml index cd03d868838f3..9b7ef4077f906 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsNotVisibleInCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsNotVisibleInCategoryTest.xml @@ -31,7 +31,7 @@ <!-- Delete created entity --> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Product Index Page and filter the product--> <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml index bfea4fa7557f5..433289f59f21b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml @@ -33,7 +33,7 @@ <!-- Delete created entity --> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <magentoCLI stepKey="setDisplayOutOfStockProduct" command="config:set cataloginventory/options/show_out_of_stock 0" /> </after> <!--Open Product Index Page and filter the product--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckPaginationInStorefrontTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckPaginationInStorefrontTest.xml index 5bb9cc8a080df..c1f310575de2f 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckPaginationInStorefrontTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckPaginationInStorefrontTest.xml @@ -87,7 +87,7 @@ <deleteData createDataKey="simpleProduct28" stepKey="deleteSimpleProduct28"/> <deleteData createDataKey="simpleProduct29" stepKey="deleteSimpleProduct29"/> <deleteData createDataKey="simpleProduct30" stepKey="deleteSimpleProduct30"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Verify default number of products displayed in the grid view--> <comment userInput="Verify default number of products displayed in the grid view" stepKey="commentVerifyDefaultValues"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckSubCategoryIsNotVisibleInNavigationMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckSubCategoryIsNotVisibleInNavigationMenuTest.xml index f5872ac3efca0..4ea294e3a3f36 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckSubCategoryIsNotVisibleInNavigationMenuTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckSubCategoryIsNotVisibleInNavigationMenuTest.xml @@ -26,7 +26,7 @@ <after> <!--Delete created data--> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Category Page--> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCloneProductWithDuplicateUrlTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCloneProductWithDuplicateUrlTest.xml index cef5bc622c6cf..a213f2af900cf 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCloneProductWithDuplicateUrlTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCloneProductWithDuplicateUrlTest.xml @@ -32,7 +32,7 @@ <argument name="product" value="$$createSimpleProduct$$"/> </actionGroup> <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetFiltersIfExist"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <amOnPage url="{{AdminProductEditPage.url($$createSimpleProduct.id$$)}}" stepKey="goToProductEditPage"/> <waitForPageLoad stepKey="waitForSimpleProductPageLoad"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditSimpleProductSettingsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditSimpleProductSettingsTest.xml index 80c20a7e0b5d9..2fddc667b60fd 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditSimpleProductSettingsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditSimpleProductSettingsTest.xml @@ -34,7 +34,7 @@ <deleteData createDataKey="createThirdRelatedProduct" stepKey="deleteThirdRelatedProduct"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create new simple product --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditVirtualProductSettingsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditVirtualProductSettingsTest.xml index 70cbfe7259da0..43fce1cfdd329 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditVirtualProductSettingsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditVirtualProductSettingsTest.xml @@ -48,7 +48,7 @@ <deleteData createDataKey="createThirdRelatedProduct" stepKey="deleteThirdRelatedProduct"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <comment userInput="remove me" stepKey="disableWYSIWYG"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest.xml index 784b5d3fd1827..44a83f2dbadd4 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryTest.xml @@ -19,7 +19,7 @@ <group value="category"/> </annotations> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> @@ -52,7 +52,7 @@ </before> <after> <actionGroup ref="RestoreLayoutSetting" stepKey="sampleActionGroup"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{WebConfigurationPage.url}}" stepKey="navigateToWebConfigurationPage"/> <waitForPageLoad stepKey="waitForPageLoad"/> @@ -83,7 +83,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage"/> <waitForPageLoad time="30" stepKey="waitForPageLoad1"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml index 5e7a8defdc28f..8900e85ca3431 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml @@ -24,7 +24,7 @@ </before> <after> <actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="createDefaultCMSBlock" stepKey="deleteDefaultCMSBlock"/> <deleteData stepKey="deleteSimpleProduct" createDataKey="simpleProduct"/> </after> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithCustomRootCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithCustomRootCategoryTest.xml index a68a585bbf31d..ac237fbe49978 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithCustomRootCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithCustomRootCategoryTest.xml @@ -29,7 +29,7 @@ <actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCreatedNewRootCategory"> <argument name="categoryEntity" value="NewRootCategory"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/> <waitForPageLoad stepKey="waitForCategoryIndexPageToBeLoaded"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithFiveNestingTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithFiveNestingTest.xml index 530bafaef24c2..bc60f21b5d214 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithFiveNestingTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithFiveNestingTest.xml @@ -33,7 +33,7 @@ <see selector="You deleted the category." stepKey="seeDeleteSuccess"/> <click selector="{{AdminCategorySidebarTreeSection.expandAll}}" stepKey="expandToSeeAllCategories"/> <dontSee selector="{{AdminCategorySidebarTreeSection.categoryInTree(FirstLevelSubCat.name)}}" stepKey="dontSeeCategoryInTree"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create Category with Five Nesting --> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveCategoryTest.xml index fae1a1fa8c2e4..ca2b15658f02e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveCategoryTest.xml @@ -22,7 +22,7 @@ </before> <after> <actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create In active Category --> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveIncludeInMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveIncludeInMenuTest.xml index a695aa33079bd..f6b0a0a321c5d 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveIncludeInMenuTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithInactiveIncludeInMenuTest.xml @@ -22,7 +22,7 @@ </before> <after> <actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create Category with not included in menu Subcategory --> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithNoAnchorFieldTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithNoAnchorFieldTest.xml index 9957198285056..5342dec6b1ebb 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithNoAnchorFieldTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithNoAnchorFieldTest.xml @@ -24,7 +24,7 @@ </before> <after> <actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="createDefaultCMSBlock" stepKey="deleteDefaultCMSBlock"/> <deleteData stepKey="deleteSimpleProduct" createDataKey="simpleProduct"/> </after> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithProductsGridFilter.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithProductsGridFilter.xml index 6a49b47b75078..2a4718223ef0c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithProductsGridFilter.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithProductsGridFilter.xml @@ -29,7 +29,7 @@ <argument name="product" value="SimpleProduct"/> </actionGroup> <actionGroup ref="NavigateToAndResetProductGridToDefaultViewActionGroup" stepKey="NavigateToAndResetProductGridToDefaultView"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="amOnProductList"/> <waitForPageLoad stepKey="waitForProductList"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithRequiredFieldsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithRequiredFieldsTest.xml index dac2a121d107f..110f52aaeb40a 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithRequiredFieldsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithRequiredFieldsTest.xml @@ -22,7 +22,7 @@ </before> <after> <actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create subcategory with required fields --> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCustomProductAttributeWithDropdownFieldTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCustomProductAttributeWithDropdownFieldTest.xml index 2d1a58764e20a..2b33f4a6bb1c0 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCustomProductAttributeWithDropdownFieldTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCustomProductAttributeWithDropdownFieldTest.xml @@ -42,7 +42,7 @@ <argument name="ProductAttribute" value="newProductAttribute"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open Product Index Page--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDatetimeProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDatetimeProductAttributeTest.xml index 981af5b5abb4a..e32aad76c9b28 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDatetimeProductAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDatetimeProductAttributeTest.xml @@ -24,7 +24,7 @@ <argument name="ProductAttribute" value="DatetimeProductAttribute"/> </actionGroup> <actionGroup ref="AdminGridFilterResetActionGroup" stepKey="resetGridFilter"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Generate the datetime default value --> <generateDate date="now" format="n/j/y g:i A" stepKey="generateDefaultValue"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeTest.xml index 4118356b07e74..4b69123635852 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeTest.xml @@ -24,7 +24,7 @@ <actionGroup ref="DeleteProductAttributeActionGroup" stepKey="deleteAttribute"> <argument name="ProductAttribute" value="productDropDownAttribute"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{ProductAttributePage.url}}" stepKey="navigateToNewProductAttributePage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml index 00e0758f6e70b..b36cbc27f7086 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml @@ -36,7 +36,7 @@ <after> <deleteData createDataKey="attribute" stepKey="deleteProductAttribute"/> <deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateCategoryTest.xml index cbef9566b2b78..4c91c6bac0e1a 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateCategoryTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open Category Page and select Add category --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateProductTest.xml index 3eb617d19d54c..c6703a1109345 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateProductTest.xml @@ -29,7 +29,7 @@ <after> <deleteData createDataKey="subCategory" stepKey="deleteSubCategory"/> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to new simple product page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml index b0e6fe87be918..bff43cf65faf6 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml @@ -52,7 +52,7 @@ <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewFr"> <argument name="customStore" value="customStoreFR"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Select created category and make category inactive--> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml index 7de37b9cb77ef..9ef3659cb5ab1 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml @@ -52,7 +52,7 @@ <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewFr"> <argument name="customStore" value="customStoreFR"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Select created category and make category inactive--> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml index c7aba1fe8376f..4623f9ad4005b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml @@ -52,7 +52,7 @@ <argument name="customStore" value="customStoreFR"/> </actionGroup> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Select created category and disable Include In Menu option--> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateMultipleSelectProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateMultipleSelectProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml index 56a6a869d8d35..2c8ec9ad7d1b9 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateMultipleSelectProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateMultipleSelectProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml @@ -40,7 +40,7 @@ <!-- Delete product attribute set --> <deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductPageTest.xml index 51c4a3250d609..4ffb81d9a1d67 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductPageTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductPageTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="GoToProductCatalogPageActionGroup" stepKey="goToProductCatalogPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductTest.xml index 8fb226f5f5585..a39bc0bd39e2f 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewAttributeFromProductTest.xml @@ -42,7 +42,7 @@ <argument name="ProductAttribute" value="productDropDownAttribute"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create 2 store views--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewGroupForAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewGroupForAttributeSetTest.xml index 12d4f825c3764..f468f61fada04 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewGroupForAttributeSetTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateNewGroupForAttributeSetTest.xml @@ -28,7 +28,7 @@ <after> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> <deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml index 2e502f58041e6..18d1ec5b30f72 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml @@ -39,7 +39,7 @@ <argument name="ProductAttribute" value="newProductAttribute"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open Product Index Page--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeRequiredTextFieldTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeRequiredTextFieldTest.xml index 63eed37b1e84f..a6632fa1ddabb 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeRequiredTextFieldTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeRequiredTextFieldTest.xml @@ -37,7 +37,7 @@ <actionGroup ref="DeleteProductAttributeActionGroup" stepKey="deleteCreatedAttribute"> <argument name="ProductAttribute" value="newProductAttribute"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open Product Index Page--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest.xml index eacb69db38e9a..ecce1bb1517e1 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductDuplicateUrlkeyTest.xml @@ -23,7 +23,7 @@ </createData> </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> </after> @@ -62,7 +62,7 @@ <argument name="product" value="$$createSimpleProduct$$"/> </actionGroup> <deleteData createDataKey="createCategory" stepKey="deletePreReqCatalog" /> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct1"> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml index 7a99750c00e53..2352e231e66a4 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml @@ -36,7 +36,7 @@ <actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCreatedNewRootCategory"> <argument name="categoryEntity" value="NewRootCategory"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout2"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout2"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="amOnAdminCategoryPage"/> @@ -70,7 +70,7 @@ <selectOption userInput="{{NewRootCategory.name}}" selector="{{AdminNewStoreGroupSection.storeRootCategoryDropdown}}" stepKey="selectOptionCreatedNewRootCategory"/> <click selector="{{AdminStoreGroupActionsSection.saveButton}}" stepKey="clickSaveStoreButton"/> <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="clickOkOnModalDialog1"/> - <actionGroup ref="logout" stepKey="logout1"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout1"/> <!--Go to storefront and verify created subcategory on frontend--> <amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefrontPage"/> <waitForPageLoad stepKey="waitForPageAdminSystemStoreLoad2"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryRequiredFieldsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryRequiredFieldsTest.xml index 2b824554b9bd4..a5556b076fef6 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryRequiredFieldsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryRequiredFieldsTest.xml @@ -26,7 +26,7 @@ <actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCategory"> <argument name="categoryEntity" value="_defaultCategory" /> </actionGroup> - <actionGroup ref="logout" stepKey="logout" /> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout" /> </after> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="OpenAdminCatergoryIndexPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest.xml index 052f6b1924e89..e018f2de035ca 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest.xml @@ -54,7 +54,7 @@ </before> <after> <actionGroup ref="RestoreLayoutSetting" stepKey="sampleActionGroup"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{WebConfigurationPage.url}}" stepKey="navigateToWebConfigurationPage"/> <waitForPageLoad stepKey="waitForPageLoad"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithCountryOfManufactureAttributeSKUMaskTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithCountryOfManufactureAttributeSKUMaskTest.xml index bbaabffcc5ecd..967babc617ce9 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithCountryOfManufactureAttributeSKUMaskTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithCountryOfManufactureAttributeSKUMaskTest.xml @@ -28,7 +28,7 @@ <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteCreatedProduct"> <argument name="sku" value="{{nameAndAttributeSkuMaskSimpleProduct.name}}-{{nameAndAttributeSkuMaskSimpleProduct.country_of_manufacture_label}}" /> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{ProductCatalogPage.url}}" stepKey="openProductCatalogPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithDatetimeAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithDatetimeAttributeTest.xml index 0f88fa9d6abf4..fe5b70b8e4ca7 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithDatetimeAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithDatetimeAttributeTest.xml @@ -27,7 +27,7 @@ <argument name="sku" value="{{_defaultProduct.sku}}"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFiltersOnProductIndexPage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Generate default value --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml index 5dcc23a725b84..9660a46d43dba 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml @@ -22,7 +22,7 @@ <createData entity="_defaultCategory" stepKey="createPreReqCategory"/> </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> </after> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateTextEditorProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateTextEditorProductAttributeTest.xml index 848e765d34d70..bad620b3dab99 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateTextEditorProductAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateTextEditorProductAttributeTest.xml @@ -40,7 +40,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to Stores > Product, click "Add New Attribute" --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductFillingRequiredFieldsOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductFillingRequiredFieldsOnlyTest.xml index c3fe666c84fd4..6d39455e4a31b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductFillingRequiredFieldsOnlyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductFillingRequiredFieldsOnlyTest.xml @@ -22,7 +22,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{ProductCatalogPage.url}}" stepKey="OpenProductCatalogPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductOutOfStockWithTierPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductOutOfStockWithTierPriceTest.xml index 9db9f64396826..df46983b361c6 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductOutOfStockWithTierPriceTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductOutOfStockWithTierPriceTest.xml @@ -28,7 +28,7 @@ <argument name="sku" value="{{virtualProductOutOfStock.sku}}"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{ProductCatalogPage.url}}" stepKey="OpenProductCatalogPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml index fe39bb6ada2bd..899f3af02c78e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml @@ -28,7 +28,7 @@ <argument name="sku" value="{{virtualProductCustomImportOptions.sku}}"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetOrderFilter"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{ProductCatalogPage.url}}" stepKey="OpenProductCatalogPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml index b2ddaac65d070..84cba791c6629 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml @@ -33,7 +33,7 @@ <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessageAppears"/> <see selector="{{AdminMessagesSection.success}}" userInput="A total of 1 record(s) have been deleted." stepKey="seeSuccessMessage"/> <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearFiltersAfter"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!-- Create virtual product--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceTest.xml index 40f26761e7b6d..ea73de1cab15d 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceTest.xml @@ -24,7 +24,7 @@ </before> <after> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="categoryEntity"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{ProductCatalogPage.url}}" stepKey="OpenProductCatalogPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithoutManageStockTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithoutManageStockTest.xml index cb41b0292d33a..685db6db90a10 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithoutManageStockTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithoutManageStockTest.xml @@ -24,7 +24,7 @@ </before> <after> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="categoryEntity"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{ProductCatalogPage.url}}" stepKey="OpenProductCatalogPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteAttributeSetTest.xml index 973ff0381584a..bb4ff7acaa4a7 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteAttributeSetTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteAttributeSetTest.xml @@ -28,7 +28,7 @@ </before> <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{AdminProductAttributeSetGridPage.url}}" stepKey="goToAttributeSetsPage"/> <fillField selector="{{AdminProductAttributeSetGridSection.filter}}" userInput="$$createAttributeSet.attribute_set_name$$" stepKey="filterByAttributeName"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteConfigurableChildProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteConfigurableChildProductsTest.xml index 04a4eff0a26d4..3510b99a0c778 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteConfigurableChildProductsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteConfigurableChildProductsTest.xml @@ -81,7 +81,7 @@ <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteAttribute"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteDropdownProductAttributeFromAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteDropdownProductAttributeFromAttributeSetTest.xml index 58e60da3bdac5..373d14d4d0db4 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteDropdownProductAttributeFromAttributeSetTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteDropdownProductAttributeFromAttributeSetTest.xml @@ -28,7 +28,7 @@ <after> <!--Delete Created Data --> <deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductAttributeTest.xml index d72806cb0991d..de95604e76a2f 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductAttributeTest.xml @@ -22,7 +22,7 @@ <createData entity="productAttributeWysiwyg" stepKey="createProductAttribute"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductWithCustomOptionTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductWithCustomOptionTest.xml index dec911ec84a8d..834da3f4d4f9b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductWithCustomOptionTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductWithCustomOptionTest.xml @@ -28,7 +28,7 @@ </before> <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteSimpleProductFilteredBySkuAndName"> <argument name="product" value="$$createSimpleProduct$$"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml index 55c98bcc13d34..9ed0a8104faa1 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml @@ -67,7 +67,7 @@ <deleteData createDataKey="createRootCategory" stepKey="deleteRootCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <createData entity="DefaultWebUrlOptionsConfig" stepKey="defaultWebUrlOptionsConfig"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Grab new store view code--> <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="navigateToNewWebsitePage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryAssignedToStoreTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryAssignedToStoreTest.xml index e4b269dff96ba..77ebf77f05e58 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryAssignedToStoreTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryAssignedToStoreTest.xml @@ -26,7 +26,7 @@ <argument name="storeGroupName" value="customStore.code"/> </actionGroup> <deleteData createDataKey="rootCategory" stepKey="deleteRootCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/> @@ -48,4 +48,4 @@ <!--Verify Delete button is not displayed--> <dontSeeElement selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="dontSeeDeleteButton"/> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryTest.xml index e7ab14c77945a..5e9e536203f1e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryTest.xml @@ -22,7 +22,7 @@ <createData entity="NewRootCategory" stepKey="rootCategory" /> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Verify Created root Category--> @@ -41,4 +41,4 @@ <click selector="{{AdminCategorySidebarTreeSection.expandAll}}" stepKey="expandToSeeAllCategories1"/> <dontSee selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{NewRootCategory.name}}" stepKey="dontSeeRootCategory"/> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootSubCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootSubCategoryTest.xml index 14e8fa0bab7ba..48422d9ba2025 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootSubCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootSubCategoryTest.xml @@ -29,7 +29,7 @@ <argument name="storeGroupName" value="customStore.code"/> </actionGroup> <deleteData createDataKey="rootCategory" stepKey="deleteRootCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create a Store--> @@ -89,4 +89,4 @@ <waitForPageLoad stepKey="waitForPageToLoad1"/> <see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="seeEmptyRow"/> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSimpleProductTest.xml index 5b8ac5157514d..5c8b90a26594b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSimpleProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSimpleProductTest.xml @@ -27,7 +27,7 @@ </before> <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteSimpleProductFilteredBySkuAndName"> <argument name="product" value="$$createSimpleProduct$$"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSystemProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSystemProductAttributeTest.xml index 6de1a5cd359cd..c3a550165de89 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSystemProductAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteSystemProductAttributeTest.xml @@ -21,7 +21,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="navigateToProductAttribute"/> <waitForPageLoad stepKey="waitForPageLoad"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteTextFieldProductAttributeFromAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteTextFieldProductAttributeFromAttributeSetTest.xml index e12bac55d8bc8..8528212e8fa20 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteTextFieldProductAttributeFromAttributeSetTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteTextFieldProductAttributeFromAttributeSetTest.xml @@ -31,7 +31,7 @@ <after> <!--Delete cteated Data --> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimplaeProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteVirtualProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteVirtualProductTest.xml index 86f253f358532..642fb1c1f7ba0 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteVirtualProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteVirtualProductTest.xml @@ -27,7 +27,7 @@ </before> <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteVirtualProductFilteredBySkuAndName"> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDisableProductOnChangingAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDisableProductOnChangingAttributeSetTest.xml index 0fc2c022b81e9..8ce478ff48469 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDisableProductOnChangingAttributeSetTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDisableProductOnChangingAttributeSetTest.xml @@ -29,7 +29,7 @@ <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductsFilter"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="login"/> <amOnPage url="{{AdminProductAttributeSetEditPage.url}}/$$createAttributeSet.attribute_set_id$$/" stepKey="onAttributeSetEdit"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminEditTextEditorProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminEditTextEditorProductAttributeTest.xml index feea0930390b7..30b06ac8e0b43 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminEditTextEditorProductAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminEditTextEditorProductAttributeTest.xml @@ -18,7 +18,7 @@ <testCaseId value="MC-6215"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> <createData stepKey="myProductAttributeCreation" entity="productAttributeWysiwyg"/> @@ -76,7 +76,7 @@ <after> <deleteData createDataKey="myProductAttributeCreation" stepKey="deletePreReqProductAttribute" /> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilterByNameByStoreViewOnProductGridTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilterByNameByStoreViewOnProductGridTest.xml index 0b230b0b8e002..5ad3ee6f83e2d 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilterByNameByStoreViewOnProductGridTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilterByNameByStoreViewOnProductGridTest.xml @@ -26,7 +26,7 @@ <after> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductsFilter"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{AdminProductEditPage.url($$createSimpleProduct.id$$)}}" stepKey="goToEditPage"/> <actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="switchToDefaultStoreView"> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml index 77b719c03091e..a6f34af9f5315 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml @@ -97,7 +97,7 @@ <deleteData createDataKey="createProduct2" stepKey="deleteProduct2"/> <deleteData createDataKey="createProduct12" stepKey="deleteProduct3"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Step 1-2: Open Category page and Set scope selector to All Store Views--> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="goToCategoryPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminGridPageNumberAfterSaveAndCloseActionTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminGridPageNumberAfterSaveAndCloseActionTest.xml index 81d032850bf5a..a42fe576751f7 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminGridPageNumberAfterSaveAndCloseActionTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminGridPageNumberAfterSaveAndCloseActionTest.xml @@ -47,7 +47,7 @@ <deleteData stepKey="deleteProduct1" createDataKey="product1"/> <deleteData stepKey="deleteCategory2" createDataKey="category2"/> <deleteData stepKey="deleteProduct2" createDataKey="product2"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{ProductCatalogPage.url}}" stepKey="goToProductCatalog"/> <waitForPageLoad stepKey="waitForProductIndexPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminImportCustomizableOptionToProductWithSKUTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminImportCustomizableOptionToProductWithSKUTest.xml index 76c0d7f7b931c..cfce9143f6cc6 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminImportCustomizableOptionToProductWithSKUTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminImportCustomizableOptionToProductWithSKUTest.xml @@ -46,7 +46,7 @@ <argument name="sku" value="$$createFirstProduct.sku$$-1"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductGridFilter"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <!--Change second product sku to first product sku--> <amOnPage url="{{AdminProductEditPage.url($$createSecondProduct.id$$)}}" stepKey="goToProductEditPage1"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml index e98b145f01401..f803050b7a59b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml @@ -26,7 +26,7 @@ <after> <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Product Index Page--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml index 71873fe5b0960..0fbbca2602e86 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml @@ -38,7 +38,7 @@ <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="AdminDeleteStoreViewActionGroup"/> <click selector="{{AdminStoresGridSection.resetButton}}" stepKey="resetSearchFilter"/> <actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductFilter"/> - <actionGroup ref="logout" stepKey="amOnLogoutPage"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/> </after> <!-- Search and select products --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductStatusStoreViewScopeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductStatusStoreViewScopeTest.xml index 21c6c56adfd96..6030e76dca721 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductStatusStoreViewScopeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductStatusStoreViewScopeTest.xml @@ -21,7 +21,7 @@ <group value="SearchEngineElasticsearch"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <!--Create Website --> <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite"> @@ -80,7 +80,7 @@ <actionGroup ref="DeleteProductActionGroup" stepKey="deleteProduct2"> <argument name="productName" value="simpleProductForMassUpdate2.name"/> </actionGroup> - <actionGroup ref="logout" stepKey="amOnLogoutPage"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/> </after> <!-- Search and select products --> @@ -171,7 +171,7 @@ <group value="SearchEngineMysql"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <!--Create Website --> <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite"> @@ -230,7 +230,7 @@ <actionGroup ref="DeleteProductActionGroup" stepKey="deleteProduct2"> <argument name="productName" value="simpleProductForMassUpdate2.name"/> </actionGroup> - <actionGroup ref="logout" stepKey="amOnLogoutPage"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/> </after> <!-- Search and select products --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml index f01becd2034d8..72ef78accb7fc 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryTest.xml @@ -44,7 +44,7 @@ <deleteData createDataKey="simpleSubCategoryWithParent" stepKey="deleteSubcategoryWithParent"/> <deleteData createDataKey="simpleSubCategoryOne" stepKey="deleteSubcategoryOne"/> <deleteData createDataKey="simpleSubCategoryTwo" stepKey="deleteSubcategoryTwo"/> - <actionGroup ref="logout" stepKey="logoutAdminUserAfterTest"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdminUserAfterTest"/> </after> <!--Move category one to category two--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryToDefaultCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryToDefaultCategoryTest.xml index a8a8ede297b44..2122d73ca7e62 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryToDefaultCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryToDefaultCategoryTest.xml @@ -25,7 +25,7 @@ <after> <deleteData createDataKey="createDefaultCategory" stepKey="deleteDefaultCategory"/> <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Category Page--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml index 3d51d8cb99298..061bc795b2bff 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml @@ -25,7 +25,7 @@ </before> <after> <deleteData createDataKey="createDefaultCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open category page--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml index 271d78ab9cdb0..393d0c49c2e93 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml @@ -28,7 +28,7 @@ <actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCategory"> <argument name="categoryEntity" value="SimpleSubCategory"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Category page--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryToAnotherPositionInCategoryTreeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryToAnotherPositionInCategoryTreeTest.xml index 044b120173423..801d925c0fd84 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryToAnotherPositionInCategoryTreeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryToAnotherPositionInCategoryTreeTest.xml @@ -28,7 +28,7 @@ <actionGroup ref="DeleteCategoryActionGroup" stepKey="SecondLevelSubCat"> <argument name="categoryEntity" value="SecondLevelSubCat"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open Category Page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveProductBetweenCategoriesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveProductBetweenCategoriesTest.xml index 7e6e79cd08c26..3f7d612a1fdbc 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveProductBetweenCategoriesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveProductBetweenCategoriesTest.xml @@ -53,7 +53,7 @@ <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createSecondCategory" stepKey="deleteSecondCategory"/> <deleteData createDataKey="createAnchoredCategory1" stepKey="deleteAnchoredCategory1"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create the anchored category <Cat1_anchored> --> <actionGroup ref="AdminAnchorCategoryActionGroup" stepKey="anchorCategory"> @@ -129,7 +129,7 @@ <waitForPageLoad stepKey="waitForRefresh"/> <see userInput="2 cache type(s) refreshed." stepKey="seeCacheRefreshedMessage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Open frontend --> <amOnPage url="{{StorefrontHomePage.url}}" stepKey="onFrontend"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml index f7fd81f28199f..d56f64d72a1c1 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml @@ -22,9 +22,9 @@ <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteSecondWebsite"> <argument name="websiteName" value="Second Website"/> </actionGroup> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> - <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite"> <argument name="newWebsiteName" value="Second Website"/> <argument name="websiteCode" value="second_website"/> @@ -81,4 +81,4 @@ <seeCheckboxIsChecked selector="{{AdminProductFormSection.productTaxClassUseDefault}}" stepKey="seeTaxClassCheckboxChecked"/> <seeCheckboxIsChecked selector="{{AdminProductFormSection.visibilityUseDefault}}" stepKey="seeVisibilityCheckboxChecked"/> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminNavigateMultipleUpSellProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminNavigateMultipleUpSellProductsTest.xml index 7bfe3ae50c58b..ab1ced89175bc 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminNavigateMultipleUpSellProductsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminNavigateMultipleUpSellProductsTest.xml @@ -78,7 +78,7 @@ </before> <after> <!--Logout as admin--> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!--Delete created data--> <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCategoryIndexerInUpdateOnScheduleModeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCategoryIndexerInUpdateOnScheduleModeTest.xml index 2283a0e4d6158..b547fbe69fbf7 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCategoryIndexerInUpdateOnScheduleModeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCategoryIndexerInUpdateOnScheduleModeTest.xml @@ -69,7 +69,7 @@ <deleteData createDataKey="createCategoryA" stepKey="deleteCategoryA"/> <deleteData createDataKey="createCategoryC" stepKey="deleteCategoryC"/> <deleteData createDataKey="createCategoryB" stepKey="deleteCategoryB"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Case: change product category from product page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKey.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKey.xml index df09768139533..400cc891b3c91 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKey.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKey.xml @@ -47,7 +47,7 @@ <argument name="customStore" value="storeViewData"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open product --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByCustomAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByCustomAttributeTest.xml index a4986117380ff..1f7b88e8bb27f 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByCustomAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByCustomAttributeTest.xml @@ -89,7 +89,7 @@ <!--Delete category--> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <actionGroup ref="NavigateToAndResetProductGridToDefaultViewActionGroup" stepKey="NavigateToAndResetProductGridToDefaultViewAfterTest"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByDateAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByDateAttributeTest.xml index d9f894fa5736b..8c334cb84be01 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByDateAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridFilteringByDateAttributeTest.xml @@ -24,7 +24,7 @@ </before> <after> <deleteData createDataKey="createSimpleProductWithDate" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="navigateToProductAttribute"/> <waitForPageLoad stepKey="wait1"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductImageAssignmentForMultipleStoresTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductImageAssignmentForMultipleStoresTest.xml index 59be8157d2f87..f32845072ec02 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductImageAssignmentForMultipleStoresTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductImageAssignmentForMultipleStoresTest.xml @@ -54,7 +54,7 @@ <!-- Clear Filter Product --> <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductFilters"/> <!-- Logout Admin --> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <!-- Search Product and Open Edit --> <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchProduct"> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductStatusAttributeDisabledByDefaultTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductStatusAttributeDisabledByDefaultTest.xml index a882c6e7817ce..5f089aad256b7 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductStatusAttributeDisabledByDefaultTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductStatusAttributeDisabledByDefaultTest.xml @@ -35,7 +35,7 @@ <waitForPageLoad stepKey="waitForSaveAttribute1"/> <actionGroup ref="ClearCacheActionGroup" stepKey="clearCache1"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="navigateToProductAttribute"/> <waitForPageLoad stepKey="wait1"/> @@ -56,4 +56,4 @@ <dontSeeCheckboxIsChecked selector="{{AdminProductFormSection.productStatus}}" stepKey="dontSeeCheckboxEnableProductIsChecked"/> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest.xml index 0b7e2a70735c3..8e8f3ebccafb1 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest.xml @@ -34,7 +34,7 @@ <comment userInput="Delete product" stepKey="commentDeleteProduct"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductFilters"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Change product type to Downloadable--> <comment userInput="Change product type to Downloadable" stepKey="commentCreateDownloadable"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveCustomOptionsFromProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveCustomOptionsFromProductTest.xml index fb54b0b601d85..90fd42f8b4c95 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveCustomOptionsFromProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveCustomOptionsFromProductTest.xml @@ -28,7 +28,7 @@ <deleteData createDataKey="createProduct" stepKey="deleteProductWithOptions"/> <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductFilter"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> <!-- Edit Simple Product --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml index 47f497b381553..5e29bf30b4bf2 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml @@ -67,7 +67,7 @@ <deleteData createDataKey="product" stepKey="deleteFirstProduct"/> <magentoCLI stepKey="reindex" command="indexer:reindex"/> <magentoCLI stepKey="flushCache" command="cache:flush"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create product--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageFromCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageFromCategoryTest.xml index ef276114b4de5..b3e5900c9bb76 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageFromCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageFromCategoryTest.xml @@ -25,7 +25,7 @@ <actionGroup ref="DeleteCategoryActionGroup" stepKey="DeleteCategory"> <argument name="categoryEntity" value="SimpleSubCategory"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to create a new category with image --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRequiredFieldsHaveRequiredFieldIndicatorTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRequiredFieldsHaveRequiredFieldIndicatorTest.xml index ebae27a1f7182..45c2c9d379033 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRequiredFieldsHaveRequiredFieldIndicatorTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRequiredFieldsHaveRequiredFieldIndicatorTest.xml @@ -18,7 +18,7 @@ <group value="Catalog"/> </annotations> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRestrictedUserAddCategoryFromProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRestrictedUserAddCategoryFromProductPageTest.xml index 05008b32ed4fb..5f489e337b01a 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRestrictedUserAddCategoryFromProductPageTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRestrictedUserAddCategoryFromProductPageTest.xml @@ -32,7 +32,7 @@ <argument name="sku" value="{{_defaultProduct.sku}}"/> </actionGroup> <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetFiltersIfExist"/> - <actionGroup ref="logout" stepKey="logoutOfUser"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfUser"/> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> <!--Delete created data--> <comment userInput="Delete created data" stepKey="commentDeleteCreatedData"/> @@ -47,7 +47,7 @@ <argument name="userName" value="{{admin2.username}}"/> </actionGroup> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <!--Create user role--> <comment userInput="Create user role" stepKey="commentCreateUserRole"/> @@ -74,7 +74,7 @@ </actionGroup> <!--Log out of admin and login with newly created user--> <comment userInput="Log out of admin and login with newly created user" stepKey="commentLoginWithNewUser"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> <actionGroup ref="LoginAsAdmin" stepKey="loginAsNewUser"> <argument name="adminUser" value="admin2"/> </actionGroup> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminShouldBeAbleToAssociateSimpleProductToWebsitesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminShouldBeAbleToAssociateSimpleProductToWebsitesTest.xml index 9d19a1dedf7ef..190a051c16d44 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminShouldBeAbleToAssociateSimpleProductToWebsitesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminShouldBeAbleToAssociateSimpleProductToWebsitesTest.xml @@ -44,7 +44,7 @@ <actionGroup ref="AdminGridFilterResetActionGroup" stepKey="resetFiltersOnStoresIndexPage"/> <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="openProductIndexPageToResetFilters"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFiltersOnProductIndexPage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- 1. Go to product page in admin panel to edit --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest.xml index ff8240655ca03..3d505b9f893eb 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest.xml @@ -34,7 +34,7 @@ <deleteData createDataKey="category" stepKey="deletePreReqCategory"/> <deleteData createDataKey="firstProduct" stepKey="deleteFirstProduct"/> <deleteData createDataKey="secondProduct" stepKey="deleteSecondProduct"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Go to the first product edit page --> @@ -188,7 +188,7 @@ <after> <deleteData createDataKey="category" stepKey="deletePreReqCategory"/> <deleteData createDataKey="product" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Go to the product edit page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductSetEditContentTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductSetEditContentTest.xml index 1e1fe4572b28d..80e245818e216 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductSetEditContentTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductSetEditContentTest.xml @@ -30,7 +30,7 @@ <argument name="product" value="SimpleProduct"/> </actionGroup> <!--Admin Logout--> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create product --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSortingByWebsitesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSortingByWebsitesTest.xml index b20a024a7c586..16bc76cb6446a 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSortingByWebsitesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSortingByWebsitesTest.xml @@ -45,7 +45,7 @@ <actionGroup ref="ResetWebUrlOptionsActionGroup" stepKey="resetUrlOption"/> <magentoCLI command="indexer:reindex" stepKey="reindex"/> <magentoCLI command="cache:flush" stepKey="flushCache"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Assign Custom Website to Simple Product --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresAttributeSetNavigateMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresAttributeSetNavigateMenuTest.xml index ed29c281b804c..544ab05d8783b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresAttributeSetNavigateMenuTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresAttributeSetNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToAttributeSetPage"> <argument name="menuUiId" value="{{AdminMenuStores.dataUiId}}"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresProductNavigateMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresProductNavigateMenuTest.xml index 28a33c4f20c01..37571d7b44635 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresProductNavigateMenuTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminStoresProductNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToProductAttributePage"> <argument name="menuUiId" value="{{AdminMenuStores.dataUiId}}"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminTierPriceNotAvailableForProductOptionsWithoutTierPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminTierPriceNotAvailableForProductOptionsWithoutTierPriceTest.xml index 7f62dd14a4f32..ee8dab9c0ee37 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminTierPriceNotAvailableForProductOptionsWithoutTierPriceTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminTierPriceNotAvailableForProductOptionsWithoutTierPriceTest.xml @@ -82,7 +82,7 @@ <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml index c508e3ae94d67..c651d2db6a7ce 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml @@ -36,7 +36,7 @@ <deleteData createDataKey="product" stepKey="deleteProduct"/> <deleteData createDataKey="attribute" stepKey="deleteAttribute"/> <magentoCLI command="cron:run --group=index" stepKey="runCron"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndCheckDefaultUrlKeyOnStoreViewTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndCheckDefaultUrlKeyOnStoreViewTest.xml index d8d462f850f8f..0f4e6e2854948 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndCheckDefaultUrlKeyOnStoreViewTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndCheckDefaultUrlKeyOnStoreViewTest.xml @@ -29,7 +29,7 @@ <argument name="storeGroupName" value="customStore.name"/> </actionGroup> <deleteData createDataKey="rootCategory" stepKey="deleteRootCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Store Page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndMakeInactiveTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndMakeInactiveTest.xml index 479249ca678dd..b121ba46410e4 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndMakeInactiveTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndMakeInactiveTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="createDefaultCategory" stepKey="deleteCreatedCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open category page--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryNameWithStoreViewTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryNameWithStoreViewTest.xml index 2cb4a6b6dd436..51d8b9e1eaf37 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryNameWithStoreViewTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryNameWithStoreViewTest.xml @@ -29,7 +29,7 @@ <argument name="storeGroupName" value="customStore.name"/> </actionGroup> <deleteData createDataKey="rootCategory" stepKey="deleteRootCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open store page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryStoreUrlKeyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryStoreUrlKeyTest.xml index 01eba2976c3d6..299298266d061 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryStoreUrlKeyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryStoreUrlKeyTest.xml @@ -22,7 +22,7 @@ <actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCategory"> <argument name="categoryEntity" value="_defaultCategory"/> </actionGroup> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Create category, change store view to default --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryUrlKeyWithStoreViewTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryUrlKeyWithStoreViewTest.xml index e7c4a8a093e19..c0c8f53307b20 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryUrlKeyWithStoreViewTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryUrlKeyWithStoreViewTest.xml @@ -29,7 +29,7 @@ <argument name="storeGroupName" value="customStore.name"/> </actionGroup> <deleteData createDataKey="rootCategory" stepKey="deleteRootCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Store Page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithInactiveIncludeInMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithInactiveIncludeInMenuTest.xml index 7a7c701fca429..d6c581b18beff 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithInactiveIncludeInMenuTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithInactiveIncludeInMenuTest.xml @@ -24,7 +24,7 @@ </before> <after> <deleteData createDataKey="createDefaultCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Category Page--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml index ad110ceee32d2..065ebb74785d4 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml @@ -25,7 +25,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Category Page--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryAndAddProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryAndAddProductsTest.xml index cebf67ae2ebcf..8a31145f7349d 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryAndAddProductsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryAndAddProductsTest.xml @@ -54,7 +54,7 @@ </actionGroup> <deleteData createDataKey="category" stepKey="deleteCategory"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Select Created Category--> <magentoCLI command="indexer:reindex" stepKey="reindexBeforeFlow"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml index d7ce22bdc0097..6575fd1f1c977 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml @@ -51,7 +51,7 @@ <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewFr"> <argument name="customStore" value="customStoreFR"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Verify Category is not listed in navigation menu--> <amOnPage url="/{{CatNotIncludeInMenu.name_lwr}}.html" stepKey="openCategoryPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml index 2b14973d6ce32..2ae3c67cb222d 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml @@ -52,7 +52,7 @@ <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewFr"> <argument name="customStore" value="customStoreFR"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Select Created Category--> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="openAdminCategoryIndexPage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductNameToVerifyDataOverridingOnStoreViewLevelTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductNameToVerifyDataOverridingOnStoreViewLevelTest.xml index 60e7f03824ab7..2c45e957d801c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductNameToVerifyDataOverridingOnStoreViewLevelTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductNameToVerifyDataOverridingOnStoreViewLevelTest.xml @@ -38,7 +38,7 @@ <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"> <argument name="customStore" value="customStoreFR"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default simple product in grid --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductPriceToVerifyDataOverridingOnStoreViewLevelTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductPriceToVerifyDataOverridingOnStoreViewLevelTest.xml index 7624ad0557b47..4e80f95bbf390 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductPriceToVerifyDataOverridingOnStoreViewLevelTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductPriceToVerifyDataOverridingOnStoreViewLevelTest.xml @@ -38,7 +38,7 @@ <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"> <argument name="customStore" value="customStoreFR"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default simple product in grid --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductTieredPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductTieredPriceTest.xml index a848eb3d11e61..7096e547c5aa7 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductTieredPriceTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductTieredPriceTest.xml @@ -36,7 +36,7 @@ <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteCreatedProduct"> <argument name="sku" value="{{simpleProductTierPrice300InStock.sku}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default simple product in the grid --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockDisabledProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockDisabledProductTest.xml index ff3f56b566b38..270b95b7e52c5 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockDisabledProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockDisabledProductTest.xml @@ -30,7 +30,7 @@ <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteCreatedProduct"> <argument name="sku" value="{{simpleProductDisabled.sku}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default simple product in the grid page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockEnabledFlatTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockEnabledFlatTest.xml index 09ddc18aff4bd..e9c2ed1511ce3 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockEnabledFlatTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockEnabledFlatTest.xml @@ -33,7 +33,7 @@ <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteCreatedProduct"> <argument name="sku" value="{{simpleProductEnabledFlat.sku}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <magentoCLI stepKey="unsetFlatCatalogProduct" command="config:set catalog/frontend/flat_catalog_product 0"/> </after> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockNotVisibleIndividuallyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockNotVisibleIndividuallyTest.xml index 94aec4cc95d1d..17a91ed2cf4f4 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockNotVisibleIndividuallyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockNotVisibleIndividuallyTest.xml @@ -32,7 +32,7 @@ <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteCreatedProduct"> <argument name="sku" value="{{simpleProductNotVisibleIndividually.sku}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default simple product in the grid page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockUnassignFromCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockUnassignFromCategoryTest.xml index fa3317aa815d9..84f2c4552ae6c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockUnassignFromCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockUnassignFromCategoryTest.xml @@ -30,7 +30,7 @@ <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteCreatedProduct"> <argument name="sku" value="$$initialSimpleProduct.sku$$"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Search default simple product in the grid page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml index 95b74f4d38b3f..2490782d86b8b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml @@ -32,7 +32,7 @@ <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteCreatedProduct"> <argument name="sku" value="{{simpleProductRegularPrice245InStock.sku}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default simple product in the grid page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml index af190890ac351..2f0ef84d4be0d 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml @@ -32,7 +32,7 @@ <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteCreatedProduct"> <argument name="sku" value="{{simpleProductRegularPrice32501InStock.sku}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default simple product in the grid --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInSearchOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInSearchOnlyTest.xml index 626c3d00a5caf..5c196744f0181 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInSearchOnlyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInSearchOnlyTest.xml @@ -32,7 +32,7 @@ <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteCreatedProduct"> <argument name="sku" value="{{simpleProductRegularPrice325InStock.sku}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default simple product in the grid --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockWithCustomOptionsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockWithCustomOptionsTest.xml index 13782da076f69..4b13323afdc44 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockWithCustomOptionsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockWithCustomOptionsTest.xml @@ -32,7 +32,7 @@ <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteCreatedProduct"> <argument name="sku" value="{{simpleProductRegularPriceCustomOptions.sku}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default simple product in the grid --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceOutOfStockTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceOutOfStockTest.xml index 285ceb3c4d722..ec19a2a496f9f 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceOutOfStockTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceOutOfStockTest.xml @@ -32,7 +32,7 @@ <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteCreatedProduct"> <argument name="sku" value="{{simpleProductRegularPrice32503OutOfStock.sku}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default simple product in the grid --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithNoRedirectTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithNoRedirectTest.xml index ae91779f58cca..df3f0529b1bd4 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithNoRedirectTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithNoRedirectTest.xml @@ -32,7 +32,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="login"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="createThreeLevelNestedCategories" stepKey="deleteThreeNestedCategories"/> <deleteData createDataKey="createTwoLevelNestedCategories" stepKey="deleteTwoLevelNestedCategory"/> @@ -91,4 +91,4 @@ <waitForPageLoad stepKey="waitForPageToLoad4"/> <see stepKey="seeEmptyRecodsMessage" selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records."/> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithRedirectTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithRedirectTest.xml index dfaeea11d33a5..fddaced13fa4d 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithRedirectTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateTopCategoryUrlWithRedirectTest.xml @@ -34,7 +34,7 @@ <deleteData createDataKey="createThreeLevelNestedCategories" stepKey="deleteThreeNestedCategories"/> <deleteData createDataKey="createTwoLevelNestedCategories" stepKey="deleteTwoLevelNestedCategory"/> <deleteData createDataKey="createDefaultCategory" stepKey="deleteDefaultCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open Category page --> @@ -90,4 +90,4 @@ <see selector="{{AdminUrlRewriteIndexSection.gridCellByColumnRowNumber('1', 'Target Path')}}" userInput="$$createDefaultCategory.name$$/$$createTwoLevelNestedCategories.name$$/updateredirecturl.html" stepKey="seeTheTargetPathForOldUrl"/> <see selector="{{AdminUrlRewriteIndexSection.gridCellByColumnRowNumber('1', 'Redirect Type')}}" userInput="Permanent (301)" stepKey="seeTheRedirectTypeForOldUrl"/> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceInStockVisibleInCategoryOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceInStockVisibleInCategoryOnlyTest.xml index 0e9b9431dcfa6..cea09b0cdb4bd 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceInStockVisibleInCategoryOnlyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceInStockVisibleInCategoryOnlyTest.xml @@ -33,7 +33,7 @@ </actionGroup> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/> <deleteData stepKey="deleteSimpleSubCategory2" createDataKey="categoryEntity"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default virtual product in the grid page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceInStockWithCustomOptionsVisibleInSearchOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceInStockWithCustomOptionsVisibleInSearchOnlyTest.xml index f621813f4f8c0..77de42bdbac21 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceInStockWithCustomOptionsVisibleInSearchOnlyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceInStockWithCustomOptionsVisibleInSearchOnlyTest.xml @@ -30,7 +30,7 @@ <after> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/> <deleteData stepKey="deleteSimpleSubCategory2" createDataKey="categoryEntity"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default virtual product in the grid page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceOutOfStockVisibleInCategoryAndSearchTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceOutOfStockVisibleInCategoryAndSearchTest.xml index 021ed5593c738..918cda5274216 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceOutOfStockVisibleInCategoryAndSearchTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceOutOfStockVisibleInCategoryAndSearchTest.xml @@ -33,7 +33,7 @@ </actionGroup> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/> <deleteData stepKey="deleteSimpleSubCategory2" createDataKey="categoryEntity"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default virtual product in the grid page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceOutOfStockVisibleInCategoryOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceOutOfStockVisibleInCategoryOnlyTest.xml index d74a6ce508b88..5f6f44110bfb4 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceOutOfStockVisibleInCategoryOnlyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceOutOfStockVisibleInCategoryOnlyTest.xml @@ -33,7 +33,7 @@ </actionGroup> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/> <deleteData stepKey="deleteSimpleSubCategory2" createDataKey="categoryEntity"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default virtual product in the grid page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceOutOfStockVisibleInSearchOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceOutOfStockVisibleInSearchOnlyTest.xml index aa90d018f7710..393c280eedf1b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceOutOfStockVisibleInSearchOnlyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithRegularPriceOutOfStockVisibleInSearchOnlyTest.xml @@ -31,7 +31,7 @@ <argument name="sku" value="{{updateVirtualProductRegularPrice99OutOfStock.sku}}"/> </actionGroup> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default virtual product in the grid page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithSpecialPriceInStockVisibleInCategoryAndSearchTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithSpecialPriceInStockVisibleInCategoryAndSearchTest.xml index 94ddb3dc5e5da..9658597a04717 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithSpecialPriceInStockVisibleInCategoryAndSearchTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithSpecialPriceInStockVisibleInCategoryAndSearchTest.xml @@ -33,7 +33,7 @@ </actionGroup> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/> <deleteData stepKey="deleteSimpleSubCategory2" createDataKey="categoryEntity"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default virtual product in the grid page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithSpecialPriceOutOfStockVisibleInCategoryAndSearchTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithSpecialPriceOutOfStockVisibleInCategoryAndSearchTest.xml index a6a629b35091e..9d3d315487d65 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithSpecialPriceOutOfStockVisibleInCategoryAndSearchTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithSpecialPriceOutOfStockVisibleInCategoryAndSearchTest.xml @@ -33,7 +33,7 @@ </actionGroup> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/> <deleteData stepKey="deleteSimpleSubCategory2" createDataKey="categoryEntity"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default virtual product in the grid page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryAndSearchTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryAndSearchTest.xml index ea331bfc97db2..f5571633c2da4 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryAndSearchTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryAndSearchTest.xml @@ -38,7 +38,7 @@ <argument name="product" value="updateVirtualProductTierPriceInStock"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <actionGroup ref="FilterAndSelectProductActionGroup" stepKey="openProductEditPageBySKU"> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryOnlyTest.xml index 0edc487e71edf..5c0b7c31756ca 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryOnlyTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceInStockVisibleInCategoryOnlyTest.xml @@ -33,7 +33,7 @@ </actionGroup> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/> <deleteData stepKey="deleteSimpleSubCategory2" createDataKey="categoryEntity"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default virtual product in the grid page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceOutOfStockVisibleInCategoryAndSearchTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceOutOfStockVisibleInCategoryAndSearchTest.xml index e513d007e6a09..eeb85e8d6fc2e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceOutOfStockVisibleInCategoryAndSearchTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateVirtualProductWithTierPriceOutOfStockVisibleInCategoryAndSearchTest.xml @@ -33,7 +33,7 @@ </actionGroup> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/> <deleteData stepKey="deleteSimpleSubCategory2" createDataKey="categoryEntity"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search default virtual product in the grid page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminVerifyProductOrderTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminVerifyProductOrderTest.xml index b61be7fd95a58..09ddcd040bea4 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminVerifyProductOrderTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminVerifyProductOrderTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="GoToProductCatalogPageActionGroup" stepKey="goToProductCatalogPage"/> <actionGroup ref="VerifyProductTypeOrder" stepKey="verifyProductTypeOrder"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml index 3125ba3decce6..14f4a6f6d1cfb 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest.xml @@ -25,7 +25,7 @@ </before> <after> <deleteData createDataKey="product" stepKey="delete"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> </test> <test name="AdvanceCatalogSearchSimpleProductBySkuTest"> @@ -106,7 +106,7 @@ </before> <after> <deleteData createDataKey="product" stepKey="delete"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> </test> </tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml index f80cfed54c8f3..1fe42a331c80c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml @@ -330,7 +330,7 @@ <argument name="websiteName" value="secondWebsite"/> </actionGroup> <createData entity="CustomerAccountSharingDefault" stepKey="setConfigCustomerAccountDefault"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!--Do reindex and flush cache--> <magentoCLI command="indexer:reindex" stepKey="reindex"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest.xml index 1e297586ecb65..d5dee9e462560 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest.xml @@ -30,7 +30,7 @@ <click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/> <click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/> <waitForPageLoad stepKey="waitForDeletion"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Navigate to Stores > Attributes > Product.--> @@ -89,7 +89,7 @@ <click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/> <click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/> <waitForPageLoad stepKey="waitForDeletion"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Generate date for use as default value, needs to be MM/d/YYYY --> @@ -149,7 +149,7 @@ <click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/> <click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/> <waitForPageLoad stepKey="waitForDeletion"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Navigate to Stores > Attributes > Product.--> @@ -203,7 +203,7 @@ <click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/> <click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/> <waitForPageLoad stepKey="waitForDeletion"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Navigate to Stores > Attributes > Product.--> @@ -290,7 +290,7 @@ <click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/> <click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/> <waitForPageLoad stepKey="waitForDeletion"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Navigate to Stores > Attributes > Product.--> @@ -358,7 +358,7 @@ <click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/> <click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/> <waitForPageLoad stepKey="waitForDeletion"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Navigate to Stores > Attributes > Product.--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml index 8609d50fecaf2..604c01f05b838 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml @@ -36,7 +36,7 @@ <createData entity="NewRootCategory" stepKey="createNewRootCategoryA"/> </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createProduct1" stepKey="deleteProduct1"/> <deleteData createDataKey="createProduct2" stepKey="deleteProduct2"/> <deleteData createDataKey="createProduct3" stepKey="deleteProduct3"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/DeleteUsedInConfigurableProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/DeleteUsedInConfigurableProductAttributeTest.xml index 0d382798a6266..eb6661e12116d 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/DeleteUsedInConfigurableProductAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/DeleteUsedInConfigurableProductAttributeTest.xml @@ -72,7 +72,7 @@ <deleteData createDataKey="productAttributeHandle" stepKey="deleteProductAttribute"/> <!-- Logout --> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/DisplayRefreshCacheAfterChangingCategoryPageLayoutTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/DisplayRefreshCacheAfterChangingCategoryPageLayoutTest.xml index 1f71ec1e6a850..5a57bd844aa8d 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/DisplayRefreshCacheAfterChangingCategoryPageLayoutTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/DisplayRefreshCacheAfterChangingCategoryPageLayoutTest.xml @@ -30,7 +30,7 @@ <!-- Delete category and log out --> <comment userInput="Delete category and log out" stepKey="deleteCategoryAndLogOut"/> <deleteData createDataKey="simpleCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logOutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logOutFromAdmin"/> <magentoCLI command="cache:flush" stepKey="flushCache"/> </after> <!-- Navigate to category details page --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml index 232321610eadc..0400de5227cf3 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CAdminTest.xml @@ -21,7 +21,7 @@ </skip> </annotations> <after> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <!--Login to Admin Area--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/ProductAttributeWithoutValueInCompareListTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/ProductAttributeWithoutValueInCompareListTest.xml index 93afb7f1c2df1..96907eb091b45 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/ProductAttributeWithoutValueInCompareListTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/ProductAttributeWithoutValueInCompareListTest.xml @@ -43,7 +43,7 @@ <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/> <deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/ProductAvailableAfterEnablingSubCategoriesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/ProductAvailableAfterEnablingSubCategoriesTest.xml index c8a7cdee66b53..9e0dea7e06ded 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/ProductAvailableAfterEnablingSubCategoriesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/ProductAvailableAfterEnablingSubCategoriesTest.xml @@ -34,7 +34,7 @@ <after> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="$$createCategory.name$$.html" stepKey="goToCategoryStorefront2"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml index 89e784d67eaea..f2c5750a2b18e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml @@ -53,7 +53,7 @@ <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteTestWebsite"> <argument name="websiteName" value="Second Website"/> </actionGroup> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <actionGroup ref="EnableWebUrlOptionsActionGroup" stepKey="addStoreCodeToUrls"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontProductsDisplayUsingElasticSearchTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontProductsDisplayUsingElasticSearchTest.xml index 3c1bcb3b352cd..fe37f2110acc9 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontProductsDisplayUsingElasticSearchTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontProductsDisplayUsingElasticSearchTest.xml @@ -171,7 +171,7 @@ <actionGroup ref="ResetSearchEngineConfigurationActionGroup" stepKey="resetCatalogSearchConfiguration"/> <magentoCLI command="indexer:reindex" stepKey="performReindexAfterElasticSearchDisable"/> <magentoCLI command="cache:flush" stepKey="cleanCacheAfterElasticSearchDisable"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Storefront on the myCategory page--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCatalogNavigationMenuUIDesktopTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCatalogNavigationMenuUIDesktopTest.xml index 22ec0048497fa..68ced18a0a7dd 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCatalogNavigationMenuUIDesktopTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCatalogNavigationMenuUIDesktopTest.xml @@ -29,7 +29,7 @@ <argument name="theme" value="{{MagentoLumaTheme.name}}"/> </actionGroup> <!-- Admin log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to Content > Themes. Change theme to Blank --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryHighlightedAndProductDisplayedTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryHighlightedAndProductDisplayedTest.xml index 3e72df9133898..b8a9a9cb3e0e6 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryHighlightedAndProductDisplayedTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryHighlightedAndProductDisplayedTest.xml @@ -47,7 +47,7 @@ <deleteData createDataKey="category2" stepKey="deleteCategory2"/> <deleteData createDataKey="category3" stepKey="deleteCategory3"/> <deleteData createDataKey="category4" stepKey="deleteCategory4"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Storefront home page--> <comment userInput="Open Storefront home page" stepKey="openStorefrontHomePage"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml index 4eef6a2c06800..dc053bb990685 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml @@ -176,7 +176,7 @@ <deleteData createDataKey="createSimpleProductThirtyFive" stepKey="deleteProductThirtyFive"/> <deleteData createDataKey="createSimpleProductThirtySix" stepKey="deleteProductThirtySix"/> <deleteData createDataKey="createSimpleProductThirtySeven" stepKey="deleteProductThirtySeven"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Verify configuration for default number of products displayed in the grid view--> <comment userInput="Verify configuration for default number of products displayed in the grid view" stepKey="commentVerifyDefaultValues"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontFotoramaArrowsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontFotoramaArrowsTest.xml index 1a8e0c95a304c..120fa30832075 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontFotoramaArrowsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontFotoramaArrowsTest.xml @@ -24,7 +24,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> </after> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductWithEmptyAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductWithEmptyAttributeTest.xml index 7ba8f26ba1c05..feefcf6f4559d 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductWithEmptyAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductWithEmptyAttributeTest.xml @@ -28,7 +28,7 @@ </actionGroup> <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> <deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductsCompareWithEmptyAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductsCompareWithEmptyAttributeTest.xml index 3aa12a7268593..3b6284a6f6efa 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductsCompareWithEmptyAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductsCompareWithEmptyAttributeTest.xml @@ -32,7 +32,7 @@ <deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/> <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/> <deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViewsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViewsTest.xml index 8637de9711da0..a8ab4cca1ac78 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViewsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductCustomOptionsDifferentStoreViewsTest.xml @@ -69,7 +69,7 @@ <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="amOnProductGridPage"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogoutStorefront"/> </after> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsTest.xml index c0653d9dbba7e..066337bf25cb6 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsTest.xml @@ -36,7 +36,7 @@ <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderListingFilters"/> - <actionGroup ref="logout" stepKey="logoutAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/> <!-- Logout customer --> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogoutStorefront"/> </after> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitle.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitle.xml index 7a667ce9667d4..36a803b03199b 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitle.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitle.xml @@ -37,7 +37,7 @@ <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearFilters"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Login Customer Storefront --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontSpecialPriceForDifferentTimezonesForWebsitesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontSpecialPriceForDifferentTimezonesForWebsitesTest.xml index 3e887a0a83aa4..59f0b2f5dd76e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontSpecialPriceForDifferentTimezonesForWebsitesTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontSpecialPriceForDifferentTimezonesForWebsitesTest.xml @@ -33,7 +33,7 @@ <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Set timezone for default config--> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml index e91f9742b2841..c5d3a35a4db77 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml @@ -72,7 +72,7 @@ <deleteData createDataKey="categoryL" stepKey="deleteCategoryL"/> <deleteData createDataKey="categoryK" stepKey="deleteCategoryK"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open categories K, L, M, N on Storefront --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyChildCategoriesShouldNotIncludeInMenuTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyChildCategoriesShouldNotIncludeInMenuTest.xml index d39d54400279c..2a6a05c8ffeab 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyChildCategoriesShouldNotIncludeInMenuTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyChildCategoriesShouldNotIncludeInMenuTest.xml @@ -25,7 +25,7 @@ <actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCategory"> <argument name="categoryEntity" value="SimpleSubCategory"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage1"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest.xml index fe0ed32f39e1e..8c10f22b7b09e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest.xml @@ -19,7 +19,7 @@ <testCaseId value="MAGETWO-80505"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -44,7 +44,7 @@ <seeElement selector="{{ProductDescriptionWYSIWYGToolbarSection.SpecialCharacter}}" stepKey="assertInfo14"/> <after> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> <test name="Verifydefaultcontrolsonproductshortdescription"> @@ -58,7 +58,7 @@ <testCaseId value="MAGETWO-80505"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -83,7 +83,7 @@ <seeElement selector="{{ProductShortDescriptionWYSIWYGToolbarSection.SpecialCharacter}}" stepKey="assertInfo28"/> <after> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogTest.xml index cc69d0828015f..b439223674b60 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCatalogTest.xml @@ -19,7 +19,7 @@ <testCaseId value="MAGETWO-82551"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -46,7 +46,7 @@ <see userInput="Hello World!" selector="{{StorefrontCategoryMainSection.CatalogDescription}}" stepKey="assertCatalogDescription"/> <after> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnProductTest.xml index 5a2728b6532c8..1e4adedfc168d 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnProductTest.xml @@ -18,7 +18,7 @@ <testCaseId value="MAGETWO-81819"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -59,7 +59,7 @@ <see userInput="Hello World! Short Content" selector="{{StorefrontProductInfoMainSection.productShortDescription}}" stepKey="assertProductShortDescription"/> <after> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml index 7fb4d8b025b07..5415f75879ae8 100644 --- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml +++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml @@ -106,7 +106,7 @@ <argument name="rowIndex" value="0"/> </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml index d9b93196db060..adc511542074b 100644 --- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml +++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml @@ -70,7 +70,7 @@ <argument name="rowIndex" value="0"/> </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to export page --> diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml index c27a1716e84e5..9ff9f54d36939 100644 --- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml +++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml @@ -152,7 +152,7 @@ <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/> <!-- Admin logout--> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml index a55e92d64ce00..03314206fa67f 100644 --- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml +++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml @@ -94,7 +94,7 @@ <argument name="rowIndex" value="0"/> </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml index 7131fe41ea5ec..b199f4546b909 100644 --- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml +++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml @@ -110,7 +110,7 @@ <argument name="rowIndex" value="0"/> </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml index ea27d61e3b00c..578a9586a36c5 100644 --- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml +++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml @@ -95,7 +95,7 @@ <argument name="rowIndex" value="0"/> </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml index 8553fb8a2cf7e..cefd412025158 100644 --- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml +++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml @@ -47,7 +47,7 @@ <argument name="rowIndex" value="0"/> </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to export page --> diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Test/AdminCreateProductWithZeroMaximumQtyAllowedInShoppingCartTest.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Test/AdminCreateProductWithZeroMaximumQtyAllowedInShoppingCartTest.xml index 74b24209682ff..43f16c0fa475e 100644 --- a/app/code/Magento/CatalogInventory/Test/Mftf/Test/AdminCreateProductWithZeroMaximumQtyAllowedInShoppingCartTest.xml +++ b/app/code/Magento/CatalogInventory/Test/Mftf/Test/AdminCreateProductWithZeroMaximumQtyAllowedInShoppingCartTest.xml @@ -28,7 +28,7 @@ <after> <createData entity="DefaultValueForMaxSaleQty" stepKey="setDefaultValueForMaxSaleQty"/> <deleteData createDataKey="createdProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to Inventory configuration page --> diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Test/AssociatedProductToConfigurableOutOfStockTest.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Test/AssociatedProductToConfigurableOutOfStockTest.xml index 07354d0b4c89f..d0e3819ccc3cc 100644 --- a/app/code/Magento/CatalogInventory/Test/Mftf/Test/AssociatedProductToConfigurableOutOfStockTest.xml +++ b/app/code/Magento/CatalogInventory/Test/Mftf/Test/AssociatedProductToConfigurableOutOfStockTest.xml @@ -135,7 +135,7 @@ <waitForLoadingMaskToDisappear stepKey="waitForShipLoadingMask"/> <click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="submitShipment"/> <waitForPageLoad stepKey="waitShipmentCreated"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <magentoCLI stepKey="runCron" command="cron:run --group='index'"/> <!-- Wait till cron job runs for schedule updates --> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithSpecialPricesTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithSpecialPricesTest.xml index 453c64a32ce32..bf4ec749d7264 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithSpecialPricesTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithSpecialPricesTest.xml @@ -84,7 +84,7 @@ </actionGroup> <!-- Admin logout --> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <!-- Delete all created data --> <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateInactiveCatalogPriceRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateInactiveCatalogPriceRuleTest.xml index 83dff1ecdcab5..4211f0fc76508 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateInactiveCatalogPriceRuleTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateInactiveCatalogPriceRuleTest.xml @@ -28,7 +28,7 @@ <argument name="catalogRuleName" value="{{InactiveCatalogRule.name}}"/> </actionGroup> <actionGroup ref="AdminDeleteCatalogRuleActionGroup" stepKey="deleteTheCatalogRule"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create Inactive Catalog Price Rule --> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest.xml index d5efaec971bba..730e04bfea7cf 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest.xml @@ -42,7 +42,7 @@ <see selector="{{AdminNewCatalogPriceRule.successMessage}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/> </before> <after> - <actionGroup ref="logout" stepKey="logoutOfAdmin1"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin1"/> <deleteData createDataKey="createCustomer1" stepKey="deleteCustomer1"/> <deleteData createDataKey="createProduct1" stepKey="deleteSimpleProduct1"/> @@ -174,7 +174,7 @@ <see selector="{{AdminNewCatalogPriceRule.successMessage}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/> </before> <after> - <actionGroup ref="logout" stepKey="logoutOfAdmin1"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin1"/> <deleteData createDataKey="createCustomer1" stepKey="deleteCustomer"/> <deleteData createDataKey="createCategory1" stepKey="deleteCategory1"/> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleTest.xml index a6eb6eb1e5178..dfb846e90b669 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleTest.xml @@ -43,7 +43,7 @@ <amOnPage url="{{AdminCatalogPriceRuleGridPage.url}}" stepKey="goToCatalogRuleGridPage"/> <waitForPageLoad stepKey="waitForCatalogRuleGridPageLoaded"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearCatalogRuleGridFilters"/> - <actionGroup ref="logout" stepKey="amOnLogoutPage"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/> </after> <!-- Create a catalog price rule --> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml index da855b08cf390..0df73c99595a6 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml @@ -62,7 +62,7 @@ <deleteData createDataKey="createSecondCategory" stepKey="deleteSecondCategory"/> <deleteData createDataKey="createSecondProductAttribute" stepKey="deleteSecondProductAttribute"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <magentoCLI command="indexer:reindex" stepKey="reindex"/> <magentoCLI command="cache:flush" stepKey="flushCache"/> </after> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminMarketingCatalogPriceRuleNavigateMenuTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminMarketingCatalogPriceRuleNavigateMenuTest.xml index 0fe35419aaf3e..2a45de28db199 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminMarketingCatalogPriceRuleNavigateMenuTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminMarketingCatalogPriceRuleNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToCatalogPriceRulePage"> <argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml index c3cb4d6180f18..feb9423151299 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml @@ -104,7 +104,7 @@ </actionGroup> <click stepKey="resetFilters" selector="{{AdminSecondaryGridSection.resetFilters}}"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml index dad3063dae45f..2790dfbe46fda 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml @@ -87,7 +87,7 @@ </actionGroup> <!-- Logout --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Delete products and category --> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductAndFixedMethodTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductAndFixedMethodTest.xml index bb0a890fd0974..0149a2d0a6abb 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductAndFixedMethodTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductAndFixedMethodTest.xml @@ -47,7 +47,7 @@ </actionGroup> <!-- Logout --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- 1. Begin creating a new catalog price rule --> <actionGroup ref="NewCatalogPriceRuleByUIWithConditionIsCategoryActionGroup" stepKey="newCatalogPriceRuleByUIWithConditionIsCategory"> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml index 4ab2d0d491548..c70a72d725489 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml @@ -58,7 +58,7 @@ </actionGroup> <!-- Logout --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- 1. Begin creating a new catalog price rule --> <actionGroup ref="NewCatalogPriceRuleByUIWithConditionIsCategoryActionGroup" stepKey="newCatalogPriceRuleByUIWithConditionIsCategory"> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml index 166d202ec2410..9ebab2d28249a 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml @@ -63,7 +63,7 @@ </actionGroup> <!-- Logout --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- 1. Begin creating a new catalog price rule --> <actionGroup ref="NewCatalogPriceRuleByUIWithConditionIsCategoryActionGroup" stepKey="newCatalogPriceRuleByUIWithConditionIsCategory"> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/CatalogPriceRuleAndCustomerGroupMembershipArePersistedUnderLongTermCookieTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/CatalogPriceRuleAndCustomerGroupMembershipArePersistedUnderLongTermCookieTest.xml index 102054c315f4c..8130bdaae6303 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/CatalogPriceRuleAndCustomerGroupMembershipArePersistedUnderLongTermCookieTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/CatalogPriceRuleAndCustomerGroupMembershipArePersistedUnderLongTermCookieTest.xml @@ -54,7 +54,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <!-- Delete the rule --> <actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Go to category and check price--> diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml index 45b0c1bcaa5a0..17266b0c80d7a 100644 --- a/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml +++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml @@ -42,7 +42,7 @@ <deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!-- Verify price is not discounted on category page --> diff --git a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProducts2Test.xml b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProducts2Test.xml index 80ff2a447052c..56e0573649d29 100644 --- a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProducts2Test.xml +++ b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProducts2Test.xml @@ -171,7 +171,7 @@ <!-- Delete created price rules --> <actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/> <!-- Admin log out --> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProductsTest.xml b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProductsTest.xml index ea0d8e01d540f..bd73501b6117e 100644 --- a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProductsTest.xml +++ b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithAssignedSimpleProductsTest.xml @@ -175,7 +175,7 @@ </actionGroup> <!-- Admin log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptions2Test.xml b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptions2Test.xml index 2a5786b38107f..1cc2a8cb57256 100644 --- a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptions2Test.xml +++ b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptions2Test.xml @@ -105,7 +105,7 @@ <deleteData createDataKey="simpleCategory" stepKey="deleteCategory"/> <actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptionsTest.xml b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptionsTest.xml index c077719dfa80b..2375d50d73e3c 100644 --- a/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptionsTest.xml +++ b/app/code/Magento/CatalogRuleConfigurable/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithOptionsTest.xml @@ -122,7 +122,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminCreateSearchTermEntityTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminCreateSearchTermEntityTest.xml index 86a1d4321cba0..2ab87b3ceb967 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminCreateSearchTermEntityTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminCreateSearchTermEntityTest.xml @@ -35,7 +35,7 @@ <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to the search terms page and create new search term --> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminDeleteSearchTermTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminDeleteSearchTermTest.xml index b449d92d8e003..a950fb6c379cb 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminDeleteSearchTermTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminDeleteSearchTermTest.xml @@ -29,7 +29,7 @@ <after> <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/> <deleteData stepKey="deleteSimpleProduct" createDataKey="simpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Add new search term--> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminMarketingSearchTermsNavigateMenuTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminMarketingSearchTermsNavigateMenuTest.xml index bc255020d98b3..6be63541f3c27 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminMarketingSearchTermsNavigateMenuTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminMarketingSearchTermsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToMarketingSearchTermsPage"> <argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminReportsSearchTermsNavigateMenuTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminReportsSearchTermsNavigateMenuTest.xml index 85cf0e3ba90ed..e1a965bd08e0b 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminReportsSearchTermsNavigateMenuTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdminReportsSearchTermsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportSearchTermsPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/LayerNavigationOfCatalogSearchTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/LayerNavigationOfCatalogSearchTest.xml index fa9407495e6e7..c8055d85c98ea 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/LayerNavigationOfCatalogSearchTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/LayerNavigationOfCatalogSearchTest.xml @@ -38,7 +38,7 @@ <deleteData stepKey="deleteSimpleProduct1" createDataKey="simpleProduct1"/> <deleteData stepKey="deleteSimpleProduct2" createDataKey="simpleProduct2"/> <deleteData createDataKey="createPriceAttribute" stepKey="deleteAttribute"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Update value for price attribute of Product 1--> <comment userInput="Update value for price attribute of Product 1" stepKey="comment1"/> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/MinimalQueryLengthForCatalogSearchTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/MinimalQueryLengthForCatalogSearchTest.xml index 89269a1ad0d9e..6ae215f821a0b 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/MinimalQueryLengthForCatalogSearchTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/MinimalQueryLengthForCatalogSearchTest.xml @@ -31,7 +31,7 @@ <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <createData entity="SetMinQueryLengthToDefault" stepKey="setMinimumQueryLengthToDefault"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="SetMinimalQueryLengthActionGroup" stepKey="setMinQueryLength"/> <comment userInput="Go to Storefront and search for product" stepKey="searchProdUsingMinQueryLength"/> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml index 7648b59aaefe8..dc715a5d95f2f 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml @@ -385,7 +385,7 @@ <argument name="sku" value="{{_defaultProduct.sku}}"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToFrontPage"/> <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchStorefront"> @@ -465,7 +465,7 @@ <after> <deleteData stepKey="deleteGroupedProduct" createDataKey="createProduct"/> <deleteData stepKey="deleteSimpleProduct" createDataKey="simple1"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToFrontPage"/> <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchStorefront"> @@ -517,7 +517,7 @@ <deleteData stepKey="deleteBundleProduct" createDataKey="createBundleProduct"/> <deleteData stepKey="deleteProduct" createDataKey="createProduct"/> <deleteData stepKey="deleteCategory" createDataKey="createCategory"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToFrontPage"/> <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchStorefront"> @@ -586,7 +586,7 @@ <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> <deleteData stepKey="deleteCategory" createDataKey="createCategory"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <comment userInput="$simpleProduct1.name$" stepKey="asdf"/> <amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToFrontPage"/> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml index 61f274cd13061..f032a97ac297c 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml @@ -28,7 +28,7 @@ <after> <!-- Delete data --> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logoutAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/> </after> <!-- Perform reindex and flush cache --> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontQuickSearchConfigurableChildrenTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontQuickSearchConfigurableChildrenTest.xml index 44a4001f7b579..5c3f55c7212ad 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontQuickSearchConfigurableChildrenTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontQuickSearchConfigurableChildrenTest.xml @@ -81,7 +81,7 @@ <deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/> <deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToHomePage"/> <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchStorefront"> diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontUpdateSearchTermEntityTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontUpdateSearchTermEntityTest.xml index fab28dc357016..502301939f71a 100644 --- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontUpdateSearchTermEntityTest.xml +++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontUpdateSearchTermEntityTest.xml @@ -41,7 +41,7 @@ <comment userInput="Delete all search terms" stepKey="deleteAllSearchTermsComment"/> <actionGroup ref="AdminDeleteAllSearchTermsActionGroup" stepKey="deleteAllSearchTerms"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin1"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin1"/> </after> <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByProductName1"> diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminCategoryWithRestrictedUrlKeyNotCreatedTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminCategoryWithRestrictedUrlKeyNotCreatedTest.xml index c3c7e3c3281f4..cb969ac2d329e 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminCategoryWithRestrictedUrlKeyNotCreatedTest.xml +++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminCategoryWithRestrictedUrlKeyNotCreatedTest.xml @@ -36,7 +36,7 @@ <actionGroup ref="AdminDeleteCategoryByNameActionGroup" stepKey="deleteGraphQlCategory"> <argument name="categoryName" value="graphql"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Check category creation with restricted url key 'admin'--> <comment userInput="Check category creation with restricted url key 'admin'" stepKey="commentCheckAdminCategoryCreation"/> diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml index cc5f09faca57b..453f18003e694 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml +++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml @@ -33,7 +33,7 @@ <deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Created product--> diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/RewriteStoreLevelUrlKeyOfChildCategoryTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/RewriteStoreLevelUrlKeyOfChildCategoryTest.xml index c3a358bbbd292..e176fba9fd189 100644 --- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/RewriteStoreLevelUrlKeyOfChildCategoryTest.xml +++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/RewriteStoreLevelUrlKeyOfChildCategoryTest.xml @@ -58,7 +58,7 @@ <after> <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="subCategory" stepKey="deleteSubCategory"/> <deleteData createDataKey="defaultCategory" stepKey="deleteNewRootCategory"/> diff --git a/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOperatorsTest.xml b/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOperatorsTest.xml index 13ffedb1f707b..8d4e97420dd0b 100644 --- a/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOperatorsTest.xml +++ b/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOperatorsTest.xml @@ -151,7 +151,7 @@ <deleteData createDataKey="createFirstProduct" stepKey="deleteFirstProduct"/> <deleteData createDataKey="createSecondProduct" stepKey="deleteSecondProduct"/> <deleteData createDataKey="createThirdProduct" stepKey="deleteThirdProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOrderTest.xml b/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOrderTest.xml index f0af04478bc28..ea6a3a73522e7 100644 --- a/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOrderTest.xml +++ b/app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListWidgetOrderTest.xml @@ -82,7 +82,7 @@ <deleteData createDataKey="createFirstProduct" stepKey="deleteFirstProduct"/> <deleteData createDataKey="createSecondProduct" stepKey="deleteSecondProduct"/> <deleteData createDataKey="createThirdProduct" stepKey="deleteThirdProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/CatalogWidget/Test/Mftf/Test/StorefrontProductGridUIUpdatesOnDesktopTest.xml b/app/code/Magento/CatalogWidget/Test/Mftf/Test/StorefrontProductGridUIUpdatesOnDesktopTest.xml index f1753f4c0b649..74e1110c95636 100644 --- a/app/code/Magento/CatalogWidget/Test/Mftf/Test/StorefrontProductGridUIUpdatesOnDesktopTest.xml +++ b/app/code/Magento/CatalogWidget/Test/Mftf/Test/StorefrontProductGridUIUpdatesOnDesktopTest.xml @@ -56,7 +56,7 @@ <deleteData createDataKey="createFourthSimpleProduct" stepKey="deleteFourthSimpleProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createCmsPage" stepKey="deleteCmsPage"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <actionGroup ref="StorefrontGoToCMSPageActionGroup" stepKey="navigateAndOpenCreatedCmsPage"> <argument name="identifier" value="$createCmsPage.identifier$"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/AdminCheckConfigsChangesIsNotAffectedStartedCheckoutProcessTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/AdminCheckConfigsChangesIsNotAffectedStartedCheckoutProcessTest.xml index 31a9d011a91c7..a9c3d20c447a9 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/AdminCheckConfigsChangesIsNotAffectedStartedCheckoutProcessTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/AdminCheckConfigsChangesIsNotAffectedStartedCheckoutProcessTest.xml @@ -37,7 +37,7 @@ <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Add product to cart --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest.xml index 5f898492ad016..b939209751fcd 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest.xml @@ -30,7 +30,7 @@ <!--Logout from customer account--> <amOnPage url="{{StorefrontCustomerLogoutPage.url}}" stepKey="logoutCustomerOne"/> <waitForPageLoad stepKey="waitLogoutCustomerOne"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createSimpleUsCustomer" stepKey="deleteCustomer"/> </after> @@ -147,7 +147,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> </after> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/CheckoutSpecificDestinationsTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/CheckoutSpecificDestinationsTest.xml index 1bfb1804f41a7..294fc2c562491 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/CheckoutSpecificDestinationsTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/CheckoutSpecificDestinationsTest.xml @@ -77,7 +77,7 @@ </actionGroup> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> <deleteData createDataKey="defaultCategory" stepKey="deleteCategory"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/ConfiguringInstantPurchaseFunctionalityTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/ConfiguringInstantPurchaseFunctionalityTest.xml index aea0657cc2e3b..899688c80764e 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/ConfiguringInstantPurchaseFunctionalityTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/ConfiguringInstantPurchaseFunctionalityTest.xml @@ -47,7 +47,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <!-- Admin logout --> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Create store views --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml index f2501fdf4c0c6..c88025feba3d4 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingDefaultAddressTest.xml @@ -30,7 +30,7 @@ </before> <after> <!-- Admin log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Customer log out --> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNewAddressTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNewAddressTest.xml index b072989bc968c..600163501b556 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNewAddressTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNewAddressTest.xml @@ -30,7 +30,7 @@ </before> <after> <!-- Admin log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Customer log out --> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml index 9b0da574d6307..661957a1de980 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutAsCustomerUsingNonDefaultAddressTest.xml @@ -30,7 +30,7 @@ </before> <after> <!-- Admin log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Customer Log out --> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml index 80cf9c14b578e..43ee1c8dd3de4 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml @@ -30,7 +30,7 @@ </before> <after> <!-- Admin log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Customer Log out --> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml index c08a930ba6224..d0fb6babb22fa 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml @@ -31,7 +31,7 @@ <after> <deleteData createDataKey="product" stepKey="deleteProduct" /> <deleteData createDataKey="category" stepKey="deleteCategory" /> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <amOnPage url="$$product.name$$.html" stepKey="navigateToProductPage"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontFreeShippingRecalculationAfterCouponCodeAddedTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontFreeShippingRecalculationAfterCouponCodeAddedTest.xml index 8a2990c5869c9..d7b462d7f649b 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontFreeShippingRecalculationAfterCouponCodeAddedTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontFreeShippingRecalculationAfterCouponCodeAddedTest.xml @@ -54,7 +54,7 @@ <actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteCartPriceRule"> <argument name="ruleName" value="{{CatPriceRule.name}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="ApplyCartRuleOnStorefrontActionGroup" stepKey="applyCartRule"> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddDownloadableProductToShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddDownloadableProductToShoppingCartTest.xml index 3c1421f2616aa..e098c15c0eb6a 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddDownloadableProductToShoppingCartTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddDownloadableProductToShoppingCartTest.xml @@ -34,7 +34,7 @@ <after> <magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove example.com static.magento.com"/> <deleteData createDataKey="createDownloadableProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open Downloadable Product page --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontApplyPromoCodeDuringCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontApplyPromoCodeDuringCheckoutTest.xml index 5e13ce3e06e10..58cc137efd7b3 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontApplyPromoCodeDuringCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontApplyPromoCodeDuringCheckoutTest.xml @@ -38,7 +38,7 @@ <deleteData createDataKey="createCartPriceRule" stepKey="deleteCartPriceRule"/> <!-- Admin log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to Storefront as Guest and add simple product to cart --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndProductWithTierPricesTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndProductWithTierPricesTest.xml index 92eae461019a2..80da3fb70f944 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndProductWithTierPricesTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndProductWithTierPricesTest.xml @@ -45,7 +45,7 @@ <actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer"> <argument name="customerEmail" value="UKCustomer.email"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Product page in StoreFront and assert product and price range --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndRegisterCustomerAfterCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndRegisterCustomerAfterCheckoutTest.xml index 2f19dcd2dc32f..85e6a6b9c434c 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndRegisterCustomerAfterCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndRegisterCustomerAfterCheckoutTest.xml @@ -31,7 +31,7 @@ <actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer"> <argument name="customerEmail" value="UKCustomer.email"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Product page in StoreFront and assert product and price range --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml index 3f286df8337de..c76ec4cbc3c5c 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml @@ -101,7 +101,7 @@ <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteProductAttribute"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutOnLoginWhenGuestCheckoutIsDisabledTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutOnLoginWhenGuestCheckoutIsDisabledTest.xml index 1c3d3d4914fb4..f0907e89f00da 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutOnLoginWhenGuestCheckoutIsDisabledTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutOnLoginWhenGuestCheckoutIsDisabledTest.xml @@ -35,7 +35,7 @@ <actionGroup ref="StorefrontSignOutActionGroup" stepKey="customerLogout"/> <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Product page in StoreFront and assert product and price range --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml index 8bdbabb584b83..580b4e32b0b28 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest.xml @@ -31,7 +31,7 @@ <deleteData createDataKey="createCategory" stepKey="deleteSimpleCategory"/> <deleteData createDataKey="createCustomer" stepKey="deleteUsCustomer"/> <actionGroup ref="AdminClearCustomersFiltersActionGroup" stepKey="resetCustomerFilters"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> </after> @@ -144,7 +144,7 @@ <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="simpleproduct1" stepKey="deleteProduct1"/> <deleteData createDataKey="simplecategory" stepKey="deleteCategory"/> <deleteData createDataKey="multiple_address_customer" stepKey="deleteCustomer"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithNewCustomerRegistrationAndDisableGuestCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithNewCustomerRegistrationAndDisableGuestCheckoutTest.xml index e0fff27a583e7..2b96d385487bc 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithNewCustomerRegistrationAndDisableGuestCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithNewCustomerRegistrationAndDisableGuestCheckoutTest.xml @@ -35,7 +35,7 @@ <actionGroup ref="StorefrontSignOutActionGroup" stepKey="customerLogout"/> <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Product page in StoreFront and assert product and price range --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithoutRegionTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithoutRegionTest.xml index a6b9372679a11..c66c6371ae595 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithoutRegionTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutWithoutRegionTest.xml @@ -33,7 +33,7 @@ <actionGroup ref="SelectCountriesWithRequiredRegionActionGroup" stepKey="setDefaultCountriesWithRequiredRegion"> <argument name="countries" value="DefaultCountriesWithRequiredRegions"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml index afefbff5ea59a..f43cadabfd611 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerLoginDuringCheckoutTest.xml @@ -38,7 +38,7 @@ </actionGroup> <!-- Logout admin --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to Storefront as Guest and create new account --> <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="createNewCustomerAccount"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteBundleProductFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteBundleProductFromMiniShoppingCartTest.xml index 8956ed7687f06..1690612fa3242 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteBundleProductFromMiniShoppingCartTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteBundleProductFromMiniShoppingCartTest.xml @@ -46,7 +46,7 @@ <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/> <deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/> <deleteData createDataKey="createSubCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Product page in StoreFront --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromMiniShoppingCartTest.xml index d302289b27f19..8fe2ac3a74791 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromMiniShoppingCartTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromMiniShoppingCartTest.xml @@ -71,7 +71,7 @@ <deleteData createDataKey="createConfigProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteProductAttribute"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteDownloadableProductFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteDownloadableProductFromMiniShoppingCartTest.xml index dd9259833cbc4..a60fe104ce14b 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteDownloadableProductFromMiniShoppingCartTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteDownloadableProductFromMiniShoppingCartTest.xml @@ -33,7 +33,7 @@ <after> <magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove example.com static.magento.com"/> <deleteData createDataKey="createDownloadableProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open Downloadable Product page --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteProductsWithCartItemsDisplayDefaultLimitationFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteProductsWithCartItemsDisplayDefaultLimitationFromMiniShoppingCartTest.xml index 07215988c945d..992d3eab9b563 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteProductsWithCartItemsDisplayDefaultLimitationFromMiniShoppingCartTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteProductsWithCartItemsDisplayDefaultLimitationFromMiniShoppingCartTest.xml @@ -63,7 +63,7 @@ <deleteData createDataKey="simpleProduct8" stepKey="deleteProduct8"/> <deleteData createDataKey="simpleProduct9" stepKey="deleteProduct9"/> <deleteData createDataKey="simpleProduct10" stepKey="deleteProduct10"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Product1 page in StoreFront--> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleAndVirtualProductFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleAndVirtualProductFromMiniShoppingCartTest.xml index b1aa1de71293f..a6ac6d40a0ce0 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleAndVirtualProductFromMiniShoppingCartTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleAndVirtualProductFromMiniShoppingCartTest.xml @@ -32,7 +32,7 @@ <after> <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> <deleteData createDataKey="virtualProduct" stepKey="deleteVirtualproduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Add Simple Product to the cart --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleProductFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleProductFromMiniShoppingCartTest.xml index 0108b6310f59d..9e0f59f8a0e77 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleProductFromMiniShoppingCartTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteSimpleProductFromMiniShoppingCartTest.xml @@ -27,7 +27,7 @@ </before> <after> <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Add Simple Product to the cart --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml index a2007da317c00..cce4d9f0345d7 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest.xml @@ -29,7 +29,7 @@ <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> </after> @@ -114,7 +114,7 @@ <magentoCLI command="cache:flush" stepKey="flushCache"/> </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <magentoCLI stepKey="allowSpecificValue" command="config:set payment/checkmo/allowspecific 0" /> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutUsingFreeShippingAndTaxesTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutUsingFreeShippingAndTaxesTest.xml index e544cbb497f2d..3fe5f1be2a53d 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutUsingFreeShippingAndTaxesTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutUsingFreeShippingAndTaxesTest.xml @@ -108,7 +108,7 @@ <deleteData createDataKey="createTaxRule" stepKey="deleteTaxRule1"/> <createData entity="DefaultShippingMethodsConfig" stepKey="defaultShippingMethodsConfig"/> <createData entity="DefaultMinimumOrderAmount" stepKey="defaultMinimumOrderAmount"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutWithCouponAndZeroSubtotalTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutWithCouponAndZeroSubtotalTest.xml index 97004ea91f5fd..c217eca5053c1 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutWithCouponAndZeroSubtotalTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutWithCouponAndZeroSubtotalTest.xml @@ -27,7 +27,7 @@ <after> <deleteData createDataKey="virtualProduct" stepKey="deleteVirtualProduct"/> <deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Product page in StoreFront and assert product and price range --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml index cb3b8a1934e4c..d83550a82a87c 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontNotApplicableShippingMethodInReviewAndPaymentStepTest.xml @@ -83,7 +83,7 @@ <argument name="postcode" value=""/> <argument name="street" value=""/> </actionGroup> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!-- Guest Customer Test Scenario --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductNameMinicartOnCheckoutPageDifferentStoreViewsTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductNameMinicartOnCheckoutPageDifferentStoreViewsTest.xml index b678cb835f503..1fff7501f578d 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductNameMinicartOnCheckoutPageDifferentStoreViewsTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductNameMinicartOnCheckoutPageDifferentStoreViewsTest.xml @@ -32,7 +32,7 @@ <argument name="customStore" value="customStore"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create store view --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductQuantityChangesInBackendAfterCustomerCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductQuantityChangesInBackendAfterCustomerCheckoutTest.xml index e87aa31576595..44e12d1ea4039 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductQuantityChangesInBackendAfterCustomerCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontProductQuantityChangesInBackendAfterCustomerCheckoutTest.xml @@ -28,7 +28,7 @@ <after> <magentoCLI command="config:set {{DisablePaymentBankTransferConfigData.path}} {{DisablePaymentBankTransferConfigData.value}}" stepKey="enableGuestCheckout"/> <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Product page in StoreFront and assert product and price range --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontRefreshPageDuringGuestCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontRefreshPageDuringGuestCheckoutTest.xml index bb74726330b68..90896c3eb403e 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontRefreshPageDuringGuestCheckoutTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontRefreshPageDuringGuestCheckoutTest.xml @@ -30,7 +30,7 @@ <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <!-- Logout admin --> - <actionGroup ref="logout" stepKey="logoutAsAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/> </after> <!-- Add simple product to cart as Guest --> <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPage"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKCustomerCheckoutWithCouponTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKCustomerCheckoutWithCouponTest.xml index b53954709b2de..293abcb8197e1 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKCustomerCheckoutWithCouponTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKCustomerCheckoutWithCouponTest.xml @@ -44,7 +44,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/> <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderFilters"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open Downloadable Product page --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKGuestCheckoutWithConditionProductQuantityEqualsToOrderedQuantityTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKGuestCheckoutWithConditionProductQuantityEqualsToOrderedQuantityTest.xml index ba096d4a59615..04ee2e2adbf28 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKGuestCheckoutWithConditionProductQuantityEqualsToOrderedQuantityTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUKGuestCheckoutWithConditionProductQuantityEqualsToOrderedQuantityTest.xml @@ -25,7 +25,7 @@ </before> <after> <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Product page in StoreFront and assert product and price range --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUSCustomerCheckoutWithCouponAndBankTransferPaymentMethodTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUSCustomerCheckoutWithCouponAndBankTransferPaymentMethodTest.xml index e67fd938c0a74..bb3bd50072f23 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUSCustomerCheckoutWithCouponAndBankTransferPaymentMethodTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUSCustomerCheckoutWithCouponAndBankTransferPaymentMethodTest.xml @@ -32,7 +32,7 @@ <magentoCLI command="config:set {{DisablePaymentBankTransferConfigData.path}} {{DisablePaymentBankTransferConfigData.value}}" stepKey="disableBankTransferPayment"/> <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open Product page in StoreFront and assert product and price range --> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUpdatePriceInShoppingCartAfterProductSaveTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUpdatePriceInShoppingCartAfterProductSaveTest.xml index 4bff22950174f..46c4abf4eab1a 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUpdatePriceInShoppingCartAfterProductSaveTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUpdatePriceInShoppingCartAfterProductSaveTest.xml @@ -31,7 +31,7 @@ <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> <actionGroup ref="SetCustomerDataLifetimeActionGroup" stepKey="setDefaultCustomerDataLifetime"/> <magentoCLI command="indexer:reindex customer_grid" stepKey="reindexCustomerGrid"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Go to product page--> <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToSimpleProductPage"/> diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/ZeroSubtotalOrdersWithProcessingStatusTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/ZeroSubtotalOrdersWithProcessingStatusTest.xml index 0f0b98912de30..781253a707271 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Test/ZeroSubtotalOrdersWithProcessingStatusTest.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Test/ZeroSubtotalOrdersWithProcessingStatusTest.xml @@ -36,7 +36,7 @@ <createData entity="DefaultShippingMethodsConfig" stepKey="defaultShippingMethodsConfig"/> <createData entity="DisableFreeShippingConfig" stepKey="disableFreeShippingConfig"/> <createData entity="DisablePaymentMethodsSettingConfig" stepKey="disablePaymentMethodsSettingConfig"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="simpleproduct" stepKey="deleteProduct"/> <deleteData createDataKey="simplecategory" stepKey="deleteCategory"/> </after> diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml index dc329ae63ba21..1e87d73c26205 100644 --- a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml +++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveHtmlTermEntityTest.xml @@ -32,7 +32,7 @@ <actionGroup ref="DeleteTermActionGroup" stepKey="deleteTerm"> <argument name="term" value="activeHtmlTerm"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="CreateNewTermActionGroup" stepKey="createTerm"> diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveTextTermEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveTextTermEntityTest.xml index a7baa061750c5..2db3377e0e89e 100644 --- a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveTextTermEntityTest.xml +++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateActiveTextTermEntityTest.xml @@ -32,7 +32,7 @@ <actionGroup ref="DeleteTermActionGroup" stepKey="deleteTerm"> <argument name="term" value="activeTextTerm"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="CreateNewTermActionGroup" stepKey="createTerm"> diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateDisabledTextTermEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateDisabledTextTermEntityTest.xml index d5f35fc79fbed..df666ecab817b 100644 --- a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateDisabledTextTermEntityTest.xml +++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateDisabledTextTermEntityTest.xml @@ -32,7 +32,7 @@ <actionGroup ref="DeleteTermActionGroup" stepKey="deleteTerm"> <argument name="term" value="disabledTextTerm"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="CreateNewTermActionGroup" stepKey="createTerm"> diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateEnabledTextTermOnMultishippingEntityTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateEnabledTextTermOnMultishippingEntityTest.xml index 462b13ae386c4..fec2365431862 100644 --- a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateEnabledTextTermOnMultishippingEntityTest.xml +++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminCreateEnabledTextTermOnMultishippingEntityTest.xml @@ -36,7 +36,7 @@ <actionGroup ref="DeleteTermActionGroup" stepKey="deleteTerm"> <argument name="term" value="activeTextTerm"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="CreateNewTermActionGroup" stepKey="createTerm"> diff --git a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminStoresTermsAndConditionsNavigateMenuTest.xml b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminStoresTermsAndConditionsNavigateMenuTest.xml index d2d4cb9138bd5..7ffabcfa51215 100644 --- a/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminStoresTermsAndConditionsNavigateMenuTest.xml +++ b/app/code/Magento/CheckoutAgreements/Test/Mftf/Test/AdminStoresTermsAndConditionsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToStoresTermsAndConditionsPage"> <argument name="menuUiId" value="{{AdminMenuStores.dataUiId}}"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToCMSPageTinyMCE3Test.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToCMSPageTinyMCE3Test.xml index 69f9d24699db0..f54547015eb9c 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToCMSPageTinyMCE3Test.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToCMSPageTinyMCE3Test.xml @@ -28,7 +28,7 @@ <!-- Switch WYSIWYG editor to TinyMCE4--> <comment userInput="Reset editor as TinyMCE4" stepKey="chooseTinyMCE4AsEditor"/> <magentoCLI command="config:set cms/wysiwyg/editor mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter" stepKey="enableTinyMCE4"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{CmsNewPagePage.url}}" stepKey="navigateToPage2"/> <waitForPageLoad stepKey="wait5"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGBlockTest.xml index 64b775c6cbef9..e22f6e085a32b 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGBlockTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGBlockTest.xml @@ -20,7 +20,7 @@ <before> <createData entity="_defaultCmsPage" stepKey="createCMSPage" /> <createData entity="_defaultBlock" stepKey="createPreReqBlock" /> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -63,7 +63,7 @@ <deleteData createDataKey="createPreReqBlock" stepKey="deletePreReqBlock" /> <deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" /> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGCMSTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGCMSTest.xml index 201a84ecb3c65..51afa7b59d366 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGCMSTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddImageToWYSIWYGCMSTest.xml @@ -19,7 +19,7 @@ </annotations> <before> <createData entity="_defaultCmsPage" stepKey="createCMSPage" /> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -58,7 +58,7 @@ <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYGFirst"/> <deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" /> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGBlockTest.xml index cc7f59c7a9478..32bd75d373115 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGBlockTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGBlockTest.xml @@ -20,7 +20,7 @@ <before> <createData entity="_defaultCmsPage" stepKey="createCMSPage" /> <createData entity="_defaultBlock" stepKey="createPreReqBlock" /> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -143,7 +143,7 @@ <deleteData createDataKey="createPreReqBlock" stepKey="deletePreReqBlock" /> <deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" /> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGCMSTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGCMSTest.xml index 92164f34f5a83..55c01f3818a19 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGCMSTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGCMSTest.xml @@ -17,7 +17,7 @@ <testCaseId value="MAGETWO-83504"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -95,7 +95,7 @@ <dontSee userInput="{{customVariable.html}}" stepKey="dontSeeCustomVariableName" /> <after> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGBlockTest.xml index 24440a6164e84..e5aecd0f3da81 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGBlockTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGBlockTest.xml @@ -20,7 +20,7 @@ <before> <createData entity="_defaultCmsPage" stepKey="createCMSPage" /> <createData entity="_defaultBlock" stepKey="createPreReqBlock" /> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -81,7 +81,7 @@ <deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" /> <deleteData createDataKey="createPreReqBlock" stepKey="deletePreReqBlock" /> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeTest.xml index 53ed63c89bfb6..5f9bfaf47a157 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeTest.xml @@ -19,7 +19,7 @@ <testCaseId value="MAGETWO-83781"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -67,7 +67,7 @@ <see userInput="Home page" stepKey="seeHomepageWidget" /> <after> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeTest.xml index c199601231a13..81826eeab5e10 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeTest.xml @@ -20,7 +20,7 @@ </annotations> <before> <createData entity="_defaultBlock" stepKey="createPreReqBlock" /> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -69,7 +69,7 @@ <after> <deleteData createDataKey="createPreReqBlock" stepKey="deletePreReqBlock" /> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeTest.xml index 0237d3704f7c1..5d745c625ac10 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeTest.xml @@ -19,7 +19,7 @@ </annotations> <before> <createData entity="_defaultCategory" stepKey="createPreReqCategory"/> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> <actionGroup ref="ConfigAdminAccountSharingActionGroup" stepKey="allowAdminShareAccount"/> @@ -77,7 +77,7 @@ <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCatalog" /> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="enableGenerateUrlRewrite"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeTest.xml index 4e7ecd48a6af4..940c1979710e1 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeTest.xml @@ -23,7 +23,7 @@ <createData entity="_defaultProduct" stepKey="createPreReqProduct"> <requiredEntity createDataKey="createPreReqCategory"/> </createData> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -84,7 +84,7 @@ <deleteData createDataKey="createPreReqProduct" stepKey="deletePreReqProduct" /> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="enableGenerateUrlRewrite"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeTest.xml index 2cd41eb9d9f7b..f849c31948c3c 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeTest.xml @@ -25,7 +25,7 @@ <createData entity="_defaultProduct" stepKey="createPreReqProduct2"> <requiredEntity createDataKey="createPreReqCategory"/> </createData> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -100,7 +100,7 @@ <deleteData createDataKey="createPreReqProduct1" stepKey="deletePreReqProduct1" /> <deleteData createDataKey="createPreReqProduct2" stepKey="deletePreReqProduct2" /> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeTest.xml index 803a3b692dbe2..f4f1da8763fbb 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeTest.xml @@ -24,7 +24,7 @@ <createData entity="_defaultProduct" stepKey="createPreReqProduct"> <requiredEntity createDataKey="createPreReqCategory"/> </createData> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -83,7 +83,7 @@ <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCatalog" /> <deleteData createDataKey="createPreReqProduct" stepKey="deletePreReqProduct" /> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeTest.xml index 2c3b060d3bc15..d9c080e034dd2 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeTest.xml @@ -23,7 +23,7 @@ <createData entity="_defaultProduct" stepKey="createPreReqProduct"> <requiredEntity createDataKey="createPreReqCategory"/> </createData> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -73,7 +73,7 @@ <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCatalog" /> <deleteData createDataKey="createPreReqProduct" stepKey="deletePreReqProduct" /> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreateDisabledPageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreateDisabledPageTest.xml index a5f43b090e9d6..3c6d70dc53418 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreateDisabledPageTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreateDisabledPageTest.xml @@ -24,7 +24,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Go to New CMS Page page--> <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="navigateToCreateNewPage"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageForDefaultStoreTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageForDefaultStoreTest.xml index d63952f7eb6c8..036efab75f963 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageForDefaultStoreTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageForDefaultStoreTest.xml @@ -24,7 +24,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Go to New CMS Page page--> <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="navigateToCreateNewPage"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageInSingleStoreModeTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageInSingleStoreModeTest.xml index d2124b5d83be6..1b3a7e74af08f 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageInSingleStoreModeTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageInSingleStoreModeTest.xml @@ -26,7 +26,7 @@ </before> <after> <magentoCLI command="config:set {{StorefrontSingleStoreModeDisabledConfigData.path}} {{StorefrontSingleStoreModeDisabledConfigData.value}}" stepKey="disableSingleStoreMode" /> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Go to New CMS Page page--> <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="navigateToCreateNewPage"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageTest.xml index d33d7484f7770..a097a6d11403e 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageTest.xml @@ -24,7 +24,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Go to New CMS Page page--> <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="navigateToCreateNewPage"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageWithBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageWithBlockTest.xml index 1600a0d9d8d0f..9c2f1abc4d522 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageWithBlockTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCMSPageCreatePageWithBlockTest.xml @@ -24,7 +24,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Go to New CMS Page page--> <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="navigateToCreateNewPage"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageMassActionTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageMassActionTest.xml index 7cc0719dcbeb2..f2ad852a90b0e 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageMassActionTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageMassActionTest.xml @@ -27,7 +27,7 @@ <after> <deleteData createDataKey="firstCMSPage" stepKey="deleteFirstCMSPage" /> <deleteData createDataKey="secondCMSPage" stepKey="deleteSecondCMSPage" /> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Go to Grid page--> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigDefaultCMSPageLayoutFromConfigurationSettingTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigDefaultCMSPageLayoutFromConfigurationSettingTest.xml index ee06b4ce86656..99990595fca95 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigDefaultCMSPageLayoutFromConfigurationSettingTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminConfigDefaultCMSPageLayoutFromConfigurationSettingTest.xml @@ -23,7 +23,7 @@ </before> <after> <actionGroup ref="RestoreLayoutSetting" stepKey="sampleActionGroup"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{WebConfigurationPage.url}}" stepKey="navigateToWebConfigurationPage"/> <waitForPageLoad stepKey="waitForPageLoad"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminContentBlocksNavigateMenuTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminContentBlocksNavigateMenuTest.xml index 19f501d6aa209..bb15904540be4 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminContentBlocksNavigateMenuTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminContentBlocksNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToContentBlocksPage"> <argument name="menuUiId" value="{{AdminMenuContent.dataUiId}}"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminContentPagesNavigateMenuTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminContentPagesNavigateMenuTest.xml index 323a1de7b9a4e..c7726e7e427ce 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminContentPagesNavigateMenuTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminContentPagesNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToContentPagesPage"> <argument name="menuUiId" value="{{AdminMenuContent.dataUiId}}"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsBlockTest.xml index 7e7d942140645..eb13bb71b5f6b 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsBlockTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsBlockTest.xml @@ -20,13 +20,13 @@ <group value="WYSIWYGDisabled"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> </before> <after> <actionGroup ref="deleteBlock" stepKey="deleteCreatedBlock"> <argument name="Block" value="_defaultBlock"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Navigate to create cms block page and verify save split button --> <actionGroup ref="VerifyCmsBlockSaveSplitButtonActionGroup" stepKey="verifyCmsBlockSaveButton" /> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsPageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsPageTest.xml index 82bcb295c2a9a..b2fca0ff99115 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsPageTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsPageTest.xml @@ -20,10 +20,10 @@ <group value="WYSIWYGDisabled"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <actionGroup ref="AdminNavigateToPageGridActionGroup" stepKey="navigateToCmsPageGrid" /> <actionGroup ref="CreateNewPageWithBasicValues" stepKey="createNewPageWithBasicValues" /> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDuplicatedCmsPageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDuplicatedCmsPageTest.xml index 5c5fccf761aa1..da333924ec81f 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDuplicatedCmsPageTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDuplicatedCmsPageTest.xml @@ -20,10 +20,10 @@ <group value="WYSIWYGDisabled"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{CmsNewPagePage.url}}" stepKey="amOnPageCreationForm"/> <waitForPageLoad stepKey="waitForPageLoad1"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminMediaGalleryPopupUploadImagesWithoutErrorTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminMediaGalleryPopupUploadImagesWithoutErrorTest.xml index ff389a6ce2965..58803533efaf2 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminMediaGalleryPopupUploadImagesWithoutErrorTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminMediaGalleryPopupUploadImagesWithoutErrorTest.xml @@ -26,14 +26,14 @@ <!--Create block--> <comment userInput="Create block" stepKey="commentCreateBlock"/> <createData entity="Sales25offBlock" stepKey="createBlock"/> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> </before> <after> <!--Disable WYSIWYG options--> <comment userInput="Disable WYSIWYG options" stepKey="commentDisableWYSIWYG"/> <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> <deleteData createDataKey="createBlock" stepKey="deleteBlock" /> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open created block page and add image--> <comment userInput="Open create block page and add image" stepKey="commentOpenBlockPage"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/AdminSaveAndCloseCmsBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/AdminSaveAndCloseCmsBlockTest.xml index 23f602d7b1005..e2800c2ac3094 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/AdminSaveAndCloseCmsBlockTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/AdminSaveAndCloseCmsBlockTest.xml @@ -28,7 +28,7 @@ <argument name="Block" value="_defaultBlock"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="resetGridFilters"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!-- Navigate to create cms block page and verify save split button --> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/CheckOrderOfProdsInWidgetOnCMSPageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/CheckOrderOfProdsInWidgetOnCMSPageTest.xml index afcf5e3764ef7..58adae02298b7 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/CheckOrderOfProdsInWidgetOnCMSPageTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/CheckOrderOfProdsInWidgetOnCMSPageTest.xml @@ -39,7 +39,7 @@ <deleteData createDataKey="product1" stepKey="deleteProduct1"/> <deleteData createDataKey="product2" stepKey="deleteProduct2"/> <deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage1"> <argument name="CMSPage" value="$$createCMSPage$$"/> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/StoreViewLanguageCorrectSwitchTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/StoreViewLanguageCorrectSwitchTest.xml index 6569c07f4580a..a73e41de6b861 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/StoreViewLanguageCorrectSwitchTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/StoreViewLanguageCorrectSwitchTest.xml @@ -32,7 +32,7 @@ <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"> <argument name="customStore" value="NewStoreViewData"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create StoreView --> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockTest.xml index 944cd02d87b86..58f3b9d5bd3b1 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockTest.xml @@ -20,7 +20,7 @@ </annotations> <before> <createData entity="_defaultCmsPage" stepKey="createPreReqCMSPage" /> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -91,7 +91,7 @@ <waitForPageLoad stepKey="waitForGridReload"/> <deleteData createDataKey="createPreReqCMSPage" stepKey="deletePreReqCMSPage" /> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageTest.xml index 24377e92fe083..43615ac906b00 100644 --- a/app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageTest.xml +++ b/app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnCMSPageTest.xml @@ -19,7 +19,7 @@ <testCaseId value="MAGETWO-84182 "/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -51,7 +51,7 @@ <see userInput="Hello World!" stepKey="seeContent" /> <after> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml b/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml index 1d54f2ef52c02..32fa1d13023de 100644 --- a/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml +++ b/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml @@ -30,7 +30,7 @@ </actionGroup> <actionGroup ref="AdminClearCustomersFiltersActionGroup" stepKey="clearFilters"/> <waitForPageLoad stepKey="WaitForPageToLoad"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Flush Magento Cache--> <magentoCLI stepKey="flushCache" command="cache:flush"/> diff --git a/app/code/Magento/Config/Test/Mftf/Test/ConfigurationTest.xml b/app/code/Magento/Config/Test/Mftf/Test/ConfigurationTest.xml index 66aacf706b039..916a5a09a09c0 100644 --- a/app/code/Magento/Config/Test/Mftf/Test/ConfigurationTest.xml +++ b/app/code/Magento/Config/Test/Mftf/Test/ConfigurationTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{CatalogConfigPage.url}}" stepKey="navigateToConfigurationPage" /> <waitForPageLoad stepKey="waitForPageLoad"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddingNewOptionsWithImagesAndPricesToConfigurableProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddingNewOptionsWithImagesAndPricesToConfigurableProductTest.xml index a70a62470ecbc..543ead3f6732a 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddingNewOptionsWithImagesAndPricesToConfigurableProductTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAddingNewOptionsWithImagesAndPricesToConfigurableProductTest.xml @@ -34,7 +34,7 @@ <actionGroup ref="DeleteProductActionGroup" stepKey="deleteProduct1"> <argument name="productName" value="$$createConfigProductCreateConfigurableProduct.name$$"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open edit product page--> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAssertNoticeThatExistingSkuAutomaticallyChangedWhenSavingProductWithSameSkuTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAssertNoticeThatExistingSkuAutomaticallyChangedWhenSavingProductWithSameSkuTest.xml index 1613452dfc47c..a6c3794a2d622 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAssertNoticeThatExistingSkuAutomaticallyChangedWhenSavingProductWithSameSkuTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminAssertNoticeThatExistingSkuAutomaticallyChangedWhenSavingProductWithSameSkuTest.xml @@ -32,7 +32,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create configurable product --> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckConfigurableProductAttributeValueUniquenessTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckConfigurableProductAttributeValueUniquenessTest.xml index 4288684e53d27..79d109de31821 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckConfigurableProductAttributeValueUniquenessTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckConfigurableProductAttributeValueUniquenessTest.xml @@ -33,7 +33,7 @@ <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProductAttribute" stepKey="deleteAttribute"/> - <actionGroup ref="logout" stepKey="logOut"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logOut"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckResultsOfColorAndOtherFiltersTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckResultsOfColorAndOtherFiltersTest.xml index 0b3d013660b6e..7843d387eb2b9 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckResultsOfColorAndOtherFiltersTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckResultsOfColorAndOtherFiltersTest.xml @@ -109,7 +109,7 @@ <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductAttributesFilter"/> <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductsGridFilter"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckValidatorConfigurableProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckValidatorConfigurableProductTest.xml index 92a6dcad27b30..635e4c6f84c72 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckValidatorConfigurableProductTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckValidatorConfigurableProductTest.xml @@ -43,7 +43,7 @@ <actionGroup ref="DeleteProductAttributeActionGroup" stepKey="deleteAttribute"> <argument name="ProductAttribute" value="productDropDownAttribute"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest.xml index 2a1c38ee135eb..692ba32c6db28 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductCreateTest.xml @@ -26,7 +26,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Create a configurable product via the UI --> @@ -92,7 +92,7 @@ <after> <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{AdminProductEditPage.url($$createConfigProduct.id$$)}}" stepKey="goToEditPage"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest.xml index 68afa17c4d539..eabeb1b6881a0 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductDeleteTest.xml @@ -66,7 +66,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> @@ -219,7 +219,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> <deleteData createDataKey="createConfigChildProduct3" stepKey="deleteConfigChildProduct3"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml index fc1f6dad36345..24a7a590566bd 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml @@ -52,7 +52,7 @@ <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> <!--Clean up category--> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest.xml index 48a33bfd14d9c..2ab3a9e6e60c9 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest.xml @@ -77,7 +77,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> @@ -203,7 +203,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> @@ -307,7 +307,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest.xml index a73a7082502d8..7c20574868a66 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductSearchTest.xml @@ -68,7 +68,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> @@ -150,7 +150,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest.xml index e95a73dcebba0..fc10b2cc3b4e3 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateAttributeTest.xml @@ -96,7 +96,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <!-- Delete everything that was created in the before block --> <deleteData createDataKey="createCategory" stepKey="deleteCatagory" /> @@ -216,7 +216,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <!-- Delete everything that was created in the before block --> <deleteData createDataKey="createCategory" stepKey="deleteCatagory" /> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest.xml index 1eb1d8df6030c..be039eb2f3389 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest.xml @@ -41,7 +41,7 @@ <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductList"/> <waitForPageLoad stepKey="waitForPageLoad"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search for prefix of the 3 products we created via api --> @@ -286,7 +286,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Create a configurable product via the UI --> @@ -335,7 +335,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Create a configurable product via the UI --> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndEditConfigurableProductSettingsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndEditConfigurableProductSettingsTest.xml index 6632cbcee30f2..2503af780d5d3 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndEditConfigurableProductSettingsTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndEditConfigurableProductSettingsTest.xml @@ -24,7 +24,7 @@ </before> <after> <!-- Log out --> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Create a configurable product --> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndSwitchProductType.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndSwitchProductType.xml index fa515c89fa460..7e2639c7e6e25 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndSwitchProductType.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndSwitchProductType.xml @@ -149,7 +149,7 @@ <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> <deleteData stepKey="deleteAttribute" createDataKey="createConfigProductAttribute"/> <magentoCLI command="cron:run --group=index" stepKey="runCron"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create configurable product from downloadable product page--> <comment userInput="Create configurable product" stepKey="commentCreateProduct"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductBasedOnParentSkuTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductBasedOnParentSkuTest.xml index 578e908664ecb..41ba0fc048120 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductBasedOnParentSkuTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductBasedOnParentSkuTest.xml @@ -32,7 +32,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create configurable product --> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithCreatingCategoryAndAttributeTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithCreatingCategoryAndAttributeTest.xml index 363daa0ec8bb2..cef95ec7835d0 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithCreatingCategoryAndAttributeTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithCreatingCategoryAndAttributeTest.xml @@ -49,7 +49,7 @@ <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create configurable product --> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithDisabledChildrenProductsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithDisabledChildrenProductsTest.xml index d3db180cb7999..586a22982b334 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithDisabledChildrenProductsTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithDisabledChildrenProductsTest.xml @@ -53,7 +53,7 @@ <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml index 37d5d515bb9e0..7f03efbc7fd65 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml @@ -56,7 +56,7 @@ <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDisplayOutOfStockProductsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDisplayOutOfStockProductsTest.xml index 299fbca412fac..41a446e6bc320 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDisplayOutOfStockProductsTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDisplayOutOfStockProductsTest.xml @@ -76,7 +76,7 @@ <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDontDisplayOutOfStockProductsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDontDisplayOutOfStockProductsTest.xml index 0aa0f22d6af2e..95891b286ab53 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDontDisplayOutOfStockProductsTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDontDisplayOutOfStockProductsTest.xml @@ -75,7 +75,7 @@ <magentoCLI command="cron:run --group=index" stepKey="runCron"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTierPriceForOneItemTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTierPriceForOneItemTest.xml index a2cd949a77d13..f9729c42f0acf 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTierPriceForOneItemTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTierPriceForOneItemTest.xml @@ -64,7 +64,7 @@ <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsAssignedToCategoryTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsAssignedToCategoryTest.xml index 6ab4734a074a5..4c39b0c2a54fb 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsAssignedToCategoryTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsAssignedToCategoryTest.xml @@ -52,7 +52,7 @@ <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create configurable product --> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsWithoutAssignedToCategoryTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsWithoutAssignedToCategoryTest.xml index 14303aa9b650b..31851fc78968b 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsWithoutAssignedToCategoryTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsWithoutAssignedToCategoryTest.xml @@ -45,7 +45,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create configurable product --> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminDeleteConfigurableProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminDeleteConfigurableProductTest.xml index c2edbaa4e6e87..68f86a7d07890 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminDeleteConfigurableProductTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminDeleteConfigurableProductTest.xml @@ -26,7 +26,7 @@ </before> <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteConfigurableProductFilteredBySkuAndName"> <argument name="product" value="$$createConfigurableProduct$$"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest.xml index f441579a6ef42..e308bafb2ac46 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest.xml @@ -43,7 +43,7 @@ <argument name="product" value="$$createProduct$$"/> </actionGroup> <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductFilters"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> @@ -150,7 +150,7 @@ <argument name="product" value="$$createProduct$$"/> </actionGroup> <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductFilters"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml index 7bb8661627b8c..49a1ab6b5e11d 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml @@ -77,7 +77,7 @@ <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteSecondWebsite"> <argument name="websiteName" value="Second Website"/> </actionGroup> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> </after> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoErrorForMiniCartItemEditTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoErrorForMiniCartItemEditTest.xml index 914550fabf39b..18993269ab0b1 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoErrorForMiniCartItemEditTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoErrorForMiniCartItemEditTest.xml @@ -35,7 +35,7 @@ <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go To Created Product Page --> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml index 0e46027a69378..55a109aee4b37 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml @@ -102,7 +102,7 @@ <deleteData createDataKey="createConfigChildProduct3" stepKey="deleteConfigChildProduct3"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> <deleteData createDataKey="createCustomer" stepKey="deleteCreatedCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml index 6045ca5567b45..24c60006a3504 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml @@ -32,7 +32,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> - <actionGroup ref="logout" stepKey="amOnLogoutPage"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/> </after> <amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage1"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml index a0f3689b9c170..eaf9fa689d218 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml @@ -132,7 +132,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest.xml index 5d5481938f404..387f2e212c4aa 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest.xml @@ -35,7 +35,7 @@ <argument name="sku" value="{{_defaultProduct.sku}}"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Verify configurable product details in storefront product view --> @@ -80,7 +80,7 @@ <argument name="sku" value="{{_defaultProduct.sku}}"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Verify configurable product options in storefront product view --> @@ -125,7 +125,7 @@ <argument name="sku" value="{{_defaultProduct.sku}}"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Verify adding configurable product to cart after an option is selected in storefront product view --> @@ -167,7 +167,7 @@ <argument name="sku" value="{{_defaultProduct.sku}}"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Verify not able to add configurable product to cart when no option is selected in storefront product view --> @@ -219,7 +219,7 @@ <deleteData createDataKey="createFirstAttribute" stepKey="deleteFirstAttribute"/> <deleteData createDataKey="createSecondAttribute" stepKey="deleteSecondAttribute"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest.xml index bfdadd54b872c..7e9ee68b9f2f7 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest.xml @@ -37,7 +37,7 @@ <actionGroup stepKey="deleteProduct" ref="DeleteProductBySkuActionGroup"> <argument name="sku" value="{{_defaultProduct.sku}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Verify the storefront category grid view --> @@ -73,7 +73,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Verify storefront category list view --> @@ -111,7 +111,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Should be taken to product details page when adding to cart because an option needs to be selected --> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductWithFileCustomOptionTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductWithFileCustomOptionTest.xml index e24c8e4d94916..4de8dedefab48 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductWithFileCustomOptionTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductWithFileCustomOptionTest.xml @@ -25,7 +25,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontShouldSeeOnlyConfigurableProductChildAssignedToSeparateCategoryTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontShouldSeeOnlyConfigurableProductChildAssignedToSeparateCategoryTest.xml index 324050608829a..fc32a1ca6ac8c 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontShouldSeeOnlyConfigurableProductChildAssignedToSeparateCategoryTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontShouldSeeOnlyConfigurableProductChildAssignedToSeparateCategoryTest.xml @@ -94,7 +94,7 @@ <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> <deleteData createDataKey="createCategory" stepKey="deleteApiCategory"/> <deleteData createDataKey="secondCategory" stepKey="deleteSecondCategory"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontSortingByPriceForConfigurableWithCatalogRuleAppliedTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontSortingByPriceForConfigurableWithCatalogRuleAppliedTest.xml index ce5bad8c333a6..fcb9811a93dfa 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontSortingByPriceForConfigurableWithCatalogRuleAppliedTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontSortingByPriceForConfigurableWithCatalogRuleAppliedTest.xml @@ -121,7 +121,7 @@ <argument name="option" value="No"/> </actionGroup> <actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllRules"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml index adaa302a23a52..32f9d78828ed1 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml @@ -116,7 +116,7 @@ <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> <deleteData createDataKey="createConfigChildProduct3" stepKey="deleteConfigChildProduct3"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteAttribute"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVisibilityOfDuplicateProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVisibilityOfDuplicateProductTest.xml index b8b0007c63d5f..6befc15044cc5 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVisibilityOfDuplicateProductTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVisibilityOfDuplicateProductTest.xml @@ -45,7 +45,7 @@ </actionGroup> <click selector="{{AdminProductAttributeGridSection.ResetFilter}}" stepKey="resetFiltersOnGridSecond"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create attribute and options for product--> <comment userInput="Create attribute and options for product" stepKey="commentCreateAttributesAndOptions"/> diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyConverterAPIConfigurationTest.xml b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyConverterAPIConfigurationTest.xml index 6232f59bb839a..eb3ca4f977c65 100644 --- a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyConverterAPIConfigurationTest.xml +++ b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyConverterAPIConfigurationTest.xml @@ -40,7 +40,7 @@ <!--Delete created data--> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Import rates from Currency Converter API--> <amOnPage url="{{AdminCurrencyRatesPage.url}}" stepKey="onCurrencyRatePage"/> diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminDefaultCurrencySymbolsAreDisabledTest.xml b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminDefaultCurrencySymbolsAreDisabledTest.xml index a04128c3d5ded..7e1cb41871d43 100644 --- a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminDefaultCurrencySymbolsAreDisabledTest.xml +++ b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminDefaultCurrencySymbolsAreDisabledTest.xml @@ -23,7 +23,7 @@ </before> <after> <magentoCLI command="config:set --scope={{SetAllowedCurrenciesConfigForUSD.scope}} --scope-code={{SetAllowedCurrenciesConfigForUSD.scope_code}} {{SetAllowedCurrenciesConfigForUSD.path}} {{SetAllowedCurrenciesConfigForUSD.value}},{{SetAllowedCurrenciesConfigForEUR.value}}" stepKey="setAllowedCurrencyWebsites_EUR_USD"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateToCurrencySymbolsPageActionGroup" stepKey="navigateToCurrencySymbolsPage"/> <actionGroup ref="AssertAdminCurrencySymbolIsDisabledActionGroup" stepKey="assertEURDisabledInput"> diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayWhenChooseThreeAllowedCurrenciesTest.xml b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayWhenChooseThreeAllowedCurrenciesTest.xml index 100aa39613b33..8f87246bcf018 100644 --- a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayWhenChooseThreeAllowedCurrenciesTest.xml +++ b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayWhenChooseThreeAllowedCurrenciesTest.xml @@ -32,7 +32,7 @@ <!--Delete created product--> <comment userInput="Delete created product" stepKey="commentDeleteCreatedProduct"/> <deleteData createDataKey="createNewProduct" stepKey="deleteNewProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Set currency rates--> <amOnPage url="{{AdminCurrencyRatesPage.url}}" stepKey="gotToCurrencyRatesPageSecondTime"/> diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayedInOneLineTest.xml b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayedInOneLineTest.xml index 94c9bc67e34c4..8c61bd4434fff 100644 --- a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayedInOneLineTest.xml +++ b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayedInOneLineTest.xml @@ -46,7 +46,7 @@ <magentoCLI command="config:set --scope={{SetCurrencyUSDBaseConfig.scope}} --scope-code={{SetCurrencyUSDBaseConfig.scope_code}} {{SetCurrencyUSDBaseConfig.path}} {{SetCurrencyUSDBaseConfig.value}}" stepKey="setCurrencyBaseUSDWebsites"/> <magentoCLI command="config:set --scope={{SetDefaultCurrencyUSDConfig.scope}} --scope-code={{SetDefaultCurrencyUSDConfig.scope_code}} {{SetDefaultCurrencyUSDConfig.path}} {{SetDefaultCurrencyUSDConfig.value}}" stepKey="setCurrencyDefaultUSDWebsites"/> <magentoCLI command="config:set --scope={{SetAllowedCurrenciesConfigForUSD.scope}} --scope-code={{SetAllowedCurrenciesConfigForUSD.scope_code}} {{SetAllowedCurrenciesConfigForUSD.path}} {{SetAllowedCurrenciesConfigForUSD.value}}" stepKey="setAllowedCurrencyUSDWebsites"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open created product on Storefront and place for order--> <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPage"/> diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencyRatesNavigateMenuTest.xml b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencyRatesNavigateMenuTest.xml index 4a33d40d2a35f..a5781698deed4 100644 --- a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencyRatesNavigateMenuTest.xml +++ b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencyRatesNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToStoresCurrencyRatesPage"> <argument name="menuUiId" value="{{AdminMenuStores.dataUiId}}"/> diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencySymbolsNavigateMenuTest.xml b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencySymbolsNavigateMenuTest.xml index 978917772f2dd..65afd4e2e744a 100644 --- a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencySymbolsNavigateMenuTest.xml +++ b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminStoresCurrencySymbolsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToStoresCurrencySymbolsPage"> <argument name="menuUiId" value="{{AdminMenuStores.dataUiId}}"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminAddNewDefaultBillingShippingCustomerAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminAddNewDefaultBillingShippingCustomerAddressTest.xml index fba7ebd2d4d5e..5600b6088cfe5 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminAddNewDefaultBillingShippingCustomerAddressTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminAddNewDefaultBillingShippingCustomerAddressTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="customer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- - Step1. Login to admin and go to Customers > All Customers. diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeCustomerGenderInCustomersGridTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeCustomerGenderInCustomersGridTest.xml index 7ca9a6993f2fc..30c441796c435 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeCustomerGenderInCustomersGridTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeCustomerGenderInCustomersGridTest.xml @@ -30,7 +30,7 @@ <waitForPageLoad stepKey="waitForCustomersGrid"/> <actionGroup ref="AdminResetFilterInCustomerGrid" stepKey="resetFilter"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open customers grid page, filter by created customer--> <actionGroup ref="AdminFilterCustomerByEmail" stepKey="filterCustomerGridByEmail"> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeSingleCustomerGroupViaGridTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeSingleCustomerGroupViaGridTest.xml index 2478334de3baf..908977da25d36 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeSingleCustomerGroupViaGridTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminChangeSingleCustomerGroupViaGridTest.xml @@ -31,7 +31,7 @@ <deleteData createDataKey="createCustomerGroup" stepKey="deleteCustomerGroup"/> <actionGroup ref="NavigateToAllCustomerPage" stepKey="navigateToCustomersPage"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearCustomersGridFilter"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <actionGroup ref="NavigateToAllCustomerPage" stepKey="navigateToCustomersPage"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsNoTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsNoTest.xml index be96765920bf5..aa23fc0670a88 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsNoTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsNoTest.xml @@ -24,7 +24,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <actionGroup ref="AdminNavigateNewCustomerActionGroup" stepKey="navigateToNewCustomer"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsYesTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsYesTest.xml index 87cba0c10dbc1..d7c4fb2d68772 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsYesTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsYesTest.xml @@ -26,7 +26,7 @@ <after> <magentoCLI command="config:set customer/create_account/viv_disable_auto_group_assign_default 0" stepKey="setConfigDefaultIsNo"/> <magentoCLI command="cache:flush" stepKey="flushCache"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <actionGroup ref="AdminNavigateNewCustomerActionGroup" stepKey="navigateToNewCustomer"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerGroupAlreadyExistsTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerGroupAlreadyExistsTest.xml index 6b1c1f29f97fc..dd065adc7f417 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerGroupAlreadyExistsTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerGroupAlreadyExistsTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Steps: 1. Log in to backend as admin user. 2. Navigate to Stores > Other Settings > Customer Groups. diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerRetailerWithoutAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerRetailerWithoutAddressTest.xml index 36592ab38e91d..436d7838fc6b7 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerRetailerWithoutAddressTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerRetailerWithoutAddressTest.xml @@ -25,7 +25,7 @@ <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteCustomer"> <argument name="email" value="{{CustomerEntityOne.email}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Filter the customer From grid--> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml index a11fb9d0eaa8f..2021b589790cf 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml @@ -23,7 +23,7 @@ <magentoCLI command="indexer:reindex customer_grid" stepKey="reindexCustomerGrid"/> </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryPolandTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryPolandTest.xml index d2435a093046a..3482f150ebaad 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryPolandTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryPolandTest.xml @@ -24,7 +24,7 @@ </before> <after> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Filter the created customer From grid--> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryUSATest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryUSATest.xml index a487571c43534..7d19f2fcf096b 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryUSATest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCountryUSATest.xml @@ -24,7 +24,7 @@ </before> <after> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Filter the customer From grid--> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCustomGroupTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCustomGroupTest.xml index 872da149ed0b2..e16a01bc3222b 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCustomGroupTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCustomGroupTest.xml @@ -27,7 +27,7 @@ <argument name="email" value="{{CustomerEntityOne.email}}" /> </actionGroup> <deleteData createDataKey="customerGroup" stepKey="deleteCustomerGroup"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open New Customer Page --> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithPrefixTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithPrefixTest.xml index 1b901a7b3e1cd..6b2655b5deaaf 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithPrefixTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithPrefixTest.xml @@ -25,7 +25,7 @@ <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteCustomer"> <argument name="email" value="{{CustomerEntityOne.email}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open New Customer Page and create a customer with Prefix and Suffix--> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithoutAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithoutAddressTest.xml index fe4bb3ee59e6e..7889f2be57a4c 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithoutAddressTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithoutAddressTest.xml @@ -25,7 +25,7 @@ <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteCustomer"> <argument name="email" value="{{CustomerEntityOne.email}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open New Customer Page --> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontSignupNewsletterTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontSignupNewsletterTest.xml index 5d09f819bcbc0..3810da9d62427 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontSignupNewsletterTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontSignupNewsletterTest.xml @@ -26,7 +26,7 @@ <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteNewUser"> <argument name="email" value="{{CustomerEntityOne.email}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create new customer on storefront and signup news letter--> @@ -51,4 +51,4 @@ <waitForPageLoad stepKey="waitForNewsletterTabToOpen"/> <seeCheckboxIsChecked selector="{{AdminEditCustomerNewsletterSection.subscribedStatus('1')}}" stepKey="seeAssertSubscribedToNewsletterCheckboxIsChecked"/> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontTest.xml index fc65a271a8196..116ba3773efff 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerOnStorefrontTest.xml @@ -26,7 +26,7 @@ <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteNewUser"> <argument name="email" value="{{CustomerEntityOne.email}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create new customer on storefront and perform the asserts--> @@ -37,4 +37,4 @@ <argument name="customer" value="CustomerEntityOne"/> </actionGroup> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerTest.xml index de4ab9ffaa121..49d23c7787554 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateNewCustomerTest.xml @@ -25,7 +25,7 @@ <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteCustomer"> <argument name="email" value="{{CustomerEntityOne.email}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open New Customer Page --> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateRetailCustomerGroupTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateRetailCustomerGroupTest.xml index 6e08d98a53c56..e0c1c0012f5bc 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateRetailCustomerGroupTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateRetailCustomerGroupTest.xml @@ -27,7 +27,7 @@ <argument name="customerGroupName" value="{{CustomCustomerGroup.code}}"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilters"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Steps: 1. Log in to backend as admin user. 2. Navigate to Stores > Other Settings > Customer Groups. diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateTaxClassCustomerGroupTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateTaxClassCustomerGroupTest.xml index 4b539ec350435..d89b755492cec 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateTaxClassCustomerGroupTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateTaxClassCustomerGroupTest.xml @@ -33,7 +33,7 @@ </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilters"/> <deleteData createDataKey="createCustomerTaxClass" stepKey="deleteCustomerTaxClass"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Steps: 1. Log in to backend as admin user. 2. Navigate to Stores > Other Settings > Customer Groups. diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomerSubscribeNewsletterPerWebsiteTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomerSubscribeNewsletterPerWebsiteTest.xml index 6c1a27c395917..06c0593ad00c4 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomerSubscribeNewsletterPerWebsiteTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomerSubscribeNewsletterPerWebsiteTest.xml @@ -32,7 +32,7 @@ <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite"> <argument name="websiteName" value="{{secondCustomWebsite.name}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <createData entity="CustomerAccountSharingDefault" stepKey="setConfigCustomerAccountDefault"/> </after> @@ -98,4 +98,4 @@ <argument name="storeView" value="SecondStoreUnique"/> </actionGroup> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersAllCustomersNavigateMenuTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersAllCustomersNavigateMenuTest.xml index 76e4407675e4c..d4551c0cd0af9 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersAllCustomersNavigateMenuTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersAllCustomersNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToAllCustomerPage"> <argument name="menuUiId" value="{{AdminMenuCustomers.dataUiId}}"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersCustomerGroupsNavigateMenuTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersCustomerGroupsNavigateMenuTest.xml index 13a4b1c714337..7c1a0722ef912 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersCustomerGroupsNavigateMenuTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersCustomerGroupsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToCustomerGroupsPage"> <argument name="menuUiId" value="{{AdminMenuCustomers.dataUiId}}"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersNowOnlineNavigateMenuTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersNowOnlineNavigateMenuTest.xml index e9eb7803e01ea..828fc60f0b77f 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersNowOnlineNavigateMenuTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCustomersNowOnlineNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToNowOnlinePage"> <argument name="menuUiId" value="{{AdminMenuCustomers.dataUiId}}"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridTest.xml index 4f501c27352bf..d4af9ab58a299 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridTest.xml @@ -25,7 +25,7 @@ </before> <after> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- - Step1. Login to admin and go to Customers > All Customerts. diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridViaMassActionsTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridViaMassActionsTest.xml index a703c5a7c5d92..05926e7aefc92 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridViaMassActionsTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridViaMassActionsTest.xml @@ -25,7 +25,7 @@ </before> <after> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- - Step1. Login to admin and go to Customers > All Customerts. diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerTest.xml index 7fef916fc458a..b5ade97dbb968 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerTest.xml @@ -25,7 +25,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="login"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Delete created customer --> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteDefaultBillingCustomerAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteDefaultBillingCustomerAddressTest.xml index bb455677d5e94..54ea673f7249f 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteDefaultBillingCustomerAddressTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteDefaultBillingCustomerAddressTest.xml @@ -25,7 +25,7 @@ </before> <after> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- - Step1. Login to admin and go to Customers > All Customers. diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminEditDefaultBillingShippingCustomerAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminEditDefaultBillingShippingCustomerAddressTest.xml index df317c8bf7012..4f69a9bbfb695 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminEditDefaultBillingShippingCustomerAddressTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminEditDefaultBillingShippingCustomerAddressTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="customer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- - Step1. Login to admin and go to Customers > All Customers. diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminExactMatchSearchInCustomerGridTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminExactMatchSearchInCustomerGridTest.xml index d278b6c52d330..1822f427ec389 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminExactMatchSearchInCustomerGridTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminExactMatchSearchInCustomerGridTest.xml @@ -30,7 +30,7 @@ <deleteData createDataKey="createSecondCustomer" stepKey="deleteSecondCustomer"/> <amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/> <actionGroup ref="AdminResetFilterInCustomerAddressGrid" stepKey="clearCustomerGridFilter"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Step 1: Go to Customers > All Customers--> <amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminPanelIsFrozenIfStorefrontIsOpenedViaCustomerViewTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminPanelIsFrozenIfStorefrontIsOpenedViaCustomerViewTest.xml index 16125c6ddf250..0eeab8cb36c2e 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminPanelIsFrozenIfStorefrontIsOpenedViaCustomerViewTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminPanelIsFrozenIfStorefrontIsOpenedViaCustomerViewTest.xml @@ -28,7 +28,7 @@ <after> <deleteData createDataKey="createSimpleCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderPage"> <argument name="customer" value="$simpleCustomer$"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminResetCustomerPasswordTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminResetCustomerPasswordTest.xml index fb67838e941b6..afe8dbef99916 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminResetCustomerPasswordTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminResetCustomerPasswordTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="customer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <magentoCLI command="indexer:reindex" stepKey="reindex"/> <magentoCLI command="cache:flush" stepKey="flushCache"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminSearchCustomerAddressByKeywordTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminSearchCustomerAddressByKeywordTest.xml index 9f1c5e8cd923a..6be675140c555 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminSearchCustomerAddressByKeywordTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminSearchCustomerAddressByKeywordTest.xml @@ -25,7 +25,7 @@ </before> <after> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- - Step1. Login to admin and go to Customers > All Customerts. @@ -44,4 +44,4 @@ <waitForPageLoad stepKey="waitForCustomerAddressesGridPageLoad"/> <seeNumberOfElements userInput="1" selector="{{AdminCustomerAddressesGridSection.rowsInGrid}}" stepKey="seeOnlyOneCustomerAddressesInGrid"/> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultBillingAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultBillingAddressTest.xml index db8d4e1ee1eea..b0de96782f0f5 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultBillingAddressTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultBillingAddressTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="customer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- - Step1. Login to admin and go to Customers > All Customers. diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultShippingAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultShippingAddressTest.xml index 6e83218176904..dfeb868959d54 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultShippingAddressTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminSetCustomerDefaultShippingAddressTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="customer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- - Step1. Login to admin and go to Customers > All Customers. diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest.xml index f58f23dee4235..56bf8fb731993 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest.xml @@ -30,7 +30,7 @@ <amOnPage stepKey="goToCustomersGridPage" url="{{AdminCustomerPage.url}}"/> <waitForPageLoad stepKey="waitForCustomersGrid"/> <actionGroup stepKey="resetFilter" ref="AdminResetFilterInCustomerGrid"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{AdminCustomerPage.url}}edit/id/$$customer.id$$/" stepKey="openCustomerEditPage"/> @@ -221,7 +221,7 @@ </before> <after> <deleteData stepKey="deleteCustomer" createDataKey="customer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{AdminCustomerPage.url}}edit/id/$$customer.id$$/" stepKey="openCustomerEditPage"/> @@ -305,4 +305,4 @@ <argument name="text" value="{{UK_Not_Default_Address.street[0]}}"/> </actionGroup> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCreateCustomerRequiredFieldsTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCreateCustomerRequiredFieldsTest.xml index 7dab6eefde8ec..72661e4505322 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCreateCustomerRequiredFieldsTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCreateCustomerRequiredFieldsTest.xml @@ -22,7 +22,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginToAdminPanel"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open New Customer Page --> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressRequiredFieldsTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressRequiredFieldsTest.xml index bfb47dc9e1911..41efec9d87b18 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressRequiredFieldsTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressRequiredFieldsTest.xml @@ -24,7 +24,7 @@ </before> <after> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Created Customer --> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressStateContainValuesOnceTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressStateContainValuesOnceTest.xml index daab5fd2061fb..f491fcefa9545 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressStateContainValuesOnceTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminVerifyCustomerAddressStateContainValuesOnceTest.xml @@ -29,7 +29,7 @@ <argument name="customerEmail" value="Simple_US_Customer.email"/> </actionGroup> <actionGroup ref="AdminClearCustomersFiltersActionGroup" stepKey="clearFilters"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to Customers > All Customers.--> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AllowedCountriesRestrictionApplyOnBackendTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AllowedCountriesRestrictionApplyOnBackendTest.xml index 194c6e6164f8c..7cd69b4e17472 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/AllowedCountriesRestrictionApplyOnBackendTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/AllowedCountriesRestrictionApplyOnBackendTest.xml @@ -23,7 +23,7 @@ <createData entity="SimpleProduct" stepKey="createSimpleProduct"> <requiredEntity createDataKey="createCategory"/> </createData> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <!--Create new website,store and store view--> <comment userInput="Create new website,store and store view" stepKey="createWebsite"/> <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="goToAdminSystemStorePage"/> @@ -59,7 +59,7 @@ </actionGroup> <actionGroup ref="SetWebsiteCountryOptionsToDefaultActionGroup" stepKey="setCountryOptionsToDefault"/> <createData entity="CustomerAccountSharingSystemValue" stepKey="setAccountSharingToSystemValue"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <magentoCLI command="indexer:reindex" stepKey="reindex"/> <magentoCLI command="cache:flush" stepKey="flushCache"/> </after> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/ChangeCustomerGroupTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/ChangeCustomerGroupTest.xml index 7de52875d4341..eb46a9d2b1ace 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/ChangeCustomerGroupTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/ChangeCustomerGroupTest.xml @@ -35,7 +35,7 @@ <argument name="customerGroupName" value="{{CustomerGroupChange.code}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminCreateCustomerGroupActionGroup" stepKey="createCustomerGroup"> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/DeleteCustomerGroupTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/DeleteCustomerGroupTest.xml index b19966e0102b6..b03478c5be684 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/DeleteCustomerGroupTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/DeleteCustomerGroupTest.xml @@ -29,7 +29,7 @@ </before> <after> <deleteData createDataKey="customer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Customer Group success delete message--> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml index bf8844b2cc7ab..cf45c3e6037d5 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml @@ -25,7 +25,7 @@ <resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/> </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Step 0: User signs up an account --> <comment userInput="Start of signing up user account" stepKey="startOfSigningUpUserAccount" /> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/SearchByEmailInCustomerGridTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/SearchByEmailInCustomerGridTest.xml index 5cce64495bbd2..0d9f17096b26e 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/SearchByEmailInCustomerGridTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/SearchByEmailInCustomerGridTest.xml @@ -28,7 +28,7 @@ <deleteData createDataKey="createSecondCustomer" stepKey="deleteSecondCustomer"/> <amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/> <actionGroup ref="AdminResetFilterInCustomerAddressGrid" stepKey="clearCustomerGridFilter"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Step 1: Go to Customers > All Customers--> <amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontAddCustomerAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontAddCustomerAddressTest.xml index e2c55eb3962f2..ac6612184e32c 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontAddCustomerAddressTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontAddCustomerAddressTest.xml @@ -24,7 +24,7 @@ </before> <after> <deleteData createDataKey="createCustomer" stepKey="DeleteCustomer"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!--Log in to Storefront as Customer 1 --> @@ -101,7 +101,7 @@ </before> <after> <deleteData createDataKey="createCustomer" stepKey="DeleteCustomer"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!--Log in to Storefront as Customer 1 --> @@ -118,4 +118,4 @@ <see userInput="{{US_Address_TX.postcode}}" selector="{{StorefrontCustomerAddressesSection.addressesList}}" stepKey="checkNewAddressesPostcodeOnDefaultShipping"/> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCheckTaxAddingValidVATIdTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCheckTaxAddingValidVATIdTest.xml index 4c35cdbdb7cbb..5935af2c02182 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCheckTaxAddingValidVATIdTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCheckTaxAddingValidVATIdTest.xml @@ -143,7 +143,7 @@ </actionGroup> <!--Log Out--> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontClearAllCompareProductsTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontClearAllCompareProductsTest.xml index 8651c9b4db62e..8e4f9edc085a4 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontClearAllCompareProductsTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontClearAllCompareProductsTest.xml @@ -111,7 +111,7 @@ <after> <magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove static.magento.com"/> <!-- Logout --> - <actionGroup ref="logout" stepKey="logoutOfAdmin1"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin1"/> <!-- Delete Created Entities --> <deleteData createDataKey="createSimpleCustomer1" stepKey="deleteSimpleCustomer1"/> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerTest.xml index 7d51f97f2463a..7899f4ac53132 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerTest.xml @@ -20,11 +20,11 @@ <group value="create"/> </annotations> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser"> <argument name="Customer" value="CustomerEntityOne"/> </actionGroup> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressBelgiumTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressBelgiumTest.xml index d36d640c5ad17..e52df80b5415e 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressBelgiumTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressBelgiumTest.xml @@ -28,7 +28,7 @@ <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteNewUser"> <argument name="email" value="{{CustomerEntityOne.email}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Update customer address Belgium in storefront--> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressChinaTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressChinaTest.xml index 285de8d777b48..0181c2f140c39 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressChinaTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressChinaTest.xml @@ -28,7 +28,7 @@ <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteNewUser"> <argument name="email" value="{{CustomerEntityOne.email}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Update customer address in storefront--> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressFranceTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressFranceTest.xml index dae456c96a679..d03a6ae8508d5 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressFranceTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressFranceTest.xml @@ -29,7 +29,7 @@ <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteNewUser"> <argument name="email" value="{{CustomerEntityOne.email}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Update customer address France in storefront--> @@ -49,4 +49,4 @@ <argument name="address" value="updateCustomerFranceAddress"/> </actionGroup> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressUKTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressUKTest.xml index 7b6e695aa8dc4..cacde523c0fd8 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressUKTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerAddressUKTest.xml @@ -29,7 +29,7 @@ <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteNewUser"> <argument name="email" value="{{CustomerEntityOne.email}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Update customer address UK in storefront--> @@ -54,4 +54,4 @@ <argument name="customer" value="CustomerEntityOne"/> </actionGroup> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifyNoXssInjectionOnUpdateCustomerInformationAddAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifyNoXssInjectionOnUpdateCustomerInformationAddAddressTest.xml index e11404db9a9a9..49e9d7048dd2b 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifyNoXssInjectionOnUpdateCustomerInformationAddAddressTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifyNoXssInjectionOnUpdateCustomerInformationAddAddressTest.xml @@ -29,7 +29,7 @@ <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteNewUser"> <argument name="email" value="{{Colorado_US_Customer.email}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Update customer address in storefront--> @@ -54,4 +54,4 @@ <argument name="customer" value="Colorado_US_Customer"/> </actionGroup> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml b/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml index 853872dd907bd..0333aef5f34ff 100644 --- a/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml +++ b/app/code/Magento/Directory/Test/Mftf/Test/AdminScheduledImportSettingsHiddenTest.xml @@ -21,7 +21,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <magentoCLI command="config:set currency/import/enabled 0" stepKey="disableCurrencyImport"/> </after> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateAndEditDownloadableProductSettingsTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateAndEditDownloadableProductSettingsTest.xml index ebd36dddc0b6c..a09f205b8c4d0 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateAndEditDownloadableProductSettingsTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateAndEditDownloadableProductSettingsTest.xml @@ -29,7 +29,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create new downloadable product --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductAndAssignItToCustomStoreTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductAndAssignItToCustomStoreTest.xml index e0a38e7db7552..9a1f1273a41fd 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductAndAssignItToCustomStoreTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductAndAssignItToCustomStoreTest.xml @@ -41,7 +41,7 @@ <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteCreatedStoreView"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create store view --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithCustomOptionsTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithCustomOptionsTest.xml index 3651b322628c4..8e08ae813faed 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithCustomOptionsTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithCustomOptionsTest.xml @@ -38,7 +38,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create Downloadable product --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithDefaultSetLinksTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithDefaultSetLinksTest.xml index 18dedca393178..865f392f7c841 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithDefaultSetLinksTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithDefaultSetLinksTest.xml @@ -40,7 +40,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create downloadable product --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithGroupPriceTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithGroupPriceTest.xml index 64920432f2e01..7fcb70b169ab7 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithGroupPriceTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithGroupPriceTest.xml @@ -38,7 +38,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create downloadable product --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithLinkTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithLinkTest.xml index 3b315d030cc8c..94753a1e5e2b3 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithLinkTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithLinkTest.xml @@ -38,7 +38,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create downloadable product --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithManageStockTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithManageStockTest.xml index 5ab683034bad8..e9a6efc49b635 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithManageStockTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithManageStockTest.xml @@ -38,7 +38,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create downloadable product --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithOutOfStockStatusTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithOutOfStockStatusTest.xml index 3348603563ff1..16d88c16073cb 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithOutOfStockStatusTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithOutOfStockStatusTest.xml @@ -38,7 +38,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create Downloadable product --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithSpecialPriceTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithSpecialPriceTest.xml index 0ac14680cff46..307eb43273dbd 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithSpecialPriceTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithSpecialPriceTest.xml @@ -38,7 +38,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create downloadable product --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutFillingQuantityAndStockTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutFillingQuantityAndStockTest.xml index c80c42bc53ed9..092129dc1ba1e 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutFillingQuantityAndStockTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutFillingQuantityAndStockTest.xml @@ -38,7 +38,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create downloadable product --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutTaxClassIdTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutTaxClassIdTest.xml index 27a27f22c87ff..63796a197e586 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutTaxClassIdTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithoutTaxClassIdTest.xml @@ -38,7 +38,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create downloadable product --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminDeleteDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminDeleteDownloadableProductTest.xml index 0d93bac16569f..3d01168613ecc 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminDeleteDownloadableProductTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminDeleteDownloadableProductTest.xml @@ -34,7 +34,7 @@ <after> <magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove example.com static.magento.com"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteDownloadableProductFilteredBySkuAndName"> <argument name="product" value="$$createDownloadableProduct$$"/> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest.xml index 4a13a3f60e385..f2b6dc9e8a809 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest.xml @@ -50,7 +50,7 @@ <!--Delete product--> <comment userInput="Delete product" stepKey="commentDeleteProduct"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Change product type to Downloadable--> <comment userInput="Change product type to Downloadable" stepKey="commentCreateDownloadable"/> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/EditDownloadableProductWithSeparateLinksFromCartTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/EditDownloadableProductWithSeparateLinksFromCartTest.xml index 6535bf11d43c4..3d9229a4b0854 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/EditDownloadableProductWithSeparateLinksFromCartTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/EditDownloadableProductWithSeparateLinksFromCartTest.xml @@ -76,7 +76,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Step 1: Navigate to store front Product page as guest --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/ManualSelectAllDownloadableLinksDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/ManualSelectAllDownloadableLinksDownloadableProductTest.xml index 3ab64be9ad2ca..7eea3926f450c 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/ManualSelectAllDownloadableLinksDownloadableProductTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/ManualSelectAllDownloadableLinksDownloadableProductTest.xml @@ -76,7 +76,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Step 1: Navigate to store front Product page as guest --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/SelectAllDownloadableLinksDownloadableProductTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/SelectAllDownloadableLinksDownloadableProductTest.xml index 3f77eff56193d..2ce0272852711 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/SelectAllDownloadableLinksDownloadableProductTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/SelectAllDownloadableLinksDownloadableProductTest.xml @@ -76,7 +76,7 @@ </actionGroup> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Step 1: Navigate to store front Product page as guest --> diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyDisableDownloadableProductSamplesAreNotAccessibleTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyDisableDownloadableProductSamplesAreNotAccessibleTest.xml index b0f7edaeaa3a9..b641a2541ff98 100644 --- a/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyDisableDownloadableProductSamplesAreNotAccessibleTest.xml +++ b/app/code/Magento/Downloadable/Test/Mftf/Test/VerifyDisableDownloadableProductSamplesAreNotAccessibleTest.xml @@ -53,7 +53,7 @@ <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <!-- Admin logout --> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Open Downloadable product from precondition on Storefront --> diff --git a/app/code/Magento/Elasticsearch/Test/Mftf/Test/ProductQuickSearchUsingElasticSearchTest.xml b/app/code/Magento/Elasticsearch/Test/Mftf/Test/ProductQuickSearchUsingElasticSearchTest.xml index fb28e6dd4d9df..9fcc1909ab42c 100644 --- a/app/code/Magento/Elasticsearch/Test/Mftf/Test/ProductQuickSearchUsingElasticSearchTest.xml +++ b/app/code/Magento/Elasticsearch/Test/Mftf/Test/ProductQuickSearchUsingElasticSearchTest.xml @@ -32,7 +32,7 @@ <actionGroup ref="UpdateIndexerOnSaveActionGroup" stepKey="resetIndexerBackToOriginalState"> <argument name="indexerName" value="catalogsearch_fulltext"/> </actionGroup> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> @@ -42,7 +42,7 @@ <actionGroup ref="UpdateIndexerByScheduleActionGroup" stepKey="updateAnIndexerBySchedule"> <argument name="indexerName" value="catalogsearch_fulltext"/> </actionGroup> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> <!--Navigate to storefront and do a quick search for the product --> <comment userInput="Navigate to Storefront to check if quick search works" stepKey="commentCheckQuickSearch" /> <amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToHomePage"/> diff --git a/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontCheckAdvancedSearchOnElasticSearchTest.xml b/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontCheckAdvancedSearchOnElasticSearchTest.xml index 2d803dd4968d1..7380ec085e0f3 100644 --- a/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontCheckAdvancedSearchOnElasticSearchTest.xml +++ b/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontCheckAdvancedSearchOnElasticSearchTest.xml @@ -53,7 +53,7 @@ <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!-- Navigate to Frontend --> diff --git a/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticSearchForChineseLocaleTest.xml b/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticSearchForChineseLocaleTest.xml index fd18a0f4e1e5e..71e0401a1c30a 100644 --- a/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticSearchForChineseLocaleTest.xml +++ b/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticSearchForChineseLocaleTest.xml @@ -38,7 +38,7 @@ <magentoCLI command="config:set {{SetDefaultSearchEngineConfig.path}} {{SetDefaultSearchEngineConfig.value}}" stepKey="resetSearchEnginePreviousState"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <!-- Search for product by name --> <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByProductName"> diff --git a/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticsearch6SearchInvalidValueTest.xml b/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticsearch6SearchInvalidValueTest.xml index 050ce1263d10d..622b78fce01b9 100644 --- a/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticsearch6SearchInvalidValueTest.xml +++ b/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticsearch6SearchInvalidValueTest.xml @@ -50,7 +50,7 @@ <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetFiltersIfExist"/> <magentoCLI command="indexer:reindex catalogsearch_fulltext" stepKey="reindex"/> <magentoCLI command="cache:flush config" stepKey="flushCache"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create new searchable product attribute--> <amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="goToProductAttributes"/> diff --git a/app/code/Magento/Email/Test/Mftf/Test/AdminEmailTemplatePreviewTest.xml b/app/code/Magento/Email/Test/Mftf/Test/AdminEmailTemplatePreviewTest.xml index ca73de1f88fcc..92f4b79b09be2 100644 --- a/app/code/Magento/Email/Test/Mftf/Test/AdminEmailTemplatePreviewTest.xml +++ b/app/code/Magento/Email/Test/Mftf/Test/AdminEmailTemplatePreviewTest.xml @@ -30,7 +30,7 @@ <actionGroup ref="DeleteEmailTemplateActionGroup" stepKey="deleteTemplate"/> <click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clearFilters"/> <!--Logout from Admin Area--> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <actionGroup ref="CreateCustomTemplateActionGroup" stepKey="createTemplate"/> diff --git a/app/code/Magento/Email/Test/Mftf/Test/AdminMarketingEmailTemplatesNavigateMenuTest.xml b/app/code/Magento/Email/Test/Mftf/Test/AdminMarketingEmailTemplatesNavigateMenuTest.xml index d512fc263ef2c..28e77ee399737 100644 --- a/app/code/Magento/Email/Test/Mftf/Test/AdminMarketingEmailTemplatesNavigateMenuTest.xml +++ b/app/code/Magento/Email/Test/Mftf/Test/AdminMarketingEmailTemplatesNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToMarketingEmailTemplatesPage"> <argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/> diff --git a/app/code/Magento/Email/Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml b/app/code/Magento/Email/Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml index 9e1d9c5c3cdbb..280b41bfbac12 100644 --- a/app/code/Magento/Email/Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml +++ b/app/code/Magento/Email/Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml @@ -27,7 +27,7 @@ </before> <!--Logout from Admin Area--> <after> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <!--Navigate to content->Design->Config page--> <amOnPage url="{{DesignConfigPage.url}}" stepKey="navigateToDesignConfigPage" /> diff --git a/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyAutoGenerateKeyTest.xml b/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyAutoGenerateKeyTest.xml index ded57f4aad019..04430661a62a4 100644 --- a/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyAutoGenerateKeyTest.xml +++ b/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyAutoGenerateKeyTest.xml @@ -25,7 +25,7 @@ <after> <!--Logout from Admin Area--> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <actionGroup ref="AdminEncryptionKeyNavigateToChangePageActionGroup" stepKey="navigateToPage"/> diff --git a/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyManualGenerateKeyTest.xml b/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyManualGenerateKeyTest.xml index f3a9849969263..0674fd12ebead 100644 --- a/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyManualGenerateKeyTest.xml +++ b/app/code/Magento/EncryptionKey/Test/Mftf/Test/AdminEncryptionKeyManualGenerateKeyTest.xml @@ -25,7 +25,7 @@ <after> <!--Logout from Admin Area--> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <actionGroup ref="AdminEncryptionKeyNavigateToChangePageActionGroup" stepKey="navigateToPage"/> diff --git a/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml b/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml index 016c609ae7762..c0b602e772b54 100644 --- a/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml +++ b/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml @@ -75,7 +75,7 @@ <!--Delete created data--> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Add country of manufacture to product--> <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="amOnEditPage"/> diff --git a/app/code/Magento/GoogleAdwords/Test/Mftf/Test/AdminValidateConversionIdConfigTest.xml b/app/code/Magento/GoogleAdwords/Test/Mftf/Test/AdminValidateConversionIdConfigTest.xml index 7c0214a8654c8..bc1983344ce88 100644 --- a/app/code/Magento/GoogleAdwords/Test/Mftf/Test/AdminValidateConversionIdConfigTest.xml +++ b/app/code/Magento/GoogleAdwords/Test/Mftf/Test/AdminValidateConversionIdConfigTest.xml @@ -19,7 +19,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateToGoogleAdwordsConfigurationActionGroup" stepKey="goToConfigPage"/> <actionGroup ref="AdminExpandConfigSectionActionGroup" stepKey="expandingGoogleAdwordsSection"> diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAssociateGroupedProductToWebsitesTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAssociateGroupedProductToWebsitesTest.xml index 41096c416d05e..d23013a6157c9 100644 --- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAssociateGroupedProductToWebsitesTest.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAssociateGroupedProductToWebsitesTest.xml @@ -72,7 +72,7 @@ <actionGroup ref="NavigateToAndResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridFilter"/> <!-- Admin logout --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open product page and assign grouped project to second website --> diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminCreateAndEditGroupedProductSettingsTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminCreateAndEditGroupedProductSettingsTest.xml index e3b76dafdd100..c6228e674aa34 100644 --- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminCreateAndEditGroupedProductSettingsTest.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminCreateAndEditGroupedProductSettingsTest.xml @@ -43,7 +43,7 @@ <deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create new grouped product --> diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminDeleteGroupedProductTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminDeleteGroupedProductTest.xml index f7b9357f1b34a..ebcdc0623cd75 100644 --- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminDeleteGroupedProductTest.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminDeleteGroupedProductTest.xml @@ -31,7 +31,7 @@ </before> <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteGroupedProductFilteredBySkuAndName"> <argument name="product" value="$$createGroupedProduct$$"/> diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminGroupedProductsListTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminGroupedProductsListTest.xml index d80e68e37c44c..151a987ea89cc 100644 --- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminGroupedProductsListTest.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminGroupedProductsListTest.xml @@ -33,7 +33,7 @@ <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> <deleteData createDataKey="category1" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create product --> diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminSortingAssociatedProductsTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminSortingAssociatedProductsTest.xml index bac294d59ce51..dd4619c5c2ce1 100644 --- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminSortingAssociatedProductsTest.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminSortingAssociatedProductsTest.xml @@ -123,7 +123,7 @@ <deleteData createDataKey="product22" stepKey="deleteProduct22"/> <deleteData createDataKey="product23" stepKey="deleteProduct23"/> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create grouped Product--> diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminCheckThatSomeAttributesChangedValueToEmptyAfterImportTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminCheckThatSomeAttributesChangedValueToEmptyAfterImportTest.xml index f5e8c91c31950..9ccdb313b88e6 100644 --- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminCheckThatSomeAttributesChangedValueToEmptyAfterImportTest.xml +++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminCheckThatSomeAttributesChangedValueToEmptyAfterImportTest.xml @@ -41,7 +41,7 @@ <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <!--Delete attribute--> <deleteData createDataKey="productAttribute" stepKey="deleteProductAttribute"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPageNavigateMenuTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPageNavigateMenuTest.xml index e8fb12ca521c2..eba744e551037 100644 --- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPageNavigateMenuTest.xml +++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPageNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToExportPage"> <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPagerGridTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPagerGridTest.xml index b203a4d11a2d2..b52d8ec729fc0 100644 --- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPagerGridTest.xml +++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminExportPagerGridTest.xml @@ -21,7 +21,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateToExportPageActionGroup" stepKey="navigateToExportPage"/> <actionGroup ref="AdminAssertVisiblePagerActionGroup" stepKey="seeGridPager"/> diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImagesFileDirectoryCorrectExplanationTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImagesFileDirectoryCorrectExplanationTest.xml index 989c405324f06..92f93736f237a 100644 --- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImagesFileDirectoryCorrectExplanationTest.xml +++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImagesFileDirectoryCorrectExplanationTest.xml @@ -21,7 +21,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <amOnPage url="{{AdminImportIndexPage.url}}" stepKey="goToImportIndexPage"/> <waitForPageLoad stepKey="adminImportMainSectionLoad"/> diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportCSVWithSpecialCharactersTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportCSVWithSpecialCharactersTest.xml index 38c1a09dc534c..91d1209f1f1b8 100644 --- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportCSVWithSpecialCharactersTest.xml +++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportCSVWithSpecialCharactersTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <actionGroup ref="AdminCheckDataForImportProductActionGroup" stepKey="adminImportProducts"> <argument name="behavior" value="Add/Update"/> diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithAddUpdateBehaviorTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithAddUpdateBehaviorTest.xml index 796732d572290..3eebb9def9c7a 100644 --- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithAddUpdateBehaviorTest.xml +++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithAddUpdateBehaviorTest.xml @@ -65,7 +65,7 @@ </actionGroup> <!-- Logout --> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!-- Import products with add/update behavior --> diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithDeleteBehaviorTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithDeleteBehaviorTest.xml index 7ec48a3a7e8fd..9934ac2e0c8c2 100644 --- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithDeleteBehaviorTest.xml +++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithDeleteBehaviorTest.xml @@ -38,7 +38,7 @@ </before> <after> <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductFilters"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <amOnPage url="{{AdminImportIndexPage.url}}" stepKey="goToImportIndexPage"/> <selectOption selector="{{AdminImportMainSection.entityType}}" userInput="Products" stepKey="selectProductsOption"/> diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithErrorEntriesTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithErrorEntriesTest.xml index e3065f005218b..1d3a45b79dc74 100644 --- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithErrorEntriesTest.xml +++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminImportProductsWithErrorEntriesTest.xml @@ -27,7 +27,7 @@ <!--Delete all imported products--> <actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteAllProducts"/> <!--Logout from Admin page--> - <actionGroup ref="logout" stepKey="logoutFromAdminPage"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdminPage"/> </after> <!--Import products with "Skip error entries"--> diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductImportCSVFileCorrectDifferentFilesTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductImportCSVFileCorrectDifferentFilesTest.xml index 56c1c43bc28d2..593282b9bb867 100644 --- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductImportCSVFileCorrectDifferentFilesTest.xml +++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductImportCSVFileCorrectDifferentFilesTest.xml @@ -25,7 +25,7 @@ </before> <after> <!--Logout from Admin--> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!--Check data products with add/update behavior--> <actionGroup ref="AdminCheckDataForImportProductActionGroup" stepKey="adminImportProducts"> diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductVisibilityDifferentStoreViewsAfterImportTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductVisibilityDifferentStoreViewsAfterImportTest.xml index f0d721075fdfd..de3b52c3c3a98 100644 --- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductVisibilityDifferentStoreViewsAfterImportTest.xml +++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminProductVisibilityDifferentStoreViewsAfterImportTest.xml @@ -46,7 +46,7 @@ <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteChineseStoreView"> <argument name="customStore" value="storeViewChinese"/> </actionGroup> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!--Import products from file--> <actionGroup ref="AdminImportProductsActionGroup" stepKey="importProducts"> diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminSystemImportNavigateMenuTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminSystemImportNavigateMenuTest.xml index 9913933d857a8..249f3b28f7a56 100644 --- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminSystemImportNavigateMenuTest.xml +++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminSystemImportNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToImportPage"> <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> diff --git a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminURLKeyWorksWhenUpdatingProductThroughImportingCSVTest.xml b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminURLKeyWorksWhenUpdatingProductThroughImportingCSVTest.xml index 8d56d9d8dad9d..4d4e87f9387cc 100644 --- a/app/code/Magento/ImportExport/Test/Mftf/Test/AdminURLKeyWorksWhenUpdatingProductThroughImportingCSVTest.xml +++ b/app/code/Magento/ImportExport/Test/Mftf/Test/AdminURLKeyWorksWhenUpdatingProductThroughImportingCSVTest.xml @@ -31,7 +31,7 @@ <!--Delete created data--> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!--Import product from CSV file--> <actionGroup ref="AdminImportProductsActionGroup" stepKey="importProduct"> diff --git a/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementNavigateMenuTest.xml b/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementNavigateMenuTest.xml index 140c93f7f2b48..cbe5161e40ee8 100644 --- a/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementNavigateMenuTest.xml +++ b/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToIndexManagementPage"> <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> diff --git a/app/code/Magento/Integration/Test/Mftf/Test/AdminCreateIntegrationEntityWithDuplicatedNameTest.xml b/app/code/Magento/Integration/Test/Mftf/Test/AdminCreateIntegrationEntityWithDuplicatedNameTest.xml index b23436d474ed8..60598fdd27612 100644 --- a/app/code/Magento/Integration/Test/Mftf/Test/AdminCreateIntegrationEntityWithDuplicatedNameTest.xml +++ b/app/code/Magento/Integration/Test/Mftf/Test/AdminCreateIntegrationEntityWithDuplicatedNameTest.xml @@ -23,9 +23,9 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> - + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToIntegrationsPage"> <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> <argument name="submenuUiId" value="{{AdminMenuSystemExtensionsIntegrations.dataUiId}}"/> diff --git a/app/code/Magento/Integration/Test/Mftf/Test/AdminDeleteIntegrationEntityTest.xml b/app/code/Magento/Integration/Test/Mftf/Test/AdminDeleteIntegrationEntityTest.xml index 966be94d9e404..d1850fdc989fb 100644 --- a/app/code/Magento/Integration/Test/Mftf/Test/AdminDeleteIntegrationEntityTest.xml +++ b/app/code/Magento/Integration/Test/Mftf/Test/AdminDeleteIntegrationEntityTest.xml @@ -38,7 +38,7 @@ <actionGroup ref="AdminSubmitNewIntegrationFormActionGroup" stepKey="submitTheForm"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- TEST BODY --> diff --git a/app/code/Magento/Integration/Test/Mftf/Test/AdminSystemIntegrationsNavigateMenuTest.xml b/app/code/Magento/Integration/Test/Mftf/Test/AdminSystemIntegrationsNavigateMenuTest.xml index 3bd149d222c0e..483afc62c9808 100644 --- a/app/code/Magento/Integration/Test/Mftf/Test/AdminSystemIntegrationsNavigateMenuTest.xml +++ b/app/code/Magento/Integration/Test/Mftf/Test/AdminSystemIntegrationsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToIntegrationsPage"> <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/AdminSpecifyLayerNavigationConfigurationTest.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/AdminSpecifyLayerNavigationConfigurationTest.xml index fd8763891af93..80280178e4593 100644 --- a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/AdminSpecifyLayerNavigationConfigurationTest.xml +++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/AdminSpecifyLayerNavigationConfigurationTest.xml @@ -20,11 +20,11 @@ </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Configure Layered Navigation in Stores -> Configuration -> Catalog -> Layered Navigation --> diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobile.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobile.xml index d2b462d0467a2..76a9cc8f920a1 100644 --- a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobile.xml +++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobile.xml @@ -35,7 +35,7 @@ <deleteData createDataKey="attribute" stepKey="deleteAttribute"/> <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> <resizeWindow width="1280" height="1024" stepKey="resizeWindowToDesktop"/> </after> <!-- Go to default attribute set edit page and add the product attribute to the set --> diff --git a/app/code/Magento/Msrp/Test/Mftf/Test/StorefrontProductWithMapAssignedConfigProductIsCorrectTest.xml b/app/code/Magento/Msrp/Test/Mftf/Test/StorefrontProductWithMapAssignedConfigProductIsCorrectTest.xml index 29f14185a0518..cfc841cbeb0f6 100644 --- a/app/code/Magento/Msrp/Test/Mftf/Test/StorefrontProductWithMapAssignedConfigProductIsCorrectTest.xml +++ b/app/code/Magento/Msrp/Test/Mftf/Test/StorefrontProductWithMapAssignedConfigProductIsCorrectTest.xml @@ -104,7 +104,7 @@ <!--Disable Minimum advertised Price--> <createData entity="MsrpDisableMAP" stepKey="disableMAP"/> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithMultishipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithMultishipmentTest.xml index cfec857329b3d..a054649c5365c 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithMultishipmentTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithMultishipmentTest.xml @@ -58,7 +58,7 @@ <deleteData stepKey="deleteProduct2" createDataKey="product2"/> <deleteData stepKey="deleteCustomer" createDataKey="customer"/> <createData entity="FreeShippinMethodDefault" stepKey="disableFreeShipping"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithSingleShipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithSingleShipmentTest.xml index dcf0770e5421e..de52d20542ce8 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithSingleShipmentTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontCheckingWithSingleShipmentTest.xml @@ -58,7 +58,7 @@ <deleteData stepKey="deleteProduct2" createDataKey="product2"/> <deleteData stepKey="deleteCustomer" createDataKey="customer"/> <createData entity="FreeShippinMethodDefault" stepKey="disableFreeShipping"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMinicartWithMultishipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMinicartWithMultishipmentTest.xml index e826d8e03ffbc..90cc8b3952dde 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMinicartWithMultishipmentTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMinicartWithMultishipmentTest.xml @@ -44,7 +44,7 @@ <deleteData stepKey="deleteProduct2" createDataKey="product2"/> <deleteData stepKey="deleteCustomer" createDataKey="customer"/> <createData entity="FreeShippinMethodDefault" stepKey="disableFreeShipping"/> - <actionGroup ref="logout" stepKey="logoutAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/> </after> <amOnPage url="$$product1.name$$.html" stepKey="goToProduct1"/> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMyAccountWithMultishipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMyAccountWithMultishipmentTest.xml index d8b6a35a4885c..8f27fa35bde02 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMyAccountWithMultishipmentTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StoreFrontMyAccountWithMultishipmentTest.xml @@ -50,7 +50,7 @@ <deleteData createDataKey="customer" stepKey="deleteCustomer"/> <magentoCLI command="config:set {{DisableFreeShippingMethod.path}} {{DisableFreeShippingMethod.value}}" stepKey="disableFreeShipping"/> <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearAllFilters"/> - <actionGroup ref="logout" stepKey="logoutAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/> </after> <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSimpleProduct1ToCart"> <argument name="product" value="$$product1$$"/> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutWithMultipleAddressesTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutWithMultipleAddressesTest.xml index dc786f9cbc5db..5890ab49b2587 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutWithMultipleAddressesTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutWithMultipleAddressesTest.xml @@ -36,7 +36,7 @@ </before> <after> <!-- Delete created data --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="firstProduct" stepKey="deleteFirstProduct"/> <deleteData createDataKey="secondProduct" stepKey="deleteSecondProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontOrderWithMultishippingTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontOrderWithMultishippingTest.xml index ef63d55ccfe35..9a3d622b2e264 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontOrderWithMultishippingTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontOrderWithMultishippingTest.xml @@ -46,7 +46,7 @@ <magentoCLI command="config:set {{DisableMultiShippingCheckoutMultiple.path}} {{DisableMultiShippingCheckoutMultiple.value}}" stepKey="withdrawShippingToMultipleAddresses"/> <magentoCLI command="config:set {{DisableFreeShippingMethod.path}} {{DisableFreeShippingMethod.value}}" stepKey="disableFreeShipping"/> <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearAllOrdersGridFilters"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSimpleProduct1ToCart"> diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontProcessMultishippingCheckoutWhenCartPageIsOpenedInAnotherTabTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontProcessMultishippingCheckoutWhenCartPageIsOpenedInAnotherTabTest.xml index f25ac203c3fa5..81b536746616e 100644 --- a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontProcessMultishippingCheckoutWhenCartPageIsOpenedInAnotherTabTest.xml +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontProcessMultishippingCheckoutWhenCartPageIsOpenedInAnotherTabTest.xml @@ -36,7 +36,7 @@ </before> <after> <!-- Delete created data --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="createFirstProduct" stepKey="deleteFirstProduct"/> <deleteData createDataKey="createSecondProduct" stepKey="deleteSecondProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> diff --git a/app/code/Magento/NewRelicReporting/Test/Mftf/Test/AdminCheckNewRelicSystemConfigDependencyTest.xml b/app/code/Magento/NewRelicReporting/Test/Mftf/Test/AdminCheckNewRelicSystemConfigDependencyTest.xml index c343f93de2c58..5b4b92559f355 100644 --- a/app/code/Magento/NewRelicReporting/Test/Mftf/Test/AdminCheckNewRelicSystemConfigDependencyTest.xml +++ b/app/code/Magento/NewRelicReporting/Test/Mftf/Test/AdminCheckNewRelicSystemConfigDependencyTest.xml @@ -25,7 +25,7 @@ </actionGroup> </before> <after> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <actionGroup ref="AssertAdminNewRelicConfigFieldIsNotVisibleActionGroup" stepKey="checkingIfApiUrlIsNotVisible"> <argument name="config" value="{{AdminNewRelicConfigSystemSection.apiUrl}}"/> diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddImageToWYSIWYGNewsletterTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddImageToWYSIWYGNewsletterTest.xml index 4992a36c0b3cb..a763f43d9e4d1 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddImageToWYSIWYGNewsletterTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddImageToWYSIWYGNewsletterTest.xml @@ -18,7 +18,7 @@ <testCaseId value="MAGETWO-84377"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -58,7 +58,7 @@ <closeTab stepKey="closeTab"/> <after> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddVariableToWYSIWYGNewsletterTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddVariableToWYSIWYGNewsletterTest.xml index 958340671ac43..ff2e2a84a612e 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddVariableToWYSIWYGNewsletterTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddVariableToWYSIWYGNewsletterTest.xml @@ -18,7 +18,7 @@ <severity value="AVERAGE"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -100,7 +100,7 @@ <closeTab stepKey="closeTab"/> <after> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddWidgetToWYSIWYGNewsletterTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddWidgetToWYSIWYGNewsletterTest.xml index 29c125a52c9e2..73880f283677d 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddWidgetToWYSIWYGNewsletterTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminAddWidgetToWYSIWYGNewsletterTest.xml @@ -18,7 +18,7 @@ <testCaseId value="MC-6070"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -55,7 +55,7 @@ <closeTab stepKey="closeTab"/> <after> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterQueueNavigateMenuTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterQueueNavigateMenuTest.xml index 31da588250a0a..c094117870712 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterQueueNavigateMenuTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterQueueNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToNewsletterQueuePage"> <argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/> diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterSubscribersNavigateMenuTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterSubscribersNavigateMenuTest.xml index 8ced2690322f8..a5046b6fa4b71 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterSubscribersNavigateMenuTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterSubscribersNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToNewsletterSubscribersPage"> <argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/> diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterTemplateNavigateMenuTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterTemplateNavigateMenuTest.xml index ca994aa1d6269..4c12765ebc2a0 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterTemplateNavigateMenuTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminMarketingNewsletterTemplateNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToNewsletterTemplatePage"> <argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/> diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminNameEmptyForGuestTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminNameEmptyForGuestTest.xml index 07c7cc050d5cf..42815fe79b55e 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminNameEmptyForGuestTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminNameEmptyForGuestTest.xml @@ -18,11 +18,11 @@ </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStorefrontPage"/> diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminReportsNewsletterProblemReportsNavigateMenuTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminReportsNewsletterProblemReportsNavigateMenuTest.xml index 3891b90536a17..9765a65cd60db 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/Test/AdminReportsNewsletterProblemReportsNavigateMenuTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/AdminReportsNewsletterProblemReportsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToNewsletterProblemsReportPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/VerifySubscribedNewsletterDisplayedTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/VerifySubscribedNewsletterDisplayedTest.xml index 200eb0e49f5b2..a568fb1799ac2 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/Test/VerifySubscribedNewsletterDisplayedTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/VerifySubscribedNewsletterDisplayedTest.xml @@ -21,7 +21,7 @@ <before> <!--Log in to Magento as admin.--> - <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createWebsite"> <argument name="newWebsiteName" value="Second"/> <argument name="websiteCode" value="Base2"/> @@ -49,7 +49,7 @@ </actionGroup> <magentoCLI command="indexer:reindex" stepKey="reindex"/> <magentoCLI command="cache:flush" stepKey="flushCache"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!--Go to store front (default) and click Create an Account.--> diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterTest.xml index 0c20357127e6d..3a247402c111d 100644 --- a/app/code/Magento/Newsletter/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterTest.xml +++ b/app/code/Magento/Newsletter/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnNewsletterTest.xml @@ -18,7 +18,7 @@ <testCaseId value="MAGETWO-84683"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> </before> @@ -49,7 +49,7 @@ <closeTab stepKey="closeTab"/> <after> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/PageCache/Test/Mftf/Test/AdminFrontendAreaSessionMustNotAffectAdminAreaTest.xml b/app/code/Magento/PageCache/Test/Mftf/Test/AdminFrontendAreaSessionMustNotAffectAdminAreaTest.xml index 375211e5f2f51..c94eed9dc6a57 100644 --- a/app/code/Magento/PageCache/Test/Mftf/Test/AdminFrontendAreaSessionMustNotAffectAdminAreaTest.xml +++ b/app/code/Magento/PageCache/Test/Mftf/Test/AdminFrontendAreaSessionMustNotAffectAdminAreaTest.xml @@ -40,7 +40,7 @@ </createData> <magentoCLI command="cache:clean" arguments="full_page" stepKey="clearCache"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> <resetCookie userInput="PHPSESSID" stepKey="resetSessionCookie"/> </before> @@ -54,7 +54,7 @@ <deleteData createDataKey="createCategoryB" stepKey="deleteCategoryB"/> <deleteData createDataKey="createCategoryA" stepKey="deleteCategoryA"/> - <actionGroup ref="logout" stepKey="logoutAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/> </after> <!-- 1. Login as admin --> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminCheckDefaultValueOfPayPalCustomizeButtonTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminCheckDefaultValueOfPayPalCustomizeButtonTest.xml index 5c10bc9536fcf..3a3ae03d63bf3 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminCheckDefaultValueOfPayPalCustomizeButtonTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminCheckDefaultValueOfPayPalCustomizeButtonTest.xml @@ -22,11 +22,11 @@ </skip> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <actionGroup ref="ConfigPayPalExpressCheckout" stepKey="ConfigPayPalExpressCheckout"/> </before> <after> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/> <waitForPageLoad stepKey="waitForPageLoad1"/> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPal.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPal.xml index e918a417dcfde..3e1a825861b5e 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPal.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsConflictResolutionForPayPal.xml @@ -29,7 +29,7 @@ <magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/> <magentoCLI command="config:set payment/wps_express/active 0" stepKey="disableWPSExpress"/> <magentoCLI command="config:set payment/hosted_pro/active 0" stepKey="disableHostedProExpress"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Change Merchant Country --> <comment userInput="Change Merchant Country" stepKey="changeMerchantCountryComment"/> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionState.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionState.xml index 934449dfd136c..ba5e701ceea66 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionState.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigPaymentsSectionState.xml @@ -18,7 +18,7 @@ <testCaseId value="MAGETWO-92043"/> </annotations> <after> - <actionGroup ref="logout" stepKey="amOnLogoutPage"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminOnePayPalSolutionsEnabledAtTheSameTimeTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminOnePayPalSolutionsEnabledAtTheSameTimeTest.xml index fd0e74f38287d..ede251ddee647 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminOnePayPalSolutionsEnabledAtTheSameTimeTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminOnePayPalSolutionsEnabledAtTheSameTimeTest.xml @@ -32,7 +32,7 @@ <magentoCLI command="config:set payment/wps_express/active 1" stepKey="enableWPSExpress"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <magentoCLI command="config:set payment/wps_express/active 0" stepKey="disableWPSExpress"/> <magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disableExpressCheckout"/> </after> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminReportsPayPalSettlementNavigateMenuTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminReportsPayPalSettlementNavigateMenuTest.xml index 03f0167230e9f..d2cdec73551d0 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminReportsPayPalSettlementNavigateMenuTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminReportsPayPalSettlementNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToPayPalSettlementPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/AdminSalesBillingAgreementsNavigateMenuTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/AdminSalesBillingAgreementsNavigateMenuTest.xml index 8c3735fcbd253..2f0013c43fd9e 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/AdminSalesBillingAgreementsNavigateMenuTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/AdminSalesBillingAgreementsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToBillingAgreementsPage"> <argument name="menuUiId" value="{{AdminMenuSales.dataUiId}}"/> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontCheckCreditButtonConfigurationTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontCheckCreditButtonConfigurationTest.xml index 78a27106bf406..c8089085b7ee5 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontCheckCreditButtonConfigurationTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontCheckCreditButtonConfigurationTest.xml @@ -28,7 +28,7 @@ </createData> <!-- Create Customer --> <createData entity="Simple_US_Customer" stepKey="createCustomer"/> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> <!--Config PayPal Express Checkout--> <comment userInput="config PayPal Express Checkout" stepKey="commemtConfigPayPalExpressCheckout"/> <actionGroup ref="ConfigPayPalExpressCheckout" stepKey="ConfigPayPalExpressCheckout"/> @@ -37,7 +37,7 @@ <deleteData stepKey="deleteCategory" createDataKey="createPreReqCategory"/> <deleteData stepKey="deleteProduct" createDataKey="createPreReqProduct"/> <deleteData stepKey="deleteCustomer" createDataKey="createCustomer"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/> <waitForPageLoad stepKey="waitForPageLoad1"/> diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml index fea1cf3966b99..b95d645787fed 100644 --- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml +++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml @@ -37,7 +37,7 @@ <createData entity="PaypalConfig" stepKey="createPaypalExpressConfig"/> <!-- Login --> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> </before> <after> <!-- Cleanup Paypal configurations --> @@ -55,7 +55,7 @@ <deleteData stepKey="deleteCustomer" createDataKey="createCustomer"/> <!-- Logout --> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!--Login to storefront as previously created customer--> diff --git a/app/code/Magento/Persistent/Test/Mftf/Test/ShippingQuotePersistedForGuestTest.xml b/app/code/Magento/Persistent/Test/Mftf/Test/ShippingQuotePersistedForGuestTest.xml index e81694e044f52..eebadbeaa0eec 100644 --- a/app/code/Magento/Persistent/Test/Mftf/Test/ShippingQuotePersistedForGuestTest.xml +++ b/app/code/Magento/Persistent/Test/Mftf/Test/ShippingQuotePersistedForGuestTest.xml @@ -37,7 +37,7 @@ <createData entity="PersistentConfigDefault" stepKey="setDefaultPersistentState"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Step 1: Login as a Customer with remember me checked--> <actionGroup ref="CustomerLoginOnStorefrontWithRememberMeCheckedActionGroup" stepKey="loginToStorefrontAccountWithRememberMeChecked"> diff --git a/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyShoppingCartPersistenceUnderLongTermCookieTest.xml b/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyShoppingCartPersistenceUnderLongTermCookieTest.xml index 35f4fd88f2b09..2aa43e9ef828d 100644 --- a/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyShoppingCartPersistenceUnderLongTermCookieTest.xml +++ b/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyShoppingCartPersistenceUnderLongTermCookieTest.xml @@ -45,7 +45,7 @@ <actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteJohnDoeCustomer"> <argument name="customerEmail" value="Simple_Customer_Without_Address.email"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- 1. Go to storefront and click the Create an Account link--> diff --git a/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyThatInformationAboutViewingComparisonWishlistIsPersistedUnderLongTermCookieTest.xml b/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyThatInformationAboutViewingComparisonWishlistIsPersistedUnderLongTermCookieTest.xml index 1b3a996b34e24..1f84200f856d9 100644 --- a/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyThatInformationAboutViewingComparisonWishlistIsPersistedUnderLongTermCookieTest.xml +++ b/app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyThatInformationAboutViewingComparisonWishlistIsPersistedUnderLongTermCookieTest.xml @@ -60,7 +60,7 @@ <actionGroup ref="AdminDeleteWidgetActionGroup" stepKey="deleteRecentlyViewedProductsWidget"> <argument name="widget" value="RecentlyViewedProductsWidget"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Login to storefront from customer--> diff --git a/app/code/Magento/ProductVideo/Test/Mftf/Test/AdminValidateUrlOnGetVideoInformationTest.xml b/app/code/Magento/ProductVideo/Test/Mftf/Test/AdminValidateUrlOnGetVideoInformationTest.xml index 03fb71ac039a7..183bd64d97678 100644 --- a/app/code/Magento/ProductVideo/Test/Mftf/Test/AdminValidateUrlOnGetVideoInformationTest.xml +++ b/app/code/Magento/ProductVideo/Test/Mftf/Test/AdminValidateUrlOnGetVideoInformationTest.xml @@ -22,7 +22,7 @@ </before> <after> <createData entity="DefaultProductVideoConfig" stepKey="setStoreDefaultConfig"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndexPage"/> <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct"> diff --git a/app/code/Magento/ProductVideo/Test/Mftf/Test/YoutubeVideoWindowOnProductPageTest.xml b/app/code/Magento/ProductVideo/Test/Mftf/Test/YoutubeVideoWindowOnProductPageTest.xml index 13d396b4faf45..ee03e811ae579 100644 --- a/app/code/Magento/ProductVideo/Test/Mftf/Test/YoutubeVideoWindowOnProductPageTest.xml +++ b/app/code/Magento/ProductVideo/Test/Mftf/Test/YoutubeVideoWindowOnProductPageTest.xml @@ -85,7 +85,7 @@ <!-- Set product video configuration to default --> <createData entity="DefaultProductVideoConfig" stepKey="setStoreDefaultConfig" before="logout"/> <!--Log Out--> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsNavigateMenuTest.xml index 342955e0684b3..b044b7a9b1f79 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToAbandonedCartsPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsBestsellersNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsBestsellersNavigateMenuTest.xml index 259f2cde2786a..2c78a9568325b 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsBestsellersNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsBestsellersNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsBestsellersPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsCouponsNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsCouponsNavigateMenuTest.xml index 321f3078bc63f..ff3372285b211 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsCouponsNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsCouponsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsCouponsPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsDownloadsNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsDownloadsNavigateMenuTest.xml index 584c1af6683aa..05ee0a8032fb5 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsDownloadsNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsDownloadsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsDownloadsPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsInvoicedNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsInvoicedNavigateMenuTest.xml index 34aec0620cad9..f28ffc700c34a 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsInvoicedNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsInvoicedNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsInvoicedPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockNavigateMenuTest.xml index 5d91d65a3a457..986101a8c0db8 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsLowStockNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsLowStockPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsNewNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsNewNavigateMenuTest.xml index aeb35ba65a380..dd97d092041ca 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsNewNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsNewNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsNewPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderCountNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderCountNavigateMenuTest.xml index 1bfbc654746e6..638cc30279966 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderCountNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderCountNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsOrderCountPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderTotalNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderTotalNavigateMenuTest.xml index 88c94b53f5233..c1c8256e3d331 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderTotalNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderTotalNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsOrderTotalPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedGroupedBySkuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedGroupedBySkuTest.xml index d507d6b38f74b..52c0e49ee9291 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedGroupedBySkuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedGroupedBySkuTest.xml @@ -31,7 +31,7 @@ <actionGroup ref="DeleteProductAttributeByLabelActionGroup" stepKey="deleteAttributeSet"> <argument name="ProductAttribute" value="colorProductAttribute"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Add first configurable product to order--> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedNavigateMenuTest.xml index e81239539a5b5..9053fb35150b6 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrderedNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsOrderedPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrdersNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrdersNavigateMenuTest.xml index 13fc8e7353139..77fd6c46196af 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrdersNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsOrdersNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsOrdersPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsProductsInCartNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsProductsInCartNavigateMenuTest.xml index 03877f8e58ecc..00b93b0a93180 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsProductsInCartNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsProductsInCartNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsProductsInCartPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsRefreshStatisticsNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsRefreshStatisticsNavigateMenuTest.xml index d05fc091357df..94290b918969d 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsRefreshStatisticsNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsRefreshStatisticsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsRefreshStatisticsPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsTaxNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsTaxNavigateMenuTest.xml index 11a065c933a3b..6b34f51c39d88 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsTaxNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsTaxNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsTaxPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsViewsNavigateMenuTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsViewsNavigateMenuTest.xml index 9154b96c71e38..ff259cc5870ff 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsViewsNavigateMenuTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/AdminReportsViewsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsViewsPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Reports/Test/Mftf/Test/CancelOrdersInOrderSalesReportTest.xml b/app/code/Magento/Reports/Test/Mftf/Test/CancelOrdersInOrderSalesReportTest.xml index 324b56757c516..0435ab6b7be49 100644 --- a/app/code/Magento/Reports/Test/Mftf/Test/CancelOrdersInOrderSalesReportTest.xml +++ b/app/code/Magento/Reports/Test/Mftf/Test/CancelOrdersInOrderSalesReportTest.xml @@ -37,7 +37,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingReviewsNavigateMenuTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingReviewsNavigateMenuTest.xml index fade220d22100..5f0bf53012126 100644 --- a/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingReviewsNavigateMenuTest.xml +++ b/app/code/Magento/Review/Test/Mftf/Test/AdminMarketingReviewsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsViewsPage"> <argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/> diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByCustomersNavigateMenuTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByCustomersNavigateMenuTest.xml index 58492424e76f7..bc8b5655ad537 100644 --- a/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByCustomersNavigateMenuTest.xml +++ b/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByCustomersNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsByCustomersPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByProductsNavigateMenuTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByProductsNavigateMenuTest.xml index e848aa4f22023..cab50343efb54 100644 --- a/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByProductsNavigateMenuTest.xml +++ b/app/code/Magento/Review/Test/Mftf/Test/AdminReportsByProductsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsByProductsPage"> <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminStoresRatingNavigateMenuTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminStoresRatingNavigateMenuTest.xml index 511ed5439dc3d..ad211a2ee0ec8 100644 --- a/app/code/Magento/Review/Test/Mftf/Test/AdminStoresRatingNavigateMenuTest.xml +++ b/app/code/Magento/Review/Test/Mftf/Test/AdminStoresRatingNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToStoresRatingPage"> <argument name="menuUiId" value="{{AdminMenuStores.dataUiId}}"/> diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeNoTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeNoTest.xml index 77789dd172bdd..f6e80119610c0 100644 --- a/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeNoTest.xml +++ b/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeNoTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateToNewRatingFormActionGroup" stepKey="navigateToNewRatingPage" /> <actionGroup ref="AdminAssertStoreViewRatingTitleWhenSingleStoreModeIsNoActionGroup" stepKey="verifyForm" /> diff --git a/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeYesTest.xml b/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeYesTest.xml index e5368e9192c98..5c4a455dde9ae 100644 --- a/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeYesTest.xml +++ b/app/code/Magento/Review/Test/Mftf/Test/AdminVerifyNewRatingFormSingleStoreModeYesTest.xml @@ -24,7 +24,7 @@ </before> <after> <magentoCLI command="config:set general/single_store_mode/enabled 0" stepKey="enabledSingleStoreMode"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateToNewRatingFormActionGroup" stepKey="navigateToNewRatingPage" /> <actionGroup ref="AdminAssertStoreViewRatingTitleWhenSingleStoreModeIsYesActionGroup" stepKey="verifyForm" /> diff --git a/app/code/Magento/Review/Test/Mftf/Test/StorefrontNoJavascriptErrorOnAddYourReviewClickTest.xml b/app/code/Magento/Review/Test/Mftf/Test/StorefrontNoJavascriptErrorOnAddYourReviewClickTest.xml index c981d70938e11..c76c30b47ac51 100644 --- a/app/code/Magento/Review/Test/Mftf/Test/StorefrontNoJavascriptErrorOnAddYourReviewClickTest.xml +++ b/app/code/Magento/Review/Test/Mftf/Test/StorefrontNoJavascriptErrorOnAddYourReviewClickTest.xml @@ -39,7 +39,7 @@ <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/> <deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{StorefrontProductPage.url($$createProduct.name$$)}}" stepKey="goToProductPage"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AddConfigurableProductToOrderFromShoppingCartTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AddConfigurableProductToOrderFromShoppingCartTest.xml index df3a1a2b91219..9b03f566a5c57 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AddConfigurableProductToOrderFromShoppingCartTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AddConfigurableProductToOrderFromShoppingCartTest.xml @@ -57,7 +57,7 @@ </before> <after> <!-- Admin log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Customer log out --> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AddSimpleProductToOrderFromShoppingCartTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AddSimpleProductToOrderFromShoppingCartTest.xml index 589da3e49dc89..1485613f4e4c2 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AddSimpleProductToOrderFromShoppingCartTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AddSimpleProductToOrderFromShoppingCartTest.xml @@ -28,7 +28,7 @@ </before> <after> <!-- Admin log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Customer log out --> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminAvailabilityCreditMemoWithNoPaymentTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminAvailabilityCreditMemoWithNoPaymentTest.xml index ec518c79a0808..9b12f1c951991 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminAvailabilityCreditMemoWithNoPaymentTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminAvailabilityCreditMemoWithNoPaymentTest.xml @@ -38,7 +38,7 @@ <argument name="customerEmail" value="Simple_US_Customer.email"/> </actionGroup> <magentoCLI command="cache:flush" stepKey="flushCache"/> - <actionGroup ref="logout" stepKey="logOut"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logOut"/> </after> <!--Proceed to Admin panel > SALES > Orders. Created order should be in Processing status--> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithBankTransferPaymentMethodTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithBankTransferPaymentMethodTest.xml index 726b4a99cdec9..4646f6cf2e5a0 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithBankTransferPaymentMethodTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithBankTransferPaymentMethodTest.xml @@ -40,7 +40,7 @@ <magentoCLI command="config:set {{DisablePaymentBankTransferConfigData.path}} {{DisablePaymentBankTransferConfigData.value}}" stepKey="disableBankTransferPayment"/> <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create new customer order--> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCashOnDeliveryPaymentMethodTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCashOnDeliveryPaymentMethodTest.xml index eb46621a458ab..7f162ca4e2a6a 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCashOnDeliveryPaymentMethodTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCashOnDeliveryPaymentMethodTest.xml @@ -40,7 +40,7 @@ <magentoCLI command="config:set {{DisableCashOnDeliveryConfigData.path}} {{DisableCashOnDeliveryConfigData.value}}" stepKey="disableCashOnDeliveryPayment"/> <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create new customer order --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCheckMoneyOrderPaymentMethodTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCheckMoneyOrderPaymentMethodTest.xml index 5883d044e95a0..d08754a8a4127 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCheckMoneyOrderPaymentMethodTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCheckMoneyOrderPaymentMethodTest.xml @@ -107,7 +107,7 @@ <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigurableProduct"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteProductAttribute"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithProductQtyWithoutStockDecreaseTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithProductQtyWithoutStockDecreaseTest.xml index a8076bfb9f681..d64af533b04e0 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithProductQtyWithoutStockDecreaseTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithProductQtyWithoutStockDecreaseTest.xml @@ -43,7 +43,7 @@ <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create new customer order--> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithPurchaseOrderPaymentMethodTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithPurchaseOrderPaymentMethodTest.xml index c85a3fffc2c69..ce653b11f854b 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithPurchaseOrderPaymentMethodTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithPurchaseOrderPaymentMethodTest.xml @@ -42,7 +42,7 @@ <magentoCLI command="config:set {{DisablePurchaseOrderConfigData.path}} {{DisablePurchaseOrderConfigData.value}}" stepKey="disablePurchaseOrderPayment"/> <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create new customer order--> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithZeroSubtotalCheckoutTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithZeroSubtotalCheckoutTest.xml index a8014466c5773..095bd9af2c1b1 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithZeroSubtotalCheckoutTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithZeroSubtotalCheckoutTest.xml @@ -45,7 +45,7 @@ <deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/> <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create new customer order--> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminChangeCustomerGroupInNewOrder.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminChangeCustomerGroupInNewOrder.xml index e19002d5ecb4c..cabb6edec2f52 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminChangeCustomerGroupInNewOrder.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminChangeCustomerGroupInNewOrder.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="login"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="NavigateToNewOrderPageNewCustomerActionGroup" stepKey="openNewOrder"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingCreditMemoUpdateTotalsTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingCreditMemoUpdateTotalsTest.xml index 251d29df43dd1..34a415ccf03ad 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingCreditMemoUpdateTotalsTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingCreditMemoUpdateTotalsTest.xml @@ -32,7 +32,7 @@ <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <!--Delete customer--> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="CreateOrderActionGroup" stepKey="createOrder"> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingDateAfterChangeInterfaceLocaleTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingDateAfterChangeInterfaceLocaleTest.xml index ad3b6cf45d5bb..979e2cef3ff28 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingDateAfterChangeInterfaceLocaleTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCheckingDateAfterChangeInterfaceLocaleTest.xml @@ -40,7 +40,7 @@ <!--Clear filters--> <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderFilters"/> <!--Logout from Admin page--> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create order--> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml index e499f72004986..e55cdfeb284b4 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml @@ -48,7 +48,7 @@ <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/> - <actionGroup ref="logout" stepKey="logOut"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logOut"/> </after> <!--Complete Bundle product creation--> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoBankTransferPaymentTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoBankTransferPaymentTest.xml index 4b582a09deacf..de92d80546733 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoBankTransferPaymentTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoBankTransferPaymentTest.xml @@ -39,7 +39,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create Order --> <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderPage"> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoConfigurableProductTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoConfigurableProductTest.xml index 766839a50a862..d70a7412bddc2 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoConfigurableProductTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoConfigurableProductTest.xml @@ -97,7 +97,7 @@ <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> <deleteData createDataKey="createCategory" stepKey="deleteApiCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoPartialRefundTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoPartialRefundTest.xml index 2b6008c93084e..2cacfe934427c 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoPartialRefundTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoPartialRefundTest.xml @@ -37,7 +37,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create Order --> <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderPage"> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithCashOnDeliveryTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithCashOnDeliveryTest.xml index 452c54d188c57..e9954de55afbc 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithCashOnDeliveryTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithCashOnDeliveryTest.xml @@ -39,7 +39,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create Order --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithPurchaseOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithPurchaseOrderTest.xml index 231ff78d7d8fb..2d5b2d3c66906 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithPurchaseOrderTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithPurchaseOrderTest.xml @@ -39,7 +39,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create Order --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateInvoiceTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateInvoiceTest.xml index 73c126bb7794f..9a635df80f108 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateInvoiceTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateInvoiceTest.xml @@ -25,7 +25,7 @@ </createData> </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createCategory" stepKey="deleteProduct1"/> <deleteData createDataKey="createProduct" stepKey="deleteCategory1"/> </after> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAddProductCheckboxTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAddProductCheckboxTest.xml index 8fe49558cf091..072522452e7b9 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAddProductCheckboxTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAddProductCheckboxTest.xml @@ -42,7 +42,7 @@ <seeCheckboxIsChecked selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="verifyProductChecked"/> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <deleteData createDataKey="createSimpleCustomer" stepKey="deleteSimpleCustomer"/> </after> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAndCheckTheReorderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAndCheckTheReorderTest.xml index 338765d650d13..a7112776bf157 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAndCheckTheReorderTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderAndCheckTheReorderTest.xml @@ -52,7 +52,7 @@ <actionGroup ref="StorefrontCustomerReorderButtonNotVisibleActionGroup" stepKey="checkReorderButton"/> <after> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <magentoCLI command="config:set payment/cashondelivery/active 0" stepKey="disableCashOnDeliveryMethod"/> <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderForCustomerWithTwoAddressesTaxableAndNonTaxableTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderForCustomerWithTwoAddressesTaxableAndNonTaxableTest.xml index 8177bbaa6e1d7..b687e63fbc328 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderForCustomerWithTwoAddressesTaxableAndNonTaxableTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderForCustomerWithTwoAddressesTaxableAndNonTaxableTest.xml @@ -71,7 +71,7 @@ <!--Delete tax rule--> <deleteData createDataKey="createTaxRule" stepKey="deleteTaxRule"/> <!--Logout--> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!--Disable free shipping method --> <magentoCLI command="config:set {{DisableFreeShippingConfigData.path}} {{DisableFreeShippingConfigData.value}}" stepKey="disableFreeShipping"/> </after> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingCodeTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingCodeTest.xml index 40a731410a899..bbb0489b6c9a4 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingCodeTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingCodeTest.xml @@ -22,7 +22,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to new order status page --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingLabelTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingLabelTest.xml index d1381bbb1efb0..23bf293f67a81 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingLabelTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusDuplicatingLabelTest.xml @@ -22,7 +22,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to new order status page --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusTest.xml index c2daaac84dd42..03acf2194c64d 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderStatusTest.xml @@ -22,7 +22,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to new order status page --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithBundleProductTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithBundleProductTest.xml index 1749fcd6c218e..f439d792c9330 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithBundleProductTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithBundleProductTest.xml @@ -101,7 +101,7 @@ <actionGroup ref="VerifyCreatedOrderInformationActionGroup" stepKey="verifyCreatedOrderInformation"/> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="product" stepKey="delete"/> <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithDateTimeOptionUITest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithDateTimeOptionUITest.xml index 1fa01e0efa156..9383cd263269d 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithDateTimeOptionUITest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithDateTimeOptionUITest.xml @@ -28,7 +28,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/> <deleteData createDataKey="createCustomer" stepKey="deleteSimpleCustomer"/> </after> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSelectedShoppingCartItemsTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSelectedShoppingCartItemsTest.xml index 58a680ea61c87..60ade9ebe01e7 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSelectedShoppingCartItemsTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSelectedShoppingCartItemsTest.xml @@ -97,7 +97,7 @@ <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> <!--Logout--> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductCustomOptionFileTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductCustomOptionFileTest.xml index 200ac6e62ac15..b694363960def 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductCustomOptionFileTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductCustomOptionFileTest.xml @@ -29,7 +29,7 @@ <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> <deleteData createDataKey="category" stepKey="deleteCategory"/> <deleteData createDataKey="customer" stepKey="deleteCustomer" /> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Add option to product.--> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductTest.xml index 76f916d55ee92..cc709dc6e16eb 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithSimpleProductTest.xml @@ -50,7 +50,7 @@ <argument name="stockStatus" value="Out of Stock"/> </actionGroup> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <magentoCLI command="config:set payment/cashondelivery/active 0" stepKey="disableCashOnDeliveryMethod"/> <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminFreeShippingNotAvailableIfMinimumOrderAmountNotMatchOrderTotalTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminFreeShippingNotAvailableIfMinimumOrderAmountNotMatchOrderTotalTest.xml index 9ff6f3bdac985..01a27a6191d74 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminFreeShippingNotAvailableIfMinimumOrderAmountNotMatchOrderTotalTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminFreeShippingNotAvailableIfMinimumOrderAmountNotMatchOrderTotalTest.xml @@ -37,7 +37,7 @@ <createData entity="FlatRateShippingMethodConfig" stepKey="enableFlatRate"/> <createData entity="FreeShippinMethodDefault" stepKey="disableFreeShippingMethod"/> <createData entity="setFreeShippingSubtotalToDefault" stepKey="setFreeShippingSubtotalToDefault"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <magentoCLI command="cache:flush" stepKey="flushCache2"/> </after> <!--Create new order with existing customer--> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminHoldCreatedOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminHoldCreatedOrderTest.xml index 5dc5dbf3ab79d..a5cbb15faf2d7 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminHoldCreatedOrderTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminHoldCreatedOrderTest.xml @@ -40,7 +40,7 @@ <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create new customer order--> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelCompleteAndClosedTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelCompleteAndClosedTest.xml index ec624a80f1613..803e24b3423aa 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelCompleteAndClosedTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelCompleteAndClosedTest.xml @@ -33,7 +33,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create first order --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelProcessingAndClosedTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelProcessingAndClosedTest.xml index 5e524bcf6e05c..c230dc41f0d2e 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelProcessingAndClosedTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersCancelProcessingAndClosedTest.xml @@ -33,7 +33,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create first order --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml index 179e1aa35a4e9..14b61af59eaed 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnCompleteTest.xml @@ -33,7 +33,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create order --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnPendingAndProcessingTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnPendingAndProcessingTest.xml index ec0ec8ca222da..5ac803cb666b4 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnPendingAndProcessingTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersHoldOnPendingAndProcessingTest.xml @@ -33,7 +33,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create first order --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersReleasePendingOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersReleasePendingOrderTest.xml index 6c97c4add6313..4b8df455d545d 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersReleasePendingOrderTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersReleasePendingOrderTest.xml @@ -33,7 +33,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create order --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersUpdateCancelPendingOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersUpdateCancelPendingOrderTest.xml index d7c9664b8bce2..84d5426bd44e3 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersUpdateCancelPendingOrderTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersUpdateCancelPendingOrderTest.xml @@ -32,7 +32,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create order --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminOrdersReleaseInUnholdStatusTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminOrdersReleaseInUnholdStatusTest.xml index 009f86256a910..83998990c70ed 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminOrdersReleaseInUnholdStatusTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminOrdersReleaseInUnholdStatusTest.xml @@ -33,7 +33,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create order --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminProductInTheShoppingCartCouldBeReachedByAdminDuringOrderCreationWithMultiWebsiteConfigTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminProductInTheShoppingCartCouldBeReachedByAdminDuringOrderCreationWithMultiWebsiteConfigTest.xml index d30074a240546..4f0d777ad0f21 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminProductInTheShoppingCartCouldBeReachedByAdminDuringOrderCreationWithMultiWebsiteConfigTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminProductInTheShoppingCartCouldBeReachedByAdminDuringOrderCreationWithMultiWebsiteConfigTest.xml @@ -53,7 +53,7 @@ <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite"> <argument name="websiteName" value="{{customWebsite.name}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create customer account for Second Website--> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceRuleDiscountTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceRuleDiscountTest.xml index ccdf90cc648c5..b535e1836ed24 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceRuleDiscountTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceRuleDiscountTest.xml @@ -45,7 +45,7 @@ <after> <deleteData createDataKey="createSimpleProductApi" stepKey="deleteSimpleProductApi"/> <actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!--Open order by Id--> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesCreditMemosNavigateMenuTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesCreditMemosNavigateMenuTest.xml index af7cc1822d215..424b931314b01 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesCreditMemosNavigateMenuTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesCreditMemosNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSalesCreditMemosPage"> <argument name="menuUiId" value="{{AdminMenuSales.dataUiId}}"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesInvoicesNavigateMenuTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesInvoicesNavigateMenuTest.xml index 5a38a66d1f4b2..89d4cc4c7371f 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesInvoicesNavigateMenuTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesInvoicesNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSalesInvoicesPage"> <argument name="menuUiId" value="{{AdminMenuSales.dataUiId}}"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesOrdersNavigateMenuTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesOrdersNavigateMenuTest.xml index 8099254923a2c..6d765537494ed 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesOrdersNavigateMenuTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesOrdersNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSalesOrderPage"> <argument name="menuUiId" value="{{AdminMenuSales.dataUiId}}"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesShipmentsNavigateMenuTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesShipmentsNavigateMenuTest.xml index 5717c6c90fc17..05f15ad76b07c 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesShipmentsNavigateMenuTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesShipmentsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSalesShipmentsPage"> <argument name="menuUiId" value="{{AdminMenuSales.dataUiId}}"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesTransactionsNavigateMenuTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesTransactionsNavigateMenuTest.xml index 68933be92efe6..17f0bad87037e 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesTransactionsNavigateMenuTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSalesTransactionsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSalesTransactionsPage"> <argument name="menuUiId" value="{{AdminMenuSales.dataUiId}}"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSaveInAddressBookCheckboxStateTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSaveInAddressBookCheckboxStateTest.xml index f2341278becba..ac0af3f5b80db 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSaveInAddressBookCheckboxStateTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSaveInAddressBookCheckboxStateTest.xml @@ -27,7 +27,7 @@ <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct"> <requiredEntity createDataKey="createCategory"/> </createData> - <actionGroup ref="LoginActionGroup" stepKey="login"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> </before> <after> <!-- Delete created data and log out --> @@ -35,7 +35,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logOut"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logOut"/> </after> <!-- Create new order and choose an existing customer --> <comment userInput="Create new order and choose an existing customer" stepKey="createOrderAndAddCustomer"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminStoresOrderStatusNavigateMenuTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminStoresOrderStatusNavigateMenuTest.xml index d55cde1449033..7884926946178 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminStoresOrderStatusNavigateMenuTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminStoresOrderStatusNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToStoresOrderStatusPage"> <argument name="menuUiId" value="{{AdminMenuStores.dataUiId}}"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitConfigurableProductOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitConfigurableProductOrderTest.xml index dc269ff7a2f98..cfdbd39838ecb 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitConfigurableProductOrderTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitConfigurableProductOrderTest.xml @@ -122,7 +122,7 @@ <actionGroup ref="VerifyCreatedOrderInformationActionGroup" stepKey="verifyCreatedOrderInformation"/> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderPaymentMethodValidationTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderPaymentMethodValidationTest.xml index b2d424ca5d7d3..5981c49345aa0 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderPaymentMethodValidationTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderPaymentMethodValidationTest.xml @@ -29,7 +29,7 @@ <magentoCLI stepKey="allowSpecificValue" command="config:set payment/cashondelivery/active 0" /> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!--Create order via Admin--> <comment userInput="Admin creates order" stepKey="adminCreateOrderComment"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutEmailTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutEmailTest.xml index f2d0fffe9b4cf..b9e2d475f9ff6 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutEmailTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutEmailTest.xml @@ -26,7 +26,7 @@ <after> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!--Create order via Admin--> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutFieldsValidationTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutFieldsValidationTest.xml index 4dbd80a351ee7..d44cb829bc205 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutFieldsValidationTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutFieldsValidationTest.xml @@ -25,7 +25,7 @@ <after> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!--Create order via Admin--> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminUnassignCustomOrderStatusTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminUnassignCustomOrderStatusTest.xml index 5f7a7c7606619..bd43937e6f24e 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AdminUnassignCustomOrderStatusTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminUnassignCustomOrderStatusTest.xml @@ -21,7 +21,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Go to new order status page--> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AssignCustomOrderStatusNotVisibleOnStorefrontTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AssignCustomOrderStatusNotVisibleOnStorefrontTest.xml index ac377a0d31606..af07d50bcc8c7 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/AssignCustomOrderStatusNotVisibleOnStorefrontTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/AssignCustomOrderStatusNotVisibleOnStorefrontTest.xml @@ -43,7 +43,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create order status --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CheckXSSVulnerabilityDuringOrderCreationTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CheckXSSVulnerabilityDuringOrderCreationTest.xml index 6eb9e37a3ab79..dbe012f17176d 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/CheckXSSVulnerabilityDuringOrderCreationTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/CheckXSSVulnerabilityDuringOrderCreationTest.xml @@ -27,7 +27,7 @@ <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Add product to the shopping cart --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceAndCheckInvoiceOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceAndCheckInvoiceOrderTest.xml index 0b065e0da54f0..233842d432349 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceAndCheckInvoiceOrderTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceAndCheckInvoiceOrderTest.xml @@ -47,7 +47,7 @@ <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create order --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithCashOnDeliveryPaymentMethodTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithCashOnDeliveryPaymentMethodTest.xml index 295d388ced96e..3ae4007ac211d 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithCashOnDeliveryPaymentMethodTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithCashOnDeliveryPaymentMethodTest.xml @@ -47,7 +47,7 @@ <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create order --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithShipmentAndCheckInvoicedOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithShipmentAndCheckInvoicedOrderTest.xml index 2ccecf34a5a0c..540af6958d54c 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithShipmentAndCheckInvoicedOrderTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithShipmentAndCheckInvoicedOrderTest.xml @@ -45,7 +45,7 @@ <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create order--> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithZeroSubtotalCheckoutTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithZeroSubtotalCheckoutTest.xml index 944a1ed75cebd..8fd751f96914e 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithZeroSubtotalCheckoutTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/CreateInvoiceWithZeroSubtotalCheckoutTest.xml @@ -58,7 +58,7 @@ <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create order --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml index 5d017cc0caab8..e0ede2ebe55b8 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml @@ -89,7 +89,7 @@ <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomerIndexPage"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearCustomerGridFilter"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml index 8ca8dbf21a3a2..8c80c1e9ee6d3 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml @@ -23,7 +23,7 @@ <createData entity="_defaultProduct" stepKey="createProduct"> <requiredEntity createDataKey="createCategory"/> </createData> - <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderFilters"/> <actionGroup ref="SetTaxClassForShippingActionGroup" stepKey="setShippingTaxClass"/> </before> @@ -33,7 +33,7 @@ <argument name="ruleName" value="{{ApiSalesRule.name}}"/> </actionGroup> <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderFilters"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <deleteData createDataKey="createCategory" stepKey="deleteProduct1"/> <deleteData createDataKey="createProduct" stepKey="deleteCategory1"/> </after> @@ -58,7 +58,7 @@ <click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/> <see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <!-- Place an order from Storefront as a Guest --> <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onCategoryPage"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/MoveConfigurableProductsInComparedOnOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/MoveConfigurableProductsInComparedOnOrderPageTest.xml index 27b0952781250..a214979bef885 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/MoveConfigurableProductsInComparedOnOrderPageTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/MoveConfigurableProductsInComparedOnOrderPageTest.xml @@ -86,7 +86,7 @@ </before> <after> <!-- Admin logout --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Logout customer --> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedConfigurableProductOnOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedConfigurableProductOnOrderPageTest.xml index 65c631b95f5c2..6b6718c67cb4c 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedConfigurableProductOnOrderPageTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedConfigurableProductOnOrderPageTest.xml @@ -60,7 +60,7 @@ </before> <after> <!-- Delete created data --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createConfigChildProduct" stepKey="deleteConfigChildProduct"/> <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedSimpleProductOnOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedSimpleProductOnOrderPageTest.xml index f13a934276e35..5355dba260060 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedSimpleProductOnOrderPageTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedSimpleProductOnOrderPageTest.xml @@ -33,7 +33,7 @@ <!-- Delete created data --> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logOut"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logOut"/> </after> <!-- Create order --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedBundleFixedProductOnOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedBundleFixedProductOnOrderPageTest.xml index 0a39e8a0ac852..bf78012926a7b 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedBundleFixedProductOnOrderPageTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedBundleFixedProductOnOrderPageTest.xml @@ -61,7 +61,7 @@ </before> <after> <!-- Admin logout --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Customer logout --> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedConfigurableProductOnOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedConfigurableProductOnOrderPageTest.xml index c7c08914fea4b..eae4de730f116 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedConfigurableProductOnOrderPageTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedConfigurableProductOnOrderPageTest.xml @@ -62,7 +62,7 @@ </before> <after> <!-- Admin logout --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Customer logout --> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/MoveSimpleProductsInComparedOnOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/MoveSimpleProductsInComparedOnOrderPageTest.xml index 3c01878b59e59..9790f03abed5a 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/MoveSimpleProductsInComparedOnOrderPageTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/MoveSimpleProductsInComparedOnOrderPageTest.xml @@ -33,7 +33,7 @@ </before> <after> <!-- Admin logout --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Logout customer --> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml index aef3e884c4712..f68a36b29af4f 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml @@ -120,7 +120,7 @@ <!-- Delete Customer --> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Login to Storefront as Customer --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml index 3ff8a7791d88b..9319022a96b20 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerIsAbsentTest.xml @@ -113,7 +113,7 @@ <!-- Delete Customer --> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Login to Storefront as Customer --> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontPrintOrderGuestTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontPrintOrderGuestTest.xml index 4369fa8a94101..2f5ffbb96e8d7 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontPrintOrderGuestTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontPrintOrderGuestTest.xml @@ -225,7 +225,7 @@ <deleteData createDataKey="createCartPriceRule" stepKey="deleteCartPriceRule"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartRulesAppliedForProductInCartTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartRulesAppliedForProductInCartTest.xml index 916416dcd9141..49dcc47e14779 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartRulesAppliedForProductInCartTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCartRulesAppliedForProductInCartTest.xml @@ -46,7 +46,7 @@ </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilters1"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Start creating a bundle product--> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateBuyXGetYFreeTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateBuyXGetYFreeTest.xml index addb65a68fad3..3f063b5869129 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateBuyXGetYFreeTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateBuyXGetYFreeTest.xml @@ -30,7 +30,7 @@ <argument name="ruleName" value="{{_defaultCoupon.code}}"/> </actionGroup> <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Create a cart price rule of type Buy X get Y free --> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleAndVerifyRuleConditionAndFreeShippingIsAppliedTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleAndVerifyRuleConditionAndFreeShippingIsAppliedTest.xml index 0d23e0e035432..54a6f7a16bb23 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleAndVerifyRuleConditionAndFreeShippingIsAppliedTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleAndVerifyRuleConditionAndFreeShippingIsAppliedTest.xml @@ -27,7 +27,7 @@ <actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteCreatedCartPriceRule"> <argument name="ruleName" value="{{CartPriceRuleConditionAndFreeShippingApplied.name}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create cart price rule as per data and verify AssertCartPriceRuleSuccessSaveMessage--> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleAndVerifyRuleConditionIsNotAppliedTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleAndVerifyRuleConditionIsNotAppliedTest.xml index b41e139536223..0e1a4d7c186aa 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleAndVerifyRuleConditionIsNotAppliedTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleAndVerifyRuleConditionIsNotAppliedTest.xml @@ -29,7 +29,7 @@ <actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteCreatedCartPriceRule"> <argument name="ruleName" value="{{CartPriceRuleConditionNotApplied.name}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logoutAsAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/> </after> <!--Create cart price rule as per data and verify AssertCartPriceRuleSuccessSaveMessage--> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleEmptyFromDateTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleEmptyFromDateTest.xml index f0075a92a2b82..64443c717ac33 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleEmptyFromDateTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleEmptyFromDateTest.xml @@ -34,7 +34,7 @@ </actionGroup> <deleteData createDataKey="category" stepKey="deleteCategory"/> <deleteData createDataKey="product" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Set timezone--> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml index 6242c1f3d1baf..f33eb187e4cc8 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForCouponCodeTest.xml @@ -30,7 +30,7 @@ <argument name="ruleName" value="{{_defaultCoupon.code}}"/> </actionGroup> <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create a cart price rule based on a coupon code --> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml index 78943a0648b51..4b793dbf8583f 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml @@ -30,7 +30,7 @@ <argument name="ruleName" value="{{_defaultCoupon.code}}"/> </actionGroup> <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Create a cart price rule --> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForMatchingSubtotalAndVerifyRuleConditionIsAppliedTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForMatchingSubtotalAndVerifyRuleConditionIsAppliedTest.xml index 385c9e35da393..7365f3b7a3425 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForMatchingSubtotalAndVerifyRuleConditionIsAppliedTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForMatchingSubtotalAndVerifyRuleConditionIsAppliedTest.xml @@ -27,7 +27,7 @@ <actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteCreatedCartPriceRule"> <argument name="ruleName" value="{{CartPriceRuleConditionAppliedForSubtotal.name}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create cart price rule as per data and verify AssertCartPriceRuleSuccessSaveMessage--> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleWithMatchingCategoryAndVerifyRuleConditionIsAppliedTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleWithMatchingCategoryAndVerifyRuleConditionIsAppliedTest.xml index a56e332ce1a85..81c30d197759d 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleWithMatchingCategoryAndVerifyRuleConditionIsAppliedTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleWithMatchingCategoryAndVerifyRuleConditionIsAppliedTest.xml @@ -34,7 +34,7 @@ <actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteCreatedCartPriceRule"> <argument name="ruleName" value="{{CartPriceRuleConditionAppliedForCategory.name}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create cart price rule as per data and verify AssertCartPriceRuleSuccessSaveMessage--> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleWithMatchingTotalWeightAndVerifyRuleConditionIsAppliedTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleWithMatchingTotalWeightAndVerifyRuleConditionIsAppliedTest.xml index 0541ee2dd4eba..2685e004ba1e0 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleWithMatchingTotalWeightAndVerifyRuleConditionIsAppliedTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleWithMatchingTotalWeightAndVerifyRuleConditionIsAppliedTest.xml @@ -27,7 +27,7 @@ <actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteCreatedCartPriceRule"> <argument name="ruleName" value="{{CartPriceRuleConditionAppliedForWeight.name}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create cart price rule as per data and verify AssertCartPriceRuleSuccessSaveMessage--> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountDiscountTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountDiscountTest.xml index c65a5a865e779..f6d61f62c1f54 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountDiscountTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountDiscountTest.xml @@ -30,7 +30,7 @@ <argument name="ruleName" value="{{_defaultCoupon.code}}"/> </actionGroup> <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Create a cart price rule for $10 Fixed amount discount --> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountWholeCartDiscountTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountWholeCartDiscountTest.xml index 69ba7aef393b5..cb3e6c517e1ec 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountWholeCartDiscountTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateFixedAmountWholeCartDiscountTest.xml @@ -30,7 +30,7 @@ <argument name="ruleName" value="{{SimpleSalesRule.name}}"/> </actionGroup> <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Create a cart price rule for Fixed amount discount for whole cart --> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateInvalidRuleTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateInvalidRuleTest.xml index 620112e323ff5..3bbacf912e5d6 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateInvalidRuleTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateInvalidRuleTest.xml @@ -23,7 +23,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <amOnPage url="{{AdminCartPriceRulesPage.url}}" stepKey="amOnCartPriceList"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreatePercentOfProductPriceTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreatePercentOfProductPriceTest.xml index 2c4df39426720..38986dc32f8d2 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreatePercentOfProductPriceTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreatePercentOfProductPriceTest.xml @@ -32,7 +32,7 @@ <argument name="ruleName" value="{{_defaultCoupon.code}}"/> </actionGroup> <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Create a cart price rule for 50 percent of product price --> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithComplexConditionsAndVerifyDeleteMessageTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithComplexConditionsAndVerifyDeleteMessageTest.xml index 9a71210aac1c6..aed9d71c306ae 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithComplexConditionsAndVerifyDeleteMessageTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithComplexConditionsAndVerifyDeleteMessageTest.xml @@ -62,7 +62,7 @@ <actionGroup ref="AssertCartPriceRuleSuccessSaveMessageActionGroup" stepKey="assertVerifyCartPriceRuleSuccessSaveMessage"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Delete active cart price rule--> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithPercentPriceAndVerifyDeleteMessageTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithPercentPriceAndVerifyDeleteMessageTest.xml index 34b8363e8b5ce..fc9a92765c2d0 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithPercentPriceAndVerifyDeleteMessageTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteActiveSalesRuleWithPercentPriceAndVerifyDeleteMessageTest.xml @@ -28,7 +28,7 @@ </actionGroup> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Delete active cart price rule--> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteInactiveSalesRuleAndVerifyDeleteMessageTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteInactiveSalesRuleAndVerifyDeleteMessageTest.xml index 39a5d0f6a7131..6de5f127a296c 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteInactiveSalesRuleAndVerifyDeleteMessageTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminDeleteInactiveSalesRuleAndVerifyDeleteMessageTest.xml @@ -30,7 +30,7 @@ </before> <after> <deleteData createDataKey="initialSimpleProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Delete inactive cart price rule--> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminMarketingCartPriceRulesNavigateMenuTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminMarketingCartPriceRulesNavigateMenuTest.xml index f281b0abf87a0..58d7ea7c1bad8 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminMarketingCartPriceRulesNavigateMenuTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminMarketingCartPriceRulesNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToMarketingCartPriceRulesPage"> <argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/CartPriceRuleForConfigurableProductTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/CartPriceRuleForConfigurableProductTest.xml index ab8149978996e..41062b8153b3f 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/CartPriceRuleForConfigurableProductTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/CartPriceRuleForConfigurableProductTest.xml @@ -89,7 +89,7 @@ <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> <deleteData createDataKey="createCategory" stepKey="deleteApiCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml index 84537fb69ed41..60ece859dde96 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml @@ -34,7 +34,7 @@ <deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Login as Admin --> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartRuleCouponForFreeShippingTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartRuleCouponForFreeShippingTest.xml index 3526ab20aa6b4..12c278d1e7b63 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartRuleCouponForFreeShippingTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartRuleCouponForFreeShippingTest.xml @@ -39,7 +39,7 @@ <deleteData createDataKey="createCartPriceRule" stepKey="deleteSalesRule"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logoutFromBackend"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromBackend"/> </after> <!-- Login with created Customer --> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartTotalValueWithFullDiscountUsingCartRuleTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartTotalValueWithFullDiscountUsingCartRuleTest.xml index f12b8ea7ca331..80b0747a3bf72 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartTotalValueWithFullDiscountUsingCartRuleTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartTotalValueWithFullDiscountUsingCartRuleTest.xml @@ -92,7 +92,7 @@ <magentoCLI command="config:set tax/cart_display/subtotal 1" stepKey="unsetSubtotal"/> <magentoCLI command="config:set carriers/freeshipping/active 0" stepKey="unsetFreeShipping"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Add testing products to the cart --> <amOnPage url="{{StorefrontProductPage.url($$createSimpleProductFirst.custom_attributes[url_key]$$)}}" stepKey="goToProductPage"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToComplexProductsTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToComplexProductsTest.xml index dbeb4ba94061b..b43fd095b5556 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToComplexProductsTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToComplexProductsTest.xml @@ -72,7 +72,7 @@ <deleteData createDataKey="createConfigProductAttributeCreateConfigurableProduct2" stepKey="deleteConfigProductAttribute2"/> <!--Delete Cart Price Rule --> <deleteData createDataKey="createCartPriceRule" stepKey="deleteCartPriceRule"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- 1: Create a cart price rule applying to CAT1 with discount --> <createData entity="SalesRuleNoCouponWithFixedDiscount" stepKey="createCartPriceRule"/> diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml index 13b2661dcb9d0..2a97aa673fcaa 100644 --- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml +++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCategoryRulesShouldApplyToGroupedProductWithInvisibleIndividualProductTest.xml @@ -77,7 +77,7 @@ <argument name="ruleName" value="TestSalesRule"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilter"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Start to create new cart price rule via Category conditions --> <actionGroup ref="AdminCreateCartPriceRuleWithConditionIsCategoryActionGroup" stepKey="createCartPriceRuleWithCondition"> diff --git a/app/code/Magento/Search/Test/Mftf/Test/AdminGlobalSearchOnProductPageTest.xml b/app/code/Magento/Search/Test/Mftf/Test/AdminGlobalSearchOnProductPageTest.xml index 725f45c0bc6e3..6ff7a34a03b8a 100644 --- a/app/code/Magento/Search/Test/Mftf/Test/AdminGlobalSearchOnProductPageTest.xml +++ b/app/code/Magento/Search/Test/Mftf/Test/AdminGlobalSearchOnProductPageTest.xml @@ -34,7 +34,7 @@ </actionGroup> <!-- Logout --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create Simple Product --> diff --git a/app/code/Magento/Search/Test/Mftf/Test/AdminMassDeleteSearchTermEntityTest.xml b/app/code/Magento/Search/Test/Mftf/Test/AdminMassDeleteSearchTermEntityTest.xml index 01c361d336541..2b7a4e7f5e5cb 100644 --- a/app/code/Magento/Search/Test/Mftf/Test/AdminMassDeleteSearchTermEntityTest.xml +++ b/app/code/Magento/Search/Test/Mftf/Test/AdminMassDeleteSearchTermEntityTest.xml @@ -30,7 +30,7 @@ </before> <after> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to the catalog search term page --> diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontUsingElasticSearchWithWeightAttributeTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontUsingElasticSearchWithWeightAttributeTest.xml index a8391ce5ca33b..504dee5067187 100644 --- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontUsingElasticSearchWithWeightAttributeTest.xml +++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontUsingElasticSearchWithWeightAttributeTest.xml @@ -37,7 +37,7 @@ <actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveAttributeChanges"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> <!-- Logout from admin --> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!-- Step 2 --> <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openWeightProductAttribute"> diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml index 93a0f98f6f828..5030484434925 100644 --- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml +++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml @@ -39,7 +39,7 @@ </actionGroup> <!-- Delete created below search terms --> <actionGroup ref="AdminDeleteSearchTermActionGroup" stepKey="deleteSearchTerms"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to storefront home page --> <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage"/> diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml index fc933c90341f9..1d312959a4a00 100644 --- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml +++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml @@ -43,7 +43,7 @@ </actionGroup> <!-- Delete created below search terms --> <actionGroup ref="AdminDeleteSearchTermActionGroup" stepKey="deleteSearchTerms"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to storefront home page --> diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml index 65472b9e10282..3ae29f60a8e86 100644 --- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml +++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml @@ -45,7 +45,7 @@ <!-- Delete created below search terms --> <actionGroup ref="AdminDeleteSearchTermActionGroup" stepKey="deleteSearchTerms"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to storefront home page --> diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml index 6e80823b78e0f..e14cbbb85a0e7 100644 --- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml +++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml @@ -45,7 +45,7 @@ <!-- Delete created below search terms --> <actionGroup ref="AdminDeleteSearchTermActionGroup" stepKey="deleteSearchTerms"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to storefront home page --> diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml index 9f421668bdc4f..47a0224a1c4db 100644 --- a/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml +++ b/app/code/Magento/Security/Test/Mftf/Test/AdminUserLockWhenEditingUserTest.xml @@ -31,7 +31,7 @@ <actionGroup ref="AdminDeleteUserViaCurlActionGroup" stepKey="deleteUser"> <argument name="user" value="$$user$$" /> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminOpenUserEditPageActionGroup" stepKey="openEditUserPageFirstAttempt"> diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckInputFieldsDisabledAfterAppConfigDumpTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckInputFieldsDisabledAfterAppConfigDumpTest.xml index 0b7ddd0cfa781..c3d9b243c27c7 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckInputFieldsDisabledAfterAppConfigDumpTest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckInputFieldsDisabledAfterAppConfigDumpTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Assert configuration are disabled in Flat Rate section--> <comment userInput="Assert configuration are disabled in Flat Rate section" stepKey="commentSeeDisabledFlatRateConfigs"/> diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckTheConfirmationPopupTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckTheConfirmationPopupTest.xml index 87058245c6014..bacfaf15f99d7 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckTheConfirmationPopupTest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCheckTheConfirmationPopupTest.xml @@ -24,7 +24,7 @@ <after> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="CreateOrderActionGroup" stepKey="goToCreateOrderPage"> <argument name="customer" value="$$createCustomer$$"/> diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml index 7784fdd31e58e..5319992efa585 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml @@ -73,7 +73,7 @@ <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="DeleteWebsite"> <argument name="websiteName" value="{{customWebsite.name}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Assign product to custom website--> <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="goToProductEditPage"/> diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreatePartialShipmentEntityTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreatePartialShipmentEntityTest.xml index 0e4fd3ce9a86c..64d0932e9272d 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreatePartialShipmentEntityTest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreatePartialShipmentEntityTest.xml @@ -35,7 +35,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> <createData entity="FreeShippinMethodDefault" stepKey="disableFreeShippingMethod"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- TEST BODY --> diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateShipmentEntityTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateShipmentEntityTest.xml index f4087932a0710..0985aea2e502c 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateShipmentEntityTest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateShipmentEntityTest.xml @@ -35,7 +35,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> <createData entity="FreeShippinMethodDefault" stepKey="disableFreeShippingMethod"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- TEST BODY --> diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminValidateShippingTrackingNumberTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminValidateShippingTrackingNumberTest.xml index ca4d731eb82b1..7df8f08e79530 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminValidateShippingTrackingNumberTest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminValidateShippingTrackingNumberTest.xml @@ -24,7 +24,7 @@ <after> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="CreateOrderActionGroup" stepKey="goToCreateOrderPage"> <argument name="customer" value="$$createCustomer$$"/> diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/StorefrontDisplayTableRatesShippingMethodForAETest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/StorefrontDisplayTableRatesShippingMethodForAETest.xml index 81fe492ffc005..81c76ec916f7e 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/StorefrontDisplayTableRatesShippingMethodForAETest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/StorefrontDisplayTableRatesShippingMethodForAETest.xml @@ -39,7 +39,7 @@ <argument name="status" value="0"/> </actionGroup> <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveSystemConfig"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Admin Configuration: enable Table Rates and import CSV file with the rates--> <actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/> diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/TableRatesShippingMethodForDifferentStatesTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/TableRatesShippingMethodForDifferentStatesTest.xml index 5721af7fdb71b..3a375be6533db 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Test/TableRatesShippingMethodForDifferentStatesTest.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Test/TableRatesShippingMethodForDifferentStatesTest.xml @@ -36,7 +36,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to Stores > Configuration > Sales > Shipping Methods --> diff --git a/app/code/Magento/Signifyd/Test/Mftf/Test/AdminSignifydConfigDependentOnActiveFieldTest.xml b/app/code/Magento/Signifyd/Test/Mftf/Test/AdminSignifydConfigDependentOnActiveFieldTest.xml index b8fb91c4dcd99..e3275d4097c63 100644 --- a/app/code/Magento/Signifyd/Test/Mftf/Test/AdminSignifydConfigDependentOnActiveFieldTest.xml +++ b/app/code/Magento/Signifyd/Test/Mftf/Test/AdminSignifydConfigDependentOnActiveFieldTest.xml @@ -21,7 +21,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <magentoCLI command="config:set fraud_protection/signifyd/active 0" stepKey="disableSignifyd"/> </after> diff --git a/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapCreateNewTest.xml b/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapCreateNewTest.xml index 57d8f8c75d23d..0ddc0640b56df 100644 --- a/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapCreateNewTest.xml +++ b/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapCreateNewTest.xml @@ -25,7 +25,7 @@ <argument name="filename" value="{{DefaultSiteMap.filename}}" /> </actionGroup> <actionGroup ref="AssertSiteMapDeleteSuccessActionGroup" stepKey="assertDeleteSuccessMessage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminMarketingSiteMapNavigateNewActionGroup" stepKey="navigateNewSiteMap"/> <actionGroup ref="AdminMarketingSiteMapFillFormActionGroup" stepKey="fillSiteMapForm"> diff --git a/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapNavigateMenuTest.xml b/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapNavigateMenuTest.xml index 54543fab8649d..608b284f247f3 100644 --- a/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapNavigateMenuTest.xml +++ b/app/code/Magento/Sitemap/Test/Mftf/Test/AdminMarketingSiteMapNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToMarketingSiteMapPage"> <argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateCustomStoreViewStatusDisabledVerifyErrorSaveMessageTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateCustomStoreViewStatusDisabledVerifyErrorSaveMessageTest.xml index 94e723c9afafb..d4b5bc9a9b50f 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateCustomStoreViewStatusDisabledVerifyErrorSaveMessageTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateCustomStoreViewStatusDisabledVerifyErrorSaveMessageTest.xml @@ -34,7 +34,7 @@ <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite"> <argument name="websiteName" value="{{customWebsite.name}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create store view selecting store created, choose disabled status and verify AssertStoreDisabledErrorSaveMessage--> @@ -44,4 +44,4 @@ <argument name="storeViewStatus" value="{{storeViewDataDisabled.is_active}}"/> </actionGroup> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateCustomStoreViewStatusEnabledVerifyAbsenceOfDeleteButtonTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateCustomStoreViewStatusEnabledVerifyAbsenceOfDeleteButtonTest.xml index 5d4ac8de74680..dc24a2f635b52 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateCustomStoreViewStatusEnabledVerifyAbsenceOfDeleteButtonTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateCustomStoreViewStatusEnabledVerifyAbsenceOfDeleteButtonTest.xml @@ -29,7 +29,7 @@ <actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteStore"> <argument name="storeGroupName" value="customStore.name"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create custom store view--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateCustomStoreViewStatusEnabledVerifyBackendAndFrontendTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateCustomStoreViewStatusEnabledVerifyBackendAndFrontendTest.xml index 2ba8c675b3b2a..188300acc7015 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateCustomStoreViewStatusEnabledVerifyBackendAndFrontendTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateCustomStoreViewStatusEnabledVerifyBackendAndFrontendTest.xml @@ -29,7 +29,7 @@ <actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteStore"> <argument name="storeGroupName" value="customStore.name"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create custom store view--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateNewLocalizedStoreViewStatusEnabledTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateNewLocalizedStoreViewStatusEnabledTest.xml index 6c60445107b28..faa9d38a2d6fe 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateNewLocalizedStoreViewStatusEnabledTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateNewLocalizedStoreViewStatusEnabledTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"> <argument name="customStore" value="storeViewGermany"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create new localized store view--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupWithCustomWebsiteAndDefaultCategoryTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupWithCustomWebsiteAndDefaultCategoryTest.xml index 4892556929f80..aaac3e5ea08b6 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupWithCustomWebsiteAndDefaultCategoryTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupWithCustomWebsiteAndDefaultCategoryTest.xml @@ -30,7 +30,7 @@ <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite"> <argument name="websiteName" value="{{customWebsite.name}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create custom store group with custom website and default category and verify AssertStoreGroupSuccessSaveMessage--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupWithCustomWebsiteAndRootCategoryTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupWithCustomWebsiteAndRootCategoryTest.xml index 27037f45f3835..8091f01e1f7ec 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupWithCustomWebsiteAndRootCategoryTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupWithCustomWebsiteAndRootCategoryTest.xml @@ -38,7 +38,7 @@ </actionGroup> <!--Delete root category--> <deleteData stepKey="deleteRootCategory" createDataKey="rootCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create custom store group with custom website and root category and verify AssertStoreGroupSuccessSaveMessage--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupWithDefaultWebsiteAndDefaultCategoryTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupWithDefaultWebsiteAndDefaultCategoryTest.xml index 0db65501b4112..a161abe767010 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupWithDefaultWebsiteAndDefaultCategoryTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreGroupWithDefaultWebsiteAndDefaultCategoryTest.xml @@ -25,7 +25,7 @@ <actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteStoreGroup"> <argument name="storeGroupName" value="SecondStoreGroupUnique.name"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create custom store group with default website and default category and verify AssertStoreGroupSuccessSaveMessage--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewStatusDisabledVerifyBackendAndFrontendTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewStatusDisabledVerifyBackendAndFrontendTest.xml index 2d8fbc72263d4..0207faf692f14 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewStatusDisabledVerifyBackendAndFrontendTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewStatusDisabledVerifyBackendAndFrontendTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"> <argument name="customStore" value="storeViewDataDisabled"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create store view--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewStatusEnabledVerifyBackendAndFrontendTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewStatusEnabledVerifyBackendAndFrontendTest.xml index 150e1082352cf..767b452544714 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewStatusEnabledVerifyBackendAndFrontendTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewStatusEnabledVerifyBackendAndFrontendTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"> <argument name="customStore" value="storeViewData"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create store view--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewTest.xml index e20eb70ae6f45..4171aa6f08915 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateStoreViewTest.xml @@ -20,7 +20,7 @@ </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView" /> </before> @@ -29,7 +29,7 @@ <argument name="customStore" value="customStore"/> </actionGroup> <click selector="{{AdminStoresGridSection.resetButton}}" stepKey="resetSearchFilter"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Filter grid and see created store view--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateWebsiteTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateWebsiteTest.xml index a8782acb1eb07..208ed316e2e51 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminCreateWebsiteTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminCreateWebsiteTest.xml @@ -25,7 +25,7 @@ <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite"> <argument name="websiteName" value="{{customWebsite.name}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create website and AssertWebsiteSuccessSaveMessage--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminDeleteDefaultStoreViewTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminDeleteDefaultStoreViewTest.xml index 85fd8561f90b5..c010935233a5b 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminDeleteDefaultStoreViewTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminDeleteDefaultStoreViewTest.xml @@ -20,7 +20,7 @@ <actionGroup ref = "LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create custom store view--> <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createNewStoreView"> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminDeleteStoreGroupTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminDeleteStoreGroupTest.xml index 185cf87531d9a..a3afddd794723 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminDeleteStoreGroupTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminDeleteStoreGroupTest.xml @@ -30,7 +30,7 @@ </before> <after> <magentoCLI command="config:set system/backup/functionality_enabled 0" stepKey="setEnableBackupToNo"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Delete custom store group and verify AssertStoreGroupSuccessDeleteAndBackupMessages--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminDeleteStoreViewTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminDeleteStoreViewTest.xml index df6fc391b2972..a197f88bafba2 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminDeleteStoreViewTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminDeleteStoreViewTest.xml @@ -28,7 +28,7 @@ </before> <after> <magentoCLI command="config:set system/backup/functionality_enabled 0" stepKey="setEnableBackupToNo"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Delete custom store view and verify AssertStoreSuccessDeleteMessage And BackupMessage--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminMoveStoreToOtherGroupSameWebsiteTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminMoveStoreToOtherGroupSameWebsiteTest.xml index f1983dca53bf7..a94c1f8f66c7c 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminMoveStoreToOtherGroupSameWebsiteTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminMoveStoreToOtherGroupSameWebsiteTest.xml @@ -50,7 +50,7 @@ <actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteSecondStore"> <argument name="storeGroupName" value="customStoreGroup.name"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Search created second store view in grid--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreGroupAcceptAlertAndVerifyStoreViewFormTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreGroupAcceptAlertAndVerifyStoreViewFormTest.xml index 16f830224f7f4..8d4e095d6ed87 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreGroupAcceptAlertAndVerifyStoreViewFormTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreGroupAcceptAlertAndVerifyStoreViewFormTest.xml @@ -44,7 +44,7 @@ </actionGroup> <!--Delete root category--> <deleteData stepKey="deleteRootCategory" createDataKey="rootCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open created Store group in grid--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreGroupAndVerifyStoreViewFormTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreGroupAndVerifyStoreViewFormTest.xml index ab204560f11c6..f8df1059fb1ef 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreGroupAndVerifyStoreViewFormTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreGroupAndVerifyStoreViewFormTest.xml @@ -34,7 +34,7 @@ <actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteUpdatedStoreGroup"> <argument name="storeGroupName" value="SecondStoreGroupUnique.name"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open created Store group in grid--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreViewTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreViewTest.xml index 26dee6c632928..3b16767e60d55 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreViewTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateStoreViewTest.xml @@ -32,7 +32,7 @@ <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteUpdatedStoreView"> <argument name="customStore" value="SecondStoreUnique"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Search created store view in grid--> diff --git a/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateWebsiteTest.xml b/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateWebsiteTest.xml index 5c4ecb87dda53..e9f72e46e3973 100644 --- a/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateWebsiteTest.xml +++ b/app/code/Magento/Store/Test/Mftf/Test/AdminUpdateWebsiteTest.xml @@ -30,7 +30,7 @@ <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite"> <argument name="websiteName" value="{{updateCustomWebsite.name}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Search created custom website in grid--> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml index 5cbc7ee49d6cc..0e24d63728d9d 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml @@ -29,7 +29,7 @@ </actionGroup> <actionGroup ref="AdminDeleteProductAttributeByLabelActionGroup" stepKey="deleteProductAttribute"/> <actionGroup ref="NavigateToAndResetProductAttributeGridToDefaultViewActionGroup" stepKey="resetProductAttributeFilters"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> </after> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateTextSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateTextSwatchTest.xml index 4685670fbfdd2..b01dff6a8ca06 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateTextSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateTextSwatchTest.xml @@ -22,7 +22,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Create a new product attribute of type "Text Swatch" --> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchTest.xml index 1c8e86b3765d4..7599111260980 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchTest.xml @@ -35,7 +35,7 @@ <waitForPageLoad stepKey="waitToClickSave"/> <click selector="{{AttributePropertiesSection.SaveAndEdit}}" stepKey="clickSaveAndEdit"/> <!-- Logout --> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Go to the edit page for the "color" attribute --> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchWithNonValidOptionsTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchWithNonValidOptionsTest.xml index 8e63a14413f2f..5660922962b47 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchWithNonValidOptionsTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateVisualSwatchWithNonValidOptionsTest.xml @@ -24,7 +24,7 @@ <actionGroup ref="DeleteProductAttributeActionGroup" stepKey="deleteAttribute"> <argument name="ProductAttribute" value="visualSwatchAttribute"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{ProductAttributePage.url}}" stepKey="navigateToNewProductAttributePage"/> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminDisablingSwatchTooltipsTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminDisablingSwatchTooltipsTest.xml index b44c04d2c1b46..7d3d1aafd8d6d 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminDisablingSwatchTooltipsTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminDisablingSwatchTooltipsTest.xml @@ -37,7 +37,7 @@ <click selector="{{AttributePropertiesSection.SaveAndEdit}}" stepKey="clickSaveAndEdit"/> <!-- Log out --> - <actionGroup ref="logout" stepKey="logOut"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logOut"/> <!-- Delete category --> <deleteData stepKey="deleteCategory" createDataKey="createCategory"/> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminSaveConfigurableProductWithAttributesImagesAndSwatchesTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminSaveConfigurableProductWithAttributesImagesAndSwatchesTest.xml index d034faeefbdc0..0ca0561be0a0d 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminSaveConfigurableProductWithAttributesImagesAndSwatchesTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminSaveConfigurableProductWithAttributesImagesAndSwatchesTest.xml @@ -71,7 +71,7 @@ <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="openProductIndexPage"/> <actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearProductsGridFilter"/> <!-- Admin logout --> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Add created product attribute to the Default set --> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminSetUpWatermarkForSwatchImageTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminSetUpWatermarkForSwatchImageTest.xml index b24420061db65..d5bc8dbadfb56 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminSetUpWatermarkForSwatchImageTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminSetUpWatermarkForSwatchImageTest.xml @@ -27,7 +27,7 @@ <after> <!-- Log out --> <comment userInput="Log out" stepKey="commentLogOut"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Go to Admin > Content > Configuration page --> <comment userInput="Go to Configuration Page" stepKey="commentOpenConfigurationPage"/> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontConfigurableProductSwatchMinimumPriceTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontConfigurableProductSwatchMinimumPriceTest.xml index 1cfa7da6f3410..6651692bcada4 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontConfigurableProductSwatchMinimumPriceTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontConfigurableProductSwatchMinimumPriceTest.xml @@ -40,7 +40,7 @@ <argument name="ProductAttribute" value="ProductSizeAttribute"/> </actionGroup> <!-- Logout --> - <actionGroup ref="logout" stepKey="amOnLogoutPage"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/> </after> <!--Create text swatch attribute with 3 options: Black, White and Blue--> <actionGroup ref="AddTextSwatchToProductActionGroup" stepKey="addColorAttribute"> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml index 0c179e92adc8d..427797bdb09e2 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml @@ -30,7 +30,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Begin creating a new product attribute --> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml index 0024a95360ef2..1d1c5c9c4e683 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml @@ -28,7 +28,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Begin creating a new product attribute --> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml index 3cd2e13c9d75d..0b6238d7d46be 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml @@ -30,7 +30,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <!-- Begin creating a new product attribute --> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml index 208f5cecc6fa9..18e9f82e74121 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml @@ -39,7 +39,7 @@ <argument name="perPage" value="100"/> </actionGroup> <actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteAllProducts"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <amOnPage url="{{AdminProductEditPage.url($$createConfigProduct.id$$)}}" stepKey="navigateToConfigProductPage"/> <waitForPageLoad stepKey="waitForProductPageLoad"/> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSeeProductImagesMatchingProductSwatchesTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSeeProductImagesMatchingProductSwatchesTest.xml index d3f6a2e6ccff7..8bfdb77cbe177 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSeeProductImagesMatchingProductSwatchesTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSeeProductImagesMatchingProductSwatchesTest.xml @@ -34,7 +34,7 @@ <argument name="product" value="$$createSimpleProduct$$"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductGridFilter"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Begin creating a new product attribute --> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchAttributesDisplayInWidgetCMSTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchAttributesDisplayInWidgetCMSTest.xml index 119a645252685..9acfdf394be4b 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchAttributesDisplayInWidgetCMSTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchAttributesDisplayInWidgetCMSTest.xml @@ -51,7 +51,7 @@ <waitForElementVisible selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="waitForPageReloadAfterDeleteDefaultCategory"/> <magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/> <!--logout--> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!--Login--> <actionGroup ref="LoginAsAdmin" stepKey="loginToAdmin"/> @@ -77,7 +77,7 @@ <click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickToExpandSEOSection"/> <scrollTo selector="{{CmsNewPagePageSeoSection.urlKey}}" stepKey="scrollToUrlKey"/> <grabValueFrom selector="{{CmsNewPagePageSeoSection.urlKey}}" stepKey="grabTextFromUrlKey"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!--Open Storefront page for the new created page--> <amOnPage url="{{StorefrontHomePage.url}}$grabTextFromUrlKey" stepKey="gotToCreatedCmsPage"/> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchProductWithFileCustomOptionTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchProductWithFileCustomOptionTest.xml index 99b38bd3b34d6..5c0ad3bc4ea77 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchProductWithFileCustomOptionTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchProductWithFileCustomOptionTest.xml @@ -26,7 +26,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCheckCreditMemoTotalsTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCheckCreditMemoTotalsTest.xml index dfed39e861f05..dce8852ac5628 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCheckCreditMemoTotalsTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCheckCreditMemoTotalsTest.xml @@ -59,7 +59,7 @@ <!-- Delete Tax Class --> <deleteData createDataKey="createProductTaxClass" stepKey="deleteProductTaxClass"/> <!--Logout--> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!--Create new order--> <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="createNewOrder"> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxRulesNavigateMenuTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxRulesNavigateMenuTest.xml index 1277d6e5f9fd2..219cb309820d8 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxRulesNavigateMenuTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxRulesNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToStoresTaxRulesPage"> <argument name="menuUiId" value="{{AdminMenuStores.dataUiId}}"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxZonesAndRatesNavigateMenuTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxZonesAndRatesNavigateMenuTest.xml index e0a4d5d9a4016..73c8c63be0318 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxZonesAndRatesNavigateMenuTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminStoresTaxZonesAndRatesNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToStoresTaxZonesAndRatesPage"> <argument name="menuUiId" value="{{AdminMenuStores.dataUiId}}"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminSystemImportExportTaxRatesNavigateMenuTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminSystemImportExportTaxRatesNavigateMenuTest.xml index a84ae61d66305..2b2e0c5184d4a 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminSystemImportExportTaxRatesNavigateMenuTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminSystemImportExportTaxRatesNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSystemImportExportTaxRatesPage"> <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminTaxCalcWithApplyTaxOnSettingTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminTaxCalcWithApplyTaxOnSettingTest.xml index fbf7873d37438..64d047c1a4dff 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminTaxCalcWithApplyTaxOnSettingTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminTaxCalcWithApplyTaxOnSettingTest.xml @@ -27,7 +27,7 @@ <createData entity="ApiSimpleProductWithCustomPrice" stepKey="createProduct"> <requiredEntity createDataKey="createCategory"/> </createData> - <actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <actionGroup ref="SetTaxClassForShippingActionGroup" stepKey="setTaxClass"/> <actionGroup ref="SetTaxApplyOnSettingActionGroup" stepKey="setApplyTaxOnSetting"> <argument name="userInput" value="Original price only"/> @@ -49,7 +49,7 @@ <argument name="userInput" value="Custom price if available"/> </actionGroup> <actionGroup ref="ResetTaxClassForShippingActionGroup" stepKey="resetTaxClassForShipping"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="NavigateToNewOrderPageNewCustomerSingleStoreActionGroup" stepKey="gotoNewOrderCreationPage"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminTaxReportGridTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminTaxReportGridTest.xml index e90602441261d..1611704c43334 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminTaxReportGridTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminTaxReportGridTest.xml @@ -219,7 +219,7 @@ <argument name="taxClassName" value="TaxClasses2"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemeSortTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemeSortTest.xml index 9facab57e9a09..4a074a484537d 100644 --- a/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemeSortTest.xml +++ b/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemeSortTest.xml @@ -22,7 +22,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToContentThemesPage"> <argument name="menuUiId" value="{{AdminMenuContent.dataUiId}}"/> diff --git a/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemesNavigateMenuTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemesNavigateMenuTest.xml index 8e7bfd71b07d3..2d0dc4501dfa1 100644 --- a/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemesNavigateMenuTest.xml +++ b/app/code/Magento/Theme/Test/Mftf/Test/AdminContentThemesNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToContentThemesPage"> <argument name="menuUiId" value="{{AdminMenuContent.dataUiId}}"/> diff --git a/app/code/Magento/Theme/Test/Mftf/Test/AdminDesignConfigMediaGalleryImageUploadTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/AdminDesignConfigMediaGalleryImageUploadTest.xml index 8291ddc12b3b1..ae0ebe2ed7ef3 100644 --- a/app/code/Magento/Theme/Test/Mftf/Test/AdminDesignConfigMediaGalleryImageUploadTest.xml +++ b/app/code/Magento/Theme/Test/Mftf/Test/AdminDesignConfigMediaGalleryImageUploadTest.xml @@ -22,7 +22,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginToAdminArea"/> </before> <after> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <!--Edit Store View--> <comment userInput="Edit Store View" stepKey="editStoreViewComment"/> diff --git a/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml index afe70243f602c..666d01e1090c1 100644 --- a/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml +++ b/app/code/Magento/Theme/Test/Mftf/Test/AdminWatermarkUploadTest.xml @@ -25,7 +25,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginToAdminArea"/> </before> <after> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <amOnPage url="{{DesignConfigPage.url}}" stepKey="navigateToDesignConfigPage" /> <waitForPageLoad stepKey="waitForPageload1"/> diff --git a/app/code/Magento/Theme/Test/Mftf/Test/ThemeTest.xml b/app/code/Magento/Theme/Test/Mftf/Test/ThemeTest.xml index 67213934a6c41..56041c6ccc99a 100644 --- a/app/code/Magento/Theme/Test/Mftf/Test/ThemeTest.xml +++ b/app/code/Magento/Theme/Test/Mftf/Test/ThemeTest.xml @@ -19,7 +19,7 @@ <group value="Theme"/> </annotations> <after> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <!--Login to Admin Area--> <actionGroup ref="LoginAsAdmin" stepKey="loginToAdminArea"/> diff --git a/app/code/Magento/Tinymce3/Test/Mftf/Test/AdminSwitchWYSIWYGOptionsTest.xml b/app/code/Magento/Tinymce3/Test/Mftf/Test/AdminSwitchWYSIWYGOptionsTest.xml index deb94a7f30d34..9c4e7bf3a646a 100644 --- a/app/code/Magento/Tinymce3/Test/Mftf/Test/AdminSwitchWYSIWYGOptionsTest.xml +++ b/app/code/Magento/Tinymce3/Test/Mftf/Test/AdminSwitchWYSIWYGOptionsTest.xml @@ -19,7 +19,7 @@ <testCaseId value="MC-6114"/> </annotations> <before> - <actionGroup ref="LoginActionGroup" stepKey="loginGetFromGeneralFile"/> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/> <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> </before> <amOnPage url="{{ConfigurationStoresPage.url}}" stepKey="navigateToWYSIWYGConfigPage1"/> @@ -81,7 +81,7 @@ <actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> <after> <actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> </test> </tests> diff --git a/app/code/Magento/Translation/Test/Mftf/Test/AdminInlineTranslationOnCheckoutTest.xml b/app/code/Magento/Translation/Test/Mftf/Test/AdminInlineTranslationOnCheckoutTest.xml index 08448f7735f7c..c6f2bb0713f48 100644 --- a/app/code/Magento/Translation/Test/Mftf/Test/AdminInlineTranslationOnCheckoutTest.xml +++ b/app/code/Magento/Translation/Test/Mftf/Test/AdminInlineTranslationOnCheckoutTest.xml @@ -43,7 +43,7 @@ <deleteData createDataKey="createCustomer3" stepKey="deleteCustomer3"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Set production mode --> <!-- <magentoCLI command="cache:flush" stepKey="flushCache"/>--> diff --git a/app/code/Magento/Ui/Test/Mftf/Test/AdminGridFilterDeleteAndVerifyErrorMessageTest.xml b/app/code/Magento/Ui/Test/Mftf/Test/AdminGridFilterDeleteAndVerifyErrorMessageTest.xml index 674d1d2216793..3cc120ad98176 100644 --- a/app/code/Magento/Ui/Test/Mftf/Test/AdminGridFilterDeleteAndVerifyErrorMessageTest.xml +++ b/app/code/Magento/Ui/Test/Mftf/Test/AdminGridFilterDeleteAndVerifyErrorMessageTest.xml @@ -47,7 +47,7 @@ <magentoCLI command="config:set system/backup/functionality_enabled 0" stepKey="setEnableBackupToNo"/> <deleteData stepKey="deleteRootCategory" createDataKey="rootCategory"/> <deleteData stepKey="deleteProduct" createDataKey="createProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Filter created simple product in grid and add category and website created in create data--> diff --git a/app/code/Magento/Ups/Test/Mftf/Test/DefaultConfigForUPSTypeTest.xml b/app/code/Magento/Ups/Test/Mftf/Test/DefaultConfigForUPSTypeTest.xml index 9caa32609c487..bd278c9dbe975 100644 --- a/app/code/Magento/Ups/Test/Mftf/Test/DefaultConfigForUPSTypeTest.xml +++ b/app/code/Magento/Ups/Test/Mftf/Test/DefaultConfigForUPSTypeTest.xml @@ -26,7 +26,7 @@ <!--Collapse UPS tab and logout--> <comment userInput="Collapse UPS tab and logout" stepKey="collapseTabAndLogout"/> <click selector="{{AdminShippingMethodsUpsSection.carriersUpsTab}}" stepKey="collapseTab"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Set shipping methods UPS type to default --> <comment userInput="Set shipping methods UPS type to default" stepKey="setToDefaultShippingMethodsUpsType"/> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminAutoUpdateURLRewriteWhenCategoryIsDeletedTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminAutoUpdateURLRewriteWhenCategoryIsDeletedTest.xml index 022d28ed692c1..eae8c7f0838c4 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminAutoUpdateURLRewriteWhenCategoryIsDeletedTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminAutoUpdateURLRewriteWhenCategoryIsDeletedTest.xml @@ -26,7 +26,7 @@ </before> <after> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Filter and Select the created Product --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest.xml index 9e041b5e48028..f635df7edb6f7 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest.xml @@ -51,7 +51,7 @@ <argument name="name" value="productformagetwo68980"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFiltersIfSet"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="SwitchCategoryStoreViewActionGroup" stepKey="switchToStoreViewEn"> <argument name="Store" value="customStoreENNotUnique.name"/> @@ -187,7 +187,7 @@ <argument name="name" value="productformagetwo68980"/> </actionGroup> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFiltersIfSet"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="resetConfigurationSetting"/> <!--Flush cache--> <magentoCLI command="cache:flush" stepKey="cleanCache2"/> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategory2Test.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategory2Test.xml index e14bb5342db91..7244ed1d6b534 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategory2Test.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategory2Test.xml @@ -45,7 +45,7 @@ <deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/> <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearWebsitesGridFilters"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!-- On the categories editing page change store view to created additional view --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategoryTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategoryTest.xml index 7f9ee3020c388..cd17d169804db 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategoryTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategoryTest.xml @@ -48,7 +48,7 @@ <deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstSimpleProduct"/> <deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/> <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- On the categories editing page change store view to created additional view --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddNoRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddNoRedirectTest.xml index 732fc22aaf84a..339e078faa5a4 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddNoRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddNoRedirectTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="category" stepKey="deleteRootCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Url Rewrite Index Page and update the Custom Url Rewrite, Store, Request Path, Redirect Type and Description --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddPermanentRedirectTest.xml index 867b3ee54161c..546637f2e548d 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddPermanentRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddPermanentRedirectTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="category" stepKey="deleteRootCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Url Rewrite Index Page and update the Custom Url Rewrite, Store, Request Path, Redirect Type and Description --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml index ab18add56aeb9..2ea04625b7d3d 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="category" stepKey="deleteRootCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Url Rewrite Index Page and update the Custom Url Rewrite, Store, Request Path, Redirect Type and Description --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddPermanentRedirectTest.xml index bd4f7d7a32165..d0a744a168ce3 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddPermanentRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddPermanentRedirectTest.xml @@ -26,7 +26,7 @@ <actionGroup ref="AdminDeleteUrlRewriteActionGroup" stepKey="deleteCustomUrlRewrite"> <argument name="requestPath" value="{{defaultCmsPage.title}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open CMS Edit Page and Get the CMS ID --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddTemporaryRedirectTest.xml index 074140845c8a6..4327b02d396f9 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddTemporaryRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCMSPageUrlRewriteAndAddTemporaryRedirectTest.xml @@ -26,7 +26,7 @@ <actionGroup ref="AdminDeleteUrlRewriteActionGroup" stepKey="deleteCustomUrlRewrite"> <argument name="requestPath" value="{{defaultCmsPage.title}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open CMS Edit Page and Get the CMS ID --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCategoryUrlRewriteAndAddPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCategoryUrlRewriteAndAddPermanentRedirectTest.xml index cdd7c334e35cd..c70112c0953b3 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCategoryUrlRewriteAndAddPermanentRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomCategoryUrlRewriteAndAddPermanentRedirectTest.xml @@ -26,7 +26,7 @@ <actionGroup ref="AdminDeleteUrlRewriteActionGroup" stepKey="deleteCustomUrlRewrite"> <argument name="requestPath" value="{{FirstLevelSubCat.name}}.html"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Open Category Page and Get Category ID --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomProductUrlRewriteAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomProductUrlRewriteAndAddTemporaryRedirectTest.xml index 593c4282fc516..c39bae9fd2ff2 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomProductUrlRewriteAndAddTemporaryRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateCustomProductUrlRewriteAndAddTemporaryRedirectTest.xml @@ -26,7 +26,7 @@ <actionGroup ref="AdminDeleteUrlRewriteActionGroup" stepKey="deleteCustomUrlRewrite"> <argument name="requestPath" value="{{_defaultProduct.name}}.html"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Filter Product in product page and get the Product ID --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteAndAddNoRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteAndAddNoRedirectTest.xml index c51030315b287..36c25d9a21685 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteAndAddNoRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteAndAddNoRedirectTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Filter and Select the created Product --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteWithCategoryAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteWithCategoryAndAddTemporaryRedirectTest.xml index d433aa7557094..92a2b6cac6b16 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteWithCategoryAndAddTemporaryRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductURLRewriteWithCategoryAndAddTemporaryRedirectTest.xml @@ -27,7 +27,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Filter and Select the created Product --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddPermanentRedirectTest.xml index e1ff4f598943e..b03912728a3d9 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddPermanentRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddPermanentRedirectTest.xml @@ -22,7 +22,7 @@ </before> <after> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Filter and Select the created Product --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddTemporaryRedirectTest.xml index 3fa4e6b7bad90..4b03d28d44867 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddTemporaryRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductUrLRewriteAndAddTemporaryRedirectTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Filter and Select the created Product --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductWithSeveralWebsitesAndCheckURLRewritesTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductWithSeveralWebsitesAndCheckURLRewritesTest.xml index e1028a285f183..653995da1a3a8 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductWithSeveralWebsitesAndCheckURLRewritesTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCreateProductWithSeveralWebsitesAndCheckURLRewritesTest.xml @@ -35,7 +35,7 @@ </actionGroup> <deleteData stepKey="deleteRootCategory" createDataKey="rootCategory"/> <deleteData stepKey="deleteProduct" createDataKey="createProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create first store --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageNoRedirectUrlRewriteTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageNoRedirectUrlRewriteTest.xml index 1171a5e8b79c3..a65efce1a48ea 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageNoRedirectUrlRewriteTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageNoRedirectUrlRewriteTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open CMS Edit Page and Get the CMS ID --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPagePermanentRedirectUrlRewriteTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPagePermanentRedirectUrlRewriteTest.xml index 566204094cabd..fa19b2a30c2cd 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPagePermanentRedirectUrlRewriteTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPagePermanentRedirectUrlRewriteTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open CMS Edit Page and Get the CMS ID --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageTemporaryRedirectUrlRewriteTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageTemporaryRedirectUrlRewriteTest.xml index 22cb74bf96ad6..2bed25aa3f39d 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageTemporaryRedirectUrlRewriteTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCMSPageTemporaryRedirectUrlRewriteTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open CMS Edit Page and Get the CMS ID --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteHypenAsRequestPathTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteHypenAsRequestPathTest.xml index ad952225c2ff5..fe71094e49064 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteHypenAsRequestPathTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteHypenAsRequestPathTest.xml @@ -25,7 +25,7 @@ </before> <after> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create the Category Url Rewrite--> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteTest.xml index ceb71f65e4489..b781a8297499c 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteTest.xml @@ -21,7 +21,7 @@ </before> <after> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open Url Rewrite Index Page and update the Category Url Rewrite, Store, Request Path, Redirect Type and Description --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteWithRequestPathTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteWithRequestPathTest.xml index dc9928773bf35..06b5745c32be3 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteWithRequestPathTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCategoryUrlRewriteWithRequestPathTest.xml @@ -25,7 +25,7 @@ </before> <after> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create the Category Url Rewrite--> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml index e2f0d6af0deab..d58560e40533e 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithNoRedirectsTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminGoToAddNewUrlRewritePageActionGroup" stepKey="openUrlRewriteEditPage"/> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithPermanentRedirectTest.xml index 741be6985d517..f3dfe08fe6803 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithPermanentRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithPermanentRedirectTest.xml @@ -22,7 +22,7 @@ </before> <after> <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminGoToAddNewUrlRewritePageActionGroup" stepKey="openUrlRewriteEditPage"/> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithTemporaryRedirectTest.xml index e3d417f3c1f39..a81c00506c671 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithTemporaryRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCmsPageUrlRewriteWithTemporaryRedirectTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminGoToAddNewUrlRewritePageActionGroup" stepKey="openUrlRewriteEditPage"/> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCustomUrlRewriteTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCustomUrlRewriteTest.xml index 288c32102c606..c03c21abb9e7e 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCustomUrlRewriteTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteCustomUrlRewriteTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginToAdminPanel"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Delete created custom url rewrite and verify AssertUrlRewriteDeletedMessage--> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductURLRewriteEntityTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductURLRewriteEntityTest.xml index 2becb177ee72b..6803816f42d85 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductURLRewriteEntityTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductURLRewriteEntityTest.xml @@ -28,7 +28,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Filter and Select the created Product --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductUrlRewriteTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductUrlRewriteTest.xml index 8e0ea8334a2cc..8ebad9656e7af 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductUrlRewriteTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminDeleteProductUrlRewriteTest.xml @@ -21,7 +21,7 @@ </before> <after> <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Delete created product url rewrite and verify AssertUrlRewriteDeletedMessage--> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminGenerateUrlRewritesForProductInCategoriesSwitchOffTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminGenerateUrlRewritesForProductInCategoriesSwitchOffTest.xml index 2c81333bcd674..63e76717dd6b6 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminGenerateUrlRewritesForProductInCategoriesSwitchOffTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminGenerateUrlRewritesForProductInCategoriesSwitchOffTest.xml @@ -40,7 +40,7 @@ <!--Flush cache--> <magentoCLI command="cache:flush" stepKey="cleanCache1"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- 1. Open Marketing - SEO & Search - URL Rewrites --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminMarketingUrlRewritesNavigateMenuTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminMarketingUrlRewritesNavigateMenuTest.xml index 443307b427b42..51561cfcb220f 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminMarketingUrlRewritesNavigateMenuTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminMarketingUrlRewritesNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToMarketingURLRewritesPage"> <argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminProductCreateUrlRewriteForCustomStoreViewTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminProductCreateUrlRewriteForCustomStoreViewTest.xml index 0ad68dae4e4ce..f3b0ca2237975 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminProductCreateUrlRewriteForCustomStoreViewTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminProductCreateUrlRewriteForCustomStoreViewTest.xml @@ -41,7 +41,7 @@ <argument name="customStore" value="customStore"/> </actionGroup> <actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearFilterForStores"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> </after> <!--Step 1. Navigate as Admin on Product Page for edit product`s Url Key--> <actionGroup ref="NavigateToCreatedProductEditPageActionGroup" stepKey="goToProductForUrlRewrite"> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddAspxRequestPathTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddAspxRequestPathTest.xml index fb8f200741c8a..21b0486bd1aad 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddAspxRequestPathTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddAspxRequestPathTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search and Select Edit option for created category in grid --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddNoRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddNoRedirectTest.xml index 72180105b38f8..7edeba336a7e9 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddNoRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddNoRedirectTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search and Select Edit option for created category in grid --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddPermanentRedirectTest.xml index 3fb8e5da39caf..a91da90581dda 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddPermanentRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddPermanentRedirectTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search and Select Edit option for created category in grid --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml index bea5c44461a70..e49318af53639 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCategoryUrlRewriteAndAddTemporaryRedirectTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="category" stepKey="deleteCategory"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search and Select Edit option for created category in grid --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithNoRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithNoRedirectTest.xml index b2fa13ead1164..c47419eee28e0 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithNoRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithNoRedirectTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create Custom Store View--> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithPermanentReirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithPermanentReirectTest.xml index 3bf278db8410a..87be39098ebf8 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithPermanentReirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithPermanentReirectTest.xml @@ -22,7 +22,7 @@ </before> <after> <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create Custom Store View--> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithTemporaryRedirectTest.xml index b00241bc3acac..b696811cfa8c9 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithTemporaryRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithTemporaryRedirectTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Create Custom Store View--> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddNoRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddNoRedirectTest.xml index b799a58ac9e40..b04d417cf7efa 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddNoRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddNoRedirectTest.xml @@ -22,7 +22,7 @@ </before> <after> <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open CMS Edit Page and Get the CMS ID --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddPermanentRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddPermanentRedirectTest.xml index 3cf30444fcaee..138b5f280d5f2 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddPermanentRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddPermanentRedirectTest.xml @@ -22,7 +22,7 @@ </before> <after> <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open CMS Edit Page and Get the CMS ID --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddTemporaryRedirectTest.xml index b95d1eaa44d7f..d996f2e3c7bb9 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddTemporaryRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageUrlRewriteAndAddTemporaryRedirectTest.xml @@ -22,7 +22,7 @@ </before> <after> <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Open CMS Edit Page and Get the CMS ID --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesPermanentTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesPermanentTest.xml index a07f7b8c0fe60..79376dfd7be35 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesPermanentTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesPermanentTest.xml @@ -26,7 +26,7 @@ <actionGroup ref="AdminDeleteUrlRewriteActionGroup" stepKey="deleteCustomUrlRewrite"> <argument name="requestPath" value="{{customPermanentUrlRewrite.request_path}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Search default custom url rewrite in grid--> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesTemporaryTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesTemporaryTest.xml index dcf923a34081b..9253cad21f936 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesTemporaryTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesTemporaryTest.xml @@ -28,7 +28,7 @@ <actionGroup ref="AdminDeleteUrlRewriteActionGroup" stepKey="deleteCustomUrlRewrite"> <argument name="requestPath" value="{{customTemporaryUrlRewrite.request_path}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Filter Product in product page and get the Product ID --> diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateProductUrlRewriteAndAddTemporaryRedirectTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateProductUrlRewriteAndAddTemporaryRedirectTest.xml index 74f3a60f35cea..e70896b7de04f 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateProductUrlRewriteAndAddTemporaryRedirectTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateProductUrlRewriteAndAddTemporaryRedirectTest.xml @@ -23,7 +23,7 @@ </before> <after> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Search and Select Edit option for created product in grid --> diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminBulkOperationsLogIsNotAccessibleForAdminUserWithLimitedAccessTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminBulkOperationsLogIsNotAccessibleForAdminUserWithLimitedAccessTest.xml index 4aa9e7b7fb4cd..e0db8d8b25b96 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminBulkOperationsLogIsNotAccessibleForAdminUserWithLimitedAccessTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminBulkOperationsLogIsNotAccessibleForAdminUserWithLimitedAccessTest.xml @@ -35,7 +35,7 @@ <actionGroup ref="AdminDeleteRoleByRoleNameActionGroup" stepKey="deleteRole"> <argument name="role" value="adminWithoutBulkActionRole"/> </actionGroup> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create admin user2 who doesn't have access to "Bulk Operations". Role Resources, uncheck point with title "Bulk Operations" --> @@ -44,7 +44,7 @@ <argument name="user" value="NewAdminUser"/> <argument name="role" value="adminWithoutBulkActionRole"/> </actionGroup> - <actionGroup ref="logout" stepKey="logoutAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/> <!-- Login as user2 --> <actionGroup ref="LoginAsAdmin" stepKey="LoginAsUser"> @@ -63,9 +63,9 @@ <!-- Navigate to "Your Bulk Operations log" directly: %your_build_backend_url%/bulk/ --> <amOnPage url="{{AdminBulkActionsLogIndexPage.url}}" stepKey="OnBulkPage"/> <waitForPageLoad stepKey="waitForPageLoad"/> - + <!-- Access Denied --> <see userInput="Sorry, you need permissions to view this content." selector="{{AdminMessagesSection.accessDenied}}" stepKey="seeAccessDenied"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </test> </tests> diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminCreateActiveUserEntityTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminCreateActiveUserEntityTest.xml index 753ab02f84053..218be4e282b4a 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminCreateActiveUserEntityTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminCreateActiveUserEntityTest.xml @@ -33,7 +33,7 @@ <argument name="role" value="genericAdminRole"/> <argument name="user" value="activeAdmin"/> </actionGroup> - <actionGroup ref="logout" stepKey="logoutMasterAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutMasterAdmin"/> <amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/> <fillField selector="{{AdminLoginFormSection.username}}" userInput="{{activeAdmin.username}}" stepKey="fillUsername"/> <fillField selector="{{AdminLoginFormSection.password}}" userInput="{{activeAdmin.password}}" stepKey="fillPassword"/> @@ -44,6 +44,6 @@ <click selector="{{AdminUserGridSection.searchButton}}" stepKey="clickSearchButton"/> <waitForPageLoad time="10" stepKey="wait1"/> <see selector="{{AdminUserGridSection.usernameInFirstRow}}" userInput="{{activeAdmin.username}}" stepKey="seeFoundUsername"/> - <actionGroup ref="logout" stepKey="logoutCreatedUser"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutCreatedUser"/> </test> </tests> diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminCreateInactiveUserEntityTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminCreateInactiveUserEntityTest.xml index d0fdd72ebbdcc..d52cafa13b7b8 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminCreateInactiveUserEntityTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminCreateInactiveUserEntityTest.xml @@ -38,7 +38,7 @@ <click selector="{{AdminUserGridSection.searchButton}}" stepKey="clickSearchButton"/> <waitForPageLoad time="10" stepKey="wait1"/> <see selector="{{AdminUserGridSection.usernameInFirstRow}}" userInput="{{inactiveAdmin.username}}" stepKey="seeFoundUsername"/> - <actionGroup ref="logout" stepKey="logoutMasterAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutMasterAdmin"/> <amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/> <fillField selector="{{AdminLoginFormSection.username}}" userInput="{{inactiveAdmin.username}}" stepKey="fillUsername"/> <fillField selector="{{AdminLoginFormSection.password}}" userInput="{{inactiveAdmin.password}}" stepKey="fillPassword"/> diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminLockAdminUserEntityTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminLockAdminUserEntityTest.xml index 3bd55a454c3b0..c367bddc8d999 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminLockAdminUserEntityTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminLockAdminUserEntityTest.xml @@ -28,7 +28,7 @@ <after> <magentoCLI command="config:set admin/captcha/enable 1" stepKey="enableAdminCaptcha"/> <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches"/> - <actionGroup ref="logout" stepKey="logOut"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logOut"/> </after> <!--Create New User--> @@ -47,7 +47,7 @@ <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveChanges"/> <!-- Log in to Admin Panel with incorrect password specified number of times--> - <actionGroup ref="logout" stepKey="logoutAsDefaultUser"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsDefaultUser"/> <actionGroup ref="LoginAsAdmin" stepKey="loginAsNewUserFirstAttempt"> <argument name="adminUser" value="adminUserIncorrectPassword"/> </actionGroup> diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminSystemAllUsersNavigateMenuTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminSystemAllUsersNavigateMenuTest.xml index b899320403d71..57e2ab0faccf6 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminSystemAllUsersNavigateMenuTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminSystemAllUsersNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSystemAllUsersPage"> <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminSystemLockedUsersNavigateMenuTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminSystemLockedUsersNavigateMenuTest.xml index aea46f3273157..963af44ac3bc0 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminSystemLockedUsersNavigateMenuTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminSystemLockedUsersNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSystemLockedUsersPage"> <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminSystemManageEncryptionKeyNavigateMenuTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminSystemManageEncryptionKeyNavigateMenuTest.xml index f8013a54058c3..d6a4318c7d7be 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminSystemManageEncryptionKeyNavigateMenuTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminSystemManageEncryptionKeyNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToManageEncryptionKeyPage"> <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminSystemUserRolesNavigateMenuTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminSystemUserRolesNavigateMenuTest.xml index c4052a7f4219c..ef9cb5ebfa5fe 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminSystemUserRolesNavigateMenuTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminSystemUserRolesNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSystemUserRolesPage"> <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserTest.xml index dfadee8ee6807..cfc6016b91906 100644 --- a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserTest.xml +++ b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserTest.xml @@ -39,7 +39,7 @@ </before> <after> <!--Delete new User--> - <actionGroup ref="logout" stepKey="logoutAsSaleRoleUser"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsSaleRoleUser"/> <actionGroup ref="LoginAsAdmin" stepKey="loginAsDefaultAdminUser"/> <actionGroup ref="AdminDeleteCustomUserActionGroup" stepKey="deleteNewUser"> <argument name="user" value="AdminUserWithUpdatedUserRoleToSales"/> @@ -49,7 +49,7 @@ <actionGroup ref="AdminDeleteUserRoleActionGroup" stepKey="deleteCustomRole"> <argument name="roleName" value="{{roleSales.rolename}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logOut"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logOut"/> </after> @@ -68,7 +68,7 @@ <actionGroup ref="AssertAdminUserIsInGridActionGroup" stepKey="seeUserInGrid"> <argument name="user" value="AdminUserWithUpdatedUserRoleToSales"/> </actionGroup> - <actionGroup ref="logout" stepKey="logOutFromAdminPanel"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logOutFromAdminPanel"/> <actionGroup ref="LoginAsAdmin" stepKey="loginAsSaleRoleUser"> <argument name="adminUser" value="AdminUserWithUpdatedUserRoleToSales"/> </actionGroup> diff --git a/app/code/Magento/Variable/Test/Mftf/Test/AdminCreateCustomVariableEntityTest.xml b/app/code/Magento/Variable/Test/Mftf/Test/AdminCreateCustomVariableEntityTest.xml index 3185640e3783a..ee7368a44616d 100644 --- a/app/code/Magento/Variable/Test/Mftf/Test/AdminCreateCustomVariableEntityTest.xml +++ b/app/code/Magento/Variable/Test/Mftf/Test/AdminCreateCustomVariableEntityTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminOpenNewVariablePageActionGroup" stepKey="goToNewVariableAdminPage"/> <actionGroup ref="AdminFillVariableFormActionGroup" stepKey="fillInCustomVariableData"> diff --git a/app/code/Magento/Variable/Test/Mftf/Test/AdminSystemCustomVariablesNavigateMenuTest.xml b/app/code/Magento/Variable/Test/Mftf/Test/AdminSystemCustomVariablesNavigateMenuTest.xml index 74446cf601348..c5d85907d15fc 100644 --- a/app/code/Magento/Variable/Test/Mftf/Test/AdminSystemCustomVariablesNavigateMenuTest.xml +++ b/app/code/Magento/Variable/Test/Mftf/Test/AdminSystemCustomVariablesNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSystemCustomVariablesPage"> <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> diff --git a/app/code/Magento/Weee/Test/Mftf/Test/AdminFixedTaxValSavedForSpecificWebsiteTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/AdminFixedTaxValSavedForSpecificWebsiteTest.xml index 6cbdbe0db267d..b929fd3d304c0 100644 --- a/app/code/Magento/Weee/Test/Mftf/Test/AdminFixedTaxValSavedForSpecificWebsiteTest.xml +++ b/app/code/Magento/Weee/Test/Mftf/Test/AdminFixedTaxValSavedForSpecificWebsiteTest.xml @@ -66,7 +66,7 @@ <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteCustomWebsite"> <argument name="websiteName" value="{{NewWebSiteData.name}}"/> </actionGroup> - <actionGroup ref="logout" stepKey="logoutOfAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> </after> <!-- Go to product edit page and assign it to created website --> <comment userInput="Go to product edit page and assign it to created website" stepKey="assignProductToCreatedWebsite"/> diff --git a/app/code/Magento/Weee/Test/Mftf/Test/AdminRemoveProductWeeeAttributeOptionTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/AdminRemoveProductWeeeAttributeOptionTest.xml index 6164f037048ba..d3f39e9aee664 100644 --- a/app/code/Magento/Weee/Test/Mftf/Test/AdminRemoveProductWeeeAttributeOptionTest.xml +++ b/app/code/Magento/Weee/Test/Mftf/Test/AdminRemoveProductWeeeAttributeOptionTest.xml @@ -41,7 +41,7 @@ <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductListing"/> <waitForPageLoad stepKey="waitForProductListingPageLoad"/> <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetGridToDefaultKeywordSearch"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="createProductFPTAttribute" stepKey="deleteProductFPTAttribute"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> </after> diff --git a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerPhysicalQuoteTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerPhysicalQuoteTest.xml index a43f8a306902f..befce13ef036b 100644 --- a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerPhysicalQuoteTest.xml +++ b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerPhysicalQuoteTest.xml @@ -72,7 +72,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexBrokenIndices"/> </after> diff --git a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerVirtualQuoteTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerVirtualQuoteTest.xml index 7c6394e6f8848..8abdbede98922 100644 --- a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerVirtualQuoteTest.xml +++ b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForCustomerVirtualQuoteTest.xml @@ -54,7 +54,7 @@ <createData entity="DefaultTaxConfig" stepKey="defaultTaxConfiguration"/> <deleteData createDataKey="createVirtualProduct" stepKey="deleteVirtualProduct"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexBrokenIndices"/> </after> diff --git a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestPhysicalQuoteTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestPhysicalQuoteTest.xml index 7a1077675cbee..d4e5ed74be9a3 100644 --- a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestPhysicalQuoteTest.xml +++ b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestPhysicalQuoteTest.xml @@ -67,7 +67,7 @@ <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexBrokenIndices"/> </after> diff --git a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestVirtualQuoteTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestVirtualQuoteTest.xml index a7059fcfb4644..0fc4af813c5a1 100644 --- a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestVirtualQuoteTest.xml +++ b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontFPTTaxInformationInShoppingCartForGuestVirtualQuoteTest.xml @@ -49,7 +49,7 @@ <deleteData createDataKey="createProductFPTAttribute" stepKey="deleteProductFPTAttribute"/> <createData entity="DefaultTaxConfig" stepKey="defaultTaxConfiguration"/> <deleteData createDataKey="createVirtualProduct" stepKey="deleteVirtualProduct"/> - <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexBrokenIndices"/> </after> diff --git a/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsNavigateMenuTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsNavigateMenuTest.xml index f5af024ec1d51..e62383d57fc93 100644 --- a/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsNavigateMenuTest.xml +++ b/app/code/Magento/Widget/Test/Mftf/Test/AdminContentWidgetsNavigateMenuTest.xml @@ -23,7 +23,7 @@ <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToContentWidgetsPage"> <argument name="menuUiId" value="{{AdminMenuContent.dataUiId}}"/> diff --git a/app/code/Magento/Widget/Test/Mftf/Test/NewProductsListWidgetTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/NewProductsListWidgetTest.xml index e2fb9cb50f88a..e3e0b957cf550 100644 --- a/app/code/Magento/Widget/Test/Mftf/Test/NewProductsListWidgetTest.xml +++ b/app/code/Magento/Widget/Test/Mftf/Test/NewProductsListWidgetTest.xml @@ -27,7 +27,7 @@ </before> <after> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Create a CMS page containing the New Products widget --> diff --git a/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml index 4407991ff5a93..fbad9ab271bda 100644 --- a/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml +++ b/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml @@ -28,7 +28,7 @@ </before> <after> <conditionalClick selector="{{CmsPagesPageActionsSection.clearAllButton}}" dependentSelector="{{CmsPagesPageActionsSection.activeFilters}}" stepKey="clickToResetFilter" visible="true"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> </after> @@ -65,4 +65,4 @@ <seeInTitle userInput="{{_newDefaultCmsPage.title}}" stepKey="seePageTitle"/> <see userInput="{{_newDefaultCmsPage.title}}" stepKey="seeProduct"/> </test> -</tests> \ No newline at end of file +</tests> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/ConfProdAddToCartWishListWithUnselectedAttrTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/ConfProdAddToCartWishListWithUnselectedAttrTest.xml index d1d9a439c335d..4e4d5c1a0696f 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/ConfProdAddToCartWishListWithUnselectedAttrTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/ConfProdAddToCartWishListWithUnselectedAttrTest.xml @@ -38,7 +38,7 @@ </actionGroup> <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!--Login as customer --> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/ConfigurableProductChildImageShouldBeShownOnWishListTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/ConfigurableProductChildImageShouldBeShownOnWishListTest.xml index c9c539d215165..9d6482248df0a 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/ConfigurableProductChildImageShouldBeShownOnWishListTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/ConfigurableProductChildImageShouldBeShownOnWishListTest.xml @@ -32,7 +32,7 @@ <after> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="customer" stepKey="deleteCustomer"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> <waitForPageLoad stepKey="waitForProductIndexPageLoad"/> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml index 82021e75e0983..2a84043584dbe 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml @@ -48,7 +48,7 @@ <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsFilters"/> <!--Logout everywhere--> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> </after> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleDynamicProductFromWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleDynamicProductFromWishlistTest.xml index f5d7eb4c6ed02..3ff3fe0f379ce 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleDynamicProductFromWishlistTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleDynamicProductFromWishlistTest.xml @@ -62,7 +62,7 @@ <deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/> <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/> <deleteData createDataKey="simpleProduct2" stepKey="deleteProduct2"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Login as a customer --> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleFixedProductFromWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleFixedProductFromWishlistTest.xml index cdd86bfecccc8..a23788d2c508f 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleFixedProductFromWishlistTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleFixedProductFromWishlistTest.xml @@ -55,7 +55,7 @@ <deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/> <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/> <deleteData createDataKey="simpleProduct2" stepKey="deleteProduct2"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- Login as a customer --> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromWishlistTest.xml index bb0a3c40c21f1..c380bddd2aca8 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromWishlistTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromWishlistTest.xml @@ -117,7 +117,7 @@ <deleteData createDataKey="createConfigProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteProductAttribute"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> <!-- Reindex invalidated indices after product attribute has been created/deleted --> <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeletePersistedWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeletePersistedWishlistTest.xml index f1659baaa4e09..0ead68a6b9144 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeletePersistedWishlistTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeletePersistedWishlistTest.xml @@ -32,7 +32,7 @@ <deleteData stepKey="deleteCategory" createDataKey="category"/> <deleteData stepKey="deleteProduct" createDataKey="product"/> <deleteData stepKey="deleteCustomer" createDataKey="customer"/> - <actionGroup ref="logout" stepKey="adminLogout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> </after> <amOnPage stepKey="amOnSignInPage" url="{{StorefrontCustomerSignInPage.url}}"/> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveConfigurableProductFromShoppingCartToWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveConfigurableProductFromShoppingCartToWishlistTest.xml index 0f94a08328c95..a5081ca2ad338 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveConfigurableProductFromShoppingCartToWishlistTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveConfigurableProductFromShoppingCartToWishlistTest.xml @@ -119,7 +119,7 @@ <deleteData createDataKey="createConfigProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteProductAttribute"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- 1. Login as a customer --> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveDynamicBundleProductFromShoppingCartToWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveDynamicBundleProductFromShoppingCartToWishlistTest.xml index 9fffa51e7d3c7..6af7c6eae2c2a 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveDynamicBundleProductFromShoppingCartToWishlistTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveDynamicBundleProductFromShoppingCartToWishlistTest.xml @@ -62,7 +62,7 @@ <deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/> <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/> <deleteData createDataKey="simpleProduct2" stepKey="deleteProduct2"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- 1. Login as a customer --> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveFixedBundleProductFromShoppingCartToWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveFixedBundleProductFromShoppingCartToWishlistTest.xml index f942a8f314a67..8b94c42106a6a 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveFixedBundleProductFromShoppingCartToWishlistTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveFixedBundleProductFromShoppingCartToWishlistTest.xml @@ -53,7 +53,7 @@ <deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/> <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/> <deleteData createDataKey="simpleProduct2" stepKey="deleteProduct2"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- 1. Login as a customer --> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveVirtualProductFromShoppingCartToWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveVirtualProductFromShoppingCartToWishlistTest.xml index ad10b8d01bbbd..5c2762f39dde6 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveVirtualProductFromShoppingCartToWishlistTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveVirtualProductFromShoppingCartToWishlistTest.xml @@ -32,7 +32,7 @@ <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <!-- 1. Login as a customer --> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/WishListWithDisabledProductTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/WishListWithDisabledProductTest.xml index 3aabb9e94c364..f9072402dbd73 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/WishListWithDisabledProductTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/WishListWithDisabledProductTest.xml @@ -26,7 +26,7 @@ <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> - <actionGroup ref="logout" stepKey="logout"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> </after> <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> <argument name="Customer" value="$$createCustomer$$"/> diff --git a/composer.json b/composer.json index 9c42a05a457c5..6aa98e0904d01 100644 --- a/composer.json +++ b/composer.json @@ -35,11 +35,12 @@ "colinmollenhour/php-redis-session-abstract": "~1.4.0", "composer/composer": "^1.6", "elasticsearch/elasticsearch": "~2.0||~5.1||~6.1", + "guzzlehttp/guzzle": "^6.3.3", "magento/composer": "1.6.x-dev", + "magento/inventory-composer-metapackage-dev": "1.2.0-dev", "magento/magento-composer-installer": ">=0.1.11", "magento/zendframework1": "~1.14.2", "monolog/monolog": "^1.17", - "wikimedia/less.php": "~1.8.0", "paragonie/sodium_compat": "^1.6", "pelago/emogrifier": "^2.0.0", "php-amqplib/php-amqplib": "~2.7.0||~2.10.0", @@ -52,6 +53,7 @@ "tedivm/jshrink": "~1.3.0", "tubalmartin/cssmin": "4.1.1", "webonyx/graphql-php": "^0.13.8", + "wikimedia/less.php": "~1.8.0", "zendframework/zend-captcha": "^2.7.1", "zendframework/zend-code": "~3.3.0", "zendframework/zend-config": "^2.6.0", @@ -79,8 +81,7 @@ "zendframework/zend-text": "^2.6.0", "zendframework/zend-uri": "^2.5.1", "zendframework/zend-validator": "^2.6.0", - "zendframework/zend-view": "~2.11.2", - "guzzlehttp/guzzle": "^6.3.3" + "zendframework/zend-view": "~2.11.2" }, "require-dev": { "allure-framework/allure-phpunit": "~1.2.0", @@ -346,5 +347,12 @@ "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/" } }, - "prefer-stable": true + "prefer-stable": true, + "minimum-stability": "dev", + "repositories": { + "ext": { + "type": "path", + "url": "./ext/*/*/*" + } + } } diff --git a/composer.lock b/composer.lock index 6ac7f36cd2e32..6e75b47dcc2e2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f06887dfc3e06489a251fbb5c18d30ca", + "content-hash": "cdac5eb7bc47c1aaf375c1132f768002", "packages": [ { "name": "braintree/braintree_php", @@ -986,6 +986,81 @@ "description": "Magento composer library helps to instantiate Composer application and run composer commands.", "time": "2020-01-17T16:43:51+00:00" }, + { + "name": "magento/inventory-composer-metapackage-dev", + "version": "1.2.0-dev", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/_metapackage", + "reference": "7afaa438e2504e33856f0a1676e5a50864867502" + }, + "require": { + "magento/module-inventory": "*", + "magento/module-inventory-admin-ui": "*", + "magento/module-inventory-advanced-checkout": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-bundle-product": "*", + "magento/module-inventory-bundle-product-admin-ui": "*", + "magento/module-inventory-cache": "*", + "magento/module-inventory-catalog": "*", + "magento/module-inventory-catalog-admin-ui": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-catalog-search": "*", + "magento/module-inventory-configurable-product": "*", + "magento/module-inventory-configurable-product-admin-ui": "*", + "magento/module-inventory-configurable-product-indexer": "*", + "magento/module-inventory-configuration": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-inventory-distance-based-source-selection": "*", + "magento/module-inventory-distance-based-source-selection-admin-ui": "*", + "magento/module-inventory-distance-based-source-selection-api": "*", + "magento/module-inventory-elasticsearch": "*", + "magento/module-inventory-export-stock": "*", + "magento/module-inventory-export-stock-api": "*", + "magento/module-inventory-graph-ql": "*", + "magento/module-inventory-grouped-product": "*", + "magento/module-inventory-grouped-product-admin-ui": "*", + "magento/module-inventory-grouped-product-indexer": "*", + "magento/module-inventory-import-export": "*", + "magento/module-inventory-in-store-pickup": "*", + "magento/module-inventory-in-store-pickup-admin-ui": "*", + "magento/module-inventory-in-store-pickup-api": "*", + "magento/module-inventory-in-store-pickup-frontend": "*", + "magento/module-inventory-in-store-pickup-graph-ql": "*", + "magento/module-inventory-in-store-pickup-multishipping": "*", + "magento/module-inventory-in-store-pickup-quote": "*", + "magento/module-inventory-in-store-pickup-quote-graph-ql": "*", + "magento/module-inventory-in-store-pickup-sales": "*", + "magento/module-inventory-in-store-pickup-sales-admin-ui": "*", + "magento/module-inventory-in-store-pickup-sales-api": "*", + "magento/module-inventory-in-store-pickup-shipping": "*", + "magento/module-inventory-in-store-pickup-shipping-admin-ui": "*", + "magento/module-inventory-in-store-pickup-shipping-api": "*", + "magento/module-inventory-in-store-pickup-webapi-extension": "*", + "magento/module-inventory-indexer": "*", + "magento/module-inventory-low-quantity-notification": "*", + "magento/module-inventory-low-quantity-notification-admin-ui": "*", + "magento/module-inventory-low-quantity-notification-api": "*", + "magento/module-inventory-multi-dimensional-indexer-api": "*", + "magento/module-inventory-product-alert": "*", + "magento/module-inventory-requisition-list": "*", + "magento/module-inventory-reservation-cli": "*", + "magento/module-inventory-reservations": "*", + "magento/module-inventory-reservations-api": "*", + "magento/module-inventory-sales": "*", + "magento/module-inventory-sales-admin-ui": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-inventory-sales-frontend-ui": "*", + "magento/module-inventory-setup-fixture-generator": "*", + "magento/module-inventory-shipping": "*", + "magento/module-inventory-shipping-admin-ui": "*", + "magento/module-inventory-source-deduction-api": "*", + "magento/module-inventory-source-selection": "*", + "magento/module-inventory-source-selection-api": "*" + }, + "type": "metapackage", + "description": "Metapackage with Magento Inventory modules for simple installation" + }, { "name": "magento/magento-composer-installer", "version": "0.1.13", @@ -995,75 +1070,2060 @@ "reference": "8b6c32f53b4944a5d6656e86344cd0f9784709a1" }, "dist": { - "type": "zip", - "url": "https://api.github.com/repos/magento/magento-composer-installer/zipball/8b6c32f53b4944a5d6656e86344cd0f9784709a1", - "reference": "8b6c32f53b4944a5d6656e86344cd0f9784709a1", - "shasum": "" + "type": "zip", + "url": "https://api.github.com/repos/magento/magento-composer-installer/zipball/8b6c32f53b4944a5d6656e86344cd0f9784709a1", + "reference": "8b6c32f53b4944a5d6656e86344cd0f9784709a1", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0" + }, + "replace": { + "magento-hackathon/magento-composer-installer": "*" + }, + "require-dev": { + "composer/composer": "*@dev", + "firegento/phpcs": "dev-patch-1", + "mikey179/vfsstream": "*", + "phpunit/phpunit": "*", + "phpunit/phpunit-mock-objects": "dev-master", + "squizlabs/php_codesniffer": "1.4.7", + "symfony/process": "*" + }, + "type": "composer-plugin", + "extra": { + "composer-command-registry": [ + "MagentoHackathon\\Composer\\Magento\\Command\\DeployCommand" + ], + "class": "MagentoHackathon\\Composer\\Magento\\Plugin" + }, + "autoload": { + "psr-0": { + "MagentoHackathon\\Composer\\Magento": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "OSL-3.0" + ], + "authors": [ + { + "name": "Vinai Kopp", + "email": "vinai@netzarbeiter.com" + }, + { + "name": "Daniel Fahlke aka Flyingmana", + "email": "flyingmana@googlemail.com" + }, + { + "name": "Jörg Weller", + "email": "weller@flagbit.de" + }, + { + "name": "Karl Spies", + "email": "karl.spies@gmx.net" + }, + { + "name": "Tobias Vogt", + "email": "tobi@webguys.de" + }, + { + "name": "David Fuhr", + "email": "fuhr@flagbit.de" + } + ], + "description": "Composer installer for Magento modules", + "homepage": "https://github.com/magento/magento-composer-installer", + "keywords": [ + "composer-installer", + "magento" + ], + "time": "2017-12-29T16:45:24+00:00" + }, + { + "name": "magento/module-inventory", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/Inventory", + "reference": "8f7328aef13ea2bbf0403a127ddc29aae394216a" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\Inventory\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-admin-ui", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryAdminUi", + "reference": "f2c1f23bdf130031baf313ef5d48a9134eb5243b" + }, + "require": { + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-directory": "*", + "magento/module-inventory": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-ui": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryAdminUi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-advanced-checkout", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryAdvancedCheckout", + "reference": "68f4ace4d247191152dd57a3792019290107219a" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-advanced-checkout": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryAdvancedCheckout\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-api", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryApi", + "reference": "6021a514f1cf775e71eff0f113814633c99f4cb4" + }, + "require": { + "magento/framework": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryApi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-bundle-product", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryBundleProduct", + "reference": "b70f9b7d346d89ab36c98a03b4940f66ab48f523" + }, + "require": { + "magento/framework": "*", + "magento/module-bundle": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-inventory-configuration-api": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryBundleProduct\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-bundle-product-admin-ui", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryBundleProductAdminUi", + "reference": "d6845a5e7e1937b2395af1bc264cff9d1b82f159" + }, + "require": { + "magento/framework": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-inventory-configuration-api": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryBundleProductAdminUi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-cache", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryCache", + "reference": "22bc373a550688033176222cb7119f419e62bf44" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-indexer": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-catalog": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryCache\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-catalog", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryCatalog", + "reference": "76249f98a2d94848ab66d556c04e3534af3c7174" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-inventory": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-configuration": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-inventory-indexer": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-inventory-reservations-api": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryCatalog\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-catalog-admin-ui", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryCatalogAdminUi", + "reference": "f83ee7788d4ee361a7bfaa0496e8c1ddd88d2050" + }, + "require": { + "magento/framework": "*", + "magento/module-asynchronous-operations": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-inventory-indexer": "*", + "magento/module-ui": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-inventory-admin-ui": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryCatalogAdminUi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-catalog-api", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryCatalogApi", + "reference": "7c28d112b3a95c152c98c5b0ad185d99efd132cc" + }, + "require": { + "magento/framework": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryCatalogApi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-catalog-search", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryCatalogSearch", + "reference": "79e13720b694eedbc8e1d9e35d747faf41b2f10d" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-indexer": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-catalog-search": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryCatalogSearch\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-configurable-product", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryConfigurableProduct", + "reference": "ea16d6f0d8c303bc2a92885d4489bd6127c40647" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-configurable-product": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-indexer": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryConfigurableProduct\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-configurable-product-admin-ui", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryConfigurableProductAdminUi", + "reference": "7f299a7c3c38a81fe6206a8a3f98a5f1e5b7c4b7" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-configurable-product": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-admin-ui": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-ui": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryConfigurableProductAdminUi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-configurable-product-indexer", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryConfigurableProductIndexer", + "reference": "963b25a8219dc8b283b831eafc05b504665d0400" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-indexer": "*", + "magento/module-inventory-multi-dimensional-indexer-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-inventory": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryConfigurableProductIndexer\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-configuration", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryConfiguration", + "reference": "9e72ba28e74b03db71d61ef2772716020eda9f01" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog-inventory": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryConfiguration\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-configuration-api", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryConfigurationApi", + "reference": "04a2499b11e114505baecf3e5a3d60aaf022f522" + }, + "require": { + "magento/framework": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryConfigurationApi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-distance-based-source-selection", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryDistanceBasedSourceSelection", + "reference": "c95f3fb4a2cdea348aa71612f98434ceb95b94f3" + }, + "require": { + "magento/framework": "*", + "magento/module-config": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-distance-based-source-selection-api": "*", + "magento/module-inventory-source-selection-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryDistanceBasedSourceSelection\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-distance-based-source-selection-admin-ui", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryDistanceBasedSourceSelectionAdminUi", + "reference": "d954bf833cbc4cdb48fde2f71ee4d57b698ebb41" + }, + "require": { + "magento/framework": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryDistanceBasedSourceSelectionAdminUi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-distance-based-source-selection-api", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryDistanceBasedSourceSelectionApi", + "reference": "e77aab8aa559bb64af1320b034cd1da08db1db72" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-source-selection-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryDistanceBasedSourceSelectionApi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-elasticsearch", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryElasticsearch", + "reference": "056223bf6876ac9eb10e844b78936b1a8569d752" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog-inventory": "*", + "magento/module-catalog-search": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-indexer": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryElasticsearch\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-export-stock", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryExportStock", + "reference": "6e1adeea86b37bfba0b17a73535c2bccf1b866a6" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-configurable-product": "*", + "magento/module-grouped-product": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-configuration": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-inventory-export-stock-api": "*", + "magento/module-inventory-indexer": "*", + "magento/module-inventory-sales": "*", + "magento/module-inventory-sales-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryExportStock\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-export-stock-api", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryExportStockApi", + "reference": "e0a4a95ae072230973674c44781237734d20cff1" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-sales-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryExportStockApi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-graph-ql", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryGraphQl", + "reference": "59cc31e362267fc638485841b3cfd71dd02a4eb3" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-inventory-catalog": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-inventory-sales-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryGraphQl\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-grouped-product", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryGroupedProduct", + "reference": "1285223422ad3f6c46448f98b49270951bf7987e" + }, + "require": { + "magento/framework": "*", + "magento/module-grouped-product": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-inventory-configuration-api": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryGroupedProduct\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-grouped-product-admin-ui", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryGroupedProductAdminUi", + "reference": "6dcef543c132ce32398a4e402e88feeb22514cb6" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-grouped-product": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-admin-ui": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-ui": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-inventory-configuration-api": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryGroupedProductAdminUi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-grouped-product-indexer", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryGroupedProductIndexer", + "reference": "ab274395ee3d19bf103972c600b4b995842516c7" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-grouped-product": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-indexer": "*", + "magento/module-inventory-multi-dimensional-indexer-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-inventory": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryGroupedProductIndexer\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-import-export", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryImportExport", + "reference": "d5ae7a01000f40454f619f56d52ac33af4115ad8" + }, + "require": { + "magento/framework": "*", + "magento/module-eav": "*", + "magento/module-import-export": "*", + "magento/module-inventory": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-catalog-import-export": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryImportExport\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickup", + "reference": "0ae163e3b65b7702ed2c102ce12decbaddd63d59" + }, + "require": { + "magento/framework": "*", + "magento/module-directory": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-distance-based-source-selection-api": "*", + "magento/module-inventory-in-store-pickup-api": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-inventory-source-selection-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickup\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup-admin-ui", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickupAdminUi", + "reference": "5f6eed04e9c45cc1ba72750773c66bd772a367c9" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-admin-ui": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-in-store-pickup-api": "*", + "magento/module-ui": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickupAdminUi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup-api", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickupApi", + "reference": "45f161677a03fb1af4833ea146a89b3ff049ecb0" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickupApi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup-frontend", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickupFrontend", + "reference": "8be08862ebc253ff7ac5b2140f5dc916cefb3fc0" + }, + "require": { + "magento/framework": "*", + "magento/module-checkout": "*", + "magento/module-inventory-in-store-pickup-api": "*", + "magento/module-inventory-in-store-pickup-sales-api": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickupFrontend\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup-graph-ql", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickupGraphQl", + "reference": "8d040abf32e31b1ed49c4799c3d773d2234cfad7" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-in-store-pickup-api": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickupGraphQl\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup-multishipping", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickupMultishipping", + "reference": "fd8647773aaa4d7372f480127a41fe2e0455b8f5" + }, + "require": { + "magento/framework": "*", + "magento/module-checkout": "*", + "magento/module-inventory-in-store-pickup-shipping-api": "*", + "magento/module-quote": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickupMultishipping\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup-quote", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickupQuote", + "reference": "ed092349ebaeb390390c8bc5c9ce76b8318cc837" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-in-store-pickup": "*", + "magento/module-inventory-in-store-pickup-api": "*", + "magento/module-inventory-in-store-pickup-shipping-api": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-quote": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickupQuote\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup-quote-graph-ql", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickupQuoteGraphQl", + "reference": "402b09cc604b770943790dad427a5a028a91d73f" + }, + "require": { + "magento/framework": "*", + "magento/module-graph-ql": "*", + "magento/module-quote": "*", + "magento/module-quote-graph-ql": "*", + "php": "~7.1.3||~7.2.0|~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickupQuoteGraphQl\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup-sales", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickupSales", + "reference": "2fc9ae97016a674786a0a8c212b33a9c8b473bed" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-in-store-pickup-api": "*", + "magento/module-inventory-in-store-pickup-sales-api": "*", + "magento/module-inventory-source-selection-api": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickupSales\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup-sales-admin-ui", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickupSalesAdminUi", + "reference": "f88b196f18130945cc8604cdda970db9749a1c91" + }, + "require": { + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-in-store-pickup-quote": "*", + "magento/module-inventory-in-store-pickup-sales": "*", + "magento/module-inventory-in-store-pickup-sales-api": "*", + "magento/module-inventory-in-store-pickup-shipping-api": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-quote": "*", + "magento/module-sales": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickupSalesAdminUi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup-sales-api", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickupSalesApi", + "reference": "b5eaa756e95d98c29697e1f0eaf69717d497e853" + }, + "require": { + "magento/framework": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickupSalesApi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup-shipping", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickupShipping", + "reference": "c53312ad4fb974c5638c03c98ac47cb127c8e8ab" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-inventory-in-store-pickup-api": "*", + "magento/module-inventory-in-store-pickup-shipping-api": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-quote": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickupShipping\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup-shipping-admin-ui", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickupShippingAdminUi", + "reference": "39d8aae876039cd675efa5fa77108c2004077adc" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-in-store-pickup-shipping-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-shipping": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickupShippingAdminUi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup-shipping-api", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickupShippingApi", + "reference": "386e1aca66501d4ff749e9f993643164aeb9f5bc" + }, + "require": { + "magento/framework": "*", + "magento/module-quote": "*", + "magento/module-shipping": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickupShippingApi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-in-store-pickup-webapi-extension", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryInStorePickupWebapiExtension", + "reference": "1ae1c489eed2a377f9cfc1b2e51e33ccb1592cff" + }, + "require": { + "magento/framework": "*", + "magento/module-webapi": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryInStorePickupWebapiExtension\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A", + "abandoned": true + }, + { + "name": "magento/module-inventory-indexer", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryIndexer", + "reference": "081e6bff7733f92aef05860222f6b241e0635be5" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-multi-dimensional-indexer-api": "*", + "magento/module-inventory-sales": "*", + "magento/module-inventory-sales-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-catalog": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryIndexer\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-low-quantity-notification", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryLowQuantityNotification", + "reference": "224e49f5e1fd132d3d1c7b79207edef586dad622" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-eav": "*", + "magento/module-inventory": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-inventory-low-quantity-notification-api": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryLowQuantityNotification\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-low-quantity-notification-admin-ui", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryLowQuantityNotificationAdminUi", + "reference": "749f1a201f69d4490bfa1bed4c1c896de12083d6" + }, + "require": { + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-inventory-low-quantity-notification": "*", + "magento/module-inventory-low-quantity-notification-api": "*", + "magento/module-reports": "*", + "magento/module-ui": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryLowQuantityNotificationAdminUi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-low-quantity-notification-api", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryLowQuantityNotificationApi", + "reference": "23044d7aa28b52967b7408d7eeee8ad976efd318" + }, + "require": { + "magento/framework": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryLowQuantityNotificationApi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-multi-dimensional-indexer-api", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryMultiDimensionalIndexerApi", + "reference": "70bfcfb838a752a5175bcdb0adee6c065c47598f" + }, + "require": { + "magento/framework": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryMultiDimensionalIndexerApi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-product-alert", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryProductAlert", + "reference": "096cb3e30ed3adb133ac17b51609bd10625ff0d4" + }, + "require": { + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-product-alert": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-product-alert": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryProductAlert\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-requisition-list", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryRequisitionList", + "reference": "6102879489fc26ad09aa18a65ee33b9489f5b2e1" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-inventory-sales-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "suggest": { + "magento/module-requisition-list": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryRequisitionList\\": "" + } + }, + "license": [ + "proprietary" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-reservation-cli", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryReservationCli", + "reference": "6f73556c87d144bcb2d6e5f7d02390a59efec24e" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-inventory-reservations-api": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-sales": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryReservationCli\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-reservations", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryReservations", + "reference": "2139f595fc01da3dafaeb4f96ee93fe05d1c3181" }, "require": { - "composer-plugin-api": "^1.0" + "magento/framework": "*", + "magento/module-inventory-reservations-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" }, - "replace": { - "magento-hackathon/magento-composer-installer": "*" + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryReservations\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-reservations-api", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryReservationsApi", + "reference": "4dce9b461528fd14dbc4622273dcd7a7c419c9ff" + }, + "require": { + "magento/framework": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryReservationsApi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-sales", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventorySales", + "reference": "e0bb76ee03498fb6a99b327be24f34c6e586df2f" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-inventory": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-inventory-reservations-api": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-inventory-source-deduction-api": "*", + "magento/module-inventory-source-selection-api": "*", + "magento/module-sales": "*", + "magento/module-sales-inventory": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" }, "require-dev": { - "composer/composer": "*@dev", - "firegento/phpcs": "dev-patch-1", - "mikey179/vfsstream": "*", - "phpunit/phpunit": "*", - "phpunit/phpunit-mock-objects": "dev-master", - "squizlabs/php_codesniffer": "1.4.7", - "symfony/process": "*" + "magento/module-inventory-indexer": "*" }, - "type": "composer-plugin", - "extra": { - "composer-command-registry": [ - "MagentoHackathon\\Composer\\Magento\\Command\\DeployCommand" + "suggest": { + "magento/module-inventory-catalog": "*" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" ], - "class": "MagentoHackathon\\Composer\\Magento\\Plugin" + "psr-4": { + "Magento\\InventorySales\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-sales-admin-ui", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventorySalesAdminUi", + "reference": "8038c54e08c605e269c186aa5d02d0ade0ab660a" }, + "require": { + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-catalog": "*", + "magento/module-catalog-inventory": "*", + "magento/module-inventory-admin-ui": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-store": "*", + "magento/module-ui": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", "autoload": { - "psr-0": { - "MagentoHackathon\\Composer\\Magento": "src/" + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventorySalesAdminUi\\": "" } }, - "notification-url": "https://packagist.org/downloads/", "license": [ - "OSL-3.0" + "OSL-3.0", + "AFL-3.0" ], - "authors": [ - { - "name": "Vinai Kopp", - "email": "vinai@netzarbeiter.com" - }, - { - "name": "Daniel Fahlke aka Flyingmana", - "email": "flyingmana@googlemail.com" - }, - { - "name": "Jörg Weller", - "email": "weller@flagbit.de" - }, - { - "name": "Karl Spies", - "email": "karl.spies@gmx.net" - }, - { - "name": "Tobias Vogt", - "email": "tobi@webguys.de" - }, - { - "name": "David Fuhr", - "email": "fuhr@flagbit.de" + "description": "N/A" + }, + { + "name": "magento/module-inventory-sales-api", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventorySalesApi", + "reference": "03001efa0132c6925781311b80c5dfb031653e7a" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-api": "*", + "magento/module-sales": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventorySalesApi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-sales-frontend-ui", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventorySalesFrontendUi", + "reference": "8fdcb043d36841ee9df5c9936ff299d2ccf1bfaf" + }, + "require": { + "magento/framework": "*", + "magento/module-catalog-inventory": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-inventory-sales-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventorySalesFrontendUi\\": "" } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" ], - "description": "Composer installer for Magento modules", - "homepage": "https://github.com/magento/magento-composer-installer", - "keywords": [ - "composer-installer", - "magento" + "description": "N/A" + }, + { + "name": "magento/module-inventory-setup-fixture-generator", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventorySetupFixtureGenerator", + "reference": "41140ffd67256be36e1b90b2204c8e2f59941e4f" + }, + "require": { + "magento/framework": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventorySetupFixtureGenerator\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" ], - "time": "2017-12-29T16:45:24+00:00" + "description": "N/A" + }, + { + "name": "magento/module-inventory-shipping", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryShipping", + "reference": "3f3fe614f335c9d5d492470150fecb0e6a0a29da" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-catalog-api": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-inventory-source-deduction-api": "*", + "magento/module-inventory-source-selection-api": "*", + "magento/module-sales": "*", + "magento/module-shipping": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryShipping\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-shipping-admin-ui", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventoryShippingAdminUi", + "reference": "8bc47c557b829ed22964a5686390f97f1d4a4eac" + }, + "require": { + "magento/framework": "*", + "magento/module-backend": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-inventory-source-selection-api": "*", + "magento/module-sales": "*", + "magento/module-shipping": "*", + "magento/module-ui": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventoryShippingAdminUi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-source-deduction-api", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventorySourceDeductionApi", + "reference": "bbab186125238ac4eeb3fa4d35fd3fd63c9d1f97" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-configuration-api": "*", + "magento/module-inventory-sales-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventorySourceDeductionApi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-source-selection", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventorySourceSelection", + "reference": "bbf1c97e3073ad948b8af4c05eb7e840473d0c2d" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-source-selection-api": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventorySourceSelection\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" + }, + { + "name": "magento/module-inventory-source-selection-api", + "version": "dev-1.2-develop", + "dist": { + "type": "path", + "url": "./ext/magento/inventory/InventorySourceSelectionApi", + "reference": "ad4e17d3a68bd4b7c7e3f81d0a0e7c10657840fd" + }, + "require": { + "magento/framework": "*", + "magento/module-inventory-api": "*", + "magento/module-inventory-sales-api": "*", + "magento/module-sales": "*", + "magento/module-store": "*", + "php": "~7.1.3||~7.2.0||~7.3.0" + }, + "type": "magento2-module", + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Magento\\InventorySourceSelectionApi\\": "" + } + }, + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "description": "N/A" }, { "name": "magento/zendframework1", @@ -1850,11 +3910,6 @@ "MIT" ], "authors": [ - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - }, { "name": "Marijn Huizendveld", "email": "marijn.huizendveld@gmail.com" @@ -1862,6 +3917,11 @@ { "name": "Thibaud Fabre", "email": "thibaud@aztech.io" + }, + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" } ], "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", @@ -10522,9 +12582,10 @@ } ], "aliases": [], - "minimum-stability": "stable", + "minimum-stability": "dev", "stability-flags": { "magento/composer": 20, + "magento/inventory-composer-metapackage-dev": 20, "phpmd/phpmd": 0 }, "prefer-stable": true, From 79797a7e9e30fd06f127d1983057f179d3f73280 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Wed, 26 Feb 2020 01:38:17 +0100 Subject: [PATCH 195/229] Rollback accidental change to Composer files --- composer.json | 16 +- composer.lock | 2193 ++----------------------------------------------- 2 files changed, 70 insertions(+), 2139 deletions(-) diff --git a/composer.json b/composer.json index 6aa98e0904d01..9c42a05a457c5 100644 --- a/composer.json +++ b/composer.json @@ -35,12 +35,11 @@ "colinmollenhour/php-redis-session-abstract": "~1.4.0", "composer/composer": "^1.6", "elasticsearch/elasticsearch": "~2.0||~5.1||~6.1", - "guzzlehttp/guzzle": "^6.3.3", "magento/composer": "1.6.x-dev", - "magento/inventory-composer-metapackage-dev": "1.2.0-dev", "magento/magento-composer-installer": ">=0.1.11", "magento/zendframework1": "~1.14.2", "monolog/monolog": "^1.17", + "wikimedia/less.php": "~1.8.0", "paragonie/sodium_compat": "^1.6", "pelago/emogrifier": "^2.0.0", "php-amqplib/php-amqplib": "~2.7.0||~2.10.0", @@ -53,7 +52,6 @@ "tedivm/jshrink": "~1.3.0", "tubalmartin/cssmin": "4.1.1", "webonyx/graphql-php": "^0.13.8", - "wikimedia/less.php": "~1.8.0", "zendframework/zend-captcha": "^2.7.1", "zendframework/zend-code": "~3.3.0", "zendframework/zend-config": "^2.6.0", @@ -81,7 +79,8 @@ "zendframework/zend-text": "^2.6.0", "zendframework/zend-uri": "^2.5.1", "zendframework/zend-validator": "^2.6.0", - "zendframework/zend-view": "~2.11.2" + "zendframework/zend-view": "~2.11.2", + "guzzlehttp/guzzle": "^6.3.3" }, "require-dev": { "allure-framework/allure-phpunit": "~1.2.0", @@ -347,12 +346,5 @@ "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/" } }, - "prefer-stable": true, - "minimum-stability": "dev", - "repositories": { - "ext": { - "type": "path", - "url": "./ext/*/*/*" - } - } + "prefer-stable": true } diff --git a/composer.lock b/composer.lock index 6e75b47dcc2e2..6ac7f36cd2e32 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cdac5eb7bc47c1aaf375c1132f768002", + "content-hash": "f06887dfc3e06489a251fbb5c18d30ca", "packages": [ { "name": "braintree/braintree_php", @@ -987,2143 +987,83 @@ "time": "2020-01-17T16:43:51+00:00" }, { - "name": "magento/inventory-composer-metapackage-dev", - "version": "1.2.0-dev", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/_metapackage", - "reference": "7afaa438e2504e33856f0a1676e5a50864867502" - }, - "require": { - "magento/module-inventory": "*", - "magento/module-inventory-admin-ui": "*", - "magento/module-inventory-advanced-checkout": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-bundle-product": "*", - "magento/module-inventory-bundle-product-admin-ui": "*", - "magento/module-inventory-cache": "*", - "magento/module-inventory-catalog": "*", - "magento/module-inventory-catalog-admin-ui": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-catalog-search": "*", - "magento/module-inventory-configurable-product": "*", - "magento/module-inventory-configurable-product-admin-ui": "*", - "magento/module-inventory-configurable-product-indexer": "*", - "magento/module-inventory-configuration": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-inventory-distance-based-source-selection": "*", - "magento/module-inventory-distance-based-source-selection-admin-ui": "*", - "magento/module-inventory-distance-based-source-selection-api": "*", - "magento/module-inventory-elasticsearch": "*", - "magento/module-inventory-export-stock": "*", - "magento/module-inventory-export-stock-api": "*", - "magento/module-inventory-graph-ql": "*", - "magento/module-inventory-grouped-product": "*", - "magento/module-inventory-grouped-product-admin-ui": "*", - "magento/module-inventory-grouped-product-indexer": "*", - "magento/module-inventory-import-export": "*", - "magento/module-inventory-in-store-pickup": "*", - "magento/module-inventory-in-store-pickup-admin-ui": "*", - "magento/module-inventory-in-store-pickup-api": "*", - "magento/module-inventory-in-store-pickup-frontend": "*", - "magento/module-inventory-in-store-pickup-graph-ql": "*", - "magento/module-inventory-in-store-pickup-multishipping": "*", - "magento/module-inventory-in-store-pickup-quote": "*", - "magento/module-inventory-in-store-pickup-quote-graph-ql": "*", - "magento/module-inventory-in-store-pickup-sales": "*", - "magento/module-inventory-in-store-pickup-sales-admin-ui": "*", - "magento/module-inventory-in-store-pickup-sales-api": "*", - "magento/module-inventory-in-store-pickup-shipping": "*", - "magento/module-inventory-in-store-pickup-shipping-admin-ui": "*", - "magento/module-inventory-in-store-pickup-shipping-api": "*", - "magento/module-inventory-in-store-pickup-webapi-extension": "*", - "magento/module-inventory-indexer": "*", - "magento/module-inventory-low-quantity-notification": "*", - "magento/module-inventory-low-quantity-notification-admin-ui": "*", - "magento/module-inventory-low-quantity-notification-api": "*", - "magento/module-inventory-multi-dimensional-indexer-api": "*", - "magento/module-inventory-product-alert": "*", - "magento/module-inventory-requisition-list": "*", - "magento/module-inventory-reservation-cli": "*", - "magento/module-inventory-reservations": "*", - "magento/module-inventory-reservations-api": "*", - "magento/module-inventory-sales": "*", - "magento/module-inventory-sales-admin-ui": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-inventory-sales-frontend-ui": "*", - "magento/module-inventory-setup-fixture-generator": "*", - "magento/module-inventory-shipping": "*", - "magento/module-inventory-shipping-admin-ui": "*", - "magento/module-inventory-source-deduction-api": "*", - "magento/module-inventory-source-selection": "*", - "magento/module-inventory-source-selection-api": "*" - }, - "type": "metapackage", - "description": "Metapackage with Magento Inventory modules for simple installation" - }, - { - "name": "magento/magento-composer-installer", - "version": "0.1.13", - "source": { - "type": "git", - "url": "https://github.com/magento/magento-composer-installer.git", - "reference": "8b6c32f53b4944a5d6656e86344cd0f9784709a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/magento/magento-composer-installer/zipball/8b6c32f53b4944a5d6656e86344cd0f9784709a1", - "reference": "8b6c32f53b4944a5d6656e86344cd0f9784709a1", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0" - }, - "replace": { - "magento-hackathon/magento-composer-installer": "*" - }, - "require-dev": { - "composer/composer": "*@dev", - "firegento/phpcs": "dev-patch-1", - "mikey179/vfsstream": "*", - "phpunit/phpunit": "*", - "phpunit/phpunit-mock-objects": "dev-master", - "squizlabs/php_codesniffer": "1.4.7", - "symfony/process": "*" - }, - "type": "composer-plugin", - "extra": { - "composer-command-registry": [ - "MagentoHackathon\\Composer\\Magento\\Command\\DeployCommand" - ], - "class": "MagentoHackathon\\Composer\\Magento\\Plugin" - }, - "autoload": { - "psr-0": { - "MagentoHackathon\\Composer\\Magento": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "OSL-3.0" - ], - "authors": [ - { - "name": "Vinai Kopp", - "email": "vinai@netzarbeiter.com" - }, - { - "name": "Daniel Fahlke aka Flyingmana", - "email": "flyingmana@googlemail.com" - }, - { - "name": "Jörg Weller", - "email": "weller@flagbit.de" - }, - { - "name": "Karl Spies", - "email": "karl.spies@gmx.net" - }, - { - "name": "Tobias Vogt", - "email": "tobi@webguys.de" - }, - { - "name": "David Fuhr", - "email": "fuhr@flagbit.de" - } - ], - "description": "Composer installer for Magento modules", - "homepage": "https://github.com/magento/magento-composer-installer", - "keywords": [ - "composer-installer", - "magento" - ], - "time": "2017-12-29T16:45:24+00:00" - }, - { - "name": "magento/module-inventory", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/Inventory", - "reference": "8f7328aef13ea2bbf0403a127ddc29aae394216a" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\Inventory\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-admin-ui", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryAdminUi", - "reference": "f2c1f23bdf130031baf313ef5d48a9134eb5243b" - }, - "require": { - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-directory": "*", - "magento/module-inventory": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-ui": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryAdminUi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-advanced-checkout", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryAdvancedCheckout", - "reference": "68f4ace4d247191152dd57a3792019290107219a" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-advanced-checkout": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryAdvancedCheckout\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-api", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryApi", - "reference": "6021a514f1cf775e71eff0f113814633c99f4cb4" - }, - "require": { - "magento/framework": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryApi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-bundle-product", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryBundleProduct", - "reference": "b70f9b7d346d89ab36c98a03b4940f66ab48f523" - }, - "require": { - "magento/framework": "*", - "magento/module-bundle": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-inventory-configuration-api": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryBundleProduct\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-bundle-product-admin-ui", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryBundleProductAdminUi", - "reference": "d6845a5e7e1937b2395af1bc264cff9d1b82f159" - }, - "require": { - "magento/framework": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-inventory-configuration-api": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryBundleProductAdminUi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-cache", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryCache", - "reference": "22bc373a550688033176222cb7119f419e62bf44" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-indexer": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-catalog": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryCache\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-catalog", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryCatalog", - "reference": "76249f98a2d94848ab66d556c04e3534af3c7174" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-inventory": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-configuration": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-inventory-indexer": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-inventory-reservations-api": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryCatalog\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-catalog-admin-ui", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryCatalogAdminUi", - "reference": "f83ee7788d4ee361a7bfaa0496e8c1ddd88d2050" - }, - "require": { - "magento/framework": "*", - "magento/module-asynchronous-operations": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-inventory-indexer": "*", - "magento/module-ui": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-inventory-admin-ui": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryCatalogAdminUi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-catalog-api", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryCatalogApi", - "reference": "7c28d112b3a95c152c98c5b0ad185d99efd132cc" - }, - "require": { - "magento/framework": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryCatalogApi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-catalog-search", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryCatalogSearch", - "reference": "79e13720b694eedbc8e1d9e35d747faf41b2f10d" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-indexer": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-catalog-search": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryCatalogSearch\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-configurable-product", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryConfigurableProduct", - "reference": "ea16d6f0d8c303bc2a92885d4489bd6127c40647" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-configurable-product": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-indexer": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryConfigurableProduct\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-configurable-product-admin-ui", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryConfigurableProductAdminUi", - "reference": "7f299a7c3c38a81fe6206a8a3f98a5f1e5b7c4b7" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-configurable-product": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-admin-ui": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-ui": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryConfigurableProductAdminUi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-configurable-product-indexer", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryConfigurableProductIndexer", - "reference": "963b25a8219dc8b283b831eafc05b504665d0400" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-indexer": "*", - "magento/module-inventory-multi-dimensional-indexer-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-inventory": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryConfigurableProductIndexer\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-configuration", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryConfiguration", - "reference": "9e72ba28e74b03db71d61ef2772716020eda9f01" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog-inventory": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryConfiguration\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-configuration-api", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryConfigurationApi", - "reference": "04a2499b11e114505baecf3e5a3d60aaf022f522" - }, - "require": { - "magento/framework": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryConfigurationApi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-distance-based-source-selection", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryDistanceBasedSourceSelection", - "reference": "c95f3fb4a2cdea348aa71612f98434ceb95b94f3" - }, - "require": { - "magento/framework": "*", - "magento/module-config": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-distance-based-source-selection-api": "*", - "magento/module-inventory-source-selection-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryDistanceBasedSourceSelection\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-distance-based-source-selection-admin-ui", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryDistanceBasedSourceSelectionAdminUi", - "reference": "d954bf833cbc4cdb48fde2f71ee4d57b698ebb41" - }, - "require": { - "magento/framework": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryDistanceBasedSourceSelectionAdminUi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-distance-based-source-selection-api", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryDistanceBasedSourceSelectionApi", - "reference": "e77aab8aa559bb64af1320b034cd1da08db1db72" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-source-selection-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryDistanceBasedSourceSelectionApi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-elasticsearch", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryElasticsearch", - "reference": "056223bf6876ac9eb10e844b78936b1a8569d752" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog-inventory": "*", - "magento/module-catalog-search": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-indexer": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryElasticsearch\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-export-stock", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryExportStock", - "reference": "6e1adeea86b37bfba0b17a73535c2bccf1b866a6" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-configurable-product": "*", - "magento/module-grouped-product": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-configuration": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-inventory-export-stock-api": "*", - "magento/module-inventory-indexer": "*", - "magento/module-inventory-sales": "*", - "magento/module-inventory-sales-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryExportStock\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-export-stock-api", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryExportStockApi", - "reference": "e0a4a95ae072230973674c44781237734d20cff1" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-sales-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryExportStockApi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-graph-ql", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryGraphQl", - "reference": "59cc31e362267fc638485841b3cfd71dd02a4eb3" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-inventory-catalog": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-inventory-sales-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryGraphQl\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-grouped-product", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryGroupedProduct", - "reference": "1285223422ad3f6c46448f98b49270951bf7987e" - }, - "require": { - "magento/framework": "*", - "magento/module-grouped-product": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-inventory-configuration-api": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryGroupedProduct\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-grouped-product-admin-ui", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryGroupedProductAdminUi", - "reference": "6dcef543c132ce32398a4e402e88feeb22514cb6" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-grouped-product": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-admin-ui": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-ui": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-inventory-configuration-api": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryGroupedProductAdminUi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-grouped-product-indexer", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryGroupedProductIndexer", - "reference": "ab274395ee3d19bf103972c600b4b995842516c7" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-grouped-product": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-indexer": "*", - "magento/module-inventory-multi-dimensional-indexer-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-inventory": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryGroupedProductIndexer\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-import-export", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryImportExport", - "reference": "d5ae7a01000f40454f619f56d52ac33af4115ad8" - }, - "require": { - "magento/framework": "*", - "magento/module-eav": "*", - "magento/module-import-export": "*", - "magento/module-inventory": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-catalog-import-export": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryImportExport\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickup", - "reference": "0ae163e3b65b7702ed2c102ce12decbaddd63d59" - }, - "require": { - "magento/framework": "*", - "magento/module-directory": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-distance-based-source-selection-api": "*", - "magento/module-inventory-in-store-pickup-api": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-inventory-source-selection-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickup\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup-admin-ui", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickupAdminUi", - "reference": "5f6eed04e9c45cc1ba72750773c66bd772a367c9" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-admin-ui": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-in-store-pickup-api": "*", - "magento/module-ui": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickupAdminUi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup-api", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickupApi", - "reference": "45f161677a03fb1af4833ea146a89b3ff049ecb0" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickupApi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup-frontend", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickupFrontend", - "reference": "8be08862ebc253ff7ac5b2140f5dc916cefb3fc0" - }, - "require": { - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-inventory-in-store-pickup-api": "*", - "magento/module-inventory-in-store-pickup-sales-api": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickupFrontend\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup-graph-ql", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickupGraphQl", - "reference": "8d040abf32e31b1ed49c4799c3d773d2234cfad7" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-in-store-pickup-api": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickupGraphQl\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup-multishipping", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickupMultishipping", - "reference": "fd8647773aaa4d7372f480127a41fe2e0455b8f5" - }, - "require": { - "magento/framework": "*", - "magento/module-checkout": "*", - "magento/module-inventory-in-store-pickup-shipping-api": "*", - "magento/module-quote": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickupMultishipping\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup-quote", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickupQuote", - "reference": "ed092349ebaeb390390c8bc5c9ce76b8318cc837" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-in-store-pickup": "*", - "magento/module-inventory-in-store-pickup-api": "*", - "magento/module-inventory-in-store-pickup-shipping-api": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-quote": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickupQuote\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup-quote-graph-ql", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickupQuoteGraphQl", - "reference": "402b09cc604b770943790dad427a5a028a91d73f" - }, - "require": { - "magento/framework": "*", - "magento/module-graph-ql": "*", - "magento/module-quote": "*", - "magento/module-quote-graph-ql": "*", - "php": "~7.1.3||~7.2.0|~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickupQuoteGraphQl\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup-sales", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickupSales", - "reference": "2fc9ae97016a674786a0a8c212b33a9c8b473bed" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-in-store-pickup-api": "*", - "magento/module-inventory-in-store-pickup-sales-api": "*", - "magento/module-inventory-source-selection-api": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickupSales\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup-sales-admin-ui", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickupSalesAdminUi", - "reference": "f88b196f18130945cc8604cdda970db9749a1c91" - }, - "require": { - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-in-store-pickup-quote": "*", - "magento/module-inventory-in-store-pickup-sales": "*", - "magento/module-inventory-in-store-pickup-sales-api": "*", - "magento/module-inventory-in-store-pickup-shipping-api": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-quote": "*", - "magento/module-sales": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickupSalesAdminUi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup-sales-api", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickupSalesApi", - "reference": "b5eaa756e95d98c29697e1f0eaf69717d497e853" - }, - "require": { - "magento/framework": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickupSalesApi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup-shipping", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickupShipping", - "reference": "c53312ad4fb974c5638c03c98ac47cb127c8e8ab" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-inventory-in-store-pickup-api": "*", - "magento/module-inventory-in-store-pickup-shipping-api": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-quote": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickupShipping\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup-shipping-admin-ui", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickupShippingAdminUi", - "reference": "39d8aae876039cd675efa5fa77108c2004077adc" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-in-store-pickup-shipping-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-shipping": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickupShippingAdminUi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup-shipping-api", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickupShippingApi", - "reference": "386e1aca66501d4ff749e9f993643164aeb9f5bc" - }, - "require": { - "magento/framework": "*", - "magento/module-quote": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickupShippingApi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-in-store-pickup-webapi-extension", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryInStorePickupWebapiExtension", - "reference": "1ae1c489eed2a377f9cfc1b2e51e33ccb1592cff" - }, - "require": { - "magento/framework": "*", - "magento/module-webapi": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryInStorePickupWebapiExtension\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A", - "abandoned": true - }, - { - "name": "magento/module-inventory-indexer", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryIndexer", - "reference": "081e6bff7733f92aef05860222f6b241e0635be5" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-multi-dimensional-indexer-api": "*", - "magento/module-inventory-sales": "*", - "magento/module-inventory-sales-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-catalog": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryIndexer\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-low-quantity-notification", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryLowQuantityNotification", - "reference": "224e49f5e1fd132d3d1c7b79207edef586dad622" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-eav": "*", - "magento/module-inventory": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-inventory-low-quantity-notification-api": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryLowQuantityNotification\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-low-quantity-notification-admin-ui", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryLowQuantityNotificationAdminUi", - "reference": "749f1a201f69d4490bfa1bed4c1c896de12083d6" - }, - "require": { - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-inventory-low-quantity-notification": "*", - "magento/module-inventory-low-quantity-notification-api": "*", - "magento/module-reports": "*", - "magento/module-ui": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryLowQuantityNotificationAdminUi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-low-quantity-notification-api", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryLowQuantityNotificationApi", - "reference": "23044d7aa28b52967b7408d7eeee8ad976efd318" - }, - "require": { - "magento/framework": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryLowQuantityNotificationApi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-multi-dimensional-indexer-api", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryMultiDimensionalIndexerApi", - "reference": "70bfcfb838a752a5175bcdb0adee6c065c47598f" - }, - "require": { - "magento/framework": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryMultiDimensionalIndexerApi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-product-alert", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryProductAlert", - "reference": "096cb3e30ed3adb133ac17b51609bd10625ff0d4" - }, - "require": { - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-product-alert": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-product-alert": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryProductAlert\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-requisition-list", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryRequisitionList", - "reference": "6102879489fc26ad09aa18a65ee33b9489f5b2e1" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-inventory-sales-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "suggest": { - "magento/module-requisition-list": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryRequisitionList\\": "" - } - }, - "license": [ - "proprietary" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-reservation-cli", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryReservationCli", - "reference": "6f73556c87d144bcb2d6e5f7d02390a59efec24e" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-inventory-reservations-api": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-sales": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryReservationCli\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-reservations", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryReservations", - "reference": "2139f595fc01da3dafaeb4f96ee93fe05d1c3181" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-reservations-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryReservations\\": "" - } + "name": "magento/magento-composer-installer", + "version": "0.1.13", + "source": { + "type": "git", + "url": "https://github.com/magento/magento-composer-installer.git", + "reference": "8b6c32f53b4944a5d6656e86344cd0f9784709a1" }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-reservations-api", - "version": "dev-1.2-develop", "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryReservationsApi", - "reference": "4dce9b461528fd14dbc4622273dcd7a7c419c9ff" + "type": "zip", + "url": "https://api.github.com/repos/magento/magento-composer-installer/zipball/8b6c32f53b4944a5d6656e86344cd0f9784709a1", + "reference": "8b6c32f53b4944a5d6656e86344cd0f9784709a1", + "shasum": "" }, "require": { - "magento/framework": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryReservationsApi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-sales", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventorySales", - "reference": "e0bb76ee03498fb6a99b327be24f34c6e586df2f" + "composer-plugin-api": "^1.0" }, - "require": { - "magento/framework": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-inventory": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-inventory-reservations-api": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-inventory-source-deduction-api": "*", - "magento/module-inventory-source-selection-api": "*", - "magento/module-sales": "*", - "magento/module-sales-inventory": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" + "replace": { + "magento-hackathon/magento-composer-installer": "*" }, "require-dev": { - "magento/module-inventory-indexer": "*" - }, - "suggest": { - "magento/module-inventory-catalog": "*" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventorySales\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-sales-admin-ui", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventorySalesAdminUi", - "reference": "8038c54e08c605e269c186aa5d02d0ade0ab660a" - }, - "require": { - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-catalog": "*", - "magento/module-catalog-inventory": "*", - "magento/module-inventory-admin-ui": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-store": "*", - "magento/module-ui": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventorySalesAdminUi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-sales-api", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventorySalesApi", - "reference": "03001efa0132c6925781311b80c5dfb031653e7a" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-api": "*", - "magento/module-sales": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventorySalesApi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-sales-frontend-ui", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventorySalesFrontendUi", - "reference": "8fdcb043d36841ee9df5c9936ff299d2ccf1bfaf" - }, - "require": { - "magento/framework": "*", - "magento/module-catalog-inventory": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-inventory-sales-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventorySalesFrontendUi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-setup-fixture-generator", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventorySetupFixtureGenerator", - "reference": "41140ffd67256be36e1b90b2204c8e2f59941e4f" - }, - "require": { - "magento/framework": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventorySetupFixtureGenerator\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-shipping", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryShipping", - "reference": "3f3fe614f335c9d5d492470150fecb0e6a0a29da" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-catalog-api": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-inventory-source-deduction-api": "*", - "magento/module-inventory-source-selection-api": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventoryShipping\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-shipping-admin-ui", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventoryShippingAdminUi", - "reference": "8bc47c557b829ed22964a5686390f97f1d4a4eac" - }, - "require": { - "magento/framework": "*", - "magento/module-backend": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-inventory-source-selection-api": "*", - "magento/module-sales": "*", - "magento/module-shipping": "*", - "magento/module-ui": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" + "composer/composer": "*@dev", + "firegento/phpcs": "dev-patch-1", + "mikey179/vfsstream": "*", + "phpunit/phpunit": "*", + "phpunit/phpunit-mock-objects": "dev-master", + "squizlabs/php_codesniffer": "1.4.7", + "symfony/process": "*" }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" + "type": "composer-plugin", + "extra": { + "composer-command-registry": [ + "MagentoHackathon\\Composer\\Magento\\Command\\DeployCommand" ], - "psr-4": { - "Magento\\InventoryShippingAdminUi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-source-deduction-api", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventorySourceDeductionApi", - "reference": "bbab186125238ac4eeb3fa4d35fd3fd63c9d1f97" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-configuration-api": "*", - "magento/module-inventory-sales-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" + "class": "MagentoHackathon\\Composer\\Magento\\Plugin" }, - "type": "magento2-module", "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventorySourceDeductionApi\\": "" + "psr-0": { + "MagentoHackathon\\Composer\\Magento": "src/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ - "OSL-3.0", - "AFL-3.0" + "OSL-3.0" ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-source-selection", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventorySourceSelection", - "reference": "bbf1c97e3073ad948b8af4c05eb7e840473d0c2d" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-source-selection-api": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventorySourceSelection\\": "" + "authors": [ + { + "name": "Vinai Kopp", + "email": "vinai@netzarbeiter.com" + }, + { + "name": "Daniel Fahlke aka Flyingmana", + "email": "flyingmana@googlemail.com" + }, + { + "name": "Jörg Weller", + "email": "weller@flagbit.de" + }, + { + "name": "Karl Spies", + "email": "karl.spies@gmx.net" + }, + { + "name": "Tobias Vogt", + "email": "tobi@webguys.de" + }, + { + "name": "David Fuhr", + "email": "fuhr@flagbit.de" } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" ], - "description": "N/A" - }, - { - "name": "magento/module-inventory-source-selection-api", - "version": "dev-1.2-develop", - "dist": { - "type": "path", - "url": "./ext/magento/inventory/InventorySourceSelectionApi", - "reference": "ad4e17d3a68bd4b7c7e3f81d0a0e7c10657840fd" - }, - "require": { - "magento/framework": "*", - "magento/module-inventory-api": "*", - "magento/module-inventory-sales-api": "*", - "magento/module-sales": "*", - "magento/module-store": "*", - "php": "~7.1.3||~7.2.0||~7.3.0" - }, - "type": "magento2-module", - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Magento\\InventorySourceSelectionApi\\": "" - } - }, - "license": [ - "OSL-3.0", - "AFL-3.0" + "description": "Composer installer for Magento modules", + "homepage": "https://github.com/magento/magento-composer-installer", + "keywords": [ + "composer-installer", + "magento" ], - "description": "N/A" + "time": "2017-12-29T16:45:24+00:00" }, { "name": "magento/zendframework1", @@ -3910,6 +1850,11 @@ "MIT" ], "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + }, { "name": "Marijn Huizendveld", "email": "marijn.huizendveld@gmail.com" @@ -3917,11 +1862,6 @@ { "name": "Thibaud Fabre", "email": "thibaud@aztech.io" - }, - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" } ], "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", @@ -12582,10 +10522,9 @@ } ], "aliases": [], - "minimum-stability": "dev", + "minimum-stability": "stable", "stability-flags": { "magento/composer": 20, - "magento/inventory-composer-metapackage-dev": 20, "phpmd/phpmd": 0 }, "prefer-stable": true, From b7a49e25dfb3f8331d32d73892d8b7bfbdf1c404 Mon Sep 17 00:00:00 2001 From: Stas Puga <stas.puga@transoftgroup.com> Date: Wed, 26 Feb 2020 08:20:25 +0200 Subject: [PATCH 196/229] MC-24241: [MFTF Test] Uploading a Transactional Emails logo --- .../AdminGridFilterSearchResultsBySelectActionGroup.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsBySelectActionGroup.xml b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsBySelectActionGroup.xml index 1f577940b1182..5ae764ce100aa 100644 --- a/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsBySelectActionGroup.xml +++ b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsBySelectActionGroup.xml @@ -13,14 +13,14 @@ <description>Filters an Admin Grid page using the provided Filter Selector and Search Value.</description> </annotations> <arguments> - <argument name="attributeSelector" type="string"/> - <argument name="attributeValue" type="string"/> + <argument name="attributeSelector" type="string" defaultValue="store_id"/> + <argument name="attributeValue" type="string" defaultValue="{{_defaultStore.name}}"/> </arguments> <conditionalClick selector="{{AdminGridFilterControls.clearAll}}" dependentSelector="{{AdminGridFilterControls.clearAll}}" visible="true" stepKey="clearTheFiltersIfPresent"/> <waitForPageLoad time="30" stepKey="waitForFilterApplied"/> <click selector="{{AdminGridFilterControls.filters}}" stepKey="clickOnFilters"/> - <selectOption selector="{{AdminDataGridFilterSection.filterSelectFieldByName(attributeSelector)}}" userInput="{{attributeValue}}" stepKey="selectFieldByName"/> + <selectOption selector="{{AdminDataGridFilterSection.filterSelectFieldByName(attributeSelector)}}" userInput="{{attributeValue}}" stepKey="setAttributeValue"/> <click selector="{{AdminGridFilterControls.applyFilters}}" stepKey="clickOnApplyFilters"/> </actionGroup> </actionGroups> From 1af376bee9726e4ff300a8f6017dba975425cdac Mon Sep 17 00:00:00 2001 From: DmytroPaidych <dimonovp@gmail.com> Date: Wed, 26 Feb 2020 09:28:56 +0200 Subject: [PATCH 197/229] MC-31757: Wishlist configurations enabled/disabled --- .../Customer/Controller/Section/LoadTest.php | 97 +++++++++++++++- .../Wishlist/Block/Account/LinkTest.php | 79 +++++++++++++ .../ProductList/Item/AddTo/WishlistTest.php | 69 +++++++++++ .../Product/View/AddTo/WishlistTest.php | 108 ++++++++++++++++++ .../Wishlist/Block/Customer/SidebarTest.php | 94 +++++++++++++++ .../Wishlist/Block/Customer/WishlistTest.php | 108 ++++++++++++++++++ .../Magento/Wishlist/Block/LinkTest.php | 56 +++++++++ .../wishlist_with_product_qty_three.php | 18 +++ ...shlist_with_product_qty_three_rollback.php | 9 ++ 9 files changed, 632 insertions(+), 6 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Wishlist/Block/Account/LinkTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Wishlist/Block/Catalog/Product/ProductList/Item/AddTo/WishlistTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Wishlist/Block/Catalog/Product/View/AddTo/WishlistTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/SidebarTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/WishlistTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Wishlist/Block/LinkTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_product_qty_three.php create mode 100644 dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_product_qty_three_rollback.php diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/Section/LoadTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Section/LoadTest.php index 3db22b8379850..0869832091fec 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/Section/LoadTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Section/LoadTest.php @@ -3,19 +3,104 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Customer\Controller\Section; -class LoadTest extends \Magento\TestFramework\TestCase\AbstractController +use Magento\Customer\Model\Session; +use Magento\Framework\App\Request\Http as HttpRequest; +use Magento\Framework\Serialize\SerializerInterface; +use Magento\TestFramework\TestCase\AbstractController; +use Magento\Framework\Escaper; + +/** + * Load customer data test class. + * + * @magentoDbIsolation enabled + * @magentoAppArea frontend + */ +class LoadTest extends AbstractController { - public function testLoadInvalidSection() + /** @var Session */ + private $customerSession; + + /** @var SerializerInterface */ + private $json; + + /** @var Escaper */ + private $escaper; + + /** + * @inheritdoc + */ + protected function setUp() + { + parent::setUp(); + + $this->customerSession = $this->_objectManager->get(Session::class); + $this->json = $this->_objectManager->get(SerializerInterface::class); + $this->escaper = $this->_objectManager->get(Escaper::class); + } + + /** + * @inheritdoc + */ + protected function tearDown() + { + $this->customerSession->setCustomerId(null); + + parent::tearDown(); + } + + /** + * @return void + */ + public function testLoadInvalidSection(): void { - $expected = [ - 'message' => 'The "section<invalid" section source isn't supported.', - ]; + $message = $this->escaper->escapeHtml('The "section<invalid" section source isn\'t supported.'); + $expected = ['message' => $message]; $this->dispatch( '/customer/section/load/?sections=section<invalid&force_new_section_timestamp=false&_=147066166394' ); - self::assertEquals(json_encode($expected), $this->getResponse()->getBody()); + $this->assertEquals($this->json->serialize($expected), $this->getResponse()->getBody()); + } + + /** + * @magentoConfigFixture current_store wishlist/wishlist_link/use_qty 1 + * @magentoDataFixture Magento/Wishlist/_files/wishlist_with_product_qty_three.php + * + * @return void + */ + public function testWishListCounterUseQty(): void + { + $this->customerSession->setCustomerId(1); + $response = $this->performWishListSectionRequest(); + $this->assertEquals('3 items', $response['wishlist']['counter']); + } + + /** + * @magentoConfigFixture current_store wishlist/wishlist_link/use_qty 0 + * @magentoDataFixture Magento/Wishlist/_files/wishlist_with_product_qty_three.php + * + * @return void + */ + public function testWishListCounterNotUseQty(): void + { + $this->customerSession->setCustomerId(1); + $response = $this->performWishListSectionRequest(); + $this->assertEquals('1 item', $response['wishlist']['counter']); + } + + /** + * Perform wish list section request. + * + * @return array + */ + private function performWishListSectionRequest(): array + { + $this->getRequest()->setParam('sections', 'wishlist')->setMethod(HttpRequest::METHOD_GET); + $this->dispatch('customer/section/load'); + + return $this->json->unserialize($this->getResponse()->getBody()); } } diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Account/LinkTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Account/LinkTest.php new file mode 100644 index 0000000000000..f4d66b2ff8cde --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Account/LinkTest.php @@ -0,0 +1,79 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Wishlist\Block\Account; + +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\View\Result\Page; +use Magento\TestFramework\Helper\Bootstrap; +use PHPUnit\Framework\TestCase; + +/** + * Checks My Wish List link displaying in account dashboard + * + * @magentoAppArea frontend + * @magentoDbIsolation enabled + * @magentoAppIsolation enabled + */ +class LinkTest extends TestCase +{ + /** @var ObjectManagerInterface */ + private $objectManager; + + /** @var Page */ + private $page; + + /** + * @inheritdoc + */ + protected function setUp() + { + parent::setUp(); + + $this->objectManager = Bootstrap::getObjectManager(); + $this->page = $this->objectManager->create(Page::class); + } + + /** + * @return void + */ + public function testNewsletterLink(): void + { + $this->preparePage(); + $block = $this->page->getLayout()->getBlock('customer-account-navigation-wish-list-link'); + $this->assertNotFalse($block); + $html = $block->toHtml(); + $this->assertContains('wishlist/', $html); + $this->assertEquals('My Wish List', strip_tags($html)); + } + + /** + * @magentoConfigFixture current_store wishlist/general/active 0 + * + * @return void + */ + public function testNewsletterLinkDisabled(): void + { + $this->preparePage(); + $block = $this->page->getLayout()->getBlock('customer-account-navigation-wish-list-link'); + $this->assertFalse($block); + } + + /** + * Prepare page before render + * + * @return void + */ + private function preparePage(): void + { + $this->page->addHandle([ + 'default', + 'customer_account', + ]); + $this->page->getLayout()->generateXml(); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Catalog/Product/ProductList/Item/AddTo/WishlistTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Catalog/Product/ProductList/Item/AddTo/WishlistTest.php new file mode 100644 index 0000000000000..36bd4dd4f312e --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Catalog/Product/ProductList/Item/AddTo/WishlistTest.php @@ -0,0 +1,69 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Wishlist\Block\Catalog\Product\ProductList\Item\AddTo; + +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\View\LayoutInterface; +use Magento\TestFramework\Helper\Bootstrap; +use PHPUnit\Framework\TestCase; + +/** + * Checks add to wishlist button on category page. + * + * @magentoAppArea frontend + * @magentoDbIsolation enabled + * @magentoAppIsolation disabled + */ +class WishlistTest extends TestCase +{ + /** @var ObjectManagerInterface */ + private $objectManager; + + /** @var Wishlist */ + private $block; + + /** @var ProductRepositoryInterface */ + private $productRepository; + + /** + * @inheritdoc + */ + protected function setUp() + { + $this->objectManager = Bootstrap::getObjectManager(); + $this->productRepository = $this->objectManager->get(ProductRepositoryInterface::class); + $this->productRepository->cleanCache(); + $this->block = $this->objectManager->get(LayoutInterface::class) + ->createBlock(Wishlist::class)->setTemplate('Magento_Wishlist::catalog/product/list/addto/wishlist.phtml'); + } + + /** + * @magentoDataFixture Magento/Catalog/_files/second_product_simple.php + * + * @return void + */ + public function testAddToWishListVisible(): void + { + $product = $this->productRepository->get('simple2'); + $html = $this->block->setProduct($product)->toHtml(); + $this->assertEquals('Add to Wish List', trim(strip_tags($html))); + } + + /** + * @magentoConfigFixture current_store wishlist/general/active 0 + * @magentoDataFixture Magento/Catalog/_files/second_product_simple.php + * + * @return void + */ + public function testAddToWishListNotVisible(): void + { + $product = $this->productRepository->get('simple2'); + $this->assertEmpty($this->block->setProduct($product)->toHtml()); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Catalog/Product/View/AddTo/WishlistTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Catalog/Product/View/AddTo/WishlistTest.php new file mode 100644 index 0000000000000..8d0226bfe9a2b --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Catalog/Product/View/AddTo/WishlistTest.php @@ -0,0 +1,108 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Wishlist\Block\Catalog\Product\View\AddTo; + +use Magento\Catalog\Api\Data\ProductInterface; +use Magento\Catalog\Api\ProductRepositoryInterface; +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\Registry; +use Magento\Framework\View\LayoutInterface; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\Helper\Xpath; +use PHPUnit\Framework\TestCase; + +/** + * Checks add to wishlist button on product page. + * + * @magentoAppArea frontend + * @magentoDbIsolation enabled + * @magentoAppIsolation disabled + */ +class WishlistTest extends TestCase +{ + private const ADD_TO_WISHLIST_XPATH = "//a[@data-action='add-to-wishlist']" + . "/span[contains(text(), 'Add to Wish List')]"; + + /** @var ObjectManagerInterface */ + private $objectManager; + + /** @var Registry */ + private $registry; + + /** @var Wishlist */ + private $block; + + /** @var ProductRepositoryInterface */ + private $productRepository; + + /** + * @inheritdoc + */ + protected function setUp() + { + $this->objectManager = Bootstrap::getObjectManager(); + $this->registry = $this->objectManager->get(Registry::class); + $this->productRepository = $this->objectManager->get(ProductRepositoryInterface::class); + $this->productRepository->cleanCache(); + $this->block = $this->objectManager->get(LayoutInterface::class) + ->createBlock(Wishlist::class)->setTemplate('Magento_Wishlist::catalog/product/view/addto/wishlist.phtml'); + } + + /** + * @inheritdoc + */ + protected function tearDown() + { + $this->registry->unregister('product'); + + parent::tearDown(); + } + + /** + * @magentoDataFixture Magento/Catalog/_files/second_product_simple.php + * + * @return void + */ + public function testAddToWishListVisible(): void + { + $product = $this->productRepository->get('simple2'); + $this->registerProduct($product); + $this->assertEquals( + 1, + Xpath::getElementsCountForXpath(self::ADD_TO_WISHLIST_XPATH, $this->block->toHtml()) + ); + } + + /** + * @magentoConfigFixture current_store wishlist/general/active 0 + * @magentoDataFixture Magento/Catalog/_files/second_product_simple.php + * + * @return void + */ + public function testAddToWishListNotVisible(): void + { + $product = $this->productRepository->get('simple2'); + $this->registerProduct($product); + $this->assertEquals( + 0, + Xpath::getElementsCountForXpath(self::ADD_TO_WISHLIST_XPATH, $this->block->toHtml()) + ); + } + + /** + * Register the product. + * + * @param ProductInterface $product + * @return void + */ + private function registerProduct(ProductInterface $product): void + { + $this->registry->unregister('product'); + $this->registry->register('product', $product); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/SidebarTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/SidebarTest.php new file mode 100644 index 0000000000000..6e6e88ab73019 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/SidebarTest.php @@ -0,0 +1,94 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Wishlist\Block\Customer; + +use Magento\Framework\App\ProductMetadata; +use Magento\Framework\App\ProductMetadataInterface; +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\View\Result\Page; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\Helper\Xpath; +use PHPUnit\Framework\TestCase; + +/** + * Class test sidebar wish list block. + * + * @magentoAppArea frontend + * @magentoDbIsolation enabled + * @magentoAppIsolation enabled + */ +class SidebarTest extends TestCase +{ + private const BLOCK_NAME = 'wishlist_sidebar'; + + /** @var ObjectManagerInterface */ + private $objectManager; + + /** @var Page */ + private $page; + + /** + * @inheritdoc + */ + protected function setUp() + { + $this->objectManager = Bootstrap::getObjectManager(); + $productMetadataInterface = $this->objectManager->get(ProductMetadataInterface::class); + if ($productMetadataInterface->getEdition() !== ProductMetadata::EDITION_NAME) { + $this->markTestSkipped('Skipped, because this logic is rewritten on EE.'); + } + $this->page = $this->objectManager->create(Page::class); + } + + /** + * @magentoConfigFixture current_store wishlist/general/show_in_sidebar 1 + * + * @return void + */ + public function testSidebarWishListVisible(): void + { + $this->preparePageLayout(); + $block = $this->page->getLayout()->getBlock(self::BLOCK_NAME); + $this->assertNotFalse($block); + $this->assertEquals( + 1, + Xpath::getElementsCountForXpath( + "//div[contains(@class, 'block-wishlist')]//strong[contains(text(), 'My Wish List')]", + $block->toHtml() + ) + ); + } + + /** + * @magentoConfigFixture current_store wishlist/general/show_in_sidebar 0 + * + * @return void + */ + public function testSidebarWishListNotVisible(): void + { + $this->preparePageLayout(); + $this->assertFalse( + $this->page->getLayout()->getBlock(self::BLOCK_NAME), + 'Sidebar wish list should not be visible.' + ); + } + + /** + * Prepare category page. + * + * @return void + */ + private function preparePageLayout(): void + { + $this->page->addHandle([ + 'default', + 'catalog_category_view', + ]); + $this->page->getLayout()->generateXml(); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/WishlistTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/WishlistTest.php new file mode 100644 index 0000000000000..944d2ac6faada --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/WishlistTest.php @@ -0,0 +1,108 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Wishlist\Block\Customer; + +use Magento\Customer\Model\Session; +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\View\Result\Page; +use Magento\TestFramework\Helper\Bootstrap; +use Magento\TestFramework\Helper\Xpath; +use PHPUnit\Framework\TestCase; + +/** + * Class test my wish list on customer account page. + * + * @magentoAppArea frontend + * @magentoDbIsolation enabled + * @magentoAppIsolation disabled + */ +class WishlistTest extends TestCase +{ + private const ITEMS_COUNT_XPATH = "//div[contains(@class, 'pager')]//span[contains(@class, 'toolbar-number')" + . " and contains(text(), '%s Item')]"; + + /** @var ObjectManagerInterface */ + private $objectManager; + + /** @var Page */ + private $page; + + /** @var Session */ + private $customerSession; + + /** + * @inheritdoc + */ + protected function setUp() + { + parent::setUp(); + + $this->objectManager = Bootstrap::getObjectManager(); + $this->page = $this->objectManager->create(Page::class); + $this->customerSession = $this->objectManager->get(Session::class); + } + + /** + * @inheritdoc + */ + protected function tearDown() + { + $this->customerSession->setCustomerId(null); + + parent::tearDown(); + } + + /** + * @magentoConfigFixture current_store wishlist/wishlist_link/use_qty 0 + * @magentoDataFixture Magento/Wishlist/_files/wishlist_with_product_qty_three.php + * + * @return void + */ + public function testDisplayNumberOfItemsInWishList(): void + { + $this->customerSession->setCustomerId(1); + $this->assertEquals( + 1, + Xpath::getElementsCountForXpath(sprintf(self::ITEMS_COUNT_XPATH, 1), $this->getWishListPagerBlockHtml()) + ); + } + + /** + * @magentoConfigFixture current_store wishlist/wishlist_link/use_qty 1 + * @magentoDataFixture Magento/Wishlist/_files/wishlist_with_product_qty_three.php + * + * @return void + */ + public function testDisplayItemQuantitiesInWishList(): void + { + $this->markTestSkipped('Test is blocked by issue MC-31595'); + $this->customerSession->setCustomerId(1); + $this->assertEquals( + 1, + Xpath::getElementsCountForXpath(sprintf(self::ITEMS_COUNT_XPATH, 3), $this->getWishListPagerBlockHtml()) + ); + } + + /** + * Get wish list pager block html. + * + * @return string + */ + private function getWishListPagerBlockHtml(): string + { + $this->page->addHandle([ + 'default', + 'wishlist_index_index', + ]); + $this->page->getLayout()->generateXml(); + /** @var Wishlist $customerWishlistBlock */ + $customerWishlistBlock = $this->page->getLayout()->getBlock('customer.wishlist'); + + return $customerWishlistBlock->getChildBlock('wishlist_item_pager')->toHtml(); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Block/LinkTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Block/LinkTest.php new file mode 100644 index 0000000000000..b7f124f7c1f6d --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Block/LinkTest.php @@ -0,0 +1,56 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Wishlist\Block; + +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\View\LayoutInterface; +use Magento\TestFramework\Helper\Bootstrap; +use PHPUnit\Framework\TestCase; + +/** + * Class test link my wish list in customer menu. + * + * @magentoAppArea frontend + * @magentoDbIsolation enabled + * @magentoAppIsolation disabled + */ +class LinkTest extends TestCase +{ + /** @var ObjectManagerInterface */ + private $objectManager; + + /** @var Link */ + private $block; + + /** + * @inheritdoc + */ + protected function setUp() + { + $this->objectManager = Bootstrap::getObjectManager(); + $this->block = $this->objectManager->get(LayoutInterface::class)->createBlock(Link::class); + } + + /** + * @return void + */ + public function testWishListLinkVisible(): void + { + $this->assertContains('My Wish List', strip_tags($this->block->toHtml())); + } + + /** + * @magentoConfigFixture current_store wishlist/general/active 0 + * + * @return void + */ + public function testWishListLinkNotVisible(): void + { + $this->assertEmpty($this->block->toHtml()); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_product_qty_three.php b/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_product_qty_three.php new file mode 100644 index 0000000000000..11752d5ba39f3 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_product_qty_three.php @@ -0,0 +1,18 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\Wishlist\Model\WishlistFactory; +use Magento\Framework\Serialize\SerializerInterface; + +require __DIR__ . '/../../../Magento/Customer/_files/customer.php'; +require __DIR__ . '/../../../Magento/Catalog/_files/product_simple.php'; + +$json = $objectManager->get(SerializerInterface::class); +$wishlistFactory = $objectManager->get(WishlistFactory::class); +$wishlist = $wishlistFactory->create(); +$wishlist->loadByCustomerId($customer->getId(), true); +$wishlist->addNewItem($product, $json->serialize(['qty' => 3])); diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_product_qty_three_rollback.php b/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_product_qty_three_rollback.php new file mode 100644 index 0000000000000..24bbccd5739f4 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_product_qty_three_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__ . '/../../../Magento/Catalog/_files/product_simple_rollback.php'; +require __DIR__ . '/../../../Magento/Customer/_files/customer_rollback.php'; From 73c66d95b484c4c24f358827193654466fafb948 Mon Sep 17 00:00:00 2001 From: Karyna Tsymbal <k.tsymbal@atwix.com> Date: Wed, 26 Feb 2020 09:52:06 +0200 Subject: [PATCH 198/229] Unit test for \Magento\MediaGallery\Plugin\Product\Gallery\Processor --- .../Plugin/Product/Gallery/ProcessorTest.php | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 app/code/Magento/MediaGallery/Test/Unit/Plugin/Product/Gallery/ProcessorTest.php diff --git a/app/code/Magento/MediaGallery/Test/Unit/Plugin/Product/Gallery/ProcessorTest.php b/app/code/Magento/MediaGallery/Test/Unit/Plugin/Product/Gallery/ProcessorTest.php new file mode 100644 index 0000000000000..94c3aaf5c2f19 --- /dev/null +++ b/app/code/Magento/MediaGallery/Test/Unit/Plugin/Product/Gallery/ProcessorTest.php @@ -0,0 +1,133 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +declare(strict_types=1); + +namespace Magento\MediaGallery\Test\Unit\Plugin\Product\Gallery; + +use Magento\Catalog\Model\Product; +use Magento\Catalog\Model\Product\Gallery\Processor as ProcessorSubject; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper; +use Magento\MediaGallery\Plugin\Product\Gallery\Processor; +use Magento\MediaGalleryApi\Model\Asset\Command\DeleteByPathInterface; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; +use Psr\Log\LoggerInterface; + +/** + * Unit test for \Magento\MediaGallery\Plugin\Product\Gallery\Processor + */ +class ProcessorTest extends TestCase +{ + private const STUB_FILE_NAME = 'file'; + + /** + * @var DeleteByPathInterface|MockObject + */ + private $deleteMediaAssetByPathMock; + + /** + * @var LoggerInterface|MockObject + */ + private $loggerMock; + + /** + * @var ProcessorSubject|MockObject + */ + private $processorSubjectMock; + + /** + * @var Product|MockObject + */ + private $productMock; + + /** + * @var Processor + */ + private $plugin; + + /** + * @inheritDoc + */ + protected function setUp() + { + $this->processorSubjectMock = $this->createMock(ProcessorSubject::class); + $this->productMock = $this->createMock(Product::class); + + $this->deleteMediaAssetByPathMock = $this->getMockBuilder(DeleteByPathInterface::class) + ->disableOriginalConstructor() + ->setMethods(['execute']) + ->getMockForAbstractClass(); + $this->loggerMock = $this->getMockBuilder(LoggerInterface::class) + ->disableOriginalConstructor() + ->setMethods(['critical']) + ->getMockForAbstractClass(); + + $this->plugin = (new ObjectManagerHelper($this))->getObject( + Processor::class, + [ + 'deleteMediaAssetByPath' => $this->deleteMediaAssetByPathMock, + 'logger' => $this->loggerMock + ] + ); + } + + /** + * Successful test case. + */ + public function testAfterRemoveImageExpectsExecuteCalled() + { + $this->deleteMediaAssetByPathMock->expects($this->once()) + ->method('execute') + ->with(self::STUB_FILE_NAME); + $this->loggerMock->expects($this->never())->method('critical'); + + $actualResult = $this->plugin->afterRemoveImage( + $this->processorSubjectMock, + $this->processorSubjectMock, + $this->productMock, + self::STUB_FILE_NAME + ); + $this->assertSame($this->processorSubjectMock, $actualResult); + } + + /** + * Test case when passed File argument is not a string. + */ + public function testAfterRemoveImageWithIncorrectFile() + { + $this->deleteMediaAssetByPathMock->expects($this->never())->method('execute'); + $this->loggerMock->expects($this->never())->method('critical'); + + $actualResult = $this->plugin->afterRemoveImage( + $this->processorSubjectMock, + $this->processorSubjectMock, + $this->productMock, + ['non-string-argument' => self::STUB_FILE_NAME] + ); + $this->assertSame($this->processorSubjectMock, $actualResult); + } + + /** + * Test case when an Exception is thrown. + */ + public function testAfterRemoveImageExpectsExecuteWillThrowException() + { + $this->deleteMediaAssetByPathMock->expects($this->once()) + ->method('execute') + ->with(self::STUB_FILE_NAME) + ->willThrowException(new \Exception('Some Exception')); + $this->loggerMock->expects($this->once())->method('critical'); + + $actualResult = $this->plugin->afterRemoveImage( + $this->processorSubjectMock, + $this->processorSubjectMock, + $this->productMock, + self::STUB_FILE_NAME + ); + $this->assertSame($this->processorSubjectMock, $actualResult); + } +} From 2d759c01d80478f61892dfe4c38a283f7caff0bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Szubert?= <bartlomiejszubert@gmail.com> Date: Fri, 20 Sep 2019 09:58:31 +0200 Subject: [PATCH 199/229] Fix #20332 - address fields sort order fixes --- .../Block/Checkout/LayoutProcessor.php | 81 +++--- .../Block/Checkout/LayoutProcessorTest.php | 27 +- .../frontend/layout/checkout_index_index.xml | 3 - ...dateCustomerAddressAttributesSortOrder.php | 106 ++++++++ .../ui_component/customer_address_form.xml | 22 +- .../frontend/templates/address/edit.phtml | 89 +++---- .../frontend/templates/form/register.phtml | 235 +++++++++++++----- .../Customer/Model/Metadata/FormTest.php | 12 +- 8 files changed, 399 insertions(+), 176 deletions(-) create mode 100644 app/code/Magento/Customer/Setup/Patch/Data/UpdateCustomerAddressAttributesSortOrder.php diff --git a/app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php b/app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php index 557f143352446..00cc06ea0ff47 100644 --- a/app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php +++ b/app/code/Magento/Checkout/Block/Checkout/LayoutProcessor.php @@ -3,24 +3,30 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Checkout\Block\Checkout; use Magento\Checkout\Helper\Data; -use Magento\Framework\App\ObjectManager; +use Magento\Customer\Model\AttributeMetadataDataProvider; +use Magento\Customer\Model\Options; +use Magento\Eav\Api\Data\AttributeInterface; +use Magento\Shipping\Model\Config; use Magento\Store\Model\StoreManagerInterface; +use Magento\Ui\Component\Form\AttributeMapper; /** - * Class LayoutProcessor + * Checkout Layout Processor */ -class LayoutProcessor implements \Magento\Checkout\Block\Checkout\LayoutProcessorInterface +class LayoutProcessor implements LayoutProcessorInterface { /** - * @var \Magento\Customer\Model\AttributeMetadataDataProvider + * @var AttributeMetadataDataProvider */ private $attributeMetadataDataProvider; /** - * @var \Magento\Ui\Component\Form\AttributeMapper + * @var AttributeMapper */ protected $attributeMapper; @@ -30,7 +36,7 @@ class LayoutProcessor implements \Magento\Checkout\Block\Checkout\LayoutProcesso protected $merger; /** - * @var \Magento\Customer\Model\Options + * @var Options */ private $options; @@ -45,39 +51,35 @@ class LayoutProcessor implements \Magento\Checkout\Block\Checkout\LayoutProcesso private $storeManager; /** - * @var \Magento\Shipping\Model\Config + * @var Config */ private $shippingConfig; /** - * @param \Magento\Customer\Model\AttributeMetadataDataProvider $attributeMetadataDataProvider - * @param \Magento\Ui\Component\Form\AttributeMapper $attributeMapper + * @param AttributeMetadataDataProvider $attributeMetadataDataProvider + * @param AttributeMapper $attributeMapper * @param AttributeMerger $merger - * @param \Magento\Customer\Model\Options|null $options - * @param Data|null $checkoutDataHelper - * @param \Magento\Shipping\Model\Config|null $shippingConfig - * @param StoreManagerInterface|null $storeManager + * @param Options $options + * @param Data $checkoutDataHelper + * @param Config $shippingConfig + * @param StoreManagerInterface $storeManager */ public function __construct( - \Magento\Customer\Model\AttributeMetadataDataProvider $attributeMetadataDataProvider, - \Magento\Ui\Component\Form\AttributeMapper $attributeMapper, + AttributeMetadataDataProvider $attributeMetadataDataProvider, + AttributeMapper $attributeMapper, AttributeMerger $merger, - \Magento\Customer\Model\Options $options = null, - Data $checkoutDataHelper = null, - \Magento\Shipping\Model\Config $shippingConfig = null, - StoreManagerInterface $storeManager = null + Options $options, + Data $checkoutDataHelper, + Config $shippingConfig, + StoreManagerInterface $storeManager ) { $this->attributeMetadataDataProvider = $attributeMetadataDataProvider; $this->attributeMapper = $attributeMapper; $this->merger = $merger; - $this->options = $options ?: \Magento\Framework\App\ObjectManager::getInstance() - ->get(\Magento\Customer\Model\Options::class); - $this->checkoutDataHelper = $checkoutDataHelper ?: \Magento\Framework\App\ObjectManager::getInstance() - ->get(Data::class); - $this->shippingConfig = $shippingConfig ?: \Magento\Framework\App\ObjectManager::getInstance() - ->get(\Magento\Shipping\Model\Config::class); - $this->storeManager = $storeManager ?: \Magento\Framework\App\ObjectManager::getInstance() - ->get(StoreManagerInterface::class); + $this->options = $options; + $this->checkoutDataHelper = $checkoutDataHelper; + $this->shippingConfig = $shippingConfig; + $this->storeManager = $storeManager; } /** @@ -87,7 +89,7 @@ public function __construct( */ private function getAddressAttributes() { - /** @var \Magento\Eav\Api\Data\AttributeInterface[] $attributes */ + /** @var AttributeInterface[] $attributes */ $attributes = $this->attributeMetadataDataProvider->loadAttributesCollection( 'customer_address', 'customer_register_address' @@ -157,8 +159,10 @@ public function process($jsLayout) $elements = $this->getAddressAttributes(); $elements = $this->convertElementsToSelect($elements, $attributesToConvert); // The following code is a workaround for custom address attributes - if (isset($jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children'] - ['payment']['children'])) { + if (isset( + $jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children']['payment'] + ['children'] + )) { $jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children'] ['payment']['children'] = $this->processPaymentChildrenComponents( $jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children'] @@ -166,8 +170,11 @@ public function process($jsLayout) $elements ); } - if (isset($jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children'] - ['step-config']['children']['shipping-rates-validation']['children'])) { + + if (isset( + $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children'] + ['step-config']['children']['shipping-rates-validation']['children'] + )) { $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children'] ['step-config']['children']['shipping-rates-validation']['children'] = $this->processShippingChildrenComponents( @@ -176,8 +183,10 @@ public function process($jsLayout) ); } - if (isset($jsLayout['components']['checkout']['children']['steps']['children']['shipping-step'] - ['children']['shippingAddress']['children']['shipping-address-fieldset']['children'])) { + if (isset( + $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children'] + ['shippingAddress']['children']['shipping-address-fieldset']['children'] + )) { $fields = $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step'] ['children']['shippingAddress']['children']['shipping-address-fieldset']['children']; $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step'] @@ -188,6 +197,7 @@ public function process($jsLayout) $fields ); } + return $jsLayout; } @@ -304,9 +314,6 @@ private function getBillingAddressComponent($paymentCode, $elements) 'checkoutProvider', 'billingAddress' . $paymentCode, [ - 'country_id' => [ - 'sortOrder' => 115, - ], 'region' => [ 'visible' => false, ], diff --git a/app/code/Magento/Checkout/Test/Unit/Block/Checkout/LayoutProcessorTest.php b/app/code/Magento/Checkout/Test/Unit/Block/Checkout/LayoutProcessorTest.php index 31ca2a2033012..9fff4b622e596 100644 --- a/app/code/Magento/Checkout/Test/Unit/Block/Checkout/LayoutProcessorTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Block/Checkout/LayoutProcessorTest.php @@ -10,14 +10,16 @@ use Magento\Checkout\Helper\Data; use Magento\Customer\Model\AttributeMetadataDataProvider; use Magento\Customer\Model\Options; - +use Magento\Shipping\Model\Config; +use Magento\Store\Model\StoreManagerInterface; use Magento\Ui\Component\Form\AttributeMapper; -use PHPUnit_Framework_MockObject_MockObject as MockObject; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; /** * LayoutProcessorTest covers a list of variations for checkout layout processor */ -class LayoutProcessorTest extends \PHPUnit\Framework\TestCase +class LayoutProcessorTest extends TestCase { /** * @var AttributeMetadataDataProvider|MockObject @@ -45,7 +47,7 @@ class LayoutProcessorTest extends \PHPUnit\Framework\TestCase private $layoutProcessor; /** - * @var MockObject + * @var StoreManagerInterface|MockObject */ private $storeManager; @@ -75,11 +77,11 @@ protected function setUp() ->disableOriginalConstructor() ->getMock(); - $shippingConfig = $this->getMockBuilder(\Magento\Shipping\Model\Config::class) + $shippingConfig = $this->getMockBuilder(Config::class) ->disableOriginalConstructor() ->getMock(); - $this->storeManager = $this->createMock(\Magento\Store\Model\StoreManagerInterface::class); + $this->storeManager = $this->createMock(StoreManagerInterface::class); $this->layoutProcessor = new LayoutProcessor( $this->attributeDataProvider, @@ -109,10 +111,12 @@ public function testProcess() $this->attributeMerger->expects(static::exactly(2)) ->method('merge') - ->willReturnMap([ - ['payment1_1' => $this->getBillingComponent('payment1_1')], - ['payment2_1' => $this->getBillingComponent('payment2_1')], - ]); + ->willReturnMap( + [ + ['payment1_1' => $this->getBillingComponent('payment1_1')], + ['payment2_1' => $this->getBillingComponent('payment2_1')], + ] + ); $actual = $this->layoutProcessor->process($jsLayout); @@ -236,9 +240,6 @@ private function getLayoutData() private function getBillingComponent($paymentCode) { return [ - 'country_id' => [ - 'sortOrder' => 115, - ], 'region' => [ 'visible' => false, ], diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml index fed0c951eff9f..c33b784fcd20c 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml @@ -222,9 +222,6 @@ <item name="min_text_length" xsi:type="number">0</item> </item> </item> - <item name="country_id" xsi:type="array"> - <item name="sortOrder" xsi:type="string">115</item> - </item> <item name="telephone" xsi:type="array"> <item name="config" xsi:type="array"> <item name="tooltip" xsi:type="array"> diff --git a/app/code/Magento/Customer/Setup/Patch/Data/UpdateCustomerAddressAttributesSortOrder.php b/app/code/Magento/Customer/Setup/Patch/Data/UpdateCustomerAddressAttributesSortOrder.php new file mode 100644 index 0000000000000..b35a21751ebea --- /dev/null +++ b/app/code/Magento/Customer/Setup/Patch/Data/UpdateCustomerAddressAttributesSortOrder.php @@ -0,0 +1,106 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\Customer\Setup\Patch\Data; + +use Magento\Customer\Setup\CustomerSetup; +use Magento\Customer\Setup\CustomerSetupFactory; +use Magento\Framework\Setup\ModuleDataSetupInterface; +use Magento\Framework\Setup\Patch\DataPatchInterface; + +/** + * Update Customer Address Attributes to be displayed in following order: country, region, city, postcode + */ +class UpdateCustomerAddressAttributesSortOrder implements DataPatchInterface +{ + /** + * @var ModuleDataSetupInterface + */ + private $moduleDataSetup; + + /** + * @var CustomerSetupFactory + */ + private $customerSetupFactory; + + /** + * UpdateCustomerAddressAttributesSortOrder constructor. + * @param ModuleDataSetupInterface $moduleDataSetup + * @param CustomerSetupFactory $customerSetupFactory + */ + public function __construct( + ModuleDataSetupInterface $moduleDataSetup, + CustomerSetupFactory $customerSetupFactory + ) { + $this->moduleDataSetup = $moduleDataSetup; + $this->customerSetupFactory = $customerSetupFactory; + } + + /** + * @inheritDoc + */ + public function apply() + { + /** @var CustomerSetup $customerSetup */ + $customerSetup = $this->customerSetupFactory->create(['setup' => $this->moduleDataSetup]); + $this->updateCustomerAddressAttributesSortOrder($customerSetup); + + return $this; + } + + /** + * @inheritDoc + */ + public function getAliases() + { + return []; + } + + /** + * @inheritDoc + */ + public static function getDependencies() + { + return [ + DefaultCustomerGroupsAndAttributes::class, + ]; + } + + /** + * Update customer address attributes sort order + * + * @param CustomerSetup $customerSetup + * + * @return void + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + private function updateCustomerAddressAttributesSortOrder($customerSetup) + { + $entityAttributes = [ + 'customer_address' => [ + 'country_id' => [ + 'sort_order' => 80, + 'position' => 80 + ], + 'region' => [ + 'sort_order' => 90, + 'position' => 90 + ], + 'region_id' => [ + 'sort_order' => 90, + 'position' => 90 + ], + 'city' => [ + 'sort_order' => 100, + 'position' => 100 + ], + ], + ]; + + $customerSetup->upgradeAttributes($entityAttributes); + } +} diff --git a/app/code/Magento/Customer/view/adminhtml/ui_component/customer_address_form.xml b/app/code/Magento/Customer/view/adminhtml/ui_component/customer_address_form.xml index 3af0172b3fca8..517d8151b5f10 100644 --- a/app/code/Magento/Customer/view/adminhtml/ui_component/customer_address_form.xml +++ b/app/code/Magento/Customer/view/adminhtml/ui_component/customer_address_form.xml @@ -174,17 +174,7 @@ <label translate="true">Company</label> </settings> </field> - <field name="city" sortOrder="80" formElement="input"> - <settings> - <dataType>text</dataType> - <label translate="true">City</label> - <visible>true</visible> - <validation> - <rule name="required-entry" xsi:type="boolean">true</rule> - </validation> - </settings> - </field> - <field name="country_id" component="Magento_Customer/js/form/element/country" sortOrder="90" formElement="select"> + <field name="country_id" component="Magento_Customer/js/form/element/country" sortOrder="80" formElement="select"> <settings> <validation> <rule name="required-entry" xsi:type="boolean">true</rule> @@ -212,6 +202,16 @@ </select> </formElements> </field> + <field name="city" sortOrder="100" formElement="input"> + <settings> + <dataType>text</dataType> + <label translate="true">City</label> + <visible>true</visible> + <validation> + <rule name="required-entry" xsi:type="boolean">true</rule> + </validation> + </settings> + </field> <field name="postcode" component="Magento_Ui/js/form/element/post-code" sortOrder="120" formElement="input"> <settings> <dataType>text</dataType> diff --git a/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml index 1d940296f334a..e7519c7c3320b 100644 --- a/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml @@ -6,6 +6,7 @@ /** @var \Magento\Customer\Block\Address\Edit $block */ /** @var \Magento\Customer\ViewModel\Address $viewModel */ +/** @var \Magento\Framework\Escaper $escaper */ $viewModel = $block->getViewModel(); ?> <?php $_company = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Company::class) ?> @@ -26,16 +27,16 @@ $viewModel = $block->getViewModel(); <?php $_streetValidationClassNotRequired = trim(str_replace('required-entry', '', $_streetValidationClass)); ?> <?php $_regionValidationClass = $viewModel->addressGetAttributeValidationClass('region'); ?> <form class="form-address-edit" - action="<?= $block->escapeUrl($block->getSaveUrl()) ?>" + action="<?= $escaper->escapeUrl($block->getSaveUrl()) ?>" method="post" id="form-validate" enctype="multipart/form-data" - data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>"> + data-hasrequired="<?= $escaper->escapeHtmlAttr(__('* Required Fields')) ?>"> <fieldset class="fieldset"> - <legend class="legend"><span><?= $block->escapeHtml(__('Contact Information')) ?></span></legend><br> + <legend class="legend"><span><?= $escaper->escapeHtml(__('Contact Information')) ?></span></legend><br> <?= $block->getBlockHtml('formkey') ?> - <input type="hidden" name="success_url" value="<?= $block->escapeUrl($block->getSuccessUrl()) ?>"> - <input type="hidden" name="error_url" value="<?= $block->escapeUrl($block->getErrorUrl()) ?>"> + <input type="hidden" name="success_url" value="<?= $escaper->escapeUrl($block->getSuccessUrl()) ?>"> + <input type="hidden" name="error_url" value="<?= $escaper->escapeUrl($block->getErrorUrl()) ?>"> <?= $block->getNameBlockHtml() ?> <?php if ($_company->isEnabled()): ?> @@ -52,29 +53,29 @@ $viewModel = $block->getViewModel(); </fieldset> <fieldset class="fieldset"> - <legend class="legend"><span><?= $block->escapeHtml(__('Address')) ?></span></legend><br> + <legend class="legend"><span><?= $escaper->escapeHtml(__('Address')) ?></span></legend><br> <div class="field street required"> <label for="street_1" class="label"><span><?= /* @noEscape */ $_street ?></span></label> <div class="control"> <input type="text" name="street[]" - value="<?= $block->escapeHtmlAttr($block->getStreetLine(1)) ?>" + value="<?= $escaper->escapeHtmlAttr($block->getStreetLine(1)) ?>" title="<?= /* @noEscape */ $_street ?>" id="street_1" - class="input-text <?= $block->escapeHtmlAttr($_streetValidationClass) ?>"/> + class="input-text <?= $escaper->escapeHtmlAttr($_streetValidationClass) ?>"/> <div class="nested"> <?php for ($_i = 1, $_n = $viewModel->addressGetStreetLines(); $_i < $_n; $_i++): ?> <div class="field additional"> <label class="label" for="street_<?= /* @noEscape */ $_i + 1 ?>"> - <span><?= $block->escapeHtml(__('Street Address %1', $_i + 1)) ?></span> + <span><?= $escaper->escapeHtml(__('Street Address %1', $_i + 1)) ?></span> </label> <div class="control"> <input type="text" name="street[]" - value="<?= $block->escapeHtmlAttr($block->getStreetLine($_i + 1)) ?>" - title="<?= $block->escapeHtmlAttr(__('Street Address %1', $_i + 1)) ?>" + value="<?= $escaper->escapeHtmlAttr($block->getStreetLine($_i + 1)) ?>" + title="<?= $escaper->escapeHtmlAttr(__('Street Address %1', $_i + 1)) ?>" id="street_<?= /* @noEscape */ $_i + 1 ?>" class="input-text - <?= $block->escapeHtmlAttr($_streetValidationClassNotRequired) ?>"> + <?= $escaper->escapeHtmlAttr($_streetValidationClassNotRequired) ?>"> </div> </div> <?php endfor; ?> @@ -90,22 +91,19 @@ $viewModel = $block->getViewModel(); <div class="control"> <input type="text" name="vat_id" - value="<?= $block->escapeHtmlAttr($block->getAddress()->getVatId()) ?>" + value="<?= $escaper->escapeHtmlAttr($block->getAddress()->getVatId()) ?>" title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('vat_id') ?>" - class="input-text <?= $block->escapeHtmlAttr($_vatidValidationClass) ?>" + class="input-text <?= $escaper->escapeHtmlAttr($_vatidValidationClass) ?>" id="vat_id"> </div> </div> <?php endif; ?> - <div class="field city required"> - <label class="label" for="city"><span><?= /* @noEscape */ $_city ?></span></label> + <div class="field country required"> + <label class="label" for="country"> + <span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('country_id') ?></span> + </label> <div class="control"> - <input type="text" - name="city" - value="<?= $block->escapeHtmlAttr($block->getAddress()->getCity()) ?>" - title="<?= $block->escapeHtmlAttr(__('City')) ?>" - class="input-text <?= $block->escapeHtmlAttr($_cityValidationClass) ?>" - id="city"> + <?= $block->getCountryHtmlSelect() ?> </div> </div> <div class="field region required"> @@ -117,18 +115,31 @@ $viewModel = $block->getViewModel(); title="<?= /* @noEscape */ $_region ?>" class="validate-select region_id" <?= /* @noEscape */ !$_displayAll ? ' disabled="disabled"' : '' ?>> - <option value=""><?= $block->escapeHtml(__($_selectRegion)) ?></option> + <option value=""><?= $escaper->escapeHtml(__($_selectRegion)) ?></option> </select> <input type="text" id="region" name="region" - value="<?= $block->escapeHtmlAttr($block->getRegion()) ?>" + value="<?= $escaper->escapeHtmlAttr($block->getRegion()) ?>" title="<?= /* @noEscape */ $_region ?>" class="input-text validate-not-number-first - <?= $block->escapeHtmlAttr($_regionValidationClass) ?>" + <?= $escaper->escapeHtmlAttr($_regionValidationClass) ?>" <?= !$_displayAll ? ' disabled="disabled"' : '' ?>/> </div> </div> + <div class="field city required"> + <label class="label" for="city"> + <span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('city') ?></span> + </label> + <div class="control"> + <input type="text" + name="city" + value="<?= $escaper->escapeHtmlAttr($block->getAddress()->getCity()) ?>" + title="<?= $escaper->escapeHtmlAttr(__('City')) ?>" + class="input-text <?= $escaper->escapeHtmlAttr($_cityValidationClass) ?>" + id="city"> + </div> + </div> <div class="field zip required"> <label class="label" for="zip"> <span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('postcode') ?></span> @@ -136,32 +147,26 @@ $viewModel = $block->getViewModel(); <div class="control"> <input type="text" name="postcode" - value="<?= $block->escapeHtmlAttr($block->getAddress()->getPostcode()) ?>" + value="<?= $escaper->escapeHtmlAttr($block->getAddress()->getPostcode()) ?>" title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('postcode') ?>" id="zip" class="input-text validate-zip-international - <?= $block->escapeHtmlAttr($_postcodeValidationClass) ?>"> + <?= $escaper->escapeHtmlAttr($_postcodeValidationClass) ?>"> <div role="alert" class="message warning" style="display:none"> <span></span> </div> </div> </div> - <div class="field country required"> - <label class="label" for="country"><span><?= /* @noEscape */ $_country_id ?></span></label> - <div class="control"> - <?= $block->getCountryHtmlSelect() ?> - </div> - </div> <?php if ($block->isDefaultBilling()): ?> <div class="message info"> - <span><?= $block->escapeHtml(__("It's a default billing address.")) ?></span> + <span><?= $escaper->escapeHtml(__("It's a default billing address.")) ?></span> </div> <?php elseif ($block->canSetAsDefaultBilling()): ?> <div class="field choice set billing"> <input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox"> <label class="label" for="primary_billing"> - <span><?= $block->escapeHtml(__('Use as my default billing address')) ?></span> + <span><?= $escaper->escapeHtml(__('Use as my default billing address')) ?></span> </label> </div> <?php else: ?> @@ -170,13 +175,13 @@ $viewModel = $block->getViewModel(); <?php if ($block->isDefaultShipping()): ?> <div class="message info"> - <span><?= $block->escapeHtml(__("It's a default shipping address.")) ?></span> + <span><?= $escaper->escapeHtml(__("It's a default shipping address.")) ?></span> </div> <?php elseif ($block->canSetAsDefaultShipping()): ?> <div class="field choice set shipping"> <input type="checkbox" id="primary_shipping" name="default_shipping" value="1" class="checkbox"> <label class="label" for="primary_shipping"> - <span><?= $block->escapeHtml(__('Use as my default shipping address')) ?></span> + <span><?= $escaper->escapeHtml(__('Use as my default shipping address')) ?></span> </label> </div> <?php else: ?> @@ -188,13 +193,13 @@ $viewModel = $block->getViewModel(); <button type="submit" class="action save primary" data-action="save-address" - title="<?= $block->escapeHtmlAttr(__('Save Address')) ?>"> - <span><?= $block->escapeHtml(__('Save Address')) ?></span> + title="<?= $escaper->escapeHtmlAttr(__('Save Address')) ?>"> + <span><?= $escaper->escapeHtml(__('Save Address')) ?></span> </button> </div> <div class="secondary"> - <a class="action back" href="<?= $block->escapeUrl($block->getBackUrl()) ?>"> - <span><?= $block->escapeHtml(__('Go back')) ?></span> + <a class="action back" href="<?= $escaper->escapeUrl($block->getBackUrl()) ?>"> + <span><?= $escaper->escapeHtml(__('Go back')) ?></span> </a> </div> </div> @@ -203,7 +208,7 @@ $viewModel = $block->getViewModel(); { "#form-validate": { "addressValidation": { - "postCodes": <?= /* @noEscape */ $block->getPostCodeConfig()->getSerializedPostCodes(); ?> + "postCodes": <?= /* @noEscape */ $block->getPostCodeConfig()->getSerializedPostCodes() ?> } }, "#country": { diff --git a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml index da0bb6e4cbc8b..6a267c9996908 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml @@ -3,78 +3,123 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +// phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper +// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis + +use Magento\Customer\Helper\Address; /** @var \Magento\Customer\Block\Form\Register $block */ +/** @var \Magento\Framework\Escaper $escaper */ +$formData = $block->getFormData(); ?> +<?php $displayAll = $block->getConfig('general/region/display_all'); ?> <?= $block->getChildHtml('form_fields_before') ?> <?php /* Extensions placeholder */ ?> <?= $block->getChildHtml('customer.form.register.extra') ?> -<form class="form create account form-create-account" action="<?= $block->escapeUrl($block->getPostActionUrl()) ?>" method="post" id="form-validate" enctype="multipart/form-data" autocomplete="off"> - <?= /* @noEscape */ $block->getBlockHtml('formkey'); ?> +<form class="form create account form-create-account" + action="<?= $escaper->escapeUrl($block->getPostActionUrl()) ?>" + method="post" + id="form-validate" + enctype="multipart/form-data" + autocomplete="off"> + <?= /* @noEscape */ $block->getBlockHtml('formkey') ?> <fieldset class="fieldset create info"> - <legend class="legend"><span><?= $block->escapeHtml(__('Personal Information')) ?></span></legend><br> - <input type="hidden" name="success_url" value="<?= $block->escapeUrl($block->getSuccessUrl()) ?>"> - <input type="hidden" name="error_url" value="<?= $block->escapeUrl($block->getErrorUrl()) ?>"> - <?= $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Name::class)->setObject($block->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?> - <?php if ($block->isNewsletterEnabled()) : ?> + <legend class="legend"><span><?= $escaper->escapeHtml(__('Personal Information')) ?></span></legend><br> + <input type="hidden" name="success_url" value="<?= $escaper->escapeUrl($block->getSuccessUrl()) ?>"> + <input type="hidden" name="error_url" value="<?= $escaper->escapeUrl($block->getErrorUrl()) ?>"> + <?= $block->getLayout() + ->createBlock(\Magento\Customer\Block\Widget\Name::class) + ->setObject($formData) + ->setForceUseCustomerAttributes(true) + ->toHtml() ?> + <?php if ($block->isNewsletterEnabled()): ?> <div class="field choice newsletter"> - <input type="checkbox" name="is_subscribed" title="<?= $block->escapeHtmlAttr(__('Sign Up for Newsletter')) ?>" value="1" id="is_subscribed"<?php if ($block->getFormData()->getIsSubscribed()) : ?> checked="checked"<?php endif; ?> class="checkbox"> - <label for="is_subscribed" class="label"><span><?= $block->escapeHtml(__('Sign Up for Newsletter')) ?></span></label> + <input type="checkbox" + name="is_subscribed" + title="<?= $escaper->escapeHtmlAttr(__('Sign Up for Newsletter')) ?>" + value="1" + id="is_subscribed" + <?php if ($formData->getIsSubscribed()): ?>checked="checked"<?php endif; ?> + class="checkbox"> + <label for="is_subscribed" class="label"> + <span><?= $escaper->escapeHtml(__('Sign Up for Newsletter')) ?></span> + </label> </div> <?php /* Extensions placeholder */ ?> <?= $block->getChildHtml('customer.form.register.newsletter') ?> <?php endif ?> <?php $_dob = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Dob::class) ?> - <?php if ($_dob->isEnabled()) : ?> - <?= $_dob->setDate($block->getFormData()->getDob())->toHtml() ?> + <?php if ($_dob->isEnabled()): ?> + <?= $_dob->setDate($formData->getDob())->toHtml() ?> <?php endif ?> <?php $_taxvat = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Taxvat::class) ?> - <?php if ($_taxvat->isEnabled()) : ?> - <?= $_taxvat->setTaxvat($block->getFormData()->getTaxvat())->toHtml() ?> + <?php if ($_taxvat->isEnabled()): ?> + <?= $_taxvat->setTaxvat($formData->getTaxvat())->toHtml() ?> <?php endif ?> <?php $_gender = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Gender::class) ?> - <?php if ($_gender->isEnabled()) : ?> - <?= $_gender->setGender($block->getFormData()->getGender())->toHtml() ?> + <?php if ($_gender->isEnabled()): ?> + <?= $_gender->setGender($formData->getGender())->toHtml() ?> <?php endif ?> </fieldset> - <?php if ($block->getShowAddressFields()) : ?> + <?php if ($block->getShowAddressFields()): ?> + <?php $cityValidationClass = $this->helper(Address::class)->getAttributeValidationClass('city'); ?> + <?php $postcodeValidationClass = $this->helper(Address::class)->getAttributeValidationClass('postcode'); ?> + <?php $regionValidationClass = $this->helper(Address::class)->getAttributeValidationClass('region'); ?> <fieldset class="fieldset address"> - <legend class="legend"><span><?= $block->escapeHtml(__('Address Information')) ?></span></legend><br> + <legend class="legend"><span><?= $escaper->escapeHtml(__('Address Information')) ?></span></legend><br> <input type="hidden" name="create_address" value="1" /> <?php $_company = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Company::class) ?> - <?php if ($_company->isEnabled()) : ?> - <?= $_company->setCompany($block->getFormData()->getCompany())->toHtml() ?> + <?php if ($_company->isEnabled()): ?> + <?= $_company->setCompany($formData->getCompany())->toHtml() ?> <?php endif ?> <?php $_telephone = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Telephone::class) ?> - <?php if ($_telephone->isEnabled()) : ?> - <?= $_telephone->setTelephone($block->getFormData()->getTelephone())->toHtml() ?> + <?php if ($_telephone->isEnabled()): ?> + <?= $_telephone->setTelephone($formData->getTelephone())->toHtml() ?> <?php endif ?> <?php $_fax = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Fax::class) ?> - <?php if ($_fax->isEnabled()) : ?> - <?= $_fax->setFax($block->getFormData()->getFax())->toHtml() ?> + <?php if ($_fax->isEnabled()): ?> + <?= $_fax->setFax($formData->getFax())->toHtml() ?> <?php endif ?> - <?php $_streetValidationClass = $this->helper(\Magento\Customer\Helper\Address::class)->getAttributeValidationClass('street'); ?> + <?php + $_streetValidationClass = $this->helper(Address::class) + ->getAttributeValidationClass('street'); + ?> <div class="field street required"> - <label for="street_1" class="label"><span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('street') ?></span></label> + <label for="street_1" class="label"> + <span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('street') ?></span> + </label> <div class="control"> - <input type="text" name="street[]" value="<?= $block->escapeHtmlAttr($block->getFormData()->getStreet(0)) ?>" title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('street') ?>" id="street_1" class="input-text <?= $block->escapeHtmlAttr($_streetValidationClass) ?>"> + <input type="text" + name="street[]" + value="<?= $escaper->escapeHtmlAttr($formData->getStreet(0)) ?>" + title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('street') ?>" + id="street_1" + class="input-text <?= $escaper->escapeHtmlAttr($_streetValidationClass) ?>"> <div class="nested"> - <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?> - <?php for ($_i = 2, $_n = $this->helper(\Magento\Customer\Helper\Address::class)->getStreetLines(); $_i <= $_n; $_i++) : ?> + <?php + $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); + $streetLines = $this->helper(Address::class)->getStreetLines(); + ?> + <?php for ($_i = 2, $_n = $streetLines; $_i <= $_n; $_i++): ?> <div class="field additional"> <label class="label" for="street_<?= /* @noEscape */ $_i ?>"> - <span><?= $block->escapeHtml(__('Address')) ?></span> + <span><?= $escaper->escapeHtml(__('Address')) ?></span> </label> <div class="control"> - <input type="text" name="street[]" value="<?= $block->escapeHtml($block->getFormData()->getStreetLine($_i - 1)) ?>" title="<?= $block->escapeHtmlAttr(__('Street Address %1', $_i)) ?>" id="street_<?= /* @noEscape */ $_i ?>" class="input-text <?= $block->escapeHtmlAttr($_streetValidationClass) ?>"> + <input type="text" + name="street[]" + value="<?= $escaper->escapeHtml($formData->getStreetLine($_i - 1)) ?>" + title="<?= $escaper->escapeHtmlAttr(__('Street Address %1', $_i)) ?>" + id="street_<?= /* @noEscape */ $_i ?>" + class="input-text <?= $escaper->escapeHtmlAttr($_streetValidationClass) ?>"> </div> </div> <?php endfor; ?> @@ -82,38 +127,70 @@ </div> </div> - <div class="field required"> - <label for="city" class="label"><span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('city') ?></span></label> + <div class="field country required"> + <label for="country" class="label"> + <span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('country_id') ?></span> + </label> <div class="control"> - <input type="text" name="city" value="<?= $block->escapeHtmlAttr($block->getFormData()->getCity()) ?>" title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('city') ?>" class="input-text <?= $block->escapeHtmlAttr($this->helper(\Magento\Customer\Helper\Address::class)->getAttributeValidationClass('city')) ?>" id="city"> + <?= $block->getCountryHtmlSelect() ?> </div> </div> <div class="field region required"> - <label for="region_id" class="label"><span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('region') ?></span></label> + <label for="region_id" class="label"> + <span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('region') ?></span> + </label> <div class="control"> - <select id="region_id" name="region_id" title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('region') ?>" class="validate-select region_id" style="display:none;"> - <option value=""><?= $block->escapeHtml(__('Please select a region, state or province.')) ?></option> + <select id="region_id" + name="region_id" + title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('region') ?>" + class="validate-select region_id" + style="display: none;"> + <option value=""> + <?= $escaper->escapeHtml(__('Please select a region, state or province.')) ?> + </option> </select> - <input type="text" id="region" name="region" value="<?= $block->escapeHtml($block->getRegion()) ?>" title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('region') ?>" class="input-text <?= $block->escapeHtmlAttr($this->helper(\Magento\Customer\Helper\Address::class)->getAttributeValidationClass('region')) ?>" style="display:none;"> + <input type="text" + id="region" + name="region" + value="<?= $escaper->escapeHtml($block->getRegion()) ?>" + title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('region') ?>" + class="input-text <?= $escaper->escapeHtmlAttr($regionValidationClass) ?>" + style="display:none;"> </div> </div> - <div class="field zip required"> - <label for="zip" class="label"><span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('postcode') ?></span></label> + <div class="field required"> + <label for="city" class="label"> + <span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('city') ?></span> + </label> <div class="control"> - <input type="text" name="postcode" value="<?= $block->escapeHtmlAttr($block->getFormData()->getPostcode()) ?>" title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('postcode') ?>" id="zip" class="input-text validate-zip-international <?= $block->escapeHtmlAttr($this->helper(\Magento\Customer\Helper\Address::class)->getAttributeValidationClass('postcode')) ?>"> + <input type="text" + name="city" + value="<?= $escaper->escapeHtmlAttr($formData->getCity()) ?>" + title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('city') ?>" + class="input-text <?= $escaper->escapeHtmlAttr($cityValidationClass) ?>" + id="city"> </div> </div> - <div class="field country required"> - <label for="country" class="label"><span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('country_id') ?></span></label> + <div class="field zip required"> + <label for="zip" class="label"> + <span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('postcode') ?></span> + </label> <div class="control"> - <?= $block->getCountryHtmlSelect() ?> + <input type="text" + name="postcode" + value="<?= $escaper->escapeHtmlAttr($formData->getPostcode()) ?>" + title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('postcode') ?>" + id="zip" + class="input-text validate-zip-international + <?= $escaper->escapeHtmlAttr($postcodeValidationClass) ?>"> </div> </div> + <?php $addressAttributes = $block->getChildBlock('customer_form_address_user_attributes');?> - <?php if ($addressAttributes) : ?> + <?php if ($addressAttributes): ?> <?php $addressAttributes->setEntityType('customer_address'); ?> <?php $addressAttributes->setFieldIdFormat('address:%1$s')->setFieldNameFormat('address[%1$s]');?> <?php $block->restoreSessionData($addressAttributes->getMetadataForm(), 'address');?> @@ -124,29 +201,40 @@ </fieldset> <?php endif; ?> - <fieldset class="fieldset create account" data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>"> - <legend class="legend"><span><?= $block->escapeHtml(__('Sign-in Information')) ?></span></legend><br> + <fieldset class="fieldset create account" + data-hasrequired="<?= $escaper->escapeHtmlAttr(__('* Required Fields')) ?>"> + <legend class="legend"><span><?= $escaper->escapeHtml(__('Sign-in Information')) ?></span></legend><br> <div class="field required"> - <label for="email_address" class="label"><span><?= $block->escapeHtml(__('Email')) ?></span></label> + <label for="email_address" class="label"><span><?= $escaper->escapeHtml(__('Email')) ?></span></label> <div class="control"> - <input type="email" name="email" autocomplete="email" id="email_address" value="<?= $block->escapeHtmlAttr($block->getFormData()->getEmail()) ?>" title="<?= $block->escapeHtmlAttr(__('Email')) ?>" class="input-text" data-mage-init='{"mage/trim-input":{}}' data-validate="{required:true, 'validate-email':true}"> + <input type="email" + name="email" + autocomplete="email" + id="email_address" + value="<?= $escaper->escapeHtmlAttr($formData->getEmail()) ?>" + title="<?= $escaper->escapeHtmlAttr(__('Email')) ?>" + class="input-text" + data-mage-init='{"mage/trim-input":{}}' + data-validate="{required:true, 'validate-email':true}"> </div> </div> <div class="field password required"> - <label for="password" class="label"><span><?= $block->escapeHtml(__('Password')) ?></span></label> + <label for="password" class="label"><span><?= $escaper->escapeHtml(__('Password')) ?></span></label> <div class="control"> <input type="password" name="password" id="password" - title="<?= $block->escapeHtmlAttr(__('Password')) ?>" + title="<?= $escaper->escapeHtmlAttr(__('Password')) ?>" class="input-text" - data-password-min-length="<?= $block->escapeHtmlAttr($block->getMinimumPasswordLength()) ?>" - data-password-min-character-sets="<?= $block->escapeHtmlAttr($block->getRequiredCharacterClassesNumber()) ?>" + data-password-min-length="<?= + $escaper->escapeHtmlAttr($block->getMinimumPasswordLength()) ?>" + data-password-min-character-sets="<?= + $escaper->escapeHtmlAttr($block->getRequiredCharacterClassesNumber()) ?>" data-validate="{required:true, 'validate-customer-password':true}" autocomplete="off"> <div id="password-strength-meter-container" data-role="password-strength-meter" aria-live="polite"> <div id="password-strength-meter" class="password-strength-meter"> - <?= $block->escapeHtml(__('Password Strength')) ?>: + <?= $escaper->escapeHtml(__('Password Strength')) ?>: <span id="password-strength-meter-label" data-role="password-strength-meter-label"> - <?= $block->escapeHtml(__('No Password')) ?> + <?= $escaper->escapeHtml(__('No Password')) ?> </span> </div> </div> @@ -154,19 +242,34 @@ </div> <div class="field confirmation required"> - <label for="password-confirmation" class="label"><span><?= $block->escapeHtml(__('Confirm Password')) ?></span></label> + <label for="password-confirmation" class="label"> + <span><?= $escaper->escapeHtml(__('Confirm Password')) ?></span> + </label> <div class="control"> - <input type="password" name="password_confirmation" title="<?= $block->escapeHtmlAttr(__('Confirm Password')) ?>" id="password-confirmation" class="input-text" data-validate="{required:true, equalTo:'#password'}" autocomplete="off"> + <input type="password" + name="password_confirmation" + title="<?= $escaper->escapeHtmlAttr(__('Confirm Password')) ?>" + id="password-confirmation" + class="input-text" + data-validate="{required:true, equalTo:'#password'}" + autocomplete="off"> </div> </div> <?= $block->getChildHtml('form_additional_info') ?> </fieldset> <div class="actions-toolbar"> <div class="primary"> - <button type="submit" class="action submit primary" title="<?= $block->escapeHtmlAttr(__('Create an Account')) ?>"><span><?= $block->escapeHtml(__('Create an Account')) ?></span></button> + <button type="submit" + class="action submit primary" + title="<?= $escaper->escapeHtmlAttr(__('Create an Account')) ?>"> + <span><?= $escaper->escapeHtml(__('Create an Account')) ?></span> + </button> </div> <div class="secondary"> - <a class="action back" href="<?= $block->escapeUrl($block->getBackUrl()) ?>"><span><?= $block->escapeHtml(__('Back')) ?></span></a> + <a class="action back" + href="<?= $escaper->escapeUrl($block->getBackUrl()) ?>"> + <span><?= $escaper->escapeHtml(__('Back')) ?></span> + </a> </div> </div> </form> @@ -180,7 +283,7 @@ require([ var ignore = <?= /* @noEscape */ $_dob->isEnabled() ? '\'input[id$="full"]\'' : 'null' ?>; dataForm.mage('validation', { - <?php if ($_dob->isEnabled()) : ?> + <?php if ($_dob->isEnabled()): ?> errorPlacement: function(error, element) { if (element.prop('id').search('full') !== -1) { var dobElement = $(element).parents('.customer-dob'), @@ -194,26 +297,28 @@ require([ } }, ignore: ':hidden:not(' + ignore + ')' - <?php else : ?> + <?php else: ?> ignore: ignore ? ':hidden:not(' + ignore + ')' : ':hidden' <?php endif ?> }).find('input:text').attr('autocomplete', 'off'); }); </script> -<?php if ($block->getShowAddressFields()) : ?> +<?php if ($block->getShowAddressFields()): ?> <script type="text/x-magento-init"> { "#country": { "regionUpdater": { - "optionalRegionAllowed": <?= /* @noEscape */ $block->getConfig('general/region/display_all') ? 'true' : 'false' ?>, + "optionalRegionAllowed": <?= /* @noEscape */ $displayAll ? 'true' : 'false' ?>, "regionListId": "#region_id", "regionInputId": "#region", "postcodeId": "#zip", "form": "#form-validate", - "regionJson": <?= /* @noEscape */ $this->helper(\Magento\Directory\Helper\Data::class)->getRegionJson() ?>, - "defaultRegion": "<?= (int) $block->getFormData()->getRegionId() ?>", - "countriesWithOptionalZip": <?= /* @noEscape */ $this->helper(\Magento\Directory\Helper\Data::class)->getCountriesWithOptionalZip(true) ?> + "regionJson": <?= /* @noEscape */ $this->helper(\Magento\Directory\Helper\Data::class) + ->getRegionJson() ?>, + "defaultRegion": "<?= (int) $formData->getRegionId() ?>", + "countriesWithOptionalZip": <?= /* @noEscape */ $this->helper(\Magento\Directory\Helper\Data::class) + ->getCountriesWithOptionalZip(true) ?> } } } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/FormTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/FormTest.php index 355167d809ba3..a510c6c4e6616 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/FormTest.php @@ -5,9 +5,11 @@ */ namespace Magento\Customer\Model\Metadata; +use Magento\Framework\App\RequestInterface; use Magento\TestFramework\Helper\Bootstrap; +use PHPUnit\Framework\TestCase; -class FormTest extends \PHPUnit\Framework\TestCase +class FormTest extends TestCase { /** * @var Form @@ -17,7 +19,7 @@ class FormTest extends \PHPUnit\Framework\TestCase /** @var array */ protected $_attributes; - /** @var \Magento\Framework\App\RequestInterface */ + /** @var RequestInterface */ protected $_request; /** @var array */ @@ -31,7 +33,7 @@ public function setUp() $objectManager = Bootstrap::getObjectManager(); /** @var FormFactory $formFactory */ - $formFactory = $objectManager->create(\Magento\Customer\Model\Metadata\FormFactory::class); + $formFactory = $objectManager->create(FormFactory::class); $this->_form = $formFactory->create('customer_address', 'customer_address_edit'); $this->_attributes = [ @@ -70,7 +72,7 @@ public function setUp() 'region_id' => 12, 'region' => 'California', ]; - $this->_request = $objectManager->get(\Magento\Framework\App\RequestInterface::class); + $this->_request = $objectManager->get(RequestInterface::class); $this->_request->setParams($requestData); $this->_expected = array_merge($this->_attributes, $requestData); @@ -105,10 +107,10 @@ public function testGetAttributes() 'suffix', 'company', 'street', - 'city', 'country_id', 'region', 'region_id', + 'city', 'postcode', 'telephone', 'fax', From 939b331be1f6dc2dea8e74aec8f7807d4ea79c8f Mon Sep 17 00:00:00 2001 From: "m.mezhensky" <m.mezhensky@atwix.com> Date: Wed, 26 Feb 2020 10:33:53 +0200 Subject: [PATCH 200/229] Unit test for Magento\Catalog\Observer\SetSpecialPriceStartDate --- .../Observer/SetSpecialPriceStartDateTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Unit/Observer/SetSpecialPriceStartDateTest.php b/app/code/Magento/Catalog/Test/Unit/Observer/SetSpecialPriceStartDateTest.php index 7fdb4b3cd42b9..c44a64f1d7433 100644 --- a/app/code/Magento/Catalog/Test/Unit/Observer/SetSpecialPriceStartDateTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Observer/SetSpecialPriceStartDateTest.php @@ -8,14 +8,14 @@ namespace Magento\Catalog\Test\Unit\Observer; +use Magento\Catalog\Model\Product; +use Magento\Catalog\Observer\SetSpecialPriceStartDate; use Magento\Framework\Event; use Magento\Framework\Event\Observer; -use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Framework\Stdlib\DateTime\Timezone; -use Magento\Catalog\Model\Product; -use Magento\Catalog\Observer\SetSpecialPriceStartDate; -use PHPUnit\Framework\TestCase; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; /** * Unit test for \Magento\Catalog\Observer\SetSpecialPriceStartDate @@ -62,7 +62,7 @@ class SetSpecialPriceStartDateTest extends TestCase /** * @inheritdoc */ - protected function setUp() : void + protected function setUp(): void { $this->objectManager = new ObjectManager($this); $this->observerMock = $this->createMock(Observer::class); @@ -90,7 +90,7 @@ protected function setUp() : void /** * Test observer execute method */ - public function testExecuteModifySpecialFromDate() + public function testExecuteModifySpecialFromDate(): void { $specialPrice = 15; $specialFromDate = null; @@ -108,12 +108,12 @@ public function testExecuteModifySpecialFromDate() $this->dateObject->expects($this->any()) ->method('setTime') - ->will($this->returnSelf()); + ->willReturnSelf(); $this->timezone ->expects($this->once()) ->method('date') - ->will($this->returnValue($this->dateObject)); + ->willReturn($this->dateObject); $this->productMock ->expects($this->once()) From e88e15005c3cc18aae86a5b43a68f69418e8a57d Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Wed, 26 Feb 2020 12:32:43 +0200 Subject: [PATCH 201/229] Fix static, functional tests --- .../Listing/Column/PageActionsTest.php | 228 ++++++++++++------ .../Component/Listing/Column/PageActions.php | 2 +- .../Test/Mftf/Test/ProductsListWidgetTest.xml | 7 +- 3 files changed, 154 insertions(+), 83 deletions(-) diff --git a/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/PageActionsTest.php b/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/PageActionsTest.php index 07edc4a74b7a5..781d6d31246ca 100644 --- a/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/PageActionsTest.php +++ b/app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/PageActionsTest.php @@ -3,105 +3,112 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Cms\Test\Unit\Ui\Component\Listing\Column; use Magento\Cms\Ui\Component\Listing\Column\PageActions; +use Magento\Cms\ViewModel\Page\Grid\UrlBuilder; use Magento\Framework\Escaper; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Framework\UrlInterface; +use Magento\Framework\View\Element\UiComponent\ContextInterface; +use Magento\Framework\View\Element\UiComponent\Processor; +use PHPUnit\Framework\TestCase; +use PHPUnit_Framework_MockObject_MockObject as MockObject; /** * Test for Magento\Cms\Ui\Component\Listing\Column\PageActions class. */ -class PageActionsTest extends \PHPUnit\Framework\TestCase +class PageActionsTest extends TestCase { - public function testPrepareItemsByPageId() + + /** + * @var UrlInterface|MockObject + */ + private $urlBuilderMock; + + /** + * @var UrlBuilder|MockObject + */ + private $scopeUrlBuilderMock; + + /** + * @var ContextInterface|MockObject + */ + private $contextMock; + + /** + * @var Processor|MockObject + */ + private $processorMock; + + /** + * @var Escaper|MockObject + */ + private $escaperMock; + + /** + * @var PageActions + */ + private $model; + + /** + * @inheritDoc + */ + public function setUp() { - $pageId = 1; - // Create Mocks and SUT - $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); - /** @var \PHPUnit_Framework_MockObject_MockObject $urlBuilderMock */ - $urlBuilderMock = $this->getMockBuilder(\Magento\Framework\UrlInterface::class) - ->disableOriginalConstructor() - ->getMock(); - $scopeUrlBuilderMock = $this->getMockBuilder(\Magento\Cms\ViewModel\Page\Grid\UrlBuilder::class) - ->disableOriginalConstructor() - ->getMock(); - $contextMock = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\ContextInterface::class) + $this->urlBuilderMock = $this->createMock(UrlInterface::class); + $this->scopeUrlBuilderMock = $this->createMock(UrlBuilder::class); + $this->processorMock = $this->createMock(Processor::class); + $this->contextMock = $this->getMockBuilder(ContextInterface::class) ->getMockForAbstractClass(); - $processor = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\Processor::class) + $this->escaperMock = $this->getMockBuilder(Escaper::class) ->disableOriginalConstructor() + ->setMethods(['escapeHtml']) ->getMock(); - $contextMock->expects($this->never())->method('getProcessor')->willReturn($processor); - /** @var \Magento\Cms\Ui\Component\Listing\Column\PageActions $model */ - $model = $objectManager->getObject( - \Magento\Cms\Ui\Component\Listing\Column\PageActions::class, + $objectManager = new ObjectManager($this); + + $this->model = $objectManager->getObject( + PageActions::class, [ - 'urlBuilder' => $urlBuilderMock, - 'context' => $contextMock, - 'scopeUrlBuilder' => $scopeUrlBuilderMock + 'urlBuilder' => $this->urlBuilderMock, + 'context' => $this->contextMock, + 'scopeUrlBuilder' => $this->scopeUrlBuilderMock ] ); - $escaper = $this->getMockBuilder(Escaper::class) - ->disableOriginalConstructor() - ->setMethods(['escapeHtml']) - ->getMock(); - $objectManager->setBackwardCompatibleProperty($model, 'escaper', $escaper); - - // Define test input and expectations - $title = 'page title'; - $identifier = 'page_identifier'; - - $items = [ - 'data' => [ - 'items' => [ - [ - 'page_id' => $pageId, - 'title' => $title, - 'identifier' => $identifier - ] - ] - ] - ]; - $name = 'item_name'; - $expectedItems = [ - [ - 'page_id' => $pageId, - 'title' => $title, - 'identifier' => $identifier, - $name => [ - 'edit' => [ - 'href' => 'test/url/edit', - 'label' => __('Edit'), - '__disableTmpl' => true, - ], - 'delete' => [ - 'href' => 'test/url/delete', - 'label' => __('Delete'), - 'confirm' => [ - 'title' => __('Delete %1', $title), - 'message' => __('Are you sure you want to delete a %1 record?', $title), - '__disableTmpl' => true, - ], - 'post' => true, - '__disableTmpl' => true, - ], - 'preview' => [ - 'href' => 'test/url/view', - 'label' => __('View'), - '__disableTmpl' => true, - 'target' => '_blank' - ] - ], - ], - ]; + $objectManager->setBackwardCompatibleProperty($this->model, 'escaper', $this->escaperMock); + } - $escaper->expects(static::once()) + /** + * Verify Prepare Items by page Id. + * + * @dataProvider configDataProvider + * @param int $pageId + * @param string $title + * @param string $name + * @param array $items + * @param array $expectedItems + * @return void + */ + public function testPrepareItemsByPageId( + int $pageId, + string $title, + string $name, + array $items, + array $expectedItems + ):void { + $this->contextMock->expects($this->never()) + ->method('getProcessor') + ->willReturn($this->processorMock); + $this->escaperMock->expects(static::once()) ->method('escapeHtml') ->with($title) ->willReturn($title); // Configure mocks and object data - $urlBuilderMock->expects($this->any()) + $this->urlBuilderMock->expects($this->any()) ->method('getUrl') ->willReturnMap( [ @@ -122,13 +129,76 @@ public function testPrepareItemsByPageId() ] ); - $scopeUrlBuilderMock->expects($this->any()) + $this->scopeUrlBuilderMock->expects($this->any()) ->method('getUrl') ->willReturn('test/url/view'); - $model->setName($name); - $items = $model->prepareDataSource($items); + $this->model->setName($name); + $items = $this->model->prepareDataSource($items); // Run test $this->assertEquals($expectedItems, $items['data']['items']); } + + /** + * Data provider for testPrepareItemsByPageId + * + * @return array + */ + public function configDataProvider():array + { + $pageId = 1; + $title = 'page title'; + $identifier = 'page_identifier'; + $name = 'item_name'; + + return [ + [ + 'pageId' => $pageId, + 'title' => $title, + 'name' => $name, + 'items' => [ + 'data' => [ + 'items' => [ + [ + 'page_id' => $pageId, + 'title' => $title, + 'identifier' => $identifier + ] + ] + ] + ], + 'expectedItems' => [ + [ + 'page_id' => $pageId, + 'title' => $title, + 'identifier' => $identifier, + $name => [ + 'edit' => [ + 'href' => 'test/url/edit', + 'label' => __('Edit'), + '__disableTmpl' => true, + ], + 'delete' => [ + 'href' => 'test/url/delete', + 'label' => __('Delete'), + 'confirm' => [ + 'title' => __('Delete %1', $title), + 'message' => __('Are you sure you want to delete a %1 record?', $title), + '__disableTmpl' => true, + ], + 'post' => true, + '__disableTmpl' => true, + ], + 'preview' => [ + 'href' => 'test/url/view', + 'label' => __('View'), + '__disableTmpl' => true, + 'target' => '_blank' + ] + ], + ], + ] + ] + ]; + } } diff --git a/app/code/Magento/Cms/Ui/Component/Listing/Column/PageActions.php b/app/code/Magento/Cms/Ui/Component/Listing/Column/PageActions.php index 7792c2b53f912..0c6000bdbab84 100644 --- a/app/code/Magento/Cms/Ui/Component/Listing/Column/PageActions.php +++ b/app/code/Magento/Cms/Ui/Component/Listing/Column/PageActions.php @@ -14,7 +14,7 @@ use Magento\Ui\Component\Listing\Columns\Column; /** - * Class PageActions + * Class prepare Page Actions */ class PageActions extends Column { diff --git a/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml b/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml index 4407991ff5a93..2d5d66c406282 100644 --- a/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml +++ b/app/code/Magento/Widget/Test/Mftf/Test/ProductsListWidgetTest.xml @@ -6,8 +6,7 @@ */ --> -<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> <test name="ProductsListWidgetTest"> <annotations> <features value="Widget"/> @@ -61,8 +60,10 @@ <click selector="{{CmsPagesPageActionsSection.select(_newDefaultCmsPage.title)}}" stepKey="clickSelect" /> <waitForElementVisible selector="{{CmsPagesPageActionsSection.edit(_newDefaultCmsPage.title)}}" stepKey="waitForEditLink" /> <click selector="{{CmsPagesPageActionsSection.preview(_newDefaultCmsPage.title)}}" stepKey="clickEdit" /> + <switchToNextTab stepKey="switchToNextTab"/> <waitForPageLoad stepKey="waitForCMSPage"/> <seeInTitle userInput="{{_newDefaultCmsPage.title}}" stepKey="seePageTitle"/> <see userInput="{{_newDefaultCmsPage.title}}" stepKey="seeProduct"/> + <closeTab stepKey="closeCurrentTab"/> </test> -</tests> \ No newline at end of file +</tests> From 82b8ea6f425058e02c3e7ee56ea733554c63bbe0 Mon Sep 17 00:00:00 2001 From: Serhiy Yelahin <serhiy.yelahin@transoftgroup.com> Date: Wed, 26 Feb 2020 14:23:51 +0200 Subject: [PATCH 202/229] MC-31879: Duplicate SKU in the backend while importing products via CSV --- .../CatalogImportExport/Model/Import/Product.php | 1 + .../Model/Import/Product/RowValidatorInterface.php | 2 ++ .../Model/Import/Product/Validator.php | 10 ++++++++-- .../CatalogImportExport/Model/Import/ProductTest.php | 10 ++++++++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index ae5f0f5d79e2a..d1bce7aaaf951 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -307,6 +307,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity // Can't add new translated strings in patch release 'invalidLayoutUpdate' => 'Invalid format.', 'insufficientPermissions' => 'Invalid format.', + ValidatorInterface::ERROR_SKU_MARGINAL_WHITESPACES => 'SKU contains marginal whitespaces' ]; //@codingStandardsIgnoreEnd diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/RowValidatorInterface.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/RowValidatorInterface.php index f41596ad185a6..f13b603003898 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/RowValidatorInterface.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/RowValidatorInterface.php @@ -87,6 +87,8 @@ interface RowValidatorInterface extends \Magento\Framework\Validator\ValidatorIn const ERROR_DUPLICATE_MULTISELECT_VALUES = 'duplicatedMultiselectValues'; + const ERROR_SKU_MARGINAL_WHITESPACES = 'skuMarginalWhitespaces'; + /** * Value that means all entities (e.g. websites, groups etc.) */ diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator.php index 4b7416f6ad9a6..b2eca68db4d1c 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Validator.php @@ -10,7 +10,7 @@ use Magento\Catalog\Model\Product\Attribute\Backend\Sku; /** - * Class Validator + * Product import model validator * * @api * @since 100.0.2 @@ -72,8 +72,12 @@ protected function textValidation($attrCode, $type) $val = $this->string->cleanString($this->_rowData[$attrCode]); if ($type == 'text') { $valid = $this->string->strlen($val) < Product::DB_MAX_TEXT_LENGTH; - } else if ($attrCode == Product::COL_SKU) { + } elseif ($attrCode == Product::COL_SKU) { $valid = $this->string->strlen($val) <= SKU::SKU_MAX_LENGTH; + if ($this->string->strlen($val) !== $this->string->strlen(trim($val))) { + $this->_addMessages([RowValidatorInterface::ERROR_SKU_MARGINAL_WHITESPACES]); + return false; + } } else { $valid = $this->string->strlen($val) < Product::DB_MAX_VARCHAR_LENGTH; } @@ -359,5 +363,7 @@ public function init($context) foreach ($this->validators as $validator) { $validator->init($context); } + + return $this; } } diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php index 302534679d073..93684b1e7a070 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php @@ -2416,6 +2416,16 @@ public function validateRowDataProvider() 'behavior' => Import::BEHAVIOR_REPLACE, 'expectedResult' => true, ], + [ + 'row' => ['sku' => 'sku with whitespace ', + 'name' => 'Test', + 'product_type' => 'simple', + '_attribute_set' => 'Default', + 'price' => 10.20, + ], + 'behavior' => Import::BEHAVIOR_ADD_UPDATE, + 'expectedResult' => false, + ], ]; } From 8014f5227a00e95d8ad0752de97cbf3b5680d6e2 Mon Sep 17 00:00:00 2001 From: Vasya Tsviklinskyi <tsviklinskyi@gmail.com> Date: Wed, 26 Feb 2020 14:28:53 +0200 Subject: [PATCH 203/229] MC-31727: PNG images not displaying correctly --- .../Adminhtml/Wysiwyg/Directive.php | 20 ++- .../Adminhtml/Wysiwyg/DirectiveTest.php | 127 +++++++++++++----- .../Magento/Framework/Image/Adapter/Gd2.php | 10 -- 3 files changed, 110 insertions(+), 47 deletions(-) diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Directive.php b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Directive.php index 97d0b35a2354f..a3370b2666264 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Directive.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Directive.php @@ -21,6 +21,7 @@ use Magento\Framework\Controller\Result\RawFactory; use Magento\Backend\App\Action\Context; use Magento\Framework\App\ObjectManager; +use Magento\Framework\Filesystem\Driver\File; /** * Process template text for wysiwyg editor. @@ -67,6 +68,11 @@ class Directive extends Action implements HttpGetActionInterface */ private $filter; + /** + * @var File + */ + private $file; + /** * Constructor * @@ -77,6 +83,7 @@ class Directive extends Action implements HttpGetActionInterface * @param LoggerInterface|null $logger * @param Config|null $config * @param Filter|null $filter + * @param File|null $file */ public function __construct( Context $context, @@ -85,7 +92,8 @@ public function __construct( AdapterFactory $adapterFactory = null, LoggerInterface $logger = null, Config $config = null, - Filter $filter = null + Filter $filter = null, + File $file = null ) { parent::__construct($context); $this->urlDecoder = $urlDecoder; @@ -94,6 +102,7 @@ public function __construct( $this->logger = $logger ?: ObjectManager::getInstance()->get(LoggerInterface::class); $this->config = $config ?: ObjectManager::getInstance()->get(Config::class); $this->filter = $filter ?: ObjectManager::getInstance()->get(Filter::class); + $this->file = $file ?: ObjectManager::getInstance()->get(File::class); } /** @@ -127,6 +136,15 @@ public function execute() $this->logger->warning($e); } } + $mimeType = $image->getMimeType(); + unset($image); + // To avoid issues with PNG images with alpha blending we return raw file + // after validation as an image source instead of generating the new PNG image + // with image adapter + $content = $this->file->fileGetContents($imagePath); + $resultRaw->setHeader('Content-Type', $mimeType); + $resultRaw->setContents($content); + return $resultRaw; } } diff --git a/app/code/Magento/Cms/Test/Unit/Controller/Adminhtml/Wysiwyg/DirectiveTest.php b/app/code/Magento/Cms/Test/Unit/Controller/Adminhtml/Wysiwyg/DirectiveTest.php index 5fea276225622..be9f6b8d8ccd5 100644 --- a/app/code/Magento/Cms/Test/Unit/Controller/Adminhtml/Wysiwyg/DirectiveTest.php +++ b/app/code/Magento/Cms/Test/Unit/Controller/Adminhtml/Wysiwyg/DirectiveTest.php @@ -5,100 +5,123 @@ */ namespace Magento\Cms\Test\Unit\Controller\Adminhtml\Wysiwyg; +use Magento\Backend\App\Action\Context; +use Magento\Cms\Controller\Adminhtml\Wysiwyg\Directive; +use Magento\Cms\Model\Template\Filter; +use Magento\Cms\Model\Wysiwyg\Config; +use Magento\Framework\App\RequestInterface; +use Magento\Framework\App\ResponseInterface; +use Magento\Framework\Controller\Result\Raw; +use Magento\Framework\Controller\Result\RawFactory; +use Magento\Framework\Filesystem\Driver\File; +use Magento\Framework\Image\Adapter\AdapterInterface; +use Magento\Framework\Image\AdapterFactory; +use Magento\Framework\ObjectManagerInterface; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use Magento\Framework\Url\DecoderInterface; +use PHPUnit\Framework\TestCase; +use PHPUnit_Framework_MockObject_MockObject; +use Psr\Log\LoggerInterface; + /** * @covers \Magento\Cms\Controller\Adminhtml\Wysiwyg\Directive * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class DirectiveTest extends \PHPUnit\Framework\TestCase +class DirectiveTest extends TestCase { const IMAGE_PATH = 'pub/media/wysiwyg/image.jpg'; /** - * @var \Magento\Cms\Controller\Adminhtml\Wysiwyg\Directive + * @var Directive */ protected $wysiwygDirective; /** - * @var \Magento\Backend\App\Action\Context|\PHPUnit_Framework_MockObject_MockObject + * @var Context|PHPUnit_Framework_MockObject_MockObject */ protected $actionContextMock; /** - * @var \Magento\Framework\App\RequestInterface|\PHPUnit_Framework_MockObject_MockObject + * @var RequestInterface|PHPUnit_Framework_MockObject_MockObject */ protected $requestMock; /** - * @var \Magento\Framework\Url\DecoderInterface|\PHPUnit_Framework_MockObject_MockObject + * @var DecoderInterface|PHPUnit_Framework_MockObject_MockObject */ protected $urlDecoderMock; /** - * @var \Magento\Framework\ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ObjectManagerInterface|PHPUnit_Framework_MockObject_MockObject */ protected $objectManagerMock; /** - * @var \Magento\Cms\Model\Template\Filter|\PHPUnit_Framework_MockObject_MockObject + * @var Filter|PHPUnit_Framework_MockObject_MockObject */ protected $templateFilterMock; /** - * @var \Magento\Framework\Image\AdapterFactory|\PHPUnit_Framework_MockObject_MockObject + * @var AdapterFactory|PHPUnit_Framework_MockObject_MockObject */ protected $imageAdapterFactoryMock; /** - * @var \Magento\Framework\Image\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject + * @var AdapterInterface|PHPUnit_Framework_MockObject_MockObject */ protected $imageAdapterMock; /** - * @var \Magento\Framework\App\ResponseInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ResponseInterface|PHPUnit_Framework_MockObject_MockObject */ protected $responseMock; /** - * @var \Magento\Cms\Model\Wysiwyg\Config|\PHPUnit_Framework_MockObject_MockObject + * @var File|PHPUnit_Framework_MockObject_MockObject + */ + protected $fileMock; + + /** + * @var Config|PHPUnit_Framework_MockObject_MockObject */ protected $wysiwygConfigMock; /** - * @var \Psr\Log\LoggerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var LoggerInterface|PHPUnit_Framework_MockObject_MockObject */ protected $loggerMock; /** - * @var \Magento\Framework\Controller\Result\RawFactory|\PHPUnit_Framework_MockObject_MockObject + * @var RawFactory|PHPUnit_Framework_MockObject_MockObject */ protected $rawFactoryMock; /** - * @var \Magento\Framework\Controller\Result\Raw|\PHPUnit_Framework_MockObject_MockObject + * @var Raw|PHPUnit_Framework_MockObject_MockObject */ protected $rawMock; protected function setUp() { - $this->actionContextMock = $this->getMockBuilder(\Magento\Backend\App\Action\Context::class) + $this->actionContextMock = $this->getMockBuilder(Context::class) ->disableOriginalConstructor() ->getMock(); - $this->requestMock = $this->getMockBuilder(\Magento\Framework\App\RequestInterface::class) + $this->requestMock = $this->getMockBuilder(RequestInterface::class) ->disableOriginalConstructor() ->getMock(); - $this->urlDecoderMock = $this->getMockBuilder(\Magento\Framework\Url\DecoderInterface::class) + $this->urlDecoderMock = $this->getMockBuilder(DecoderInterface::class) ->disableOriginalConstructor() ->getMock(); - $this->objectManagerMock = $this->getMockBuilder(\Magento\Framework\ObjectManagerInterface::class) + $this->objectManagerMock = $this->getMockBuilder(ObjectManagerInterface::class) ->disableOriginalConstructor() ->getMock(); - $this->templateFilterMock = $this->getMockBuilder(\Magento\Cms\Model\Template\Filter::class) + $this->templateFilterMock = $this->getMockBuilder(Filter::class) ->disableOriginalConstructor() ->getMock(); - $this->imageAdapterFactoryMock = $this->getMockBuilder(\Magento\Framework\Image\AdapterFactory::class) + $this->imageAdapterFactoryMock = $this->getMockBuilder(AdapterFactory::class) ->disableOriginalConstructor() ->getMock(); - $this->imageAdapterMock = $this->getMockBuilder(\Magento\Framework\Image\Adapter\AdapterInterface::class) + $this->imageAdapterMock = $this->getMockBuilder(AdapterInterface::class) ->disableOriginalConstructor() ->setMethods( [ @@ -117,21 +140,25 @@ protected function setUp() ] ) ->getMock(); - $this->responseMock = $this->getMockBuilder(\Magento\Framework\App\ResponseInterface::class) + $this->responseMock = $this->getMockBuilder(ResponseInterface::class) ->disableOriginalConstructor() ->setMethods(['setHeader', 'setBody', 'sendResponse']) ->getMock(); - $this->wysiwygConfigMock = $this->getMockBuilder(\Magento\Cms\Model\Wysiwyg\Config::class) + $this->fileMock = $this->getMockBuilder(File::class) ->disableOriginalConstructor() + ->setMethods(['fileGetContents']) ->getMock(); - $this->loggerMock = $this->getMockBuilder(\Psr\Log\LoggerInterface::class) + $this->wysiwygConfigMock = $this->getMockBuilder(Config::class) ->disableOriginalConstructor() ->getMock(); - $this->rawFactoryMock = $this->getMockBuilder(\Magento\Framework\Controller\Result\RawFactory::class) + $this->loggerMock = $this->getMockBuilder(LoggerInterface::class) + ->disableOriginalConstructor() + ->getMock(); + $this->rawFactoryMock = $this->getMockBuilder(RawFactory::class) ->setMethods(['create']) ->disableOriginalConstructor() ->getMock(); - $this->rawMock = $this->getMockBuilder(\Magento\Framework\Controller\Result\Raw::class) + $this->rawMock = $this->getMockBuilder(Raw::class) ->disableOriginalConstructor() ->getMock(); @@ -145,9 +172,9 @@ protected function setUp() ->method('getObjectManager') ->willReturn($this->objectManagerMock); - $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); + $objectManager = new ObjectManager($this); $this->wysiwygDirective = $objectManager->getObject( - \Magento\Cms\Controller\Adminhtml\Wysiwyg\Directive::class, + Directive::class, [ 'context' => $this->actionContextMock, 'urlDecoder' => $this->urlDecoderMock, @@ -155,7 +182,8 @@ protected function setUp() 'adapterFactory' => $this->imageAdapterFactoryMock, 'logger' => $this->loggerMock, 'config' => $this->wysiwygConfigMock, - 'filter' => $this->templateFilterMock + 'filter' => $this->templateFilterMock, + 'file' => $this->fileMock, ] ); } @@ -172,23 +200,29 @@ public function testExecute() $this->imageAdapterMock->expects($this->once()) ->method('open') ->with(self::IMAGE_PATH); - $this->imageAdapterMock->expects($this->once()) + $this->imageAdapterMock->expects($this->atLeastOnce()) ->method('getMimeType') ->willReturn($mimeType); - $this->rawMock->expects($this->once()) + $this->rawMock->expects($this->atLeastOnce()) ->method('setHeader') ->with('Content-Type', $mimeType) ->willReturnSelf(); - $this->rawMock->expects($this->once()) + $this->rawMock->expects($this->atLeastOnce()) ->method('setContents') ->with($imageBody) ->willReturnSelf(); $this->imageAdapterMock->expects($this->once()) ->method('getImage') ->willReturn($imageBody); + $this->fileMock->expects($this->once()) + ->method('fileGetContents') + ->willReturn($imageBody); $this->rawFactoryMock->expects($this->any()) ->method('create') ->willReturn($this->rawMock); + $this->imageAdapterFactoryMock->expects($this->once()) + ->method('create') + ->willReturn($this->imageAdapterMock); $this->assertSame( $this->rawMock, @@ -217,20 +251,23 @@ public function testExecuteException() $this->imageAdapterMock->expects($this->at(1)) ->method('open') ->with($placeholderPath); - $this->imageAdapterMock->expects($this->once()) + $this->imageAdapterMock->expects($this->atLeastOnce()) ->method('getMimeType') ->willReturn($mimeType); - $this->rawMock->expects($this->once()) + $this->rawMock->expects($this->atLeastOnce()) ->method('setHeader') ->with('Content-Type', $mimeType) ->willReturnSelf(); - $this->rawMock->expects($this->once()) + $this->rawMock->expects($this->atLeastOnce()) ->method('setContents') ->with($imageBody) ->willReturnSelf(); - $this->imageAdapterMock->expects($this->once()) + $this->imageAdapterMock->expects($this->any()) ->method('getImage') ->willReturn($imageBody); + $this->fileMock->expects($this->once()) + ->method('fileGetContents') + ->willReturn($imageBody); $this->loggerMock->expects($this->once()) ->method('warning') ->with($exception); @@ -238,6 +275,10 @@ public function testExecuteException() ->method('create') ->willReturn($this->rawMock); + $this->imageAdapterFactoryMock->expects($this->exactly(1)) + ->method('create') + ->willReturn($this->imageAdapterMock); + $this->assertSame( $this->rawMock, $this->wysiwygDirective->execute() @@ -297,6 +338,20 @@ public function testExecuteWithDeletedImage() ->method('warning') ->with($exception); + $this->rawMock->expects($this->once()) + ->method('setHeader') + ->with('Content-Type', null) + ->willReturnSelf(); + + $this->rawMock->expects($this->once()) + ->method('setContents') + ->with(null) + ->willReturnSelf(); + + $this->rawFactoryMock->expects($this->any()) + ->method('create') + ->willReturn($this->rawMock); + $this->wysiwygDirective->execute(); } } diff --git a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php index caa080c02e255..df236faf8173b 100644 --- a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php +++ b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php @@ -75,16 +75,6 @@ public function open($filename) $this->_getCallback('create', null, sprintf('Unsupported image format. File: %s', $this->_fileName)), $this->_fileName ); - $fileType = $this->getImageType(); - if (in_array($fileType, [IMAGETYPE_PNG, IMAGETYPE_GIF])) { - $this->_keepTransparency = true; - if ($this->_imageHandler) { - $isAlpha = $this->checkAlpha($this->_fileName); - if ($isAlpha) { - $this->_fillBackgroundColor($this->_imageHandler); - } - } - } } /** From c00cef40fffb3b60d13077ee3d40dbde38e3cc4c Mon Sep 17 00:00:00 2001 From: Timon de Groot <timon@mooore.nl> Date: Wed, 26 Feb 2020 14:49:00 +0100 Subject: [PATCH 204/229] Fix deprecated method usage --- .../product/image_with_borders.phtml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml index 33f7620f1a1f5..82b8bfed7ba0a 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml @@ -4,16 +4,19 @@ * See COPYING.txt for license details. */ ?> -<?php /** @var $block \Magento\Catalog\Block\Product\Image */ ?> +<?php +/** @var $block \Magento\Catalog\Block\Product\Image */ +/** @var $escaper \Magento\Framework\Escaper */ +?> <span class="product-image-container" - style="width:<?= $block->escapeHtmlAttr($block->getWidth()) ?>px;"> + style="width:<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>px;"> <span class="product-image-wrapper" style="padding-bottom: <?= ($block->getRatio() * 100) ?>%;"> - <img class="<?= $block->escapeHtmlAttr($block->getClass()) ?>" - <?= $block->escapeHtmlAttr($block->getCustomAttributes()) ?> - src="<?= $block->escapeUrl($block->getImageUrl()) ?>" - max-width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>" - max-height="<?= $block->escapeHtmlAttr($block->getHeight()) ?>" - alt="<?= /* @noEscape */ $block->stripTags($block->getLabel(), null, true) ?>"/></span> + <img class="<?= $escaper->escapeHtmlAttr($block->getClass()) ?>" + <?= $escaper->escapeHtmlAttr($block->getCustomAttributes()) ?> + src="<?= $escaper->escapeUrl($block->getImageUrl()) ?>" + max-width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>" + max-height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>" + alt="<?= /* @noEscape */ $block->stripTags($block->getLabel(), null, true) ?>"/></span> </span> From 1a7977570c2638a33c8cc90b253b061fc934fe2d Mon Sep 17 00:00:00 2001 From: Timon de Groot <timon@mooore.nl> Date: Wed, 26 Feb 2020 14:50:03 +0100 Subject: [PATCH 205/229] Add loading="lazy" to image_with_borders.phtml --- .../view/frontend/templates/product/image_with_borders.phtml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml index 82b8bfed7ba0a..1ed1482edf67f 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml @@ -16,6 +16,7 @@ <img class="<?= $escaper->escapeHtmlAttr($block->getClass()) ?>" <?= $escaper->escapeHtmlAttr($block->getCustomAttributes()) ?> src="<?= $escaper->escapeUrl($block->getImageUrl()) ?>" + loading="lazy" max-width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>" max-height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>" alt="<?= /* @noEscape */ $block->stripTags($block->getLabel(), null, true) ?>"/></span> From 182a47423a3f2a00daac739bb19072416fc75e89 Mon Sep 17 00:00:00 2001 From: Timon de Groot <timon@mooore.nl> Date: Wed, 26 Feb 2020 15:27:37 +0100 Subject: [PATCH 206/229] Get rid of max-width and max-height in image_with_borders.phtml --- .../view/frontend/templates/product/image_with_borders.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml index 1ed1482edf67f..3b4a74d5d86c9 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml @@ -17,7 +17,7 @@ <?= $escaper->escapeHtmlAttr($block->getCustomAttributes()) ?> src="<?= $escaper->escapeUrl($block->getImageUrl()) ?>" loading="lazy" - max-width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>" - max-height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>" + width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>" + height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>" alt="<?= /* @noEscape */ $block->stripTags($block->getLabel(), null, true) ?>"/></span> </span> From 0bd7a87110248a4efbc8cdb612e3c42ce9475942 Mon Sep 17 00:00:00 2001 From: Timon de Groot <timon@mooore.nl> Date: Wed, 26 Feb 2020 15:36:12 +0100 Subject: [PATCH 207/229] Fix deprecated method usage --- .../view/frontend/templates/product/image.phtml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml index 5a31f3d125c81..83e69b658be4e 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml @@ -4,11 +4,14 @@ * See COPYING.txt for license details. */ ?> -<?php /** @var $block \Magento\Catalog\Block\Product\Image */ ?> +<?php +/** @var $block \Magento\Catalog\Block\Product\Image */ +/** @var $escaper \Magento\Framework\Escaper */ +?> -<img class="photo image <?= $block->escapeHtmlAttr($block->getClass()) ?>" - <?= $block->escapeHtml($block->getCustomAttributes()) ?> - src="<?= $block->escapeUrl($block->getImageUrl()) ?>" - width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>" - height="<?= $block->escapeHtmlAttr($block->getHeight()) ?>" - alt="<?= /* @noEscape */ $block->stripTags($block->getLabel(), null, true) ?>" /> +<img class="photo image <?= $escaper->escapeHtmlAttr($block->getClass()) ?>" + <?= $escaper->escapeHtml($block->getCustomAttributes()) ?> + src="<?= $escaper->escapeUrl($block->getImageUrl()) ?>" + width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>" + height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>" + alt="<?= /* @noEscape */ $block->stripTags($block->getLabel(), null, true) ?>" /> From 56fde6c7a3e4d7a3e506e10b78523a8b988bf779 Mon Sep 17 00:00:00 2001 From: Timon de Groot <timon@mooore.nl> Date: Wed, 26 Feb 2020 15:36:40 +0100 Subject: [PATCH 208/229] Add loading="lazy" to image.phtml --- .../Magento/Catalog/view/frontend/templates/product/image.phtml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml index 83e69b658be4e..415fb367b729c 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml @@ -12,6 +12,7 @@ <img class="photo image <?= $escaper->escapeHtmlAttr($block->getClass()) ?>" <?= $escaper->escapeHtml($block->getCustomAttributes()) ?> src="<?= $escaper->escapeUrl($block->getImageUrl()) ?>" + loading="lazy" width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>" height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>" alt="<?= /* @noEscape */ $block->stripTags($block->getLabel(), null, true) ?>" /> From 691d7bb275846d028262f21775259186a3152357 Mon Sep 17 00:00:00 2001 From: Grimlink <sean.grimlink@gmail.com> Date: Wed, 26 Feb 2020 18:55:32 +0100 Subject: [PATCH 209/229] FIX: responsiveness for images --- lib/web/css/source/lib/_resets.less | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/web/css/source/lib/_resets.less b/lib/web/css/source/lib/_resets.less index a680c91af3dbe..e322c05af2155 100644 --- a/lib/web/css/source/lib/_resets.less +++ b/lib/web/css/source/lib/_resets.less @@ -51,14 +51,17 @@ border: 0; } - img, - object, video, - embed { - max-height: 100%; + embed, + object { max-width: 100%; } + img { + max-width: 100%; + height: auto; + } + svg:not(:root) { overflow: hidden; } From 967aa6da34b6de2fb8320fe431ac47d8cf7cf162 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Wed, 26 Feb 2020 19:07:45 +0100 Subject: [PATCH 210/229] Restore Profiler for `postdispatch`, remove `@TODO` and change `@deprecated` message --- lib/internal/Magento/Framework/App/Action/Action.php | 3 +-- .../Framework/App/Action/Plugin/EventDispatchPlugin.php | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/internal/Magento/Framework/App/Action/Action.php b/lib/internal/Magento/Framework/App/Action/Action.php index a6c5bb5674ee8..2acf4d36af457 100644 --- a/lib/internal/Magento/Framework/App/Action/Action.php +++ b/lib/internal/Magento/Framework/App/Action/Action.php @@ -23,8 +23,7 @@ * It contains standard action behavior (event dispatching, flag checks) * Action classes that do not extend from this class will lose this behavior and might not function correctly * - * @TODO: Remove this class. Allow implementation of Action Controllers by just implementing Action Interface. - * @deprecated Use \Magento\Framework\App\ActionInterface instead + * @deprecated 2.4.0, use \Magento\Framework\App\ActionInterface * * phpcs:disable Magento2.Classes.AbstractApi * @api diff --git a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php index 34a8fa3cb1ea2..7d07d1f4cf457 100644 --- a/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php +++ b/lib/internal/Magento/Framework/App/Action/Plugin/EventDispatchPlugin.php @@ -16,6 +16,7 @@ use Magento\Framework\Controller\ResultInterface; use Magento\Framework\Event\ManagerInterface; use Magento\Framework\HTTP\PhpEnvironment\Response; +use Magento\Framework\Profiler; /** * Dispatch the controller_action_predispatch and controller_action_post_dispatch events. @@ -63,7 +64,7 @@ public function beforeExecute(ActionInterface $subject) * Build the event parameter array * * @param ActionInterface $subject - * @return mixed[] + * @return array */ private function getEventParameters(ActionInterface $subject): array { @@ -89,7 +90,6 @@ public function afterExecute(ActionInterface $subject, $result) /** * Check if action flags are set that would suppress the post dispatch events. * - * @param ActionInterface $subject * @return bool */ private function isSetActionNoPostDispatchFlag(): bool @@ -123,6 +123,7 @@ private function dispatchPreDispatchEvents(ActionInterface $action) */ private function dispatchPostDispatchEvents(ActionInterface $action) { + Profiler::start('postdispatch'); $this->eventManager->dispatch( 'controller_action_postdispatch_' . $this->request->getFullActionName(), $this->getEventParameters($action) @@ -132,5 +133,6 @@ private function dispatchPostDispatchEvents(ActionInterface $action) $this->getEventParameters($action) ); $this->eventManager->dispatch('controller_action_postdispatch', $this->getEventParameters($action)); + Profiler::stop('postdispatch'); } } From 909beac8a982bbeef2d2c54c0114f6786b04b604 Mon Sep 17 00:00:00 2001 From: Lena Orobei <oorobei@magento.com> Date: Wed, 26 Feb 2020 16:28:25 -0600 Subject: [PATCH 211/229] Fixed deprecated messages --- app/code/Magento/Backend/App/AbstractAction.php | 2 ++ lib/internal/Magento/Framework/App/Action/Action.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Backend/App/AbstractAction.php b/app/code/Magento/Backend/App/AbstractAction.php index 583fc723cc38b..2f01700bdf51c 100644 --- a/app/code/Magento/Backend/App/AbstractAction.php +++ b/app/code/Magento/Backend/App/AbstractAction.php @@ -20,6 +20,8 @@ /** * Generic backend controller * + * @deprecated Use \Magento\Framework\App\ActionInterface + * * phpcs:disable Magento2.Classes.AbstractApi * @api * @SuppressWarnings(PHPMD.NumberOfChildren) diff --git a/lib/internal/Magento/Framework/App/Action/Action.php b/lib/internal/Magento/Framework/App/Action/Action.php index 2acf4d36af457..6a3b665c7d3ed 100644 --- a/lib/internal/Magento/Framework/App/Action/Action.php +++ b/lib/internal/Magento/Framework/App/Action/Action.php @@ -23,7 +23,7 @@ * It contains standard action behavior (event dispatching, flag checks) * Action classes that do not extend from this class will lose this behavior and might not function correctly * - * @deprecated 2.4.0, use \Magento\Framework\App\ActionInterface + * @deprecated Use \Magento\Framework\App\ActionInterface * * phpcs:disable Magento2.Classes.AbstractApi * @api From 2d15e9107418f04626ef021451774cdc438f1b42 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Thu, 27 Feb 2020 09:01:17 +0100 Subject: [PATCH 212/229] #27044 Integration Test to cover described case (loading with $storeId) attribute --- .../Catalog/Model/CategoryRepositoryTest.php | 41 ++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryRepositoryTest.php index e1e4a87c033d0..935f827159771 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryRepositoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryRepositoryTest.php @@ -9,10 +9,10 @@ use Magento\Catalog\Api\CategoryRepositoryInterface; use Magento\Catalog\Api\CategoryRepositoryInterfaceFactory; -use Magento\Framework\Exception\LocalizedException; -use Magento\TestFramework\Catalog\Model\CategoryLayoutUpdateManager; use Magento\Catalog\Model\ResourceModel\Category\CollectionFactory as CategoryCollectionFactory; use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory; +use Magento\Framework\Exception\LocalizedException; +use Magento\TestFramework\Catalog\Model\CategoryLayoutUpdateManager; use Magento\TestFramework\Helper\Bootstrap; use PHPUnit\Framework\TestCase; @@ -21,6 +21,11 @@ */ class CategoryRepositoryTest extends TestCase { + private const FIXTURE_CATEGORY_ID = 333; + private const FIXTURE_TWO_STORES_CATEGORY_ID = 555; + private const FIXTURE_SECOND_STORE_CODE = 'fixturestore'; + private const FIXTURE_FIRST_STORE_CODE = 'default'; + /** * @var CategoryLayoutUpdateManager */ @@ -77,13 +82,13 @@ public function testCustomLayout(): void { //New valid value $repo = $this->createRepo(); - $category = $repo->get(333); + $category = $repo->get(self::FIXTURE_CATEGORY_ID); $newFile = 'test'; - $this->layoutManager->setCategoryFakeFiles(333, [$newFile]); + $this->layoutManager->setCategoryFakeFiles(self::FIXTURE_CATEGORY_ID, [$newFile]); $category->setCustomAttribute('custom_layout_update_file', $newFile); $repo->save($category); $repo = $this->createRepo(); - $category = $repo->get(333); + $category = $repo->get(self::FIXTURE_CATEGORY_ID); $this->assertEquals($newFile, $category->getCustomAttribute('custom_layout_update_file')->getValue()); //Setting non-existent value @@ -126,4 +131,30 @@ public function testCategoryBehaviourAfterDelete(): void 'Wrong categories was deleted' ); } + + /** + * Verifies whether `get()` method `$storeId` attribute works as expected. + * + * @magentoDbIsolation enabled + * @magentoDataFixture Magento/Store/_files/core_fixturestore.php + * @magentoDataFixture Magento/Catalog/_files/category_with_two_stores.php + */ + public function testGetCategoryForProvidedStore() + { + $categoryRepository = $this->repositoryFactory->create(); + + $categoryFirstStore = $categoryRepository->get( + self::FIXTURE_TWO_STORES_CATEGORY_ID, + self::FIXTURE_FIRST_STORE_CODE + ); + + $this->assertSame('category-defaultstore', $categoryFirstStore->getUrlKey()); + + $categorySecondStore = $categoryRepository->get( + self::FIXTURE_TWO_STORES_CATEGORY_ID, + self::FIXTURE_SECOND_STORE_CODE + ); + + $this->assertSame('category-fixturestore', $categorySecondStore->getUrlKey()); + } } From 8ad33f504b11976a4faa53c9024767a740e6bc44 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com> Date: Thu, 27 Feb 2020 09:10:07 +0100 Subject: [PATCH 213/229] #27044 Add case: Get Category without `$storeId` provided --- .../Magento/Catalog/Model/CategoryRepositoryTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryRepositoryTest.php index 935f827159771..c4cabe46f5b32 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryRepositoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryRepositoryTest.php @@ -143,6 +143,12 @@ public function testGetCategoryForProvidedStore() { $categoryRepository = $this->repositoryFactory->create(); + $categoryDefault = $categoryRepository->get( + self::FIXTURE_TWO_STORES_CATEGORY_ID + ); + + $this->assertSame('category-defaultstore', $categoryDefault->getUrlKey()); + $categoryFirstStore = $categoryRepository->get( self::FIXTURE_TWO_STORES_CATEGORY_ID, self::FIXTURE_FIRST_STORE_CODE From 473356f22fe873d0680d8c9c3146f56846c9b7f3 Mon Sep 17 00:00:00 2001 From: Serhii Voloshkov <serhii.voloshkov@transoftgroup.com> Date: Thu, 27 Feb 2020 10:17:06 +0200 Subject: [PATCH 214/229] MC-29184: Unexpected message appears if you try to add products to order via admin panel --- ...AssertAdminItemOrderedErrorActionGroup.xml | 21 +++++ ...nItemOrderedErrorNotVisibleActionGroup.xml | 21 +++++ .../AdminOrderFormItemsOrderedSection.xml | 1 + .../AdminAddSelectedProductToOrderTest.xml | 78 +++++++++++++++++++ 4 files changed, 121 insertions(+) create mode 100644 app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorActionGroup.xml create mode 100644 app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorNotVisibleActionGroup.xml create mode 100644 app/code/Magento/Sales/Test/Mftf/Test/AdminAddSelectedProductToOrderTest.xml diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorActionGroup.xml new file mode 100644 index 0000000000000..a2f35b9c5fca8 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorActionGroup.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="AssertAdminItemOrderedErrorActionGroup"> + <annotations> + <description>Assert that item in "Item Ordered" grid has an error/notice</description> + </annotations> + <arguments> + <argument name="productName" defaultValue="{{_defaultProduct.name}}" type="string"/> + <argument name="messageType" defaultValue="error" type="string"/> + <argument name="message" defaultValue="The requested qty is not available" type="string"/> + </arguments> + <see userInput="{{message}}" selector="{{AdminOrderFormItemsOrderedSection.productMessage(productName, messageType)}}" stepKey="assertItemErrorVisible"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorNotVisibleActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorNotVisibleActionGroup.xml new file mode 100644 index 0000000000000..83bac652d7dff --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorNotVisibleActionGroup.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="AssertAdminItemOrderedErrorNotVisibleActionGroup"> + <annotations> + <description>Assert that item in "Item Ordered" grid does not have an error/notice</description> + </annotations> + <arguments> + <argument name="productName" defaultValue="{{_defaultProduct.name}}" type="string"/> + <argument name="messageType" defaultValue="error" type="string"/> + <argument name="message" defaultValue="The requested qty is not available" type="string"/> + </arguments> + <dontSee userInput="{{message}}" selector="{{AdminOrderFormItemsOrderedSection.productMessage(productName, messageType)}}" stepKey="assertItemErrorNotVisible"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsOrderedSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsOrderedSection.xml index e3417e7c662b9..4437f6e6775f2 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsOrderedSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsOrderedSection.xml @@ -18,5 +18,6 @@ <element name="configureSelectAttribute" type="select" selector="select[id*=attribute]"/> <element name="itemsSKU" type="text" selector="(//div[contains(@class, 'product-sku-block')])[{{productNumber}}]" parameterized="true"/> <element name="moveProduct" type="select" selector="//td[contains(.,'{{productName}}')]/../..//td//select" parameterized="true"/> + <element name="productMessage" type="text" selector="//section[@id = 'order-items']//span[text()='{{productName}}']/ancestor::tr/..//div[contains(@class, 'message-{{messageType}}')]" parameterized="true"/> </section> </sections> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminAddSelectedProductToOrderTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminAddSelectedProductToOrderTest.xml new file mode 100644 index 0000000000000..ca74eca88308a --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminAddSelectedProductToOrderTest.xml @@ -0,0 +1,78 @@ +<?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="AdminAddSelectedProductToOrderTest"> + <annotations> + <features value="CatalogInventory"/> + <stories value="Admin create order"/> + <title value="Add selected products to order in Admin when requested qty more than available"/> + <description value="Trying to add selected products to order in Admin when requested qty more than available"/> + <useCaseId value="MC-29184"/> + <testCaseId value="MC-31589"/> + <severity value="MAJOR"/> + <group value="sales"/> + <group value="catalogInventory"/> + </annotations> + <before> + <createData entity="Simple_US_Customer" stepKey="simpleCustomer"/> + <createData entity="SimpleProduct2" stepKey="simpleProduct"/> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> + </before> + <after> + <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> + <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> + <actionGroup ref="logout" stepKey="logoutFromAdmin"/> + </after> + + <!-- Initiate create new order --> + <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderPageWithExistingCustomer"> + <argument name="customer" value="$simpleCustomer$"/> + </actionGroup> + <!-- Add to order maximum available quantity - 1 --> + <executeJS function="return {{SimpleProduct2.quantity}} - 1" stepKey="maxQtyMinusOne"/> + <actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addProductToOrderWithMaxQtyMinusOne"> + <argument name="product" value="$simpleProduct$"/> + <argument name="productQty" value="{$maxQtyMinusOne}"/> + </actionGroup> + <!-- Check that there is no error or notice --> + <actionGroup ref="AssertAdminItemOrderedErrorNotVisibleActionGroup" stepKey="assertNoticeAbsent"> + <argument name="productName" value="$simpleProduct.name$"/> + <argument name="messageType" value="notice"/> + </actionGroup> + <actionGroup ref="AssertAdminItemOrderedErrorNotVisibleActionGroup" stepKey="assertErrorAbsent"> + <argument name="productName" value="$simpleProduct.name$"/> + <argument name="messageType" value="error"/> + </actionGroup> + <!-- Add to order maximum available quantity --> + <actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addProductToOrder"> + <argument name="product" value="$simpleProduct$"/> + <argument name="productQty" value="1"/> + </actionGroup> + <!-- Check that there is no error or notice --> + <actionGroup ref="AssertAdminItemOrderedErrorNotVisibleActionGroup" stepKey="assertNoticeAbsentAgain"> + <argument name="productName" value="$simpleProduct.name$"/> + <argument name="messageType" value="notice"/> + </actionGroup> + <actionGroup ref="AssertAdminItemOrderedErrorNotVisibleActionGroup" stepKey="assertErrorAbsentAgain"> + <argument name="productName" value="$simpleProduct.name$"/> + <argument name="messageType" value="error"/> + </actionGroup> + <!-- Add to order one more quantity --> + <actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addProductToOrderAgain"> + <argument name="product" value="$simpleProduct$"/> + <argument name="productQty" value="1"/> + </actionGroup> + <!-- Check that error remains --> + <actionGroup ref="AssertAdminItemOrderedErrorActionGroup" stepKey="assertProductErrorRemains"> + <argument name="productName" value="$simpleProduct.name$"/> + <argument name="messageType" value="notice"/> + </actionGroup> + </test> +</tests> From c32d06d192e34a61eb6cfbc102ba7bcb085ab9a5 Mon Sep 17 00:00:00 2001 From: Myroslav Dobra <dmaraptor@gmail.com> Date: Thu, 27 Feb 2020 17:41:21 +0200 Subject: [PATCH 215/229] MC-25026: MFTF TASK FOR MC-6080 (MC-25681) --- .../Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml | 2 ++ .../Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml index 3d797e62c806a..847ee728d5e78 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml @@ -61,6 +61,8 @@ <requiredEntity createDataKey="createConfigProduct"/> </createData> <updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateConfigProduct" createDataKey="createConfigProduct"/> + <!-- Reindex invalidated indices after product attribute has been created/deleted --> + <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> </before> <after> <!-- @TODO: Uncomment once MQE-679 is fixed --> diff --git a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml index b96779ea63c56..501baca64318f 100644 --- a/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml +++ b/app/code/Magento/Customer/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml @@ -26,6 +26,7 @@ <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> <actionGroup ref="DeleteCustomerFromAdminActionGroup" stepKey="deleteCustomerFromAdmin"/> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/> <actionGroup ref="logout" stepKey="adminLogout"/> </after> <!-- Step 0: User signs up an account --> From 2f27cb5fbed34aa42b491f9c1bf1ead4fa4c414a Mon Sep 17 00:00:00 2001 From: Mykhailo Matiola <mykhailo.matiola@transoftgroup.com> Date: Thu, 27 Feb 2020 17:42:46 +0200 Subject: [PATCH 216/229] MC-31755: Storefront: Layered Navigation with bundle product --- .../bundle_product_checkbox_options.php | 2 +- ...undle_product_checkbox_required_option.php | 2 +- ...ndle_product_checkbox_required_options.php | 2 +- .../bundle_product_dropdown_options.php | 2 +- ...ndle_product_dropdown_required_options.php | 2 +- .../bundle_product_multiselect_options.php | 2 +- ...le_product_multiselect_required_option.php | 2 +- ...e_product_multiselect_required_options.php | 2 +- .../_files/bundle_product_radio_options.php | 2 +- .../bundle_product_radio_required_option.php | 2 +- .../bundle_product_radio_required_options.php | 2 +- ..._and_fixed_bundle_products_in_category.php | 23 ++++ ...d_bundle_products_in_category_rollback.php | 10 ++ .../Block/Navigation/AbstractFiltersTest.php | 12 +- .../Category/Bundle/MultiselectFilterTest.php | 109 ++++++++++++++++++ .../Category/Bundle/PriceFilterTest.php | 96 +++++++++++++++ .../Category/Bundle/SelectFilterTest.php | 108 +++++++++++++++++ .../Search/Bundle/PriceFilterTest.php | 55 +++++++++ 18 files changed, 423 insertions(+), 12 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Bundle/_files/dynamic_and_fixed_bundle_products_in_category.php create mode 100644 dev/tests/integration/testsuite/Magento/Bundle/_files/dynamic_and_fixed_bundle_products_in_category_rollback.php create mode 100644 dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/Bundle/MultiselectFilterTest.php create mode 100644 dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/Bundle/PriceFilterTest.php create mode 100644 dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/Bundle/SelectFilterTest.php create mode 100644 dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Search/Bundle/PriceFilterTest.php diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_checkbox_options.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_checkbox_options.php index f9636890e61f6..4b581a5cbf5d6 100644 --- a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_checkbox_options.php +++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_checkbox_options.php @@ -34,7 +34,7 @@ $bundleProduct->setTypeId(Type::TYPE_BUNDLE) ->setAttributeSetId($bundleProduct->getDefaultAttributeSetId()) ->setWebsiteIds([$baseWebsiteId]) - ->setName('Bundle Product') + ->setName('Bundle Product Checkbox Options') ->setSku('bundle-product-checkbox-options') ->setVisibility(Visibility::VISIBILITY_BOTH) ->setStatus(Status::STATUS_ENABLED) diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_checkbox_required_option.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_checkbox_required_option.php index 453b531f75b2d..1cc9ede5d71e4 100644 --- a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_checkbox_required_option.php +++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_checkbox_required_option.php @@ -33,7 +33,7 @@ $bundleProduct->setTypeId(Type::TYPE_BUNDLE) ->setAttributeSetId($bundleProduct->getDefaultAttributeSetId()) ->setWebsiteIds([$baseWebsiteId]) - ->setName('Bundle Product') + ->setName('Bundle Product Checkbox Required Option') ->setSku('bundle-product-checkbox-required-option') ->setVisibility(Visibility::VISIBILITY_BOTH) ->setStatus(Status::STATUS_ENABLED) diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_checkbox_required_options.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_checkbox_required_options.php index 9b84d1236c5c9..5bb6fe6973287 100644 --- a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_checkbox_required_options.php +++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_checkbox_required_options.php @@ -34,7 +34,7 @@ $bundleProduct->setTypeId(Type::TYPE_BUNDLE) ->setAttributeSetId($product->getDefaultAttributeSetId()) ->setWebsiteIds([$baseWebsiteId]) - ->setName('Bundle Product') + ->setName('Bundle Product Checkbox Required Options') ->setSku('bundle-product-checkbox-required-options') ->setVisibility(Visibility::VISIBILITY_BOTH) ->setStatus(Status::STATUS_ENABLED) diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_dropdown_options.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_dropdown_options.php index 06f6473802ee2..62c80abc6415f 100644 --- a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_dropdown_options.php +++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_dropdown_options.php @@ -34,7 +34,7 @@ $bundleProduct->setTypeId(Type::TYPE_BUNDLE) ->setAttributeSetId($product->getDefaultAttributeSetId()) ->setWebsiteIds([$baseWebsiteId]) - ->setName('Bundle Product') + ->setName('Bundle Product Dropdown options') ->setSku('bundle-product-dropdown-options') ->setVisibility(Visibility::VISIBILITY_BOTH) ->setStatus(Status::STATUS_ENABLED) diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_dropdown_required_options.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_dropdown_required_options.php index 1789f472f968d..4093c9ff057e7 100644 --- a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_dropdown_required_options.php +++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_dropdown_required_options.php @@ -34,7 +34,7 @@ $bundleProduct->setTypeId(Type::TYPE_BUNDLE) ->setAttributeSetId($product->getDefaultAttributeSetId()) ->setWebsiteIds([$baseWebsiteId]) - ->setName('Bundle Product') + ->setName('Bundle Product Dropdown Required options') ->setSku('bundle-product-dropdown-required-options') ->setVisibility(Visibility::VISIBILITY_BOTH) ->setStatus(Status::STATUS_ENABLED) diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_multiselect_options.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_multiselect_options.php index a5667b89f8bf4..29b7710c47040 100644 --- a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_multiselect_options.php +++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_multiselect_options.php @@ -34,7 +34,7 @@ $bundleProduct->setTypeId(Type::TYPE_BUNDLE) ->setAttributeSetId($product->getDefaultAttributeSetId()) ->setWebsiteIds([$baseWebsiteId]) - ->setName('Bundle Product') + ->setName('Bundle Product Multiselect Options') ->setSku('bundle-product-multiselect-options') ->setVisibility(Visibility::VISIBILITY_BOTH) ->setStatus(Status::STATUS_ENABLED) diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_multiselect_required_option.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_multiselect_required_option.php index 7789045f6f7ef..0cde1e65c9e54 100644 --- a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_multiselect_required_option.php +++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_multiselect_required_option.php @@ -33,7 +33,7 @@ $bundleProduct->setTypeId(Type::TYPE_BUNDLE) ->setAttributeSetId($product->getDefaultAttributeSetId()) ->setWebsiteIds([$baseWebsiteId]) - ->setName('Bundle Product') + ->setName('Bundle Product Multiselect Required Option') ->setSku('bundle-product-multiselect-required-option') ->setVisibility(Visibility::VISIBILITY_BOTH) ->setStatus(Status::STATUS_ENABLED) diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_multiselect_required_options.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_multiselect_required_options.php index 65bb49f3b6122..f18494d08215c 100644 --- a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_multiselect_required_options.php +++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_multiselect_required_options.php @@ -34,7 +34,7 @@ $bundleProduct->setTypeId(Type::TYPE_BUNDLE) ->setAttributeSetId($product->getDefaultAttributeSetId()) ->setWebsiteIds([$baseWebsiteId]) - ->setName('Bundle Product') + ->setName('Bundle Product Multiselect Required Options') ->setSku('bundle-product-multiselect-required-options') ->setVisibility(Visibility::VISIBILITY_BOTH) ->setStatus(Status::STATUS_ENABLED) diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_radio_options.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_radio_options.php index def31b48b2172..23a5713e46eb0 100644 --- a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_radio_options.php +++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_radio_options.php @@ -34,7 +34,7 @@ $bundleProduct->setTypeId(Type::TYPE_BUNDLE) ->setAttributeSetId($product->getDefaultAttributeSetId()) ->setWebsiteIds([$baseWebsiteId]) - ->setName('Bundle Product') + ->setName('Bundle Product Radio Options') ->setSku('bundle-product-radio-options') ->setVisibility(Visibility::VISIBILITY_BOTH) ->setStatus(Status::STATUS_ENABLED) diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_radio_required_option.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_radio_required_option.php index c659387e09dcc..1472986023e21 100644 --- a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_radio_required_option.php +++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_radio_required_option.php @@ -33,7 +33,7 @@ $bundleProduct->setTypeId(Type::TYPE_BUNDLE) ->setAttributeSetId($product->getDefaultAttributeSetId()) ->setWebsiteIds([$baseWebsiteId]) - ->setName('Bundle Product') + ->setName('Bundle Product Radio Required Option') ->setSku('bundle-product-radio-required-option') ->setVisibility(Visibility::VISIBILITY_BOTH) ->setStatus(Status::STATUS_ENABLED) diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_radio_required_options.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_radio_required_options.php index ec28bf556b69c..cb703902a0b7a 100644 --- a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_radio_required_options.php +++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_radio_required_options.php @@ -34,7 +34,7 @@ $bundleProduct->setTypeId(Type::TYPE_BUNDLE) ->setAttributeSetId($product->getDefaultAttributeSetId()) ->setWebsiteIds([$baseWebsiteId]) - ->setName('Bundle Product') + ->setName('Bundle Product Radio Required Options') ->setSku('bundle-product-radio-required-options') ->setVisibility(Visibility::VISIBILITY_BOTH) ->setStatus(Status::STATUS_ENABLED) diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/dynamic_and_fixed_bundle_products_in_category.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/dynamic_and_fixed_bundle_products_in_category.php new file mode 100644 index 0000000000000..9a6cae37fbe25 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/dynamic_and_fixed_bundle_products_in_category.php @@ -0,0 +1,23 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +use Magento\Catalog\Api\CategoryLinkManagementInterface; +use Magento\Catalog\Helper\DefaultCategory; + +require __DIR__ . '/product.php'; +require __DIR__ . '/bundle_product_dropdown_options.php'; +require __DIR__ . '/../../Catalog/_files/category.php'; + +/** @var CategoryLinkManagementInterface $categoryLinkManagement */ +$categoryLinkManagement = $objectManager->create(CategoryLinkManagementInterface::class); +/** @var DefaultCategory $categoryHelper */ +$categoryHelper = $objectManager->get(DefaultCategory::class); +$categoryLinkManagement->assignProductToCategories('bundle-product', [2, $category->getId()]); +$categoryLinkManagement->assignProductToCategories( + 'bundle-product-dropdown-options', + [$categoryHelper->getId(), $category->getId()] +); diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/dynamic_and_fixed_bundle_products_in_category_rollback.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/dynamic_and_fixed_bundle_products_in_category_rollback.php new file mode 100644 index 0000000000000..58eb8cacde815 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/dynamic_and_fixed_bundle_products_in_category_rollback.php @@ -0,0 +1,10 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +require __DIR__ . '/product_rollback.php'; +require __DIR__ . '/bundle_product_dropdown_options_rollback.php'; +require __DIR__ . '/../../Catalog/_files/category_rollback.php'; diff --git a/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/AbstractFiltersTest.php b/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/AbstractFiltersTest.php index cf39757cb8264..fc0c23b346fe2 100644 --- a/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/AbstractFiltersTest.php +++ b/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/AbstractFiltersTest.php @@ -140,7 +140,7 @@ protected function getSearchFiltersAndAssert( $this->updateAttribute($attributeData); $this->updateProducts($products, $this->getAttributeCode()); $this->clearInstanceAndReindexSearch(); - $this->navigationBlock->getRequest()->setParams(['q' => 'Simple Product']); + $this->navigationBlock->getRequest()->setParams(['q' => $this->getSearchString()]); $this->navigationBlock->setLayout($this->layout); $filter = $this->getFilterByCode($this->navigationBlock->getFilters(), $this->getAttributeCode()); @@ -293,4 +293,14 @@ protected function createNavigationBlockInstance(): void $this->navigationBlock = $this->objectManager->create(CategoryNavigationBlock::class); } } + + /** + * Returns search query for filters on search page. + * + * @return string + */ + protected function getSearchString(): string + { + return 'Simple Product'; + } } diff --git a/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/Bundle/MultiselectFilterTest.php b/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/Bundle/MultiselectFilterTest.php new file mode 100644 index 0000000000000..518a0a19f857f --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/Bundle/MultiselectFilterTest.php @@ -0,0 +1,109 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\LayeredNavigation\Block\Navigation\Category\Bundle; + +use Magento\Catalog\Model\Layer\Resolver; +use Magento\Framework\Module\Manager; +use Magento\LayeredNavigation\Block\Navigation\AbstractFiltersTest; +use Magento\Catalog\Model\Layer\Filter\AbstractFilter; + +/** + * Provides tests for custom multiselect filter in navigation block on category page with bundle products. + * + * @magentoAppArea frontend + * @magentoAppIsolation enabled + * @magentoDbIsolation disabled + */ +class MultiselectFilterTest extends AbstractFiltersTest +{ + /** + * @var Manager + */ + private $moduleManager; + + /** + * @inheritdoc + */ + protected function setUp() + { + parent::setUp(); + $this->moduleManager = $this->objectManager->get(Manager::class); + //This check is needed because LayeredNavigation independent of Magento_Bundle + if (!$this->moduleManager->isEnabled('Magento_Bundle')) { + $this->markTestSkipped('Magento_Bundle module disabled.'); + } + } + + /** + * @magentoDataFixture Magento/Catalog/_files/multiselect_attribute.php + * @magentoDataFixture Magento/Bundle/_files/dynamic_and_fixed_bundle_products_in_category.php + * @dataProvider getFiltersWithCustomAttributeDataProvider + * @param array $products + * @param array $attributeData + * @param array $expectation + * @return void + */ + public function testGetFiltersWithCustomAttribute(array $products, array $attributeData, array $expectation): void + { + $this->getCategoryFiltersAndAssert($products, $attributeData, $expectation, 'Category 1'); + } + + /** + * @return array + */ + public function getFiltersWithCustomAttributeDataProvider(): array + { + return [ + 'not_used_in_navigation' => [ + 'products_data' => [], + 'attribute_data' => ['is_filterable' => 0], + 'expectation' => [], + ], + 'used_in_navigation_with_results' => [ + 'products_data' => [ + 'bundle-product' => 'Option 1', + 'bundle-product-dropdown-options' => 'Option 2', + ], + 'attribute_data' => ['is_filterable' => AbstractFilter::ATTRIBUTE_OPTIONS_ONLY_WITH_RESULTS], + 'expectation' => [ + ['label' => 'Option 1', 'count' => 1], + ['label' => 'Option 2', 'count' => 1], + ], + ], + 'used_in_navigation_without_results' => [ + 'products_data' => [ + 'bundle-product' => 'Option 1', + 'bundle-product-dropdown-options' => 'Option 2', + ], + 'attribute_data' => ['is_filterable' => 2], + 'expectation' => [ + ['label' => 'Option 1', 'count' => 1], + ['label' => 'Option 2', 'count' => 1], + ['label' => 'Option 3', 'count' => 0], + ['label' => 'Option 4 "!@#$%^&*', 'count' => 0], + ], + ], + ]; + } + + /** + * @inheritdoc + */ + protected function getLayerType(): string + { + return Resolver::CATALOG_LAYER_CATEGORY; + } + + /** + * @inheritdoc + */ + protected function getAttributeCode(): string + { + return 'multiselect_attribute'; + } +} diff --git a/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/Bundle/PriceFilterTest.php b/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/Bundle/PriceFilterTest.php new file mode 100644 index 0000000000000..3817c5efc86fc --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/Bundle/PriceFilterTest.php @@ -0,0 +1,96 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\LayeredNavigation\Block\Navigation\Category\Bundle; + +use Magento\Catalog\Model\Layer\Resolver; +use Magento\Framework\Module\Manager; +use Magento\LayeredNavigation\Block\Navigation\AbstractFiltersTest; +use Magento\Catalog\Model\Layer\Filter\AbstractFilter; +use Magento\Catalog\Model\Layer\Filter\Item; + +/** + * Provides price filter tests for bundle products in navigation block on category page. + * + * @magentoAppArea frontend + * @magentoAppIsolation enabled + * @magentoDbIsolation disabled + */ +class PriceFilterTest extends AbstractFiltersTest +{ + /** + * @var Manager + */ + private $moduleManager; + + /** + * @inheritdoc + */ + protected function setUp() + { + parent::setUp(); + $this->moduleManager = $this->objectManager->get(Manager::class); + //This check is needed because LayeredNavigation independent of Magento_Bundle + if (!$this->moduleManager->isEnabled('Magento_Bundle')) { + $this->markTestSkipped('Magento_Bundle module disabled.'); + } + } + + /** + * @magentoDataFixture Magento/Bundle/_files/dynamic_and_fixed_bundle_products_in_category.php + * @magentoConfigFixture current_store catalog/layered_navigation/price_range_calculation manual + * @magentoConfigFixture current_store catalog/layered_navigation/price_range_step 10 + * @return void + */ + public function testGetFilters(): void + { + $this->getCategoryFiltersAndAssert( + ['bundle-product' => 20.00], + ['is_filterable' => '1'], + [ + ['label' => '$10.00 - $19.99', 'value' => '10-20', 'count' => 1], + ['label' => '$20.00 and above', 'value' => '20-', 'count' => 1], + ], + 'Category 1' + ); + } + + /** + * @inheritdoc + */ + protected function getLayerType(): string + { + return Resolver::CATALOG_LAYER_CATEGORY; + } + + /** + * @inheritdoc + */ + protected function getAttributeCode(): string + { + return 'price'; + } + + /** + * @inheritdoc + */ + protected function prepareFilterItems(AbstractFilter $filter): array + { + $items = []; + /** @var Item $item */ + foreach ($filter->getItems() as $item) { + $item = [ + 'label' => strip_tags(__($item->getData('label'))->render()), + 'value' => $item->getData('value'), + 'count' => $item->getData('count'), + ]; + $items[] = $item; + } + + return $items; + } +} diff --git a/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/Bundle/SelectFilterTest.php b/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/Bundle/SelectFilterTest.php new file mode 100644 index 0000000000000..7b3be2afbdbdb --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/Bundle/SelectFilterTest.php @@ -0,0 +1,108 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\LayeredNavigation\Block\Navigation\Category\Bundle; + +use Magento\Catalog\Model\Layer\Resolver; +use Magento\Framework\Module\Manager; +use Magento\LayeredNavigation\Block\Navigation\AbstractFiltersTest; +use Magento\Catalog\Model\Layer\Filter\AbstractFilter; + +/** + * Provides tests for custom select filter for bundle products in navigation block on category page. + * + * @magentoAppArea frontend + * @magentoAppIsolation enabled + * @magentoDbIsolation disabled + */ +class SelectFilterTest extends AbstractFiltersTest +{ + /** + * @var Manager + */ + private $moduleManager; + + /** + * @inheritdoc + */ + protected function setUp() + { + parent::setUp(); + $this->moduleManager = $this->objectManager->get(Manager::class); + //This check is needed because LayeredNavigation independent of Magento_Bundle + if (!$this->moduleManager->isEnabled('Magento_Bundle')) { + $this->markTestSkipped('Magento_Bundle module disabled.'); + } + } + + /** + * @magentoDataFixture Magento/Catalog/_files/product_dropdown_attribute.php + * @magentoDataFixture Magento/Bundle/_files/dynamic_and_fixed_bundle_products_in_category.php + * @dataProvider getFiltersWithCustomAttributeDataProvider + * @param array $products + * @param array $attributeData + * @param array $expectation + * @return void + */ + public function testGetFiltersWithCustomAttribute(array $products, array $attributeData, array $expectation): void + { + $this->getCategoryFiltersAndAssert($products, $attributeData, $expectation, 'Category 1'); + } + + /** + * @return array + */ + public function getFiltersWithCustomAttributeDataProvider(): array + { + return [ + 'not_used_in_navigation' => [ + 'products_data' => [], + 'attribute_data' => ['is_filterable' => 0], + 'expectation' => [], + ], + 'used_in_navigation_with_results' => [ + 'products_data' => [ + 'bundle-product' => 'Option 1', + 'bundle-product-dropdown-options' => 'Option 2', + ], + 'attribute_data' => ['is_filterable' => AbstractFilter::ATTRIBUTE_OPTIONS_ONLY_WITH_RESULTS], + 'expectation' => [ + ['label' => 'Option 1', 'count' => 1], + ['label' => 'Option 2', 'count' => 1], + ], + ], + 'used_in_navigation_without_results' => [ + 'products_data' => [ + 'bundle-product' => 'Option 1', + 'bundle-product-dropdown-options' => 'Option 2', + ], + 'attribute_data' => ['is_filterable' => 2], + 'expectation' => [ + ['label' => 'Option 1', 'count' => 1], + ['label' => 'Option 2', 'count' => 1], + ['label' => 'Option 3', 'count' => 0], + ], + ], + ]; + } + + /** + * @inheritdoc + */ + protected function getLayerType(): string + { + return Resolver::CATALOG_LAYER_CATEGORY; + } + + /** + * @inheritdoc + */ + protected function getAttributeCode(): string + { + return 'dropdown_attribute'; + } +} diff --git a/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Search/Bundle/PriceFilterTest.php b/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Search/Bundle/PriceFilterTest.php new file mode 100644 index 0000000000000..435dd29e16dfa --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Search/Bundle/PriceFilterTest.php @@ -0,0 +1,55 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +declare(strict_types=1); + +namespace Magento\LayeredNavigation\Block\Navigation\Search\Bundle; + +use Magento\Catalog\Model\Layer\Resolver; +use Magento\LayeredNavigation\Block\Navigation\Category\Bundle\PriceFilterTest as CategoryFilterTest; + +/** + * Provides price filter tests for bundle product in navigation block on search page. + * + * @magentoAppArea frontend + * @magentoAppIsolation enabled + * @magentoDbIsolation disabled + */ +class PriceFilterTest extends CategoryFilterTest +{ + /** + * @magentoDataFixture Magento/Bundle/_files/dynamic_and_fixed_bundle_products_in_category.php + * @magentoConfigFixture current_store catalog/layered_navigation/price_range_calculation manual + * @magentoConfigFixture current_store catalog/layered_navigation/price_range_step 10 + * @return void + */ + public function testGetFilters(): void + { + $this->getSearchFiltersAndAssert( + ['bundle-product' => 20.00], + ['is_filterable_in_search' => 1], + [ + ['label' => '$10.00 - $19.99', 'value' => '10-20', 'count' => 1], + ['label' => '$20.00 and above', 'value' => '20-', 'count' => 1], + ] + ); + } + + /** + * @inheritdoc + */ + protected function getLayerType(): string + { + return Resolver::CATALOG_LAYER_SEARCH; + } + + /** + * @inheritdoc + */ + protected function getSearchString(): string + { + return 'Bundle'; + } +} From b26b64ea5cc7227b464f1093b7d7d1e768e3b57d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Szubert?= <bartlomiejszubert@gmail.com> Date: Thu, 27 Feb 2020 14:37:50 +0100 Subject: [PATCH 217/229] Cleanup ObjectManager usage - Magento_Authorization --- .../Authorization/Model/Acl/Loader/Role.php | 47 ++-- .../Authorization/Model/Acl/Loader/Rule.php | 44 ++-- .../Model/ResourceModel/Rules.php | 51 ++-- .../Test/Unit/Model/Acl/Loader/RoleTest.php | 228 ++++++++++-------- .../Test/Unit/Model/Acl/Loader/RuleTest.php | 120 +++++---- .../Unit/Model/ResourceModel/RulesTest.php | 96 +++++--- 6 files changed, 330 insertions(+), 256 deletions(-) diff --git a/app/code/Magento/Authorization/Model/Acl/Loader/Role.php b/app/code/Magento/Authorization/Model/Acl/Loader/Role.php index a5f8fbd6eefec..e4b1103491230 100644 --- a/app/code/Magento/Authorization/Model/Acl/Loader/Role.php +++ b/app/code/Magento/Authorization/Model/Acl/Loader/Role.php @@ -3,14 +3,23 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Authorization\Model\Acl\Loader; use Magento\Authorization\Model\Acl\Role\Group as RoleGroup; +use Magento\Authorization\Model\Acl\Role\GroupFactory; use Magento\Authorization\Model\Acl\Role\User as RoleUser; -use Magento\Framework\App\ObjectManager; +use Magento\Authorization\Model\Acl\Role\UserFactory; +use Magento\Framework\Acl\Data\CacheInterface; +use Magento\Framework\Acl\LoaderInterface; +use Magento\Framework\App\ResourceConnection; use Magento\Framework\Serialize\Serializer\Json; -class Role implements \Magento\Framework\Acl\LoaderInterface +/** + * Acl Role Loader + */ +class Role implements LoaderInterface { /** * Cache key for ACL roles cache @@ -18,22 +27,22 @@ class Role implements \Magento\Framework\Acl\LoaderInterface const ACL_ROLES_CACHE_KEY = 'authorization_role_cached_data'; /** - * @var \Magento\Framework\App\ResourceConnection + * @var ResourceConnection */ protected $_resource; /** - * @var \Magento\Authorization\Model\Acl\Role\GroupFactory + * @var GroupFactory */ protected $_groupFactory; /** - * @var \Magento\Authorization\Model\Acl\Role\UserFactory + * @var UserFactory */ protected $_roleFactory; /** - * @var \Magento\Framework\Acl\Data\CacheInterface + * @var CacheInterface */ private $aclDataCache; @@ -48,28 +57,26 @@ class Role implements \Magento\Framework\Acl\LoaderInterface private $cacheKey; /** - * @param \Magento\Authorization\Model\Acl\Role\GroupFactory $groupFactory - * @param \Magento\Authorization\Model\Acl\Role\UserFactory $roleFactory - * @param \Magento\Framework\App\ResourceConnection $resource - * @param \Magento\Framework\Acl\Data\CacheInterface $aclDataCache + * @param GroupFactory $groupFactory + * @param UserFactory $roleFactory + * @param ResourceConnection $resource + * @param CacheInterface $aclDataCache * @param Json $serializer * @param string $cacheKey */ public function __construct( - \Magento\Authorization\Model\Acl\Role\GroupFactory $groupFactory, - \Magento\Authorization\Model\Acl\Role\UserFactory $roleFactory, - \Magento\Framework\App\ResourceConnection $resource, - \Magento\Framework\Acl\Data\CacheInterface $aclDataCache = null, - Json $serializer = null, + GroupFactory $groupFactory, + UserFactory $roleFactory, + ResourceConnection $resource, + CacheInterface $aclDataCache, + Json $serializer, $cacheKey = self::ACL_ROLES_CACHE_KEY ) { - $this->_resource = $resource; $this->_groupFactory = $groupFactory; $this->_roleFactory = $roleFactory; - $this->aclDataCache = $aclDataCache ?: ObjectManager::getInstance()->get( - \Magento\Framework\Acl\Data\CacheInterface::class - ); - $this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class); + $this->_resource = $resource; + $this->aclDataCache = $aclDataCache; + $this->serializer = $serializer; $this->cacheKey = $cacheKey; } diff --git a/app/code/Magento/Authorization/Model/Acl/Loader/Rule.php b/app/code/Magento/Authorization/Model/Acl/Loader/Rule.php index 57bdcdbb3d9b8..b8fd974c5da6c 100644 --- a/app/code/Magento/Authorization/Model/Acl/Loader/Rule.php +++ b/app/code/Magento/Authorization/Model/Acl/Loader/Rule.php @@ -3,12 +3,20 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Authorization\Model\Acl\Loader; -use Magento\Framework\App\ObjectManager; +use Magento\Framework\Acl\Data\CacheInterface; +use Magento\Framework\Acl\LoaderInterface; +use Magento\Framework\Acl\RootResource; +use Magento\Framework\App\ResourceConnection; use Magento\Framework\Serialize\Serializer\Json; -class Rule implements \Magento\Framework\Acl\LoaderInterface +/** + * Acl Rule Loader + */ +class Rule implements LoaderInterface { /** * Rules array cache key @@ -16,17 +24,17 @@ class Rule implements \Magento\Framework\Acl\LoaderInterface const ACL_RULE_CACHE_KEY = 'authorization_rule_cached_data'; /** - * @var \Magento\Framework\App\ResourceConnection + * @var ResourceConnection */ protected $_resource; /** - * @var \Magento\Framework\Acl\RootResource + * @var RootResource */ private $_rootResource; /** - * @var \Magento\Framework\Acl\Data\CacheInterface + * @var CacheInterface */ private $aclDataCache; @@ -41,28 +49,26 @@ class Rule implements \Magento\Framework\Acl\LoaderInterface private $cacheKey; /** - * @param \Magento\Framework\Acl\RootResource $rootResource - * @param \Magento\Framework\App\ResourceConnection $resource - * @param array $data - * @param \Magento\Framework\Acl\Data\CacheInterface $aclDataCache + * @param RootResource $rootResource + * @param ResourceConnection $resource + * @param CacheInterface $aclDataCache * @param Json $serializer + * @param array $data * @param string $cacheKey * @SuppressWarnings(PHPMD.UnusedFormalParameter): */ public function __construct( - \Magento\Framework\Acl\RootResource $rootResource, - \Magento\Framework\App\ResourceConnection $resource, + RootResource $rootResource, + ResourceConnection $resource, + CacheInterface $aclDataCache, + Json $serializer, array $data = [], - \Magento\Framework\Acl\Data\CacheInterface $aclDataCache = null, - Json $serializer = null, $cacheKey = self::ACL_RULE_CACHE_KEY ) { - $this->_resource = $resource; $this->_rootResource = $rootResource; - $this->aclDataCache = $aclDataCache ?: ObjectManager::getInstance()->get( - \Magento\Framework\Acl\Data\CacheInterface::class - ); - $this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class); + $this->_resource = $resource; + $this->aclDataCache = $aclDataCache; + $this->serializer = $serializer; $this->cacheKey = $cacheKey; } @@ -104,7 +110,7 @@ private function getRulesArray() return $this->serializer->unserialize($rulesCachedData); } - $ruleTable = $this->_resource->getTableName("authorization_rule"); + $ruleTable = $this->_resource->getTableName('authorization_rule'); $connection = $this->_resource->getConnection(); $select = $connection->select() ->from(['r' => $ruleTable]); diff --git a/app/code/Magento/Authorization/Model/ResourceModel/Rules.php b/app/code/Magento/Authorization/Model/ResourceModel/Rules.php index 5e4ae77731a0f..46470d885650b 100644 --- a/app/code/Magento/Authorization/Model/ResourceModel/Rules.php +++ b/app/code/Magento/Authorization/Model/ResourceModel/Rules.php @@ -6,58 +6,63 @@ namespace Magento\Authorization\Model\ResourceModel; -use Magento\Framework\App\ObjectManager; +use Magento\Backend\App\AbstractAction; +use Magento\Framework\Acl\Builder; +use Magento\Framework\Acl\Data\CacheInterface; +use Magento\Framework\Acl\RootResource; +use Magento\Framework\Exception\LocalizedException; +use Magento\Framework\Model\ResourceModel\Db\AbstractDb; +use Magento\Framework\Model\ResourceModel\Db\Context; +use Psr\Log\LoggerInterface; /** * Admin rule resource model */ -class Rules extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb +class Rules extends AbstractDb { /** * Root ACL resource * - * @var \Magento\Framework\Acl\RootResource + * @var RootResource */ protected $_rootResource; /** - * @var \Magento\Framework\Acl\Builder + * @var Builder */ protected $_aclBuilder; /** - * @var \Psr\Log\LoggerInterface + * @var LoggerInterface */ protected $_logger; /** - * @var \Magento\Framework\Acl\Data\CacheInterface + * @var CacheInterface */ private $aclDataCache; /** - * @param \Magento\Framework\Model\ResourceModel\Db\Context $context - * @param \Magento\Framework\Acl\Builder $aclBuilder - * @param \Psr\Log\LoggerInterface $logger - * @param \Magento\Framework\Acl\RootResource $rootResource + * @param Context $context + * @param Builder $aclBuilder + * @param LoggerInterface $logger + * @param RootResource $rootResource + * @param CacheInterface $aclDataCache * @param string $connectionName - * @param \Magento\Framework\Acl\Data\CacheInterface $aclDataCache */ public function __construct( - \Magento\Framework\Model\ResourceModel\Db\Context $context, - \Magento\Framework\Acl\Builder $aclBuilder, - \Psr\Log\LoggerInterface $logger, - \Magento\Framework\Acl\RootResource $rootResource, - $connectionName = null, - \Magento\Framework\Acl\Data\CacheInterface $aclDataCache = null + Context $context, + Builder $aclBuilder, + LoggerInterface $logger, + RootResource $rootResource, + CacheInterface $aclDataCache, + $connectionName = null ) { $this->_aclBuilder = $aclBuilder; parent::__construct($context, $connectionName); $this->_rootResource = $rootResource; $this->_logger = $logger; - $this->aclDataCache = $aclDataCache ?: ObjectManager::getInstance()->get( - \Magento\Framework\Acl\Data\CacheInterface::class - ); + $this->aclDataCache = $aclDataCache; } /** @@ -75,7 +80,7 @@ protected function _construct() * * @param \Magento\Authorization\Model\Rules $rule * @return void - * @throws \Magento\Framework\Exception\LocalizedException + * @throws LocalizedException */ public function saveRel(\Magento\Authorization\Model\Rules $rule) { @@ -107,7 +112,7 @@ public function saveRel(\Magento\Authorization\Model\Rules $rule) $connection->insert($this->getMainTable(), $insertData); } else { /** Give basic admin permissions to any admin */ - $postedResources[] = \Magento\Backend\App\AbstractAction::ADMIN_RESOURCE; + $postedResources[] = AbstractAction::ADMIN_RESOURCE; $acl = $this->_aclBuilder->getAcl(); /** @var $resource \Magento\Framework\Acl\AclResource */ foreach ($acl->getResources() as $resourceId) { @@ -125,7 +130,7 @@ public function saveRel(\Magento\Authorization\Model\Rules $rule) $connection->commit(); $this->aclDataCache->clean(); - } catch (\Magento\Framework\Exception\LocalizedException $e) { + } catch (LocalizedException $e) { $connection->rollBack(); throw $e; } catch (\Exception $e) { diff --git a/app/code/Magento/Authorization/Test/Unit/Model/Acl/Loader/RoleTest.php b/app/code/Magento/Authorization/Test/Unit/Model/Acl/Loader/RoleTest.php index a5ae7f8e86a6e..e1841b895dd07 100644 --- a/app/code/Magento/Authorization/Test/Unit/Model/Acl/Loader/RoleTest.php +++ b/app/code/Magento/Authorization/Test/Unit/Model/Acl/Loader/RoleTest.php @@ -3,199 +3,221 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Authorization\Test\Unit\Model\Acl\Loader; -class RoleTest extends \PHPUnit\Framework\TestCase -{ - /** - * @var \Magento\Authorization\Model\Acl\Loader\Role - */ - protected $_model; +use Magento\Authorization\Model\Acl\Loader\Role; +use Magento\Authorization\Model\Acl\Role\GroupFactory; +use Magento\Authorization\Model\Acl\Role\UserFactory; +use Magento\Framework\Acl; +use Magento\Framework\Acl\Data\CacheInterface; +use Magento\Framework\App\ResourceConnection; +use Magento\Framework\DB\Adapter\Pdo\Mysql; +use Magento\Framework\DB\Select; +use Magento\Framework\Serialize\Serializer\Json; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; +/** + * Test class for \Magento\Authorization\Model\Acl\Loader\Role + */ +class RoleTest extends TestCase +{ /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var Role */ - protected $_resourceMock; + private $model; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var GroupFactory|MockObject */ - protected $_adapterMock; + private $groupFactoryMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var UserFactory|MockObject */ - protected $_roleFactoryMock; + private $roleFactoryMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var ResourceConnection|MockObject */ - protected $_groupFactoryMock; + private $resourceMock; /** - * @var \Magento\Framework\Acl\Data\CacheInterface|\PHPUnit_Framework_MockObject_MockObject + * @var CacheInterface|MockObject */ private $aclDataCacheMock; /** - * @var \Magento\Framework\Serialize\Serializer\Json|\PHPUnit_Framework_MockObject_MockObject + * @var Json|MockObject */ private $serializerMock; /** - * @var \Magento\Framework\DB\Select|\PHPUnit_Framework_MockObject_MockObject + * @var Select|MockObject */ private $selectMock; + /** + * @var Mysql|MockObject + */ + private $adapterMock; + + /** + * @inheritDoc + */ protected function setUp() { - $this->_resourceMock = $this->createMock(\Magento\Framework\App\ResourceConnection::class); - $this->_groupFactoryMock = $this->getMockBuilder(\Magento\Authorization\Model\Acl\Role\GroupFactory::class) + $this->groupFactoryMock = $this->getMockBuilder(GroupFactory::class) ->setMethods(['create', 'getModelInstance']) ->disableOriginalConstructor() ->getMock(); - $this->_roleFactoryMock = $this->getMockBuilder(\Magento\Authorization\Model\Acl\Role\UserFactory::class) + $this->roleFactoryMock = $this->getMockBuilder(UserFactory::class) ->setMethods(['create', 'getModelInstance']) ->disableOriginalConstructor() ->getMock(); - - $this->selectMock = $this->createMock(\Magento\Framework\DB\Select::class); - $this->selectMock->expects($this->any()) - ->method('from') - ->will($this->returnValue($this->selectMock)); - - $this->_adapterMock = $this->createMock(\Magento\Framework\DB\Adapter\Pdo\Mysql::class); - + $this->resourceMock = $this->createMock(ResourceConnection::class); + $this->aclDataCacheMock = $this->createMock(CacheInterface::class); $this->serializerMock = $this->createPartialMock( - \Magento\Framework\Serialize\Serializer\Json::class, + Json::class, ['serialize', 'unserialize'] ); - $this->serializerMock->expects($this->any()) - ->method('serialize') - ->will( - $this->returnCallback( - function ($value) { - return json_encode($value); - } - ) - ); - $this->serializerMock->expects($this->any()) - ->method('unserialize') - ->will( - $this->returnCallback( - function ($value) { - return json_decode($value, true); - } - ) + $this->serializerMock->method('serialize') + ->willReturnCallback( + static function ($value) { + return json_encode($value); + } ); - $this->aclDataCacheMock = $this->createMock(\Magento\Framework\Acl\Data\CacheInterface::class); + $this->serializerMock->method('unserialize') + ->willReturnCallback( + static function ($value) { + return json_decode($value, true); + } + ); - $this->_model = new \Magento\Authorization\Model\Acl\Loader\Role( - $this->_groupFactoryMock, - $this->_roleFactoryMock, - $this->_resourceMock, - $this->aclDataCacheMock, - $this->serializerMock + $this->selectMock = $this->createMock(Select::class); + $this->selectMock->method('from') + ->willReturn($this->selectMock); + + $this->adapterMock = $this->createMock(Mysql::class); + + $objectManager = new ObjectManager($this); + $this->model = $objectManager->getObject( + Role::class, + [ + 'groupFactory' => $this->groupFactoryMock, + 'roleFactory' => $this->roleFactoryMock, + 'resource' => $this->resourceMock, + 'aclDataCache' => $this->aclDataCacheMock, + 'serializer' => $this->serializerMock + ] ); } + /** + * Test populating acl roles with children + */ public function testPopulateAclAddsRolesAndTheirChildren() { - $this->_resourceMock->expects($this->once()) + $this->resourceMock->expects($this->once()) ->method('getTableName') ->with($this->equalTo('authorization_role')) - ->will($this->returnArgument(1)); + ->willReturnArgument(1); - $this->_adapterMock->expects($this->once()) + $this->adapterMock->expects($this->once()) ->method('select') - ->will($this->returnValue($this->selectMock)); + ->willReturn($this->selectMock); - $this->_resourceMock->expects($this->once()) + $this->resourceMock->expects($this->once()) ->method('getConnection') - ->will($this->returnValue($this->_adapterMock)); + ->willReturn($this->adapterMock); - $this->_adapterMock->expects($this->once()) + $this->adapterMock->expects($this->once()) ->method('fetchAll') - ->will( - $this->returnValue( - [ - ['role_id' => 1, 'role_type' => 'G', 'parent_id' => null], - ['role_id' => 2, 'role_type' => 'U', 'parent_id' => 1, 'user_id' => 1], - ] - ) + ->willReturn( + [ + ['role_id' => 1, 'role_type' => 'G', 'parent_id' => null], + ['role_id' => 2, 'role_type' => 'U', 'parent_id' => 1, 'user_id' => 1], + ] ); - $this->_groupFactoryMock->expects($this->once())->method('create')->with(['roleId' => '1']); - $this->_roleFactoryMock->expects($this->once())->method('create')->with(['roleId' => '2']); + $this->groupFactoryMock->expects($this->once())->method('create')->with(['roleId' => '1']); + $this->roleFactoryMock->expects($this->once())->method('create')->with(['roleId' => '2']); - $aclMock = $this->createMock(\Magento\Framework\Acl::class); + $aclMock = $this->createMock(Acl::class); $aclMock->expects($this->at(0))->method('addRole')->with($this->anything(), null); $aclMock->expects($this->at(2))->method('addRole')->with($this->anything(), '1'); - $this->_model->populateAcl($aclMock); + $this->model->populateAcl($aclMock); } + /** + * Test populating acl role with multiple parents + */ public function testPopulateAclAddsMultipleParents() { - $this->_resourceMock->expects($this->once()) + $this->resourceMock->expects($this->once()) ->method('getTableName') ->with($this->equalTo('authorization_role')) - ->will($this->returnArgument(1)); + ->willReturnArgument(1); - $this->_adapterMock->expects($this->once()) + $this->adapterMock->expects($this->once()) ->method('select') - ->will($this->returnValue($this->selectMock)); + ->willReturn($this->selectMock); - $this->_resourceMock->expects($this->once()) + $this->resourceMock->expects($this->once()) ->method('getConnection') - ->will($this->returnValue($this->_adapterMock)); + ->willReturn($this->adapterMock); - $this->_adapterMock->expects($this->once()) + $this->adapterMock->expects($this->once()) ->method('fetchAll') - ->will($this->returnValue([['role_id' => 1, 'role_type' => 'U', 'parent_id' => 2, 'user_id' => 3]])); + ->willReturn([['role_id' => 1, 'role_type' => 'U', 'parent_id' => 2, 'user_id' => 3]]); - $this->_roleFactoryMock->expects($this->never())->method('getModelInstance'); - $this->_groupFactoryMock->expects($this->never())->method('getModelInstance'); + $this->roleFactoryMock->expects($this->never())->method('getModelInstance'); + $this->groupFactoryMock->expects($this->never())->method('getModelInstance'); - $aclMock = $this->createMock(\Magento\Framework\Acl::class); - $aclMock->expects($this->at(0))->method('hasRole')->with('1')->will($this->returnValue(true)); + $aclMock = $this->createMock(Acl::class); + $aclMock->expects($this->at(0))->method('hasRole')->with('1')->willReturn(true); $aclMock->expects($this->at(1))->method('addRoleParent')->with('1', '2'); - $this->_model->populateAcl($aclMock); + $this->model->populateAcl($aclMock); } + /** + * Test populating acl role from cache + */ public function testPopulateAclFromCache() { - $this->_resourceMock->expects($this->never())->method('getConnection'); - $this->_resourceMock->expects($this->never())->method('getTableName'); - $this->_adapterMock->expects($this->never())->method('fetchAll'); + $this->resourceMock->expects($this->never())->method('getConnection'); + $this->resourceMock->expects($this->never())->method('getTableName'); + $this->adapterMock->expects($this->never())->method('fetchAll'); $this->aclDataCacheMock->expects($this->once()) ->method('load') - ->with(\Magento\Authorization\Model\Acl\Loader\Role::ACL_ROLES_CACHE_KEY) - ->will( - $this->returnValue( - json_encode( + ->with(Role::ACL_ROLES_CACHE_KEY) + ->willReturn( + json_encode( + [ [ - [ - 'role_id' => 1, - 'role_type' => 'U', - 'parent_id' => 2, - 'user_id' => 3 - ] + 'role_id' => 1, + 'role_type' => 'U', + 'parent_id' => 2, + 'user_id' => 3 ] - ) + ] ) ); - $this->_roleFactoryMock->expects($this->never())->method('getModelInstance'); - $this->_groupFactoryMock->expects($this->never())->method('getModelInstance'); + $this->roleFactoryMock->expects($this->never())->method('getModelInstance'); + $this->groupFactoryMock->expects($this->never())->method('getModelInstance'); - $aclMock = $this->createMock(\Magento\Framework\Acl::class); - $aclMock->expects($this->at(0))->method('hasRole')->with('1')->will($this->returnValue(true)); + $aclMock = $this->createMock(Acl::class); + $aclMock->expects($this->at(0))->method('hasRole')->with('1')->willReturn(true); $aclMock->expects($this->at(1))->method('addRoleParent')->with('1', '2'); - $this->_model->populateAcl($aclMock); + $this->model->populateAcl($aclMock); } } diff --git a/app/code/Magento/Authorization/Test/Unit/Model/Acl/Loader/RuleTest.php b/app/code/Magento/Authorization/Test/Unit/Model/Acl/Loader/RuleTest.php index 51801e1842eff..c7a9b80c6597c 100644 --- a/app/code/Magento/Authorization/Test/Unit/Model/Acl/Loader/RuleTest.php +++ b/app/code/Magento/Authorization/Test/Unit/Model/Acl/Loader/RuleTest.php @@ -3,105 +3,121 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Authorization\Test\Unit\Model\Acl\Loader; -class RuleTest extends \PHPUnit\Framework\TestCase +use Magento\Authorization\Model\Acl\Loader\Rule; +use Magento\Framework\Acl; +use Magento\Framework\Acl\Data\CacheInterface; +use Magento\Framework\Acl\RootResource; +use Magento\Framework\App\ResourceConnection; +use Magento\Framework\Serialize\Serializer\Json; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; + +/** + * Test class for \Magento\Authorization\Model\Acl\Loader\Rule + */ +class RuleTest extends TestCase { /** - * @var \Magento\Authorization\Model\Acl\Loader\Rule + * @var Rule */ - protected $_model; + private $model; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var RootResource */ - protected $_resourceMock; + private $rootResource; /** - * @var \Magento\Framework\Acl\RootResource + * @var ResourceConnection|MockObject */ - protected $_rootResourceMock; + private $resourceMock; /** - * @var \Magento\Framework\Acl\Data\CacheInterface|\PHPUnit_Framework_MockObject_MockObject + * @var CacheInterface|MockObject */ private $aclDataCacheMock; /** - * @var \Magento\Framework\Serialize\Serializer\Json|\PHPUnit_Framework_MockObject_MockObject + * @var Json|MockObject */ private $serializerMock; + /** + * @inheritDoc + */ protected function setUp() { - $this->_resourceMock = $this->createPartialMock( - \Magento\Framework\App\ResourceConnection::class, + $this->rootResource = new RootResource('Magento_Backend::all'); + $this->resourceMock = $this->createPartialMock( + ResourceConnection::class, ['getTable', 'getConnection'] ); + $this->aclDataCacheMock = $this->createMock(CacheInterface::class); $this->serializerMock = $this->createPartialMock( - \Magento\Framework\Serialize\Serializer\Json::class, + Json::class, ['serialize', 'unserialize'] ); - $this->serializerMock->expects($this->any()) - ->method('serialize') - ->will( - $this->returnCallback( - function ($value) { - return json_encode($value); - } - ) - ); - $this->serializerMock->expects($this->any()) - ->method('unserialize') - ->will( - $this->returnCallback( - function ($value) { - return json_decode($value, true); - } - ) + $this->serializerMock->method('serialize') + ->willReturnCallback( + static function ($value) { + return json_encode($value); + } ); - $this->aclDataCacheMock = $this->createMock(\Magento\Framework\Acl\Data\CacheInterface::class); + $this->serializerMock->method('unserialize') + ->willReturnCallback( + static function ($value) { + return json_decode($value, true); + } + ); - $this->_rootResourceMock = new \Magento\Framework\Acl\RootResource('Magento_Backend::all'); - $this->_model = new \Magento\Authorization\Model\Acl\Loader\Rule( - $this->_rootResourceMock, - $this->_resourceMock, - [], - $this->aclDataCacheMock, - $this->serializerMock + $objectManager = new ObjectManager($this); + $this->model = $objectManager->getObject( + Rule::class, + [ + 'rootResource' => $this->rootResource, + 'resource' => $this->resourceMock, + 'aclDataCache' => $this->aclDataCacheMock, + 'serializer' => $this->serializerMock + ] ); } + /** + * Test populating acl rule from cache + */ public function testPopulateAclFromCache() { - $this->_resourceMock->expects($this->never())->method('getTable'); - $this->_resourceMock->expects($this->never()) + $this->resourceMock->expects($this->never())->method('getTable'); + $this->resourceMock->expects($this->never()) ->method('getConnection'); $this->aclDataCacheMock->expects($this->once()) ->method('load') - ->with(\Magento\Authorization\Model\Acl\Loader\Rule::ACL_RULE_CACHE_KEY) - ->will( - $this->returnValue( - json_encode( - [ - ['role_id' => 1, 'resource_id' => 'Magento_Backend::all', 'permission' => 'allow'], - ['role_id' => 2, 'resource_id' => 1, 'permission' => 'allow'], - ['role_id' => 3, 'resource_id' => 1, 'permission' => 'deny'], - ] - ) + ->with(Rule::ACL_RULE_CACHE_KEY) + ->willReturn( + json_encode( + [ + ['role_id' => 1, 'resource_id' => 'Magento_Backend::all', 'permission' => 'allow'], + ['role_id' => 2, 'resource_id' => 1, 'permission' => 'allow'], + ['role_id' => 3, 'resource_id' => 1, 'permission' => 'deny'], + ] ) ); - $aclMock = $this->createMock(\Magento\Framework\Acl::class); - $aclMock->expects($this->any())->method('has')->will($this->returnValue(true)); + $aclMock = $this->createMock(Acl::class); + $aclMock->method('has')->willReturn(true); $aclMock->expects($this->at(1))->method('allow')->with('1', null, null); $aclMock->expects($this->at(2))->method('allow')->with('1', 'Magento_Backend::all', null); $aclMock->expects($this->at(4))->method('allow')->with('2', 1, null); $aclMock->expects($this->at(6))->method('deny')->with('3', 1, null); - $this->_model->populateAcl($aclMock); + $this->model->populateAcl($aclMock); } } diff --git a/app/code/Magento/Authorization/Test/Unit/Model/ResourceModel/RulesTest.php b/app/code/Magento/Authorization/Test/Unit/Model/ResourceModel/RulesTest.php index 260691608537e..36cd789042f43 100644 --- a/app/code/Magento/Authorization/Test/Unit/Model/ResourceModel/RulesTest.php +++ b/app/code/Magento/Authorization/Test/Unit/Model/ResourceModel/RulesTest.php @@ -3,9 +3,23 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Authorization\Test\Unit\Model\ResourceModel; +use Magento\Authorization\Model\ResourceModel\Rules; +use Magento\Framework\Acl\Builder; +use Magento\Framework\Acl\Data\CacheInterface; +use Magento\Framework\Acl\RootResource; +use Magento\Framework\App\ResourceConnection; +use Magento\Framework\DB\Adapter\AdapterInterface; +use Magento\Framework\Model\ResourceModel\Db\Context; +use Magento\Framework\Phrase; +use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\TestCase; +use Psr\Log\LoggerInterface; + /** * Unit test for Rules resource model. * @@ -14,7 +28,7 @@ * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class RulesTest extends \PHPUnit\Framework\TestCase +class RulesTest extends TestCase { /** * Test constants @@ -22,121 +36,125 @@ class RulesTest extends \PHPUnit\Framework\TestCase const TEST_ROLE_ID = 13; /** - * @var \Magento\Authorization\Model\ResourceModel\Rules + * @var Rules */ private $model; /** - * @var \Magento\Framework\Model\ResourceModel\Db\Context|\PHPUnit_Framework_MockObject_MockObject + * @var Context|MockObject */ private $contextMock; /** - * @var \Magento\Framework\Acl\Builder|\PHPUnit_Framework_MockObject_MockObject + * @var Builder|MockObject */ private $aclBuilderMock; /** - * @var \Psr\Log\LoggerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var LoggerInterface|MockObject */ private $loggerMock; /** - * @var \Magento\Framework\Acl\RootResource|\PHPUnit_Framework_MockObject_MockObject + * @var RootResource|MockObject */ private $rootResourceMock; /** - * @var \Magento\Framework\Acl\Data\CacheInterface|\PHPUnit_Framework_MockObject_MockObject + * @var CacheInterface|MockObject */ private $aclDataCacheMock; /** - * @var \Magento\Framework\App\ResourceConnection|\PHPUnit_Framework_MockObject_MockObject + * @var ResourceConnection|MockObject */ private $resourceConnectionMock; /** - * @var \Magento\Framework\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject + * @var AdapterInterface|MockObject */ private $connectionMock; /** - * @var \Magento\Authorization\Model\Rules|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Authorization\Model\Rules|MockObject */ private $ruleMock; + /** + * @inheritDoc + */ protected function setUp() { - $this->contextMock = $this->getMockBuilder(\Magento\Framework\Model\ResourceModel\Db\Context::class) + $this->contextMock = $this->getMockBuilder(Context::class) ->disableOriginalConstructor() ->setMethods(['getResources']) ->getMock(); - $this->resourceConnectionMock = $this->getMockBuilder(\Magento\Framework\App\ResourceConnection::class) + $this->resourceConnectionMock = $this->getMockBuilder(ResourceConnection::class) ->disableOriginalConstructor() ->setMethods(['getConnection', 'getTableName']) ->getMock(); $this->contextMock->expects($this->once()) ->method('getResources') - ->will($this->returnValue($this->resourceConnectionMock)); + ->willReturn($this->resourceConnectionMock); - $this->connectionMock = $this->getMockBuilder(\Magento\Framework\DB\Adapter\AdapterInterface::class) + $this->connectionMock = $this->getMockBuilder(AdapterInterface::class) ->disableOriginalConstructor() ->setMethods([]) ->getMock(); $this->resourceConnectionMock->expects($this->once()) ->method('getConnection') - ->with('connection') - ->will($this->returnValue($this->connectionMock)); + ->with('default') + ->willReturn($this->connectionMock); - $this->resourceConnectionMock->expects($this->any()) - ->method('getTableName') - ->with('authorization_rule', 'connection') + $this->resourceConnectionMock->method('getTableName') + ->with('authorization_rule', 'default') ->will($this->returnArgument(0)); - $this->aclBuilderMock = $this->getMockBuilder(\Magento\Framework\Acl\Builder::class) + $this->aclBuilderMock = $this->getMockBuilder(Builder::class) ->disableOriginalConstructor() ->setMethods(['getConfigCache']) ->getMock(); - $this->loggerMock = $this->getMockBuilder(\Psr\Log\LoggerInterface::class) + $this->loggerMock = $this->getMockBuilder(LoggerInterface::class) ->disableOriginalConstructor() ->setMethods([]) ->getMock(); - $this->rootResourceMock = $this->getMockBuilder(\Magento\Framework\Acl\RootResource::class) + $this->rootResourceMock = $this->getMockBuilder(RootResource::class) ->disableOriginalConstructor() ->setMethods([]) ->getMock(); - $this->aclDataCacheMock = $this->getMockBuilder(\Magento\Framework\Acl\Data\CacheInterface::class) + $this->aclDataCacheMock = $this->getMockBuilder(CacheInterface::class) ->disableOriginalConstructor() ->setMethods([]) ->getMock(); - $this->aclBuilderMock->expects($this->any()) - ->method('getConfigCache') - ->will($this->returnValue($this->aclDataCacheMock)); + $this->aclBuilderMock->method('getConfigCache') + ->willReturn($this->aclDataCacheMock); $this->ruleMock = $this->getMockBuilder(\Magento\Authorization\Model\Rules::class) ->disableOriginalConstructor() ->setMethods(['getRoleId']) ->getMock(); - $this->ruleMock->expects($this->any()) - ->method('getRoleId') - ->will($this->returnValue(self::TEST_ROLE_ID)); - - $this->model = new \Magento\Authorization\Model\ResourceModel\Rules( - $this->contextMock, - $this->aclBuilderMock, - $this->loggerMock, - $this->rootResourceMock, - 'connection', - $this->aclDataCacheMock + $this->ruleMock->method('getRoleId') + ->willReturn(self::TEST_ROLE_ID); + + $objectManager = new ObjectManager($this); + $this->model = $objectManager->getObject( + Rules::class, + [ + 'context' => $this->contextMock, + 'aclBuilder' => $this->aclBuilderMock, + 'logger' => $this->loggerMock, + 'rootResource' => $this->rootResourceMock, + 'aclDataCache' => $this->aclDataCacheMock, + 'default' + ] ); } @@ -167,12 +185,12 @@ public function testSaveRelNoResources() */ public function testLocalizedExceptionOccurance() { - $exceptionPhrase = $this->getMockBuilder(\Magento\Framework\Phrase::class) + $exceptionPhrase = $this->getMockBuilder(Phrase::class) ->disableOriginalConstructor() ->setMethods(['render']) ->getMock(); - $exceptionPhrase->expects($this->any())->method('render')->will($this->returnValue('TestException')); + $exceptionPhrase->method('render')->willReturn('TestException'); $exception = new \Magento\Framework\Exception\LocalizedException($exceptionPhrase); From 90ae94f8fce2b667344d9c5987108266075b1c9e Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Thu, 27 Feb 2020 11:51:20 -0600 Subject: [PATCH 218/229] updated composer.lock --- composer.lock | 1141 ++++++++++++++++++++++++++----------------------- 1 file changed, 599 insertions(+), 542 deletions(-) diff --git a/composer.lock b/composer.lock index 6ac7f36cd2e32..0de674e8fcb52 100644 --- a/composer.lock +++ b/composer.lock @@ -1,11 +1,95 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "f06887dfc3e06489a251fbb5c18d30ca", + "content-hash": "377ee095909eb010d59c41360ce505bf", "packages": [ + { + "name": "aws/aws-sdk-php", + "version": "3.133.23", + "source": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-php.git", + "reference": "fd4a74aff537a4f6a7e9ed7efb14693ae5f3013a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/fd4a74aff537a4f6a7e9ed7efb14693ae5f3013a", + "reference": "fd4a74aff537a4f6a7e9ed7efb14693ae5f3013a", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^5.3.3|^6.2.1|^7.0", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4.1", + "mtdowling/jmespath.php": "^2.5", + "php": ">=5.5" + }, + "require-dev": { + "andrewsville/php-token-reflection": "^1.4", + "aws/aws-php-sns-message-validator": "~1.0", + "behat/behat": "~3.0", + "doctrine/cache": "~1.4", + "ext-dom": "*", + "ext-openssl": "*", + "ext-pcntl": "*", + "ext-sockets": "*", + "nette/neon": "^2.3", + "phpunit/phpunit": "^4.8.35|^5.4.3", + "psr/cache": "^1.0", + "psr/simple-cache": "^1.0", + "sebastian/comparator": "^1.2.3" + }, + "suggest": { + "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", + "doctrine/cache": "To use the DoctrineCacheAdapter", + "ext-curl": "To send requests using cURL", + "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", + "ext-sockets": "To use client-side monitoring" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Aws\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Amazon Web Services", + "homepage": "http://aws.amazon.com" + } + ], + "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", + "homepage": "http://aws.amazon.com/sdkforphp", + "keywords": [ + "amazon", + "aws", + "cloud", + "dynamodb", + "ec2", + "glacier", + "s3", + "sdk" + ], + "time": "2020-02-26T19:11:26+00:00" + }, { "name": "braintree/braintree_php", "version": "3.35.0", @@ -257,16 +341,16 @@ }, { "name": "composer/composer", - "version": "1.9.2", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb" + "reference": "1291a16ce3f48bfdeca39d64fca4875098af4d7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb", - "reference": "7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb", + "url": "https://api.github.com/repos/composer/composer/zipball/1291a16ce3f48bfdeca39d64fca4875098af4d7b", + "reference": "1291a16ce3f48bfdeca39d64fca4875098af4d7b", "shasum": "" }, "require": { @@ -333,7 +417,7 @@ "dependency", "package" ], - "time": "2020-01-14T15:30:32+00:00" + "time": "2020-02-04T11:58:49+00:00" }, { "name": "composer/semver", @@ -398,16 +482,16 @@ }, { "name": "composer/spdx-licenses", - "version": "1.5.2", + "version": "1.5.3", "source": { "type": "git", "url": "https://github.com/composer/spdx-licenses.git", - "reference": "7ac1e6aec371357df067f8a688c3d6974df68fa5" + "reference": "0c3e51e1880ca149682332770e25977c70cf9dae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/7ac1e6aec371357df067f8a688c3d6974df68fa5", - "reference": "7ac1e6aec371357df067f8a688c3d6974df68fa5", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/0c3e51e1880ca149682332770e25977c70cf9dae", + "reference": "0c3e51e1880ca149682332770e25977c70cf9dae", "shasum": "" }, "require": { @@ -454,7 +538,7 @@ "spdx", "validator" ], - "time": "2019-07-29T10:31:59+00:00" + "time": "2020-02-14T07:44:31+00:00" }, { "name": "composer/xdebug-handler", @@ -950,6 +1034,178 @@ ], "time": "2019-09-25T14:49:45+00:00" }, + { + "name": "league/flysystem", + "version": "1.0.64", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "d13c43dbd4b791f815215959105a008515d1a2e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/d13c43dbd4b791f815215959105a008515d1a2e0", + "reference": "d13c43dbd4b791f815215959105a008515d1a2e0", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7.26" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "time": "2020-02-05T18:14:17+00:00" + }, + { + "name": "league/flysystem-aws-s3-v3", + "version": "1.0.24", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", + "reference": "4382036bde5dc926f9b8b337e5bdb15e5ec7b570" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/4382036bde5dc926f9b8b337e5bdb15e5ec7b570", + "reference": "4382036bde5dc926f9b8b337e5bdb15e5ec7b570", + "shasum": "" + }, + "require": { + "aws/aws-sdk-php": "^3.0.0", + "league/flysystem": "^1.0.40", + "php": ">=5.5.0" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "~1.0.1", + "phpspec/phpspec": "^2.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\AwsS3v3\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Flysystem adapter for the AWS S3 SDK v3.x", + "time": "2020-02-23T13:31:58+00:00" + }, + { + "name": "league/flysystem-azure-blob-storage", + "version": "0.1.6", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-azure-blob-storage.git", + "reference": "97215345f3c42679299ba556a4d16d4847ee7f6d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-azure-blob-storage/zipball/97215345f3c42679299ba556a4d16d4847ee7f6d", + "reference": "97215345f3c42679299ba556a4d16d4847ee7f6d", + "shasum": "" + }, + "require": { + "guzzlehttp/psr7": "^1.5", + "league/flysystem": "^1.0", + "microsoft/azure-storage-blob": "^1.1", + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\AzureBlobStorage\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "time": "2019-06-07T20:42:16+00:00" + }, { "name": "magento/composer", "version": "1.6.x-dev", @@ -1112,6 +1368,94 @@ ], "time": "2019-11-26T15:09:40+00:00" }, + { + "name": "microsoft/azure-storage-blob", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/Azure/azure-storage-blob-php.git", + "reference": "6a333cd28a3742c3e99e79042dc6510f9f917919" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Azure/azure-storage-blob-php/zipball/6a333cd28a3742c3e99e79042dc6510f9f917919", + "reference": "6a333cd28a3742c3e99e79042dc6510f9f917919", + "shasum": "" + }, + "require": { + "microsoft/azure-storage-common": "~1.4", + "php": ">=5.6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "MicrosoftAzure\\Storage\\Blob\\": "src/Blob" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Azure Storage PHP Client Library", + "email": "dmsh@microsoft.com" + } + ], + "description": "This project provides a set of PHP client libraries that make it easy to access Microsoft Azure Storage Blob APIs.", + "keywords": [ + "azure", + "blob", + "php", + "sdk", + "storage" + ], + "time": "2020-01-02T07:18:59+00:00" + }, + { + "name": "microsoft/azure-storage-common", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/Azure/azure-storage-common-php.git", + "reference": "be4df800761d0d0fa91a9460c7f42517197d57a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Azure/azure-storage-common-php/zipball/be4df800761d0d0fa91a9460c7f42517197d57a0", + "reference": "be4df800761d0d0fa91a9460c7f42517197d57a0", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "~6.0", + "php": ">=5.6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "MicrosoftAzure\\Storage\\Common\\": "src/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Azure Storage PHP Client Library", + "email": "dmsh@microsoft.com" + } + ], + "description": "This project provides a set of common code shared by Azure Storage Blob, Table, Queue and File PHP client libraries.", + "keywords": [ + "azure", + "common", + "php", + "sdk", + "storage" + ], + "time": "2020-01-02T07:15:54+00:00" + }, { "name": "monolog/monolog", "version": "1.25.3", @@ -1190,6 +1534,63 @@ ], "time": "2019-12-20T14:15:16+00:00" }, + { + "name": "mtdowling/jmespath.php", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "52168cb9472de06979613d365c7f1ab8798be895" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/52168cb9472de06979613d365c7f1ab8798be895", + "reference": "52168cb9472de06979613d365c7f1ab8798be895", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "symfony/polyfill-mbstring": "^1.4" + }, + "require-dev": { + "composer/xdebug-handler": "^1.2", + "phpunit/phpunit": "^4.8.36|^7.5.15" + }, + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-4": { + "JmesPath\\": "src/" + }, + "files": [ + "src/JmesPath.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "time": "2019-12-30T18:03:34+00:00" + }, { "name": "paragonie/random_compat", "version": "v9.99.99", @@ -1515,16 +1916,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "2.0.23", + "version": "2.0.25", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "c78eb5058d5bb1a183133c36d4ba5b6675dfa099" + "reference": "c18159618ed7cd7ff721ac1a8fec7860a475d2f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c78eb5058d5bb1a183133c36d4ba5b6675dfa099", - "reference": "c78eb5058d5bb1a183133c36d4ba5b6675dfa099", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c18159618ed7cd7ff721ac1a8fec7860a475d2f0", + "reference": "c18159618ed7cd7ff721ac1a8fec7860a475d2f0", "shasum": "" }, "require": { @@ -1603,7 +2004,7 @@ "x.509", "x509" ], - "time": "2019-09-17T03:41:22+00:00" + "time": "2020-02-25T04:16:50+00:00" }, { "name": "psr/container", @@ -1970,16 +2371,16 @@ }, { "name": "seld/phar-utils", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "84715761c35808076b00908a20317a3a8a67d17e" + "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/84715761c35808076b00908a20317a3a8a67d17e", - "reference": "84715761c35808076b00908a20317a3a8a67d17e", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8800503d56b9867d43d9c303b9cbcc26016e82f0", + "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0", "shasum": "" }, "require": { @@ -2008,22 +2409,22 @@ ], "description": "PHAR file format utilities, for when PHP phars you up", "keywords": [ - "phra" + "phar" ], - "time": "2020-01-13T10:41:09+00:00" + "time": "2020-02-14T15:25:33+00:00" }, { "name": "symfony/console", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f" + "reference": "f512001679f37e6a042b51897ed24a2f05eba656" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f", - "reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f", + "url": "https://api.github.com/repos/symfony/console/zipball/f512001679f37e6a042b51897ed24a2f05eba656", + "reference": "f512001679f37e6a042b51897ed24a2f05eba656", "shasum": "" }, "require": { @@ -2086,11 +2487,11 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2020-01-10T21:54:01+00:00" + "time": "2020-01-25T12:44:29+00:00" }, { "name": "symfony/css-selector", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -2143,7 +2544,7 @@ }, { "name": "symfony/event-dispatcher", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -2271,7 +2672,7 @@ }, { "name": "symfony/filesystem", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -2321,7 +2722,7 @@ }, { "name": "symfony/finder", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -2370,16 +2771,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", "shasum": "" }, "require": { @@ -2391,7 +2792,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -2424,20 +2825,20 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", "shasum": "" }, "require": { @@ -2449,7 +2850,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -2483,20 +2884,20 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f" + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/5e66a0fa1070bf46bec4bea7962d285108edd675", + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675", "shasum": "" }, "require": { @@ -2505,7 +2906,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -2541,11 +2942,11 @@ "portable", "shim" ], - "time": "2019-11-27T16:25:15+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/process", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -5098,16 +5499,16 @@ }, { "name": "allure-framework/allure-php-api", - "version": "1.1.6", + "version": "1.1.7", "source": { "type": "git", "url": "https://github.com/allure-framework/allure-php-commons.git", - "reference": "2c62a70d60eca190253a6b80e9aa4c2ebc2e6e7f" + "reference": "243c9a2259b60c1b7a9d298d4fb3fc72b4f64c18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/allure-framework/allure-php-commons/zipball/2c62a70d60eca190253a6b80e9aa4c2ebc2e6e7f", - "reference": "2c62a70d60eca190253a6b80e9aa4c2ebc2e6e7f", + "url": "https://api.github.com/repos/allure-framework/allure-php-commons/zipball/243c9a2259b60c1b7a9d298d4fb3fc72b4f64c18", + "reference": "243c9a2259b60c1b7a9d298d4fb3fc72b4f64c18", "shasum": "" }, "require": { @@ -5147,7 +5548,7 @@ "php", "report" ], - "time": "2020-01-09T10:26:09+00:00" + "time": "2020-02-05T16:43:19+00:00" }, { "name": "allure-framework/allure-phpunit", @@ -5199,102 +5600,18 @@ ], "time": "2017-11-03T13:08:21+00:00" }, - { - "name": "aws/aws-sdk-php", - "version": "3.133.8", - "source": { - "type": "git", - "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "c564fcccd5fc7b5e8514d1cbe35558be1e3a11cd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c564fcccd5fc7b5e8514d1cbe35558be1e3a11cd", - "reference": "c564fcccd5fc7b5e8514d1cbe35558be1e3a11cd", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-pcre": "*", - "ext-simplexml": "*", - "guzzlehttp/guzzle": "^5.3.3|^6.2.1|^7.0", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4.1", - "mtdowling/jmespath.php": "^2.5", - "php": ">=5.5" - }, - "require-dev": { - "andrewsville/php-token-reflection": "^1.4", - "aws/aws-php-sns-message-validator": "~1.0", - "behat/behat": "~3.0", - "doctrine/cache": "~1.4", - "ext-dom": "*", - "ext-openssl": "*", - "ext-pcntl": "*", - "ext-sockets": "*", - "nette/neon": "^2.3", - "phpunit/phpunit": "^4.8.35|^5.4.3", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", - "sebastian/comparator": "^1.2.3" - }, - "suggest": { - "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", - "doctrine/cache": "To use the DoctrineCacheAdapter", - "ext-curl": "To send requests using cURL", - "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", - "ext-sockets": "To use client-side monitoring" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "Aws\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Amazon Web Services", - "homepage": "http://aws.amazon.com" - } - ], - "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", - "homepage": "http://aws.amazon.com/sdkforphp", - "keywords": [ - "amazon", - "aws", - "cloud", - "dynamodb", - "ec2", - "glacier", - "s3", - "sdk" - ], - "time": "2020-02-05T19:12:47+00:00" - }, { "name": "behat/gherkin", - "version": "v4.6.0", + "version": "v4.6.1", "source": { "type": "git", "url": "https://github.com/Behat/Gherkin.git", - "reference": "ab0a02ea14893860bca00f225f5621d351a3ad07" + "reference": "25bdcaf37898b4a939fa3031d5d753ced97e4759" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/ab0a02ea14893860bca00f225f5621d351a3ad07", - "reference": "ab0a02ea14893860bca00f225f5621d351a3ad07", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/25bdcaf37898b4a939fa3031d5d753ced97e4759", + "reference": "25bdcaf37898b4a939fa3031d5d753ced97e4759", "shasum": "" }, "require": { @@ -5340,7 +5657,7 @@ "gherkin", "parser" ], - "time": "2019-01-16T14:22:17+00:00" + "time": "2020-02-27T11:29:57+00:00" }, { "name": "cache/cache", @@ -5604,80 +5921,43 @@ }, { "name": "consolidation/annotated-command", - "version": "2.12.0", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "512a2e54c98f3af377589de76c43b24652bcb789" + "reference": "33e472d3cceb0f22a527d13ccfa3f76c4d21c178" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/512a2e54c98f3af377589de76c43b24652bcb789", - "reference": "512a2e54c98f3af377589de76c43b24652bcb789", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/33e472d3cceb0f22a527d13ccfa3f76c4d21c178", + "reference": "33e472d3cceb0f22a527d13ccfa3f76c4d21c178", "shasum": "" }, "require": { - "consolidation/output-formatters": "^3.4", - "php": ">=5.4.5", - "psr/log": "^1", - "symfony/console": "^2.8|^3|^4", - "symfony/event-dispatcher": "^2.5|^3|^4", - "symfony/finder": "^2.5|^3|^4" + "consolidation/output-formatters": "^4.1", + "php": ">=7.1.3", + "psr/log": "^1|^2", + "symfony/console": "^4|^5", + "symfony/event-dispatcher": "^4|^5", + "symfony/finder": "^4|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", "php-coveralls/php-coveralls": "^1", "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "^2.7" + "squizlabs/php_codesniffer": "^3" }, "type": "library", "extra": { "scenarios": { "symfony4": { "require": { - "symfony/console": "^4.0" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - }, - "scenario-options": { - "create-lockfile": "false" - } - }, - "phpunit4": { - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } + "symfony/console": "^4.0" } } }, "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -5696,7 +5976,7 @@ } ], "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2019-03-08T16:55:03+00:00" + "time": "2020-02-07T03:35:30+00:00" }, { "name": "consolidation/config", @@ -5781,74 +6061,33 @@ }, { "name": "consolidation/log", - "version": "1.1.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/consolidation/log.git", - "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a" + "reference": "446f804476db4f73957fa4bcb66ab2facf5397ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/log/zipball/b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", - "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", + "url": "https://api.github.com/repos/consolidation/log/zipball/446f804476db4f73957fa4bcb66ab2facf5397ff", + "reference": "446f804476db4f73957fa4bcb66ab2facf5397ff", "shasum": "" }, "require": { "php": ">=5.4.5", "psr/log": "^1.0", - "symfony/console": "^2.8|^3|^4" + "symfony/console": "^4|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", "php-coveralls/php-coveralls": "^1", "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "^2" + "squizlabs/php_codesniffer": "^3" }, "type": "library", "extra": { - "scenarios": { - "symfony4": { - "require": { - "symfony/console": "^4.0" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - } - }, - "phpunit4": { - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - } - } - }, "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -5867,34 +6106,35 @@ } ], "description": "Improved Psr-3 / Psr\\Log logger based on Symfony Console components.", - "time": "2019-01-01T17:30:51+00:00" + "time": "2020-02-07T01:22:27+00:00" }, { "name": "consolidation/output-formatters", - "version": "3.5.0", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/consolidation/output-formatters.git", - "reference": "99ec998ffb697e0eada5aacf81feebfb13023605" + "reference": "eae721c3a916707c40d4390efbf48d4c799709cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/99ec998ffb697e0eada5aacf81feebfb13023605", - "reference": "99ec998ffb697e0eada5aacf81feebfb13023605", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/eae721c3a916707c40d4390efbf48d4c799709cc", + "reference": "eae721c3a916707c40d4390efbf48d4c799709cc", "shasum": "" }, "require": { "dflydev/dot-access-data": "^1.1.0", - "php": ">=5.4.0", - "symfony/console": "^2.8|^3|^4", - "symfony/finder": "^2.5|^3|^4" + "php": ">=7.1.3", + "symfony/console": "^4|^5", + "symfony/finder": "^4|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", "php-coveralls/php-coveralls": "^1", - "phpunit/phpunit": "^5.7.27", - "squizlabs/php_codesniffer": "^2.7", - "symfony/var-dumper": "^2.8|^3|^4", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^3", + "symfony/var-dumper": "^4", + "symfony/yaml": "^4", "victorjonsson/markdowndocs": "^1.3" }, "suggest": { @@ -5906,50 +6146,11 @@ "symfony4": { "require": { "symfony/console": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^6" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - }, - "symfony3": { - "require": { - "symfony/console": "^3.4", - "symfony/finder": "^3.4", - "symfony/var-dumper": "^3.4" - }, - "config": { - "platform": { - "php": "5.6.32" - } - } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - }, - "scenario-options": { - "create-lockfile": "false" } } }, "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -5968,30 +6169,30 @@ } ], "description": "Format text by applying transformations provided by plug-in formatters.", - "time": "2019-05-30T23:16:01+00:00" + "time": "2020-02-07T03:22:30+00:00" }, { "name": "consolidation/robo", - "version": "1.4.11", + "version": "1.4.12", "source": { "type": "git", "url": "https://github.com/consolidation/Robo.git", - "reference": "5fa1d901776a628167a325baa9db95d8edf13a80" + "reference": "eb45606f498b3426b9a98b7c85e300666a968e51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/Robo/zipball/5fa1d901776a628167a325baa9db95d8edf13a80", - "reference": "5fa1d901776a628167a325baa9db95d8edf13a80", + "url": "https://api.github.com/repos/consolidation/Robo/zipball/eb45606f498b3426b9a98b7c85e300666a968e51", + "reference": "eb45606f498b3426b9a98b7c85e300666a968e51", "shasum": "" }, "require": { - "consolidation/annotated-command": "^2.11.0", - "consolidation/config": "^1.2", - "consolidation/log": "~1", - "consolidation/output-formatters": "^3.1.13", - "consolidation/self-update": "^1", - "grasmash/yaml-expander": "^1.3", - "league/container": "^2.2", + "consolidation/annotated-command": "^2.11.0|^4.1", + "consolidation/config": "^1.2.1", + "consolidation/log": "^1.1.1|^2", + "consolidation/output-formatters": "^3.1.13|^4.1", + "consolidation/self-update": "^1.1.5", + "grasmash/yaml-expander": "^1.4", + "league/container": "^2.4.1", "php": ">=5.5.0", "symfony/console": "^2.8|^3|^4", "symfony/event-dispatcher": "^2.5|^3|^4", @@ -6003,20 +6204,13 @@ "codegyre/robo": "< 1.0" }, "require-dev": { - "codeception/aspect-mock": "^1|^2.1.1", - "codeception/base": "^2.3.7", - "codeception/verify": "^0.3.2", "g1a/composer-test-scenarios": "^3", - "goaop/framework": "~2.1.2", - "goaop/parser-reflection": "^1.1.0", "natxet/cssmin": "3.0.4", - "nikic/php-parser": "^3.1.5", - "patchwork/jsqueeze": "~2", + "patchwork/jsqueeze": "^2", "pear/archive_tar": "^1.4.4", "php-coveralls/php-coveralls": "^1", - "phpunit/php-code-coverage": "~2|~4", - "sebastian/comparator": "^1.2.4", - "squizlabs/php_codesniffer": "^2.8" + "phpunit/phpunit": "^5.7.27", + "squizlabs/php_codesniffer": "^3" }, "suggest": { "henrikbjorn/lurker": "For monitoring filesystem changes in taskWatch", @@ -6044,8 +6238,11 @@ "require": { "symfony/console": "^2.8" }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, "remove": [ - "goaop/framework" + "php-coveralls/php-coveralls" ], "config": { "platform": { @@ -6058,7 +6255,7 @@ } }, "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -6077,7 +6274,7 @@ } ], "description": "Modern task runner", - "time": "2019-10-29T15:50:02+00:00" + "time": "2020-02-18T17:31:26+00:00" }, { "name": "consolidation/self-update", @@ -7042,16 +7239,16 @@ }, { "name": "jms/serializer", - "version": "1.14.0", + "version": "1.14.1", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "ee96d57024af9a7716d56fcbe3aa94b3d030f3ca" + "reference": "ba908d278fff27ec01fb4349f372634ffcd697c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/ee96d57024af9a7716d56fcbe3aa94b3d030f3ca", - "reference": "ee96d57024af9a7716d56fcbe3aa94b3d030f3ca", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/ba908d278fff27ec01fb4349f372634ffcd697c0", + "reference": "ba908d278fff27ec01fb4349f372634ffcd697c0", "shasum": "" }, "require": { @@ -7104,13 +7301,13 @@ "MIT" ], "authors": [ - { - "name": "Asmir Mustafic", - "email": "goetas@gmail.com" - }, { "name": "Johannes M. Schmitt", "email": "schmittjoh@gmail.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" } ], "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", @@ -7122,7 +7319,7 @@ "serialization", "xml" ], - "time": "2019-04-17T08:12:16+00:00" + "time": "2020-02-22T20:59:37+00:00" }, { "name": "league/container", @@ -7189,90 +7386,6 @@ ], "time": "2017-05-10T09:20:27+00:00" }, - { - "name": "league/flysystem", - "version": "1.0.63", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8132daec326565036bc8e8d1876f77ec183a7bd6", - "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6", - "shasum": "" - }, - "require": { - "ext-fileinfo": "*", - "php": ">=5.5.9" - }, - "conflict": { - "league/flysystem-sftp": "<1.0.6" - }, - "require-dev": { - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.10" - }, - "suggest": { - "ext-fileinfo": "Required for MimeType", - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Flysystem\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Filesystem abstraction: Many filesystems, one API.", - "keywords": [ - "Cloud Files", - "WebDAV", - "abstraction", - "aws", - "cloud", - "copy.com", - "dropbox", - "file systems", - "files", - "filesystem", - "filesystems", - "ftp", - "rackspace", - "remote", - "s3", - "sftp", - "storage" - ], - "time": "2020-01-04T16:30:31+00:00" - }, { "name": "lusitanian/oauth", "version": "v0.8.11", @@ -7510,63 +7623,6 @@ "homepage": "http://vfs.bovigo.org/", "time": "2019-10-30T15:31:00+00:00" }, - { - "name": "mtdowling/jmespath.php", - "version": "2.5.0", - "source": { - "type": "git", - "url": "https://github.com/jmespath/jmespath.php.git", - "reference": "52168cb9472de06979613d365c7f1ab8798be895" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/52168cb9472de06979613d365c7f1ab8798be895", - "reference": "52168cb9472de06979613d365c7f1ab8798be895", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "symfony/polyfill-mbstring": "^1.4" - }, - "require-dev": { - "composer/xdebug-handler": "^1.2", - "phpunit/phpunit": "^4.8.36|^7.5.15" - }, - "bin": [ - "bin/jp.php" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-4": { - "JmesPath\\": "src/" - }, - "files": [ - "src/JmesPath.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Declaratively specify how to extract elements from a JSON document", - "keywords": [ - "json", - "jsonpath" - ], - "time": "2019-12-30T18:03:34+00:00" - }, { "name": "mustache/mustache", "version": "v2.13.0", @@ -7856,16 +7912,16 @@ }, { "name": "php-webdriver/webdriver", - "version": "1.8.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/php-webdriver/php-webdriver.git", - "reference": "3e33ee3b8a688d719c55acdd7c6788e3006e1d3e" + "reference": "262ea0d209c292e0330be1041424887bbbffef04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/3e33ee3b8a688d719c55acdd7c6788e3006e1d3e", - "reference": "3e33ee3b8a688d719c55acdd7c6788e3006e1d3e", + "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/262ea0d209c292e0330be1041424887bbbffef04", + "reference": "262ea0d209c292e0330be1041424887bbbffef04", "shasum": "" }, "require": { @@ -7897,12 +7953,12 @@ } }, "autoload": { - "files": [ - "lib/Exception/TimeoutException.php" - ], "psr-4": { "Facebook\\WebDriver\\": "lib/" - } + }, + "files": [ + "lib/Exception/TimeoutException.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -7917,7 +7973,7 @@ "selenium", "webdriver" ], - "time": "2020-02-10T15:04:25+00:00" + "time": "2020-02-17T08:14:38+00:00" }, { "name": "phpcollection/phpcollection", @@ -8079,41 +8135,38 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -8124,10 +8177,14 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-12-28T18:55:12+00:00" + "time": "2020-02-22T12:28:44+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -8364,16 +8421,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.7", + "version": "0.12.11", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "07fa7958027fd98c567099bbcda5d6a0f2ec5197" + "reference": "ca5f2b7cf81c6d8fba74f9576970399c5817e03b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/07fa7958027fd98c567099bbcda5d6a0f2ec5197", - "reference": "07fa7958027fd98c567099bbcda5d6a0f2ec5197", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ca5f2b7cf81c6d8fba74f9576970399c5817e03b", + "reference": "ca5f2b7cf81c6d8fba74f9576970399c5817e03b", "shasum": "" }, "require": { @@ -8399,7 +8456,7 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2020-01-20T21:59:06+00:00" + "time": "2020-02-16T14:00:29+00:00" }, { "name": "phpunit/php-code-coverage", @@ -9593,7 +9650,7 @@ }, { "name": "symfony/browser-kit", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", @@ -9652,7 +9709,7 @@ }, { "name": "symfony/config", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/config.git", @@ -9716,16 +9773,16 @@ }, { "name": "symfony/dependency-injection", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "6faf589e1f6af78692aed3ab6b3c336c58d5d83c" + "reference": "ec60a7d12f5e8ab0f99456adce724717d9c1784a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6faf589e1f6af78692aed3ab6b3c336c58d5d83c", - "reference": "6faf589e1f6af78692aed3ab6b3c336c58d5d83c", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/ec60a7d12f5e8ab0f99456adce724717d9c1784a", + "reference": "ec60a7d12f5e8ab0f99456adce724717d9c1784a", "shasum": "" }, "require": { @@ -9785,11 +9842,11 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2020-01-21T07:39:36+00:00" + "time": "2020-01-31T09:49:27+00:00" }, { "name": "symfony/dom-crawler", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", @@ -9850,16 +9907,16 @@ }, { "name": "symfony/http-foundation", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "c33998709f3fe9b8e27e0277535b07fbf6fde37a" + "reference": "491a20dfa87e0b3990170593bc2de0bb34d828a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/c33998709f3fe9b8e27e0277535b07fbf6fde37a", - "reference": "c33998709f3fe9b8e27e0277535b07fbf6fde37a", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/491a20dfa87e0b3990170593bc2de0bb34d828a5", + "reference": "491a20dfa87e0b3990170593bc2de0bb34d828a5", "shasum": "" }, "require": { @@ -9901,11 +9958,11 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2020-01-04T13:00:46+00:00" + "time": "2020-01-31T09:11:17+00:00" }, { "name": "symfony/mime", - "version": "v5.0.3", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", @@ -9967,7 +10024,7 @@ }, { "name": "symfony/options-resolver", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", @@ -10021,22 +10078,22 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46" + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6f9c239e61e1b0c9229a28ff89a812dc449c3d46", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6842f1a39cf7d580655688069a03dd7cd83d244a", + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a", "shasum": "" }, "require": { "php": ">=5.3.3", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.9" + "symfony/polyfill-php72": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -10044,7 +10101,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -10079,20 +10136,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-17T12:01:36+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "af23c7bb26a73b850840823662dda371484926c4" + "reference": "419c4940024c30ccc033650373a1fe13890d3255" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/af23c7bb26a73b850840823662dda371484926c4", - "reference": "af23c7bb26a73b850840823662dda371484926c4", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/419c4940024c30ccc033650373a1fe13890d3255", + "reference": "419c4940024c30ccc033650373a1fe13890d3255", "shasum": "" }, "require": { @@ -10102,7 +10159,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -10138,20 +10195,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038" + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", "shasum": "" }, "require": { @@ -10160,7 +10217,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -10193,11 +10250,11 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/stopwatch", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", @@ -10247,7 +10304,7 @@ }, { "name": "symfony/yaml", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", @@ -10437,16 +10494,16 @@ }, { "name": "webmozart/assert", - "version": "1.6.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", "shasum": "" }, "require": { @@ -10481,7 +10538,7 @@ "check", "validate" ], - "time": "2019-11-24T13:36:37+00:00" + "time": "2020-02-14T12:15:55+00:00" }, { "name": "weew/helpers-array", From e99f36fb759d5ad1e46ceaef00a61607ea1c74c8 Mon Sep 17 00:00:00 2001 From: Oleh Usik <o.usik@atwix.com> Date: Thu, 27 Feb 2020 20:18:37 +0200 Subject: [PATCH 219/229] Removed redundant method _beforeToHtml --- .../Newsletter/Block/Adminhtml/Subscriber.php | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php index 4d5165db68736..47a049844e448 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php @@ -11,13 +11,16 @@ */ namespace Magento\Newsletter\Block\Adminhtml; +use Magento\Backend\Block\Template; +use Magento\Backend\Block\Template\Context; use Magento\Newsletter\Model\ResourceModel\Queue\Collection; +use Magento\Newsletter\Model\ResourceModel\Queue\CollectionFactory; /** * @api * @since 100.0.2 */ -class Subscriber extends \Magento\Backend\Block\Template +class Subscriber extends Template { /** * Queue collection @@ -32,34 +35,24 @@ class Subscriber extends \Magento\Backend\Block\Template protected $_template = 'Magento_Newsletter::subscriber/list.phtml'; /** - * @var \Magento\Newsletter\Model\ResourceModel\Queue\CollectionFactory + * @var CollectionFactory */ protected $_collectionFactory; /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Newsletter\Model\ResourceModel\Queue\CollectionFactory $collectionFactory + * @param Context $context + * @param CollectionFactory $collectionFactory * @param array $data */ public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Newsletter\Model\ResourceModel\Queue\CollectionFactory $collectionFactory, + Context $context, + CollectionFactory $collectionFactory, array $data = [] ) { $this->_collectionFactory = $collectionFactory; parent::__construct($context, $data); } - /** - * Prepares block to render - * - * @return $this - */ - protected function _beforeToHtml() - { - return parent::_beforeToHtml(); - } - /** * Return queue collection with loaded neversent queues * @@ -68,7 +61,7 @@ protected function _beforeToHtml() public function getQueueCollection() { if ($this->_queueCollection === null) { - /** @var $this->_queueCollection \Magento\Newsletter\Model\ResourceModel\Queue\Collection */ + /** @var $this->_queueCollection Collection */ $this->_queueCollection = $this ->_collectionFactory ->create() From bfe4693034d637524d3e0fdba96e573c7790b5e9 Mon Sep 17 00:00:00 2001 From: Oleh Usik <o.usik@atwix.com> Date: Thu, 27 Feb 2020 20:52:31 +0200 Subject: [PATCH 220/229] Fixed codestyle issue --- app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php index 47a049844e448..d05657c727192 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php @@ -17,6 +17,8 @@ use Magento\Newsletter\Model\ResourceModel\Queue\CollectionFactory; /** + * Newsletter Subscriber block + * * @api * @since 100.0.2 */ From f8da9f14d88e2ee750ad46eda58171f13bc7a064 Mon Sep 17 00:00:00 2001 From: Alex Kolesnyk <kolesnyk@adobe.com> Date: Thu, 27 Feb 2020 14:53:57 -0600 Subject: [PATCH 221/229] MQE-2008: Filter test generation and execution by severity --- composer.json | 2 +- composer.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 9c42a05a457c5..db34b0a9c2fd0 100644 --- a/composer.json +++ b/composer.json @@ -88,7 +88,7 @@ "friendsofphp/php-cs-fixer": "~2.14.0", "lusitanian/oauth": "~0.8.10", "magento/magento-coding-standard": "*", - "magento/magento2-functional-testing-framework": "2.6.2", + "magento/magento2-functional-testing-framework": "~2.6.3", "pdepend/pdepend": "2.5.2", "phpcompatibility/php-compatibility": "^9.3", "phpmd/phpmd": "@stable", diff --git a/composer.lock b/composer.lock index 6ac7f36cd2e32..144614ba2279d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f06887dfc3e06489a251fbb5c18d30ca", + "content-hash": "d9bed7b45c83f9133bdec76acac8b796", "packages": [ { "name": "braintree/braintree_php", @@ -7381,16 +7381,16 @@ }, { "name": "magento/magento2-functional-testing-framework", - "version": "2.6.2", + "version": "2.6.3", "source": { "type": "git", "url": "https://github.com/magento/magento2-functional-testing-framework.git", - "reference": "8b332582751a830b3a6eafe1b09ac3b403e9a20e" + "reference": "f1d9f9ede3fea875427f5d1b012561da1dca6206" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/8b332582751a830b3a6eafe1b09ac3b403e9a20e", - "reference": "8b332582751a830b3a6eafe1b09ac3b403e9a20e", + "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/f1d9f9ede3fea875427f5d1b012561da1dca6206", + "reference": "f1d9f9ede3fea875427f5d1b012561da1dca6206", "shasum": "" }, "require": { @@ -7462,7 +7462,7 @@ "magento", "testing" ], - "time": "2020-02-13T21:29:32+00:00" + "time": "2020-02-27T19:56:31+00:00" }, { "name": "mikey179/vfsstream", From 6167b0cf306689cae3f2309e65ab9653e1e69252 Mon Sep 17 00:00:00 2001 From: Slava Mankivski <mankivsk@adobe.com> Date: Thu, 27 Feb 2020 16:11:39 -0600 Subject: [PATCH 222/229] MC-31985: [Functional Test Failed]: Functional Tests were failing because of changes to Modal - reverted https://github.com/magento/magento2/pull/25349 - reverted https://github.com/magento/partners-magento2b2b/pull/49 --- .../Ui/view/base/web/js/modal/modal.js | 2 +- .../Ui/view/base/web/js/modal/prompt.js | 21 ++++++++----------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/modal.js b/app/code/Magento/Ui/view/base/web/js/modal/modal.js index 2e797a09d225f..f5c284165d8d2 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/modal.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/modal.js @@ -308,7 +308,7 @@ define([ * Close modal. * * @return {Element} - current element. */ - closeModal: function (event, result) {//eslint-disable-line no-unused-vars + closeModal: function () { var that = this; this._removeKeyListener(); diff --git a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js index d5a8654249612..13b4d55ea2787 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/prompt.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/prompt.js @@ -51,8 +51,8 @@ define([ /** * Click handler. */ - click: function (event) { - this.closeModal(event); + click: function () { + this.closeModal(); } }, { text: $.mage.__('OK'), @@ -61,8 +61,8 @@ define([ /** * Click handler. */ - click: function (event) { - this.closeModal(event, true); + click: function () { + this.closeModal(true); } }] }, @@ -75,7 +75,7 @@ define([ this.options.validation = this.options.validation && this.options.validationRules.length; this._super(); this.modal.find(this.options.modalContent).append(this.getFormTemplate()); - this.modal.find(this.options.modalCloseBtn).off().on('click', _.bind(this.closeModal, this)); + this.modal.find(this.options.modalCloseBtn).off().on('click', _.bind(this.closeModal, this, false)); if (this.options.validation) { this.setValidationClasses(); @@ -152,23 +152,21 @@ define([ /** * Close modal window */ - closeModal: function (event, result) { + closeModal: function (result) { var value; - result = result || false; - if (result) { if (this.options.validation && !this.validate()) { return false; } value = this.modal.find(this.options.promptField).val(); - this.options.actions.confirm.call(event, value); + this.options.actions.confirm.call(this, value); } else { - this.options.actions.cancel.call(event, result); + this.options.actions.cancel.call(this, result); } - this.options.actions.always(event); + this.options.actions.always(); this.element.bind('promptclosed', _.bind(this._remove, this)); return this._super(); @@ -179,4 +177,3 @@ define([ return $('<div class="prompt-message"></div>').html(config.content).prompt(config); }; }); - From 87deab083771925b122304ea01a558a11ddb1223 Mon Sep 17 00:00:00 2001 From: Anton Kaplia <akaplya@adobe.com> Date: Thu, 27 Feb 2020 19:17:53 -0600 Subject: [PATCH 223/229] updated composer.lock --- composer.lock | 1141 ++++++++++++++++++++++++++----------------------- 1 file changed, 599 insertions(+), 542 deletions(-) diff --git a/composer.lock b/composer.lock index 144614ba2279d..1236d2b0ae82f 100644 --- a/composer.lock +++ b/composer.lock @@ -1,11 +1,95 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "d9bed7b45c83f9133bdec76acac8b796", + "content-hash": "522d676db5baf5864a824409c54948fc", "packages": [ + { + "name": "aws/aws-sdk-php", + "version": "3.133.24", + "source": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-php.git", + "reference": "726426e1514be5220d55ecf02eb1f938a3b4a105" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/726426e1514be5220d55ecf02eb1f938a3b4a105", + "reference": "726426e1514be5220d55ecf02eb1f938a3b4a105", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^5.3.3|^6.2.1|^7.0", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4.1", + "mtdowling/jmespath.php": "^2.5", + "php": ">=5.5" + }, + "require-dev": { + "andrewsville/php-token-reflection": "^1.4", + "aws/aws-php-sns-message-validator": "~1.0", + "behat/behat": "~3.0", + "doctrine/cache": "~1.4", + "ext-dom": "*", + "ext-openssl": "*", + "ext-pcntl": "*", + "ext-sockets": "*", + "nette/neon": "^2.3", + "phpunit/phpunit": "^4.8.35|^5.4.3", + "psr/cache": "^1.0", + "psr/simple-cache": "^1.0", + "sebastian/comparator": "^1.2.3" + }, + "suggest": { + "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", + "doctrine/cache": "To use the DoctrineCacheAdapter", + "ext-curl": "To send requests using cURL", + "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", + "ext-sockets": "To use client-side monitoring" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Aws\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Amazon Web Services", + "homepage": "http://aws.amazon.com" + } + ], + "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", + "homepage": "http://aws.amazon.com/sdkforphp", + "keywords": [ + "amazon", + "aws", + "cloud", + "dynamodb", + "ec2", + "glacier", + "s3", + "sdk" + ], + "time": "2020-02-27T19:13:45+00:00" + }, { "name": "braintree/braintree_php", "version": "3.35.0", @@ -257,16 +341,16 @@ }, { "name": "composer/composer", - "version": "1.9.2", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb" + "reference": "1291a16ce3f48bfdeca39d64fca4875098af4d7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb", - "reference": "7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb", + "url": "https://api.github.com/repos/composer/composer/zipball/1291a16ce3f48bfdeca39d64fca4875098af4d7b", + "reference": "1291a16ce3f48bfdeca39d64fca4875098af4d7b", "shasum": "" }, "require": { @@ -333,7 +417,7 @@ "dependency", "package" ], - "time": "2020-01-14T15:30:32+00:00" + "time": "2020-02-04T11:58:49+00:00" }, { "name": "composer/semver", @@ -398,16 +482,16 @@ }, { "name": "composer/spdx-licenses", - "version": "1.5.2", + "version": "1.5.3", "source": { "type": "git", "url": "https://github.com/composer/spdx-licenses.git", - "reference": "7ac1e6aec371357df067f8a688c3d6974df68fa5" + "reference": "0c3e51e1880ca149682332770e25977c70cf9dae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/7ac1e6aec371357df067f8a688c3d6974df68fa5", - "reference": "7ac1e6aec371357df067f8a688c3d6974df68fa5", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/0c3e51e1880ca149682332770e25977c70cf9dae", + "reference": "0c3e51e1880ca149682332770e25977c70cf9dae", "shasum": "" }, "require": { @@ -454,7 +538,7 @@ "spdx", "validator" ], - "time": "2019-07-29T10:31:59+00:00" + "time": "2020-02-14T07:44:31+00:00" }, { "name": "composer/xdebug-handler", @@ -950,6 +1034,178 @@ ], "time": "2019-09-25T14:49:45+00:00" }, + { + "name": "league/flysystem", + "version": "1.0.64", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "d13c43dbd4b791f815215959105a008515d1a2e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/d13c43dbd4b791f815215959105a008515d1a2e0", + "reference": "d13c43dbd4b791f815215959105a008515d1a2e0", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7.26" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "time": "2020-02-05T18:14:17+00:00" + }, + { + "name": "league/flysystem-aws-s3-v3", + "version": "1.0.24", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", + "reference": "4382036bde5dc926f9b8b337e5bdb15e5ec7b570" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/4382036bde5dc926f9b8b337e5bdb15e5ec7b570", + "reference": "4382036bde5dc926f9b8b337e5bdb15e5ec7b570", + "shasum": "" + }, + "require": { + "aws/aws-sdk-php": "^3.0.0", + "league/flysystem": "^1.0.40", + "php": ">=5.5.0" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "~1.0.1", + "phpspec/phpspec": "^2.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\AwsS3v3\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Flysystem adapter for the AWS S3 SDK v3.x", + "time": "2020-02-23T13:31:58+00:00" + }, + { + "name": "league/flysystem-azure-blob-storage", + "version": "0.1.6", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-azure-blob-storage.git", + "reference": "97215345f3c42679299ba556a4d16d4847ee7f6d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-azure-blob-storage/zipball/97215345f3c42679299ba556a4d16d4847ee7f6d", + "reference": "97215345f3c42679299ba556a4d16d4847ee7f6d", + "shasum": "" + }, + "require": { + "guzzlehttp/psr7": "^1.5", + "league/flysystem": "^1.0", + "microsoft/azure-storage-blob": "^1.1", + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\AzureBlobStorage\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "time": "2019-06-07T20:42:16+00:00" + }, { "name": "magento/composer", "version": "1.6.x-dev", @@ -1112,6 +1368,94 @@ ], "time": "2019-11-26T15:09:40+00:00" }, + { + "name": "microsoft/azure-storage-blob", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/Azure/azure-storage-blob-php.git", + "reference": "6a333cd28a3742c3e99e79042dc6510f9f917919" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Azure/azure-storage-blob-php/zipball/6a333cd28a3742c3e99e79042dc6510f9f917919", + "reference": "6a333cd28a3742c3e99e79042dc6510f9f917919", + "shasum": "" + }, + "require": { + "microsoft/azure-storage-common": "~1.4", + "php": ">=5.6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "MicrosoftAzure\\Storage\\Blob\\": "src/Blob" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Azure Storage PHP Client Library", + "email": "dmsh@microsoft.com" + } + ], + "description": "This project provides a set of PHP client libraries that make it easy to access Microsoft Azure Storage Blob APIs.", + "keywords": [ + "azure", + "blob", + "php", + "sdk", + "storage" + ], + "time": "2020-01-02T07:18:59+00:00" + }, + { + "name": "microsoft/azure-storage-common", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/Azure/azure-storage-common-php.git", + "reference": "be4df800761d0d0fa91a9460c7f42517197d57a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Azure/azure-storage-common-php/zipball/be4df800761d0d0fa91a9460c7f42517197d57a0", + "reference": "be4df800761d0d0fa91a9460c7f42517197d57a0", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "~6.0", + "php": ">=5.6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "MicrosoftAzure\\Storage\\Common\\": "src/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Azure Storage PHP Client Library", + "email": "dmsh@microsoft.com" + } + ], + "description": "This project provides a set of common code shared by Azure Storage Blob, Table, Queue and File PHP client libraries.", + "keywords": [ + "azure", + "common", + "php", + "sdk", + "storage" + ], + "time": "2020-01-02T07:15:54+00:00" + }, { "name": "monolog/monolog", "version": "1.25.3", @@ -1190,6 +1534,63 @@ ], "time": "2019-12-20T14:15:16+00:00" }, + { + "name": "mtdowling/jmespath.php", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "52168cb9472de06979613d365c7f1ab8798be895" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/52168cb9472de06979613d365c7f1ab8798be895", + "reference": "52168cb9472de06979613d365c7f1ab8798be895", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "symfony/polyfill-mbstring": "^1.4" + }, + "require-dev": { + "composer/xdebug-handler": "^1.2", + "phpunit/phpunit": "^4.8.36|^7.5.15" + }, + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-4": { + "JmesPath\\": "src/" + }, + "files": [ + "src/JmesPath.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "time": "2019-12-30T18:03:34+00:00" + }, { "name": "paragonie/random_compat", "version": "v9.99.99", @@ -1515,16 +1916,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "2.0.23", + "version": "2.0.25", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "c78eb5058d5bb1a183133c36d4ba5b6675dfa099" + "reference": "c18159618ed7cd7ff721ac1a8fec7860a475d2f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c78eb5058d5bb1a183133c36d4ba5b6675dfa099", - "reference": "c78eb5058d5bb1a183133c36d4ba5b6675dfa099", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c18159618ed7cd7ff721ac1a8fec7860a475d2f0", + "reference": "c18159618ed7cd7ff721ac1a8fec7860a475d2f0", "shasum": "" }, "require": { @@ -1603,7 +2004,7 @@ "x.509", "x509" ], - "time": "2019-09-17T03:41:22+00:00" + "time": "2020-02-25T04:16:50+00:00" }, { "name": "psr/container", @@ -1970,16 +2371,16 @@ }, { "name": "seld/phar-utils", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "84715761c35808076b00908a20317a3a8a67d17e" + "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/84715761c35808076b00908a20317a3a8a67d17e", - "reference": "84715761c35808076b00908a20317a3a8a67d17e", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8800503d56b9867d43d9c303b9cbcc26016e82f0", + "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0", "shasum": "" }, "require": { @@ -2008,22 +2409,22 @@ ], "description": "PHAR file format utilities, for when PHP phars you up", "keywords": [ - "phra" + "phar" ], - "time": "2020-01-13T10:41:09+00:00" + "time": "2020-02-14T15:25:33+00:00" }, { "name": "symfony/console", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f" + "reference": "f512001679f37e6a042b51897ed24a2f05eba656" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f", - "reference": "e9ee09d087e2c88eaf6e5fc0f5c574f64d100e4f", + "url": "https://api.github.com/repos/symfony/console/zipball/f512001679f37e6a042b51897ed24a2f05eba656", + "reference": "f512001679f37e6a042b51897ed24a2f05eba656", "shasum": "" }, "require": { @@ -2086,11 +2487,11 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2020-01-10T21:54:01+00:00" + "time": "2020-01-25T12:44:29+00:00" }, { "name": "symfony/css-selector", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -2143,7 +2544,7 @@ }, { "name": "symfony/event-dispatcher", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -2271,7 +2672,7 @@ }, { "name": "symfony/filesystem", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -2321,7 +2722,7 @@ }, { "name": "symfony/finder", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -2370,16 +2771,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", "shasum": "" }, "require": { @@ -2391,7 +2792,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -2424,20 +2825,20 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", "shasum": "" }, "require": { @@ -2449,7 +2850,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -2483,20 +2884,20 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f" + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/5e66a0fa1070bf46bec4bea7962d285108edd675", + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675", "shasum": "" }, "require": { @@ -2505,7 +2906,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -2541,11 +2942,11 @@ "portable", "shim" ], - "time": "2019-11-27T16:25:15+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/process", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -5098,16 +5499,16 @@ }, { "name": "allure-framework/allure-php-api", - "version": "1.1.6", + "version": "1.1.7", "source": { "type": "git", "url": "https://github.com/allure-framework/allure-php-commons.git", - "reference": "2c62a70d60eca190253a6b80e9aa4c2ebc2e6e7f" + "reference": "243c9a2259b60c1b7a9d298d4fb3fc72b4f64c18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/allure-framework/allure-php-commons/zipball/2c62a70d60eca190253a6b80e9aa4c2ebc2e6e7f", - "reference": "2c62a70d60eca190253a6b80e9aa4c2ebc2e6e7f", + "url": "https://api.github.com/repos/allure-framework/allure-php-commons/zipball/243c9a2259b60c1b7a9d298d4fb3fc72b4f64c18", + "reference": "243c9a2259b60c1b7a9d298d4fb3fc72b4f64c18", "shasum": "" }, "require": { @@ -5147,7 +5548,7 @@ "php", "report" ], - "time": "2020-01-09T10:26:09+00:00" + "time": "2020-02-05T16:43:19+00:00" }, { "name": "allure-framework/allure-phpunit", @@ -5199,102 +5600,18 @@ ], "time": "2017-11-03T13:08:21+00:00" }, - { - "name": "aws/aws-sdk-php", - "version": "3.133.8", - "source": { - "type": "git", - "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "c564fcccd5fc7b5e8514d1cbe35558be1e3a11cd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c564fcccd5fc7b5e8514d1cbe35558be1e3a11cd", - "reference": "c564fcccd5fc7b5e8514d1cbe35558be1e3a11cd", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-pcre": "*", - "ext-simplexml": "*", - "guzzlehttp/guzzle": "^5.3.3|^6.2.1|^7.0", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4.1", - "mtdowling/jmespath.php": "^2.5", - "php": ">=5.5" - }, - "require-dev": { - "andrewsville/php-token-reflection": "^1.4", - "aws/aws-php-sns-message-validator": "~1.0", - "behat/behat": "~3.0", - "doctrine/cache": "~1.4", - "ext-dom": "*", - "ext-openssl": "*", - "ext-pcntl": "*", - "ext-sockets": "*", - "nette/neon": "^2.3", - "phpunit/phpunit": "^4.8.35|^5.4.3", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", - "sebastian/comparator": "^1.2.3" - }, - "suggest": { - "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", - "doctrine/cache": "To use the DoctrineCacheAdapter", - "ext-curl": "To send requests using cURL", - "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", - "ext-sockets": "To use client-side monitoring" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "Aws\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Amazon Web Services", - "homepage": "http://aws.amazon.com" - } - ], - "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", - "homepage": "http://aws.amazon.com/sdkforphp", - "keywords": [ - "amazon", - "aws", - "cloud", - "dynamodb", - "ec2", - "glacier", - "s3", - "sdk" - ], - "time": "2020-02-05T19:12:47+00:00" - }, { "name": "behat/gherkin", - "version": "v4.6.0", + "version": "v4.6.1", "source": { "type": "git", "url": "https://github.com/Behat/Gherkin.git", - "reference": "ab0a02ea14893860bca00f225f5621d351a3ad07" + "reference": "25bdcaf37898b4a939fa3031d5d753ced97e4759" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/ab0a02ea14893860bca00f225f5621d351a3ad07", - "reference": "ab0a02ea14893860bca00f225f5621d351a3ad07", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/25bdcaf37898b4a939fa3031d5d753ced97e4759", + "reference": "25bdcaf37898b4a939fa3031d5d753ced97e4759", "shasum": "" }, "require": { @@ -5340,7 +5657,7 @@ "gherkin", "parser" ], - "time": "2019-01-16T14:22:17+00:00" + "time": "2020-02-27T11:29:57+00:00" }, { "name": "cache/cache", @@ -5604,80 +5921,43 @@ }, { "name": "consolidation/annotated-command", - "version": "2.12.0", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "512a2e54c98f3af377589de76c43b24652bcb789" + "reference": "33e472d3cceb0f22a527d13ccfa3f76c4d21c178" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/512a2e54c98f3af377589de76c43b24652bcb789", - "reference": "512a2e54c98f3af377589de76c43b24652bcb789", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/33e472d3cceb0f22a527d13ccfa3f76c4d21c178", + "reference": "33e472d3cceb0f22a527d13ccfa3f76c4d21c178", "shasum": "" }, "require": { - "consolidation/output-formatters": "^3.4", - "php": ">=5.4.5", - "psr/log": "^1", - "symfony/console": "^2.8|^3|^4", - "symfony/event-dispatcher": "^2.5|^3|^4", - "symfony/finder": "^2.5|^3|^4" + "consolidation/output-formatters": "^4.1", + "php": ">=7.1.3", + "psr/log": "^1|^2", + "symfony/console": "^4|^5", + "symfony/event-dispatcher": "^4|^5", + "symfony/finder": "^4|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", "php-coveralls/php-coveralls": "^1", "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "^2.7" + "squizlabs/php_codesniffer": "^3" }, "type": "library", "extra": { "scenarios": { "symfony4": { "require": { - "symfony/console": "^4.0" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - }, - "scenario-options": { - "create-lockfile": "false" - } - }, - "phpunit4": { - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } + "symfony/console": "^4.0" } } }, "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -5696,7 +5976,7 @@ } ], "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2019-03-08T16:55:03+00:00" + "time": "2020-02-07T03:35:30+00:00" }, { "name": "consolidation/config", @@ -5781,74 +6061,33 @@ }, { "name": "consolidation/log", - "version": "1.1.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/consolidation/log.git", - "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a" + "reference": "446f804476db4f73957fa4bcb66ab2facf5397ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/log/zipball/b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", - "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", + "url": "https://api.github.com/repos/consolidation/log/zipball/446f804476db4f73957fa4bcb66ab2facf5397ff", + "reference": "446f804476db4f73957fa4bcb66ab2facf5397ff", "shasum": "" }, "require": { "php": ">=5.4.5", "psr/log": "^1.0", - "symfony/console": "^2.8|^3|^4" + "symfony/console": "^4|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", "php-coveralls/php-coveralls": "^1", "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "^2" + "squizlabs/php_codesniffer": "^3" }, "type": "library", "extra": { - "scenarios": { - "symfony4": { - "require": { - "symfony/console": "^4.0" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - } - }, - "phpunit4": { - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - } - } - }, "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -5867,34 +6106,35 @@ } ], "description": "Improved Psr-3 / Psr\\Log logger based on Symfony Console components.", - "time": "2019-01-01T17:30:51+00:00" + "time": "2020-02-07T01:22:27+00:00" }, { "name": "consolidation/output-formatters", - "version": "3.5.0", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/consolidation/output-formatters.git", - "reference": "99ec998ffb697e0eada5aacf81feebfb13023605" + "reference": "eae721c3a916707c40d4390efbf48d4c799709cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/99ec998ffb697e0eada5aacf81feebfb13023605", - "reference": "99ec998ffb697e0eada5aacf81feebfb13023605", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/eae721c3a916707c40d4390efbf48d4c799709cc", + "reference": "eae721c3a916707c40d4390efbf48d4c799709cc", "shasum": "" }, "require": { "dflydev/dot-access-data": "^1.1.0", - "php": ">=5.4.0", - "symfony/console": "^2.8|^3|^4", - "symfony/finder": "^2.5|^3|^4" + "php": ">=7.1.3", + "symfony/console": "^4|^5", + "symfony/finder": "^4|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", "php-coveralls/php-coveralls": "^1", - "phpunit/phpunit": "^5.7.27", - "squizlabs/php_codesniffer": "^2.7", - "symfony/var-dumper": "^2.8|^3|^4", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^3", + "symfony/var-dumper": "^4", + "symfony/yaml": "^4", "victorjonsson/markdowndocs": "^1.3" }, "suggest": { @@ -5906,50 +6146,11 @@ "symfony4": { "require": { "symfony/console": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^6" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - }, - "symfony3": { - "require": { - "symfony/console": "^3.4", - "symfony/finder": "^3.4", - "symfony/var-dumper": "^3.4" - }, - "config": { - "platform": { - "php": "5.6.32" - } - } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - }, - "scenario-options": { - "create-lockfile": "false" } } }, "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -5968,30 +6169,30 @@ } ], "description": "Format text by applying transformations provided by plug-in formatters.", - "time": "2019-05-30T23:16:01+00:00" + "time": "2020-02-07T03:22:30+00:00" }, { "name": "consolidation/robo", - "version": "1.4.11", + "version": "1.4.12", "source": { "type": "git", "url": "https://github.com/consolidation/Robo.git", - "reference": "5fa1d901776a628167a325baa9db95d8edf13a80" + "reference": "eb45606f498b3426b9a98b7c85e300666a968e51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/Robo/zipball/5fa1d901776a628167a325baa9db95d8edf13a80", - "reference": "5fa1d901776a628167a325baa9db95d8edf13a80", + "url": "https://api.github.com/repos/consolidation/Robo/zipball/eb45606f498b3426b9a98b7c85e300666a968e51", + "reference": "eb45606f498b3426b9a98b7c85e300666a968e51", "shasum": "" }, "require": { - "consolidation/annotated-command": "^2.11.0", - "consolidation/config": "^1.2", - "consolidation/log": "~1", - "consolidation/output-formatters": "^3.1.13", - "consolidation/self-update": "^1", - "grasmash/yaml-expander": "^1.3", - "league/container": "^2.2", + "consolidation/annotated-command": "^2.11.0|^4.1", + "consolidation/config": "^1.2.1", + "consolidation/log": "^1.1.1|^2", + "consolidation/output-formatters": "^3.1.13|^4.1", + "consolidation/self-update": "^1.1.5", + "grasmash/yaml-expander": "^1.4", + "league/container": "^2.4.1", "php": ">=5.5.0", "symfony/console": "^2.8|^3|^4", "symfony/event-dispatcher": "^2.5|^3|^4", @@ -6003,20 +6204,13 @@ "codegyre/robo": "< 1.0" }, "require-dev": { - "codeception/aspect-mock": "^1|^2.1.1", - "codeception/base": "^2.3.7", - "codeception/verify": "^0.3.2", "g1a/composer-test-scenarios": "^3", - "goaop/framework": "~2.1.2", - "goaop/parser-reflection": "^1.1.0", "natxet/cssmin": "3.0.4", - "nikic/php-parser": "^3.1.5", - "patchwork/jsqueeze": "~2", + "patchwork/jsqueeze": "^2", "pear/archive_tar": "^1.4.4", "php-coveralls/php-coveralls": "^1", - "phpunit/php-code-coverage": "~2|~4", - "sebastian/comparator": "^1.2.4", - "squizlabs/php_codesniffer": "^2.8" + "phpunit/phpunit": "^5.7.27", + "squizlabs/php_codesniffer": "^3" }, "suggest": { "henrikbjorn/lurker": "For monitoring filesystem changes in taskWatch", @@ -6044,8 +6238,11 @@ "require": { "symfony/console": "^2.8" }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, "remove": [ - "goaop/framework" + "php-coveralls/php-coveralls" ], "config": { "platform": { @@ -6058,7 +6255,7 @@ } }, "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -6077,7 +6274,7 @@ } ], "description": "Modern task runner", - "time": "2019-10-29T15:50:02+00:00" + "time": "2020-02-18T17:31:26+00:00" }, { "name": "consolidation/self-update", @@ -7042,16 +7239,16 @@ }, { "name": "jms/serializer", - "version": "1.14.0", + "version": "1.14.1", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "ee96d57024af9a7716d56fcbe3aa94b3d030f3ca" + "reference": "ba908d278fff27ec01fb4349f372634ffcd697c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/ee96d57024af9a7716d56fcbe3aa94b3d030f3ca", - "reference": "ee96d57024af9a7716d56fcbe3aa94b3d030f3ca", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/ba908d278fff27ec01fb4349f372634ffcd697c0", + "reference": "ba908d278fff27ec01fb4349f372634ffcd697c0", "shasum": "" }, "require": { @@ -7104,13 +7301,13 @@ "MIT" ], "authors": [ - { - "name": "Asmir Mustafic", - "email": "goetas@gmail.com" - }, { "name": "Johannes M. Schmitt", "email": "schmittjoh@gmail.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" } ], "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", @@ -7122,7 +7319,7 @@ "serialization", "xml" ], - "time": "2019-04-17T08:12:16+00:00" + "time": "2020-02-22T20:59:37+00:00" }, { "name": "league/container", @@ -7189,90 +7386,6 @@ ], "time": "2017-05-10T09:20:27+00:00" }, - { - "name": "league/flysystem", - "version": "1.0.63", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8132daec326565036bc8e8d1876f77ec183a7bd6", - "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6", - "shasum": "" - }, - "require": { - "ext-fileinfo": "*", - "php": ">=5.5.9" - }, - "conflict": { - "league/flysystem-sftp": "<1.0.6" - }, - "require-dev": { - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.10" - }, - "suggest": { - "ext-fileinfo": "Required for MimeType", - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Flysystem\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Filesystem abstraction: Many filesystems, one API.", - "keywords": [ - "Cloud Files", - "WebDAV", - "abstraction", - "aws", - "cloud", - "copy.com", - "dropbox", - "file systems", - "files", - "filesystem", - "filesystems", - "ftp", - "rackspace", - "remote", - "s3", - "sftp", - "storage" - ], - "time": "2020-01-04T16:30:31+00:00" - }, { "name": "lusitanian/oauth", "version": "v0.8.11", @@ -7510,63 +7623,6 @@ "homepage": "http://vfs.bovigo.org/", "time": "2019-10-30T15:31:00+00:00" }, - { - "name": "mtdowling/jmespath.php", - "version": "2.5.0", - "source": { - "type": "git", - "url": "https://github.com/jmespath/jmespath.php.git", - "reference": "52168cb9472de06979613d365c7f1ab8798be895" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/52168cb9472de06979613d365c7f1ab8798be895", - "reference": "52168cb9472de06979613d365c7f1ab8798be895", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "symfony/polyfill-mbstring": "^1.4" - }, - "require-dev": { - "composer/xdebug-handler": "^1.2", - "phpunit/phpunit": "^4.8.36|^7.5.15" - }, - "bin": [ - "bin/jp.php" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-4": { - "JmesPath\\": "src/" - }, - "files": [ - "src/JmesPath.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Declaratively specify how to extract elements from a JSON document", - "keywords": [ - "json", - "jsonpath" - ], - "time": "2019-12-30T18:03:34+00:00" - }, { "name": "mustache/mustache", "version": "v2.13.0", @@ -7856,16 +7912,16 @@ }, { "name": "php-webdriver/webdriver", - "version": "1.8.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/php-webdriver/php-webdriver.git", - "reference": "3e33ee3b8a688d719c55acdd7c6788e3006e1d3e" + "reference": "262ea0d209c292e0330be1041424887bbbffef04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/3e33ee3b8a688d719c55acdd7c6788e3006e1d3e", - "reference": "3e33ee3b8a688d719c55acdd7c6788e3006e1d3e", + "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/262ea0d209c292e0330be1041424887bbbffef04", + "reference": "262ea0d209c292e0330be1041424887bbbffef04", "shasum": "" }, "require": { @@ -7897,12 +7953,12 @@ } }, "autoload": { - "files": [ - "lib/Exception/TimeoutException.php" - ], "psr-4": { "Facebook\\WebDriver\\": "lib/" - } + }, + "files": [ + "lib/Exception/TimeoutException.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -7917,7 +7973,7 @@ "selenium", "webdriver" ], - "time": "2020-02-10T15:04:25+00:00" + "time": "2020-02-17T08:14:38+00:00" }, { "name": "phpcollection/phpcollection", @@ -8079,41 +8135,38 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -8124,10 +8177,14 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-12-28T18:55:12+00:00" + "time": "2020-02-22T12:28:44+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -8364,16 +8421,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.7", + "version": "0.12.11", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "07fa7958027fd98c567099bbcda5d6a0f2ec5197" + "reference": "ca5f2b7cf81c6d8fba74f9576970399c5817e03b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/07fa7958027fd98c567099bbcda5d6a0f2ec5197", - "reference": "07fa7958027fd98c567099bbcda5d6a0f2ec5197", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ca5f2b7cf81c6d8fba74f9576970399c5817e03b", + "reference": "ca5f2b7cf81c6d8fba74f9576970399c5817e03b", "shasum": "" }, "require": { @@ -8399,7 +8456,7 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2020-01-20T21:59:06+00:00" + "time": "2020-02-16T14:00:29+00:00" }, { "name": "phpunit/php-code-coverage", @@ -9593,7 +9650,7 @@ }, { "name": "symfony/browser-kit", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", @@ -9652,7 +9709,7 @@ }, { "name": "symfony/config", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/config.git", @@ -9716,16 +9773,16 @@ }, { "name": "symfony/dependency-injection", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "6faf589e1f6af78692aed3ab6b3c336c58d5d83c" + "reference": "ec60a7d12f5e8ab0f99456adce724717d9c1784a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6faf589e1f6af78692aed3ab6b3c336c58d5d83c", - "reference": "6faf589e1f6af78692aed3ab6b3c336c58d5d83c", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/ec60a7d12f5e8ab0f99456adce724717d9c1784a", + "reference": "ec60a7d12f5e8ab0f99456adce724717d9c1784a", "shasum": "" }, "require": { @@ -9785,11 +9842,11 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2020-01-21T07:39:36+00:00" + "time": "2020-01-31T09:49:27+00:00" }, { "name": "symfony/dom-crawler", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", @@ -9850,16 +9907,16 @@ }, { "name": "symfony/http-foundation", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "c33998709f3fe9b8e27e0277535b07fbf6fde37a" + "reference": "491a20dfa87e0b3990170593bc2de0bb34d828a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/c33998709f3fe9b8e27e0277535b07fbf6fde37a", - "reference": "c33998709f3fe9b8e27e0277535b07fbf6fde37a", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/491a20dfa87e0b3990170593bc2de0bb34d828a5", + "reference": "491a20dfa87e0b3990170593bc2de0bb34d828a5", "shasum": "" }, "require": { @@ -9901,11 +9958,11 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2020-01-04T13:00:46+00:00" + "time": "2020-01-31T09:11:17+00:00" }, { "name": "symfony/mime", - "version": "v5.0.3", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", @@ -9967,7 +10024,7 @@ }, { "name": "symfony/options-resolver", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", @@ -10021,22 +10078,22 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46" + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6f9c239e61e1b0c9229a28ff89a812dc449c3d46", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6842f1a39cf7d580655688069a03dd7cd83d244a", + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a", "shasum": "" }, "require": { "php": ">=5.3.3", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.9" + "symfony/polyfill-php72": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -10044,7 +10101,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -10079,20 +10136,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-17T12:01:36+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "af23c7bb26a73b850840823662dda371484926c4" + "reference": "419c4940024c30ccc033650373a1fe13890d3255" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/af23c7bb26a73b850840823662dda371484926c4", - "reference": "af23c7bb26a73b850840823662dda371484926c4", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/419c4940024c30ccc033650373a1fe13890d3255", + "reference": "419c4940024c30ccc033650373a1fe13890d3255", "shasum": "" }, "require": { @@ -10102,7 +10159,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -10138,20 +10195,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038" + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", "shasum": "" }, "require": { @@ -10160,7 +10217,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -10193,11 +10250,11 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/stopwatch", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", @@ -10247,7 +10304,7 @@ }, { "name": "symfony/yaml", - "version": "v4.4.3", + "version": "v4.4.4", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", @@ -10437,16 +10494,16 @@ }, { "name": "webmozart/assert", - "version": "1.6.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", "shasum": "" }, "require": { @@ -10481,7 +10538,7 @@ "check", "validate" ], - "time": "2019-11-24T13:36:37+00:00" + "time": "2020-02-14T12:15:55+00:00" }, { "name": "weew/helpers-array", From 463c46072512b41d71bc13192ffbb5640c5ea394 Mon Sep 17 00:00:00 2001 From: Timon de Groot <timon@mooore.nl> Date: Fri, 28 Feb 2020 09:21:35 +0100 Subject: [PATCH 224/229] Add escaping to alt tags --- .../view/frontend/templates/product/image.phtml | 12 ++++++------ .../templates/product/image_with_borders.phtml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml index 415fb367b729c..24cae93ca61c0 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image.phtml @@ -10,9 +10,9 @@ ?> <img class="photo image <?= $escaper->escapeHtmlAttr($block->getClass()) ?>" - <?= $escaper->escapeHtml($block->getCustomAttributes()) ?> - src="<?= $escaper->escapeUrl($block->getImageUrl()) ?>" - loading="lazy" - width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>" - height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>" - alt="<?= /* @noEscape */ $block->stripTags($block->getLabel(), null, true) ?>" /> + <?= $escaper->escapeHtml($block->getCustomAttributes()) ?> + src="<?= $escaper->escapeUrl($block->getImageUrl()) ?>" + loading="lazy" + width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>" + height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>" + alt="<?= $escaper->escapeHtmlAttr($block->getLabel()) ?>" /> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml index 3b4a74d5d86c9..e8ddabce504ea 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml @@ -14,10 +14,10 @@ <span class="product-image-wrapper" style="padding-bottom: <?= ($block->getRatio() * 100) ?>%;"> <img class="<?= $escaper->escapeHtmlAttr($block->getClass()) ?>" - <?= $escaper->escapeHtmlAttr($block->getCustomAttributes()) ?> - src="<?= $escaper->escapeUrl($block->getImageUrl()) ?>" - loading="lazy" - width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>" - height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>" - alt="<?= /* @noEscape */ $block->stripTags($block->getLabel(), null, true) ?>"/></span> + <?= $escaper->escapeHtmlAttr($block->getCustomAttributes()) ?> + src="<?= $escaper->escapeUrl($block->getImageUrl()) ?>" + loading="lazy" + width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>" + height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>" + alt="<?= $escaper->escapeHtmlAttr($block->getLabel()) ?>"/></span> </span> From 7e096c26f8278994df520b102311e62582a668cc Mon Sep 17 00:00:00 2001 From: Grimlink <sean.grimlink@gmail.com> Date: Fri, 28 Feb 2020 12:11:11 +0100 Subject: [PATCH 225/229] IMP: merge image tag styles --- lib/web/css/source/lib/_resets.less | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/web/css/source/lib/_resets.less b/lib/web/css/source/lib/_resets.less index e322c05af2155..4c3d4476c2c80 100644 --- a/lib/web/css/source/lib/_resets.less +++ b/lib/web/css/source/lib/_resets.less @@ -48,6 +48,8 @@ } img { + max-width: 100%; + height: auto; border: 0; } @@ -57,11 +59,6 @@ max-width: 100%; } - img { - max-width: 100%; - height: auto; - } - svg:not(:root) { overflow: hidden; } From 71e275a47c19ce820ded50ddf7abf00de6a48d4a Mon Sep 17 00:00:00 2001 From: Oleksandr Miroshnichenko <omiroshnichenko@magento.com> Date: Sat, 29 Feb 2020 23:11:11 -0600 Subject: [PATCH 226/229] PB-416: Phpgt/Dom does not support PHP 7.1.0 - add whitelist support for redundant dependencies --- .../Magento/Test/Integrity/DependencyTest.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php index fa0d365061858..60855043a8c4e 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php @@ -154,6 +154,13 @@ class DependencyTest extends \PHPUnit\Framework\TestCase */ private static $routesWhitelist = null; + /** + * Redundant dependencies whitelist + * + * @var array|null + */ + private static $redundantDependenciesWhitelist = null; + /** * @var RouteMapper */ @@ -185,6 +192,7 @@ public static function setUpBeforeClass() self::_prepareMapLayoutHandles(); self::getLibraryWhiteLists(); + self::getRedundantDependenciesWhiteLists(); self::_initDependencies(); self::_initThemes(); @@ -206,6 +214,26 @@ private static function getLibraryWhiteLists() } } + /** + * Initialize redundant dependencies whitelist + * + * @return array + */ + private static function getRedundantDependenciesWhiteLists(): array + { + if (is_null(self::$redundantDependenciesWhitelist)) { + $redundantDependenciesWhitelistFilePattern = + realpath(__DIR__) . '/_files/dependency_test/whitelist/redundant_dependencies_*.php'; + $redundantDependenciesWhitelist = []; + foreach (glob($redundantDependenciesWhitelistFilePattern) as $fileName) { + //phpcs:ignore Magento2.Performance.ForeachArrayMerge + $redundantDependenciesWhitelist = array_merge($redundantDependenciesWhitelist, include $fileName); + } + self::$redundantDependenciesWhitelist = $redundantDependenciesWhitelist; + } + return self::$redundantDependenciesWhitelist; + } + /** * Initialize default themes */ @@ -532,6 +560,9 @@ public function testRedundant() foreach (array_keys(self::$mapDependencies) as $module) { $result = []; $redundant = $this->_getDependencies($module, self::TYPE_HARD, self::MAP_TYPE_REDUNDANT); + if (isset(self::$redundantDependenciesWhitelist[$module])) { + $redundant = array_diff($redundant, self::$redundantDependenciesWhitelist[$module]); + } if (!empty($redundant)) { $result[] = sprintf( "\r\nModule %s: %s [%s]", From 2bc8fcb1f8a4eb1d5e398ac4703c4ebc80712031 Mon Sep 17 00:00:00 2001 From: Alex Taranovsky <firster@atwix.com> Date: Sun, 1 Mar 2020 14:50:33 +0200 Subject: [PATCH 227/229] magento/magento2#: Remove a redundant PHP5 directives from a.htaccess --- .htaccess | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/.htaccess b/.htaccess index 71a5cf708dbc5..e07a564bc0ab6 100644 --- a/.htaccess +++ b/.htaccess @@ -37,29 +37,6 @@ DirectoryIndex index.php -<IfModule mod_php5.c> -############################################ -## adjust memory limit - - php_value memory_limit 756M - php_value max_execution_time 18000 - -############################################ -## disable automatic session start -## before autoload was initialized - - php_flag session.auto_start off - -############################################ -## enable resulting html compression - - #php_flag zlib.output_compression on - -########################################### -## disable user agent verification to not break multiple image upload - - php_flag suhosin.session.cryptua off -</IfModule> <IfModule mod_php7.c> ############################################ ## adjust memory limit From d61764f549ae54dd63a6444695f059015f1d01aa Mon Sep 17 00:00:00 2001 From: Nazar Klovanych <nazarn96@gmail.com> Date: Mon, 2 Mar 2020 09:56:32 +0200 Subject: [PATCH 228/229] Add missing view modelm to prevent exception of multishipping --- .../frontend/layout/multishipping_checkout_customer_address.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_customer_address.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_customer_address.xml index fee3cb790a522..449f5feeafd9c 100644 --- a/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_customer_address.xml +++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_customer_address.xml @@ -13,6 +13,7 @@ <arguments> <argument name="attribute_data" xsi:type="object">Magento\Customer\Block\DataProviders\AddressAttributeData</argument> <argument name="post_code_config" xsi:type="object">Magento\Customer\Block\DataProviders\PostCodesPatternsAttributeData</argument> + <argument name="view_model" xsi:type="object">Magento\Customer\ViewModel\Address</argument> </arguments> </block> </referenceContainer> From 4b66b00c574a0e092597f1603ede7bfcb8a95ed2 Mon Sep 17 00:00:00 2001 From: Vitalii Zabaznov <vzabaznov@magento.com> Date: Mon, 2 Mar 2020 10:19:07 -0600 Subject: [PATCH 229/229] MC-32062: [2.4] Deliver first part of Redis improvements --- app/code/Magento/Eav/Model/Config.php | 12 +- .../ResourceModel/Entity/Attribute/Set.php | 7 +- app/code/Magento/Eav/etc/di.xml | 10 + app/code/Magento/Theme/etc/di.xml | 20 ++ app/etc/di.xml | 10 + .../App/Cache/Frontend/FactoryTest.php | 7 +- lib/internal/Magento/Framework/App/Cache.php | 14 +- .../Framework/App/Cache/Frontend/Pool.php | 11 +- .../Framework/App/Router/ActionList.php | 26 +- .../App/Test/Unit/Cache/Frontend/PoolTest.php | 8 +- .../Magento/Framework/Cache/Backend/Redis.php | 83 ++++++ .../Cache/Backend/RemoteSynchronizedCache.php | 146 +++++++--- .../Cache/LockGuardedCacheLoader.php | 35 ++- .../Backend/RemoteSynchronizedCacheTest.php | 256 ++++++++++-------- .../Framework/Interception/Config/Config.php | 2 - .../Magento/Framework/Lock/Backend/Cache.php | 4 + .../Framework/Lock/Backend/FileLock.php | 2 + .../Console/Command/DiCompileCommand.php | 12 +- .../Task/Operation/AppActionListGenerator.php | 58 ++++ .../Module/Di/App/Task/OperationFactory.php | 12 + .../Console/Command/DiCompileCommandTest.php | 5 +- 21 files changed, 532 insertions(+), 208 deletions(-) create mode 100644 lib/internal/Magento/Framework/Cache/Backend/Redis.php create mode 100644 setup/src/Magento/Setup/Module/Di/App/Task/Operation/AppActionListGenerator.php diff --git a/app/code/Magento/Eav/Model/Config.php b/app/code/Magento/Eav/Model/Config.php index 765403567b6d9..718ef1a748590 100644 --- a/app/code/Magento/Eav/Model/Config.php +++ b/app/code/Magento/Eav/Model/Config.php @@ -157,12 +157,12 @@ class Config /** * @param \Magento\Framework\App\CacheInterface $cache - * @param \Magento\Eav\Model\Entity\TypeFactory $entityTypeFactory - * @param \Magento\Eav\Model\ResourceModel\Entity\Type\CollectionFactory $entityTypeCollectionFactory + * @param Entity\TypeFactory $entityTypeFactory + * @param ResourceModel\Entity\Type\CollectionFactory $entityTypeCollectionFactory * @param \Magento\Framework\App\Cache\StateInterface $cacheState * @param \Magento\Framework\Validator\UniversalFactory $universalFactory - * @param SerializerInterface $serializer - * @param ScopeConfigInterface $scopeConfig + * @param SerializerInterface|null $serializer + * @param ScopeConfigInterface|null $scopeConfig * @param array $attributesForPreload * @codeCoverageIgnore */ @@ -374,7 +374,9 @@ protected function _initEntityTypes() } \Magento\Framework\Profiler::start('EAV: ' . __METHOD__, ['group' => 'EAV', 'method' => __METHOD__]); - if ($this->isCacheEnabled() && ($cache = $this->_cache->load(self::ENTITIES_CACHE_ID))) { + if ($this->isCacheEnabled() && + ($cache = $this->_cache->load(self::ENTITIES_CACHE_ID)) + ) { $this->_entityTypeData = $this->serializer->unserialize($cache); foreach ($this->_entityTypeData as $typeCode => $data) { $typeId = $data['entity_type_id']; diff --git a/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Set.php b/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Set.php index 4e1762730a8d9..64c76cdbf2627 100644 --- a/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Set.php +++ b/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute/Set.php @@ -6,6 +6,9 @@ namespace Magento\Eav\Model\ResourceModel\Entity\Attribute; +/** + * Basic implementation for attribute sets + */ class Set extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb { /** @@ -24,8 +27,6 @@ class Set extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb protected $eavConfig; /** - * Constructor - * * @param \Magento\Framework\Model\ResourceModel\Db\Context $context * @param GroupFactory $attrGroupFactory * @param \Magento\Eav\Model\Config $eavConfig @@ -54,7 +55,7 @@ protected function _construct() } /** - * Perform actions after object save + * Perform actions after object save. * * @param \Magento\Framework\Model\AbstractModel $object * @return $this diff --git a/app/code/Magento/Eav/etc/di.xml b/app/code/Magento/Eav/etc/di.xml index a09dc28399858..21f248f1b1094 100644 --- a/app/code/Magento/Eav/etc/di.xml +++ b/app/code/Magento/Eav/etc/di.xml @@ -209,4 +209,14 @@ </argument> </arguments> </type> + <virtualType name="configured_eav_cache" type="Magento\Framework\App\Cache"> + <arguments> + <argument name="cacheIdentifier" xsi:type="string">eav</argument> + </arguments> + </virtualType> + <type name="Magento\Eav\Model\Config"> + <arguments> + <argument name="cache" xsi:type="object">configured_eav_cache</argument> + </arguments> + </type> </config> diff --git a/app/code/Magento/Theme/etc/di.xml b/app/code/Magento/Theme/etc/di.xml index 9e06f6c0f4e51..921e6bfc6ecf1 100644 --- a/app/code/Magento/Theme/etc/di.xml +++ b/app/code/Magento/Theme/etc/di.xml @@ -289,4 +289,24 @@ <argument name="identifierName" xsi:type="string">theme_id</argument> </arguments> </type> + <virtualType name="configured_design_cache" type="Magento\Framework\App\Cache"> + <arguments> + <argument name="cacheIdentifier" xsi:type="string">layout</argument> + </arguments> + </virtualType> + <virtualType name="design_context" type="Magento\Framework\Model\Context"> + <arguments> + <argument name="cacheManager" xsi:type="object">configured_design_cache</argument> + </arguments> + </virtualType> + <type name="Magento\Theme\Model\Design"> + <arguments> + <argument name="context" xsi:type="object">design_context</argument> + </arguments> + </type> + <type name="Magento\Theme\Model\Theme\ThemeProvider"> + <arguments> + <argument name="cache" xsi:type="object">configured_design_cache</argument> + </arguments> + </type> </config> diff --git a/app/etc/di.xml b/app/etc/di.xml index 8120676e8dda5..a11b8fd5a2506 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -1804,4 +1804,14 @@ </type> <preference for="Magento\Framework\GraphQl\Query\ErrorHandlerInterface" type="Magento\Framework\GraphQl\Query\ErrorHandler"/> <preference for="Magento\Framework\Filter\VariableResolverInterface" type="Magento\Framework\Filter\VariableResolver\StrategyResolver"/> + <virtualType name="configured_block_cache" type="Magento\Framework\App\Cache"> + <arguments> + <argument name="cacheIdentifier" xsi:type="string">block_html</argument> + </arguments> + </virtualType> + <type name="Magento\Framework\View\Element\Context"> + <arguments> + <argument name="cache" xsi:type="object">configured_block_cache</argument> + </arguments> + </type> </config> diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest.php index e6ee5297e4532..a79f5511f1533 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest.php @@ -63,6 +63,7 @@ public function testRemoteSynchronizedCache() //Removing data sleep(2); $this->assertTrue($this->model->remove($secondIdentifier)); + $this->assertTrue($this->model->remove($identifier)); $this->assertEquals($this->model->load($identifier), false); $this->assertEquals($this->model->load($secondIdentifier), false); @@ -73,11 +74,5 @@ public function testRemoteSynchronizedCache() //Checking data $this->assertEquals($this->model->load($identifier), $data); $this->assertEquals($this->model->load($secondIdentifier), $secondData); - - //Removing data - sleep(2); - $this->assertTrue($this->model->remove($identifier)); - $this->assertEquals($this->model->load($identifier), false); - $this->assertEquals($this->model->load($secondIdentifier), false); } } diff --git a/lib/internal/Magento/Framework/App/Cache.php b/lib/internal/Magento/Framework/App/Cache.php index 34729df9f1e55..7a569e5409f7d 100644 --- a/lib/internal/Magento/Framework/App/Cache.php +++ b/lib/internal/Magento/Framework/App/Cache.php @@ -4,12 +4,11 @@ * See COPYING.txt for license details. */ -/** - * System cache model - * support id and tags prefix support, - */ namespace Magento\Framework\App; +/** + * System cache model support id and tags prefix support. + */ class Cache implements CacheInterface { /** @@ -30,12 +29,13 @@ class Cache implements CacheInterface protected $_frontend; /** - * @param \Magento\Framework\App\Cache\Frontend\Pool $frontendPool + * @param Cache\Frontend\Pool $frontendPool + * @param string|null $cacheIdentifier */ - public function __construct(\Magento\Framework\App\Cache\Frontend\Pool $frontendPool) + public function __construct(\Magento\Framework\App\Cache\Frontend\Pool $frontendPool, $cacheIdentifier = null) { $this->_frontendPool = $frontendPool; - $this->_frontend = $frontendPool->get($this->_frontendIdentifier); + $this->_frontend = $frontendPool->get($cacheIdentifier ?? $this->_frontendIdentifier); } /** diff --git a/lib/internal/Magento/Framework/App/Cache/Frontend/Pool.php b/lib/internal/Magento/Framework/App/Cache/Frontend/Pool.php index a4c9fb4380651..daa7cba20139d 100644 --- a/lib/internal/Magento/Framework/App/Cache/Frontend/Pool.php +++ b/lib/internal/Magento/Framework/App/Cache/Frontend/Pool.php @@ -152,6 +152,15 @@ public function get($identifier) if (isset($this->_instances[$identifier])) { return $this->_instances[$identifier]; } - throw new \InvalidArgumentException("Cache frontend '{$identifier}' is not recognized."); + + if (!isset($this->_instances[self::DEFAULT_FRONTEND_ID])) { + throw new \InvalidArgumentException( + "Cache frontend '{$identifier}' is not recognized. As well as " . + self::DEFAULT_FRONTEND_ID . + "cache is not configured" + ); + } + + return $this->_instances[self::DEFAULT_FRONTEND_ID]; } } diff --git a/lib/internal/Magento/Framework/App/Router/ActionList.php b/lib/internal/Magento/Framework/App/Router/ActionList.php index 1640d4a98d354..63a24d58a3c81 100644 --- a/lib/internal/Magento/Framework/App/Router/ActionList.php +++ b/lib/internal/Magento/Framework/App/Router/ActionList.php @@ -5,6 +5,8 @@ */ namespace Magento\Framework\App\Router; +use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\App\State; use Magento\Framework\Serialize\SerializerInterface; use Magento\Framework\Serialize\Serializer\Serialize; use Magento\Framework\Module\Dir\Reader as ModuleReader; @@ -70,12 +72,26 @@ public function __construct( $this->reservedWords = array_merge($reservedWords, $this->reservedWords); $this->actionInterface = $actionInterface; $this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()->get(Serialize::class); - $data = $cache->load($cacheKey); - if (!$data) { - $this->actions = $moduleReader->getActionFiles(); - $cache->save($this->serializer->serialize($this->actions), $cacheKey); + $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); + $state = $objectManager->get(State::class); + + if ($state->getMode() === State::MODE_PRODUCTION) { + $directoryList = $objectManager->get(DirectoryList::class); + $file = $directoryList->getPath(DirectoryList::GENERATED_METADATA) . '/' . $cacheKey . '.' . 'php'; + + if (file_exists($file)) { + $this->actions = (include $file) ?? $moduleReader->getActionFiles(); + } else { + $this->actions = $moduleReader->getActionFiles(); + } } else { - $this->actions = $this->serializer->unserialize($data); + $data = $cache->load($cacheKey); + if (!$data) { + $this->actions = $moduleReader->getActionFiles(); + $cache->save($this->serializer->serialize($this->actions), $cacheKey); + } else { + $this->actions = $this->serializer->unserialize($data); + } } } diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/PoolTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/PoolTest.php index 5ec3dd658737b..f6398f08ebf27 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/PoolTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/PoolTest.php @@ -208,12 +208,8 @@ public function testGet() } } - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Cache frontend 'unknown' is not recognized - */ - public function testGetUnknownFrontendId() + public function testFallbackOnDefault() { - $this->_model->get('unknown'); + $this->assertSame($this->_frontendInstances[Pool::DEFAULT_FRONTEND_ID], $this->_model->get('unknown')); } } diff --git a/lib/internal/Magento/Framework/Cache/Backend/Redis.php b/lib/internal/Magento/Framework/Cache/Backend/Redis.php new file mode 100644 index 0000000000000..ed97cb9f50c3b --- /dev/null +++ b/lib/internal/Magento/Framework/Cache/Backend/Redis.php @@ -0,0 +1,83 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Framework\Cache\Backend; + +/** + * Redis wrapper to extend current implementation behaviour. + */ +class Redis extends \Cm_Cache_Backend_Redis +{ + /** + * Local state of preloaded keys. + * + * @var array + */ + private $preloadedData = []; + + /** + * Array of keys to be preloaded. + * + * @var array + */ + private $preloadKeys = []; + + /** + * @param array $options + */ + public function __construct($options = []) + { + $this->preloadKeys = $options['preload_keys'] ?? []; + parent::__construct($options); + } + + /** + * Load value with given id from cache + * + * @param string $id Cache id + * @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested + * @return bool|string + */ + public function load($id, $doNotTestCacheValidity = false) + { + if (!empty($this->preloadKeys) && empty($this->preloadedData)) { + $redis = $this->_slave ?? $this->_redis; + $redis = $redis->pipeline(); + + foreach ($this->preloadKeys as $key) { + $redis->hGet(self::PREFIX_KEY . $key, self::FIELD_DATA); + } + + $this->preloadedData = array_filter(array_combine($this->preloadKeys, $redis->exec())); + } + + if (isset($this->preloadedData[$id])) { + return $this->_decodeData($this->preloadedData[$id]); + } + + return parent::load($id, $doNotTestCacheValidity); + } + + /** + * Cover errors on save operations, which may occurs when Redis cannot evict keys, which is expected in some cases. + * + * @param string $data + * @param string $id + * @param array $tags + * @param bool $specificLifetime + * @return bool + */ + public function save($data, $id, $tags = [], $specificLifetime = false) + { + try { + parent::save($data, $id, $tags, $specificLifetime); + } catch (\Throwable $exception) { + return false; + } + + return true; + } +} diff --git a/lib/internal/Magento/Framework/Cache/Backend/RemoteSynchronizedCache.php b/lib/internal/Magento/Framework/Cache/Backend/RemoteSynchronizedCache.php index 007f921259bed..90c1bf5808737 100644 --- a/lib/internal/Magento/Framework/Cache/Backend/RemoteSynchronizedCache.php +++ b/lib/internal/Magento/Framework/Cache/Backend/RemoteSynchronizedCache.php @@ -9,8 +9,10 @@ /** * Remote synchronized cache * - * This class created for correct work local caches with multiple web nodes, - * that will be check cache status from remote cache + * This class created for correct work witch local caches and multiple web nodes, + * in order to be sure that we always have up to date local version of cache. + * This class will be check cache version from remote cache and in case it newer + * than local one, it will update local one from remote cache a.k.a two level cache. */ class RemoteSynchronizedCache extends \Zend_Cache_Backend implements \Zend_Cache_Backend_ExtendedInterface { @@ -36,11 +38,15 @@ class RemoteSynchronizedCache extends \Zend_Cache_Backend implements \Zend_Cache protected $cacheInvalidationTime; /** - * {@inheritdoc} + * Suffix for hash to compare data version in cache storage. + */ + private const HASH_SUFFIX = ':hash'; + + /** + * @inheritdoc */ protected $_options = [ 'remote_backend' => '', - 'remote_backend_invalidation_time_id' => 'default_remote_backend_invalidation_time', 'remote_backend_custom_naming' => true, 'remote_backend_autoload' => true, 'remote_backend_options' => [], @@ -52,6 +58,7 @@ class RemoteSynchronizedCache extends \Zend_Cache_Backend implements \Zend_Cache /** * @param array $options + * @throws \Zend_Cache_Exception */ public function __construct(array $options = []) { @@ -97,76 +104,137 @@ public function __construct(array $options = []) } /** - * Update remote cache status info + * @inheritdoc + */ + public function setDirectives($directives) + { + return $this->local->setDirectives($directives); + } + + /** + * Return hash sign of the data. * - * @return void + * @param string $data + * @return string */ - private function updateRemoteCacheStatusInfo() + private function getDataVersion(string $data) { - $this->remote->save(time(), $this->_options['remote_backend_invalidation_time_id'], [], null); - $this->cacheInvalidationTime = null; + return \hash('sha256', $data); } /** - * {@inheritdoc} + * Load data version by id from remote. + * + * @param string $id + * @return false|string */ - public function setDirectives($directives) + private function loadRemoteDataVersion(string $id) { - return $this->local->setDirectives($directives); + return $this->remote->load( + $id . self::HASH_SUFFIX + ); } /** - * {@inheritdoc} + * Save new data version to remote. + * + * @param string $data + * @param string $id + * @param array $tags + * @param mixed $specificLifetime + * @return bool + */ + private function saveRemoteDataVersion(string $data, string $id, array $tags, $specificLifetime = false) + { + return $this->remote->save($this->getDataVersion($data), $id . self::HASH_SUFFIX, $tags, $specificLifetime); + } + + /** + * Remove remote data version. + * + * @param string $id + * @return bool + */ + private function removeRemoteDataVersion($id) + { + return $this->remote->remove($id . self::HASH_SUFFIX); + } + + /** + * @inheritdoc */ public function load($id, $doNotTestCacheValidity = false) { - $dataModificationTime = $this->local->test($id); - if ($this->cacheInvalidationTime === null) { - $this->cacheInvalidationTime = $this->remote->load($this->_options['remote_backend_invalidation_time_id']); - } - if ($dataModificationTime >= $this->cacheInvalidationTime) { - return $this->local->load($id, $doNotTestCacheValidity); + $localData = $this->local->load($id); + $remoteData = false; + + if (false === $localData) { + $remoteData = $this->remote->load($id); + + if (false === $remoteData) { + return false; + } } else { - return false; + if ($this->getDataVersion($localData) !== $this->loadRemoteDataVersion($id)) { + $localData = false; + $remoteData = $this->remote->load($id); + } } + + if ($remoteData !== false) { + $this->local->save($remoteData, $id); + $localData = $remoteData; + } + + return $localData; } /** - * {@inheritdoc} + * @inheritdoc */ public function test($id) { - return $this->local->test($id); + return $this->local->test($id) ?? $this->remote->test($id); } /** - * {@inheritdoc} + * @inheritdoc */ public function save($data, $id, $tags = [], $specificLifetime = false) { - return $this->local->save($data, $id, $tags, $specificLifetime); + $dataToSave = $data; + $remHash = $this->loadRemoteDataVersion($id); + + if ($remHash !== false) { + $dataToSave = $this->remote->load($id); + } else { + $this->remote->save($data, $id, $tags, $specificLifetime); + $this->saveRemoteDataVersion($data, $id, $tags, $specificLifetime); + } + + return $this->local->save($dataToSave, $id, [], $specificLifetime); } /** - * {@inheritdoc} + * @inheritdoc */ public function remove($id) { - $this->updateRemoteCacheStatusInfo(); - return $this->local->remove($id); + return $this->removeRemoteDataVersion($id) && + $this->remote->remove($id) && + $this->local->remove($id); } /** - * {@inheritdoc} + * @inheritdoc */ public function clean($mode = \Zend_Cache::CLEANING_MODE_ALL, $tags = []) { - $this->updateRemoteCacheStatusInfo(); - return $this->local->clean($mode, $tags); + return $this->remote->clean($mode, $tags); } /** - * {@inheritdoc} + * @inheritdoc */ public function getIds() { @@ -174,7 +242,7 @@ public function getIds() } /** - * {@inheritdoc} + * @inheritdoc */ public function getTags() { @@ -182,7 +250,7 @@ public function getTags() } /** - * {@inheritdoc} + * @inheritdoc */ public function getIdsMatchingTags($tags = []) { @@ -190,7 +258,7 @@ public function getIdsMatchingTags($tags = []) } /** - * {@inheritdoc} + * @inheritdoc */ public function getIdsNotMatchingTags($tags = []) { @@ -198,7 +266,7 @@ public function getIdsNotMatchingTags($tags = []) } /** - * {@inheritdoc} + * @inheritdoc */ public function getIdsMatchingAnyTags($tags = []) { @@ -206,7 +274,7 @@ public function getIdsMatchingAnyTags($tags = []) } /** - * {@inheritdoc} + * @inheritdoc */ public function getFillingPercentage() { @@ -214,7 +282,7 @@ public function getFillingPercentage() } /** - * {@inheritdoc} + * @inheritdoc */ public function getMetadatas($id) { @@ -222,7 +290,7 @@ public function getMetadatas($id) } /** - * {@inheritdoc} + * @inheritdoc */ public function touch($id, $extraLifetime) { @@ -230,7 +298,7 @@ public function touch($id, $extraLifetime) } /** - * {@inheritdoc} + * @inheritdoc */ public function getCapabilities() { diff --git a/lib/internal/Magento/Framework/Cache/LockGuardedCacheLoader.php b/lib/internal/Magento/Framework/Cache/LockGuardedCacheLoader.php index 216d8e9a0a01b..d15f23e0d7c0b 100644 --- a/lib/internal/Magento/Framework/Cache/LockGuardedCacheLoader.php +++ b/lib/internal/Magento/Framework/Cache/LockGuardedCacheLoader.php @@ -37,18 +37,33 @@ class LockGuardedCacheLoader private $delayTimeout; /** + * Timeout for information to be collected and saved. + * If timeout passed that means that data cannot be saved right now. + * And we will just return collected data. + * + * Value of the variable in milliseconds. + * + * @var int + */ + private $loadTimeout; + + /** + * LockGuardedCacheLoader constructor. * @param LockManagerInterface $locker * @param int $lockTimeout * @param int $delayTimeout + * @param int $loadTimeout */ public function __construct( LockManagerInterface $locker, int $lockTimeout = 10000, - int $delayTimeout = 20 + int $delayTimeout = 20, + int $loadTimeout = 10000 ) { $this->locker = $locker; $this->lockTimeout = $lockTimeout; $this->delayTimeout = $delayTimeout; + $this->loadTimeout = $loadTimeout; } /** @@ -67,21 +82,21 @@ public function lockedLoadData( callable $dataSaver ) { $cachedData = $dataLoader(); //optimistic read - - while ($cachedData === false && $this->locker->isLocked($lockName)) { - usleep($this->delayTimeout * 1000); - $cachedData = $dataLoader(); - } + $deadline = microtime(true) + $this->loadTimeout; while ($cachedData === false) { - try { - if ($this->locker->lock($lockName, $this->lockTimeout / 1000)) { + if ($deadline <= microtime(true)) { + return $dataCollector(); + } + + if ($this->locker->lock($lockName, $this->lockTimeout / 1000)) { + try { $data = $dataCollector(); $dataSaver($data); $cachedData = $data; + } finally { + $this->locker->unlock($lockName); } - } finally { - $this->locker->unlock($lockName); } if ($cachedData === false) { diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/RemoteSynchronizedCacheTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/RemoteSynchronizedCacheTest.php index 6aca2bedd4989..9a1afc2ebd6ea 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/RemoteSynchronizedCacheTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/Backend/RemoteSynchronizedCacheTest.php @@ -6,6 +6,9 @@ namespace Magento\Framework\Cache\Test\Unit\Backend; +use Magento\Framework\Cache\Backend\Database; +use Magento\Framework\Cache\Backend\RemoteSynchronizedCache; + class RemoteSynchronizedCacheTest extends \PHPUnit\Framework\TestCase { /** @@ -13,9 +16,43 @@ class RemoteSynchronizedCacheTest extends \PHPUnit\Framework\TestCase */ protected $objectManager; + /** + * @var \Cm_Cache_Backend_File|\PHPUnit_Framework_MockObject_MockObject + */ + private $localCacheMockExample; + + /** + * @var Database|\PHPUnit_Framework_MockObject_MockObject + */ + private $remoteCacheMockExample; + + /** + * @var RemoteSynchronizedCache + */ + private $remoteSyncCacheInstance; + protected function setUp() { $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); + + $this->localCacheMockExample = $this->getMockBuilder(\Cm_Cache_Backend_File::class) + ->disableOriginalConstructor() + ->getMock(); + + $this->remoteCacheMockExample = $this->getMockBuilder(\Magento\Framework\Cache\Backend\Database::class) + ->disableOriginalConstructor() + ->getMock(); + /** @var \Magento\Framework\Cache\Backend\Database $databaseCacheInstance */ + + $this->remoteSyncCacheInstance = $this->objectManager->getObject( + \Magento\Framework\Cache\Backend\RemoteSynchronizedCache::class, + [ + 'options' => [ + 'remote_backend' => $this->remoteCacheMockExample, + 'local_backend' => $this->localCacheMockExample, + ], + ] + ); } /** @@ -109,152 +146,135 @@ public function initializeWithOutExceptionDataProvider() } /** - * @param array $options - * @param bool|string $expected - * - * @dataProvider loadDataProvider + * Test that load will always return newest data. */ - public function testLoad($options, $expected) + public function testLoadWithLocalData() { - /** @var \Magento\Framework\Cache\Backend\Database $database */ - $database = $this->objectManager->getObject( - \Magento\Framework\Cache\Backend\RemoteSynchronizedCache::class, - [ - 'options' => $options, - ] - ); + $localData = 1; + $remoteData = 2; - $this->assertEquals($expected, $database->load(5)); - } + $this->localCacheMockExample + ->expects($this->at(0)) + ->method('load') + ->will($this->returnValue($localData)); - /** - * @return array - */ - public function loadDataProvider() - { - return [ - 'cacheInvalidationTime_is_less_than_that_dataModificationTime' => [ - 'options' => [ - 'remote_backend' => $this->getDatabaseMock(444), - 'local_backend' => $this->getFileMock(555, 'loaded_value'), - ], - 'expected' => 'loaded_value', - ], - 'cacheInvalidationTime_is_greater_than_that_dataModificationTime' => [ - 'options' => [ - 'remote_backend' => $this->getDatabaseMock(444), - 'local_backend' => $this->getFileMock(333, 'loaded_value'), - ], - 'expected' => false, - ], - 'cacheInvalidationTime_is_equal_to_the_dataModificationTime' => [ - 'options' => [ - 'remote_backend' => $this->getDatabaseMock(444), - 'local_backend' => $this->getFileMock(444, 'loaded_value'), - ], - 'expected' => 'loaded_value', - ], - ]; - } + $this->remoteCacheMockExample + ->expects($this->at(0)) + ->method('load') + ->will($this->returnValue(\hash('sha256', $remoteData))); - /** - * @param integer $cacheInvalidationTime - * @return \Magento\Framework\Cache\Backend\Database|\PHPUnit_Framework_MockObject_MockObject - */ - public function getDatabaseMock($cacheInvalidationTime) - { - $databaseMock = $this->getMockBuilder(\Magento\Framework\Cache\Backend\Database::class) - ->setMethods(['load']) - ->disableOriginalConstructor() - ->getMock(); - $databaseMock->expects($this->once()) + $this->remoteCacheMockExample + ->expects($this->at(1)) ->method('load') - ->will($this->returnValue($cacheInvalidationTime)); + ->will($this->returnValue($remoteData)); - return $databaseMock; + $this->localCacheMockExample + ->expects($this->atLeastOnce()) + ->method('save') + ->with($remoteData) + ->will($this->returnValue(true)); + + $this->assertEquals($remoteData, $this->remoteSyncCacheInstance->load(1)); } - /** - * @param integer $dataModificationTime - * @return \Cm_Cache_Backend_File|\PHPUnit_Framework_MockObject_MockObject - */ - public function getFileMock($dataModificationTime, $cacheResult) + public function testLoadWithNoLocalAndNoRemoteData() { - $fileMock = $this->getMockBuilder(\Cm_Cache_Backend_File::class) - ->setMethods(['test', 'load']) - ->disableOriginalConstructor() - ->getMock(); - $fileMock->expects($this->once()) - ->method('test') - ->will($this->returnValue($dataModificationTime)); - $fileMock->expects($this->any()) + $localData = false; + $remoteData = false; + + $this->localCacheMockExample + ->expects($this->at(0)) + ->method('load') + ->will($this->returnValue($localData)); + + $this->remoteCacheMockExample + ->expects($this->at(0)) ->method('load') - ->will($this->returnValue($cacheResult)); + ->will($this->returnValue($remoteData)); - return $fileMock; + $this->assertEquals($remoteData, $this->remoteSyncCacheInstance->load(1)); } - public function testRemove() + public function testLoadWithNoLocalAndRemoteData() { - $databaseMock = $this->getMockBuilder(\Magento\Framework\Cache\Backend\Database::class) - ->setMethods(['save']) - ->disableOriginalConstructor() - ->getMock(); - $databaseMock->expects($this->once()) + $localData = false; + $remoteData = 1; + + $this->localCacheMockExample + ->expects($this->atLeastOnce()) + ->method('load') + ->will($this->returnValue($localData)); + + $this->remoteCacheMockExample + ->expects($this->at(0)) + ->method('load') + ->will($this->returnValue($remoteData)); + + $this->localCacheMockExample + ->expects($this->atLeastOnce()) ->method('save') ->will($this->returnValue(true)); - $fileMock = $this->getMockBuilder(\Cm_Cache_Backend_File::class) - ->setMethods(['remove']) - ->disableOriginalConstructor() - ->getMock(); - $fileMock->expects($this->once()) + $this->assertEquals($remoteData, $this->remoteSyncCacheInstance->load(1)); + } + + public function testRemove() + { + $this->remoteCacheMockExample + ->expects($this->exactly(2)) ->method('remove') - ->will($this->returnValue(true)); + ->willReturn(true); - /** @var \Magento\Framework\Cache\Backend\Database $database */ - $database = $this->objectManager->getObject( - \Magento\Framework\Cache\Backend\RemoteSynchronizedCache::class, - [ - 'options' => [ - 'remote_backend' => $databaseMock, - 'local_backend' => $fileMock, - ] - ] - ); + $this->localCacheMockExample + ->expects($this->exactly(1)) + ->method('remove') + ->willReturn(true); - $this->assertEquals(true, $database->remove(5)); + $this->remoteSyncCacheInstance->remove(1); } public function testClean() { - $databaseMock = $this->getMockBuilder(\Magento\Framework\Cache\Backend\Database::class) - ->setMethods(['save']) - ->disableOriginalConstructor() - ->getMock(); - $databaseMock->expects($this->once()) + $this->remoteCacheMockExample + ->expects($this->exactly(1)) + ->method('clean') + ->willReturn(true); + + $this->remoteSyncCacheInstance->clean(); + } + + public function testSaveWithRemoteData() + { + $remoteData = 1; + + $this->remoteCacheMockExample + ->expects($this->at(0)) + ->method('load') + ->willReturn(\hash('sha256', $remoteData)); + + $this->remoteCacheMockExample + ->expects($this->at(1)) + ->method('load') + ->willReturn($remoteData); + + $this->localCacheMockExample + ->expects($this->once()) ->method('save') - ->will($this->returnValue(true)); + ->willReturn(true); - $fileMock = $this->getMockBuilder(\Cm_Cache_Backend_File::class) - ->setMethods(['clean']) - ->disableOriginalConstructor() - ->getMock(); - $fileMock->expects($this->once()) - ->method('clean') - ->will($this->returnValue(true)); + $this->remoteSyncCacheInstance->save($remoteData, 1); + } - /** @var \Magento\Framework\Cache\Backend\Database $database */ - $database = $this->objectManager->getObject( - \Magento\Framework\Cache\Backend\RemoteSynchronizedCache::class, - [ - 'options' => [ - 'remote_backend' => $databaseMock, - 'local_backend' => $fileMock, - ] - ] - ); + public function testSaveWithoutRemoteData() + { + $this->remoteCacheMockExample + ->expects($this->at(0)) + ->method('load') + ->willReturn(false); + + $this->remoteCacheMockExample->expects($this->exactly(2))->method('save'); + $this->localCacheMockExample->expects($this->once())->method('save'); - $this->assertEquals(true, $database->clean()); + $this->remoteSyncCacheInstance->save(1, 1); } } diff --git a/lib/internal/Magento/Framework/Interception/Config/Config.php b/lib/internal/Magento/Framework/Interception/Config/Config.php index 3f16e9275bd08..abf2a6d9d57b7 100644 --- a/lib/internal/Magento/Framework/Interception/Config/Config.php +++ b/lib/internal/Magento/Framework/Interception/Config/Config.php @@ -187,8 +187,6 @@ public function hasPlugins($type) */ private function initializeUncompiled($classDefinitions = []) { - $this->cacheManager->clean($this->_cacheId); - $this->generateIntercepted($classDefinitions); $this->cacheManager->save($this->_cacheId, $this->_intercepted); diff --git a/lib/internal/Magento/Framework/Lock/Backend/Cache.php b/lib/internal/Magento/Framework/Lock/Backend/Cache.php index dfe6bbb828352..1bfc7fdeda255 100644 --- a/lib/internal/Magento/Framework/Lock/Backend/Cache.php +++ b/lib/internal/Magento/Framework/Lock/Backend/Cache.php @@ -37,6 +37,10 @@ public function __construct(FrontendInterface $cache) */ public function lock(string $name, int $timeout = -1): bool { + if ((bool)$this->cache->test($this->getIdentifier($name))) { + return false; + } + return $this->cache->save('1', $this->getIdentifier($name), [], $timeout); } diff --git a/lib/internal/Magento/Framework/Lock/Backend/FileLock.php b/lib/internal/Magento/Framework/Lock/Backend/FileLock.php index d168e910a4ab7..dd8eda9621667 100644 --- a/lib/internal/Magento/Framework/Lock/Backend/FileLock.php +++ b/lib/internal/Magento/Framework/Lock/Backend/FileLock.php @@ -91,6 +91,7 @@ public function lock(string $name, int $timeout = -1): bool while (!$this->tryToLock($fileResource)) { if (!$skipDeadline && $deadline <= microtime(true)) { + $this->tryToUnlock($fileResource); $this->fileDriver->fileClose($fileResource); return false; } @@ -124,6 +125,7 @@ public function isLocked(string $name): bool } else { $result = true; } + $this->tryToUnlock($fileResource); $this->fileDriver->fileClose($fileResource); } } catch (FileSystemException $exception) { diff --git a/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php b/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php index 014d699cb239d..56a4a85b17d99 100644 --- a/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php +++ b/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php @@ -260,9 +260,12 @@ private function getExcludedModulePaths(array $modulePaths) */ private function getExcludedLibraryPaths(array $libraryPaths) { - $libraryPaths = array_map(function ($libraryPath) { - return preg_quote($libraryPath, '#'); - }, $libraryPaths); + $libraryPaths = array_map( + function ($libraryPath) { + return preg_quote($libraryPath, '#'); + }, + $libraryPaths + ); $excludedLibraryPaths = [ '#^(?:' . join('|', $libraryPaths) . ')/([\\w]+/)?Test#', @@ -395,7 +398,8 @@ private function getOperationsConfiguration( $compiledPathsList['application'], $compiledPathsList['library'], $compiledPathsList['generated_helpers'], - ] + ], + OperationFactory::APPLICATION_ACTION_LIST_GENERATOR => [], ]; return $operations; diff --git a/setup/src/Magento/Setup/Module/Di/App/Task/Operation/AppActionListGenerator.php b/setup/src/Magento/Setup/Module/Di/App/Task/Operation/AppActionListGenerator.php new file mode 100644 index 0000000000000..c3426dd0d9205 --- /dev/null +++ b/setup/src/Magento/Setup/Module/Di/App/Task/Operation/AppActionListGenerator.php @@ -0,0 +1,58 @@ +<?php +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +namespace Magento\Setup\Module\Di\App\Task\Operation; + +use Magento\Setup\Module\Di\App\Task\OperationInterface; +use Magento\Framework\Module\Dir\Reader as ModuleReader; +use Magento\Framework\App\ObjectManager\ConfigWriterInterface; + +/** + * Pregenerates actions for Magento + */ +class AppActionListGenerator implements OperationInterface +{ + /** + * @var ModuleReader + */ + private $moduleReader; + + /** + * @var \Magento\Framework\App\ObjectManager\ConfigWriterInterface + */ + private $configWriter; + + /** + * @param ModuleReader $moduleReader + * @param ConfigWriterInterface $configWriter + */ + public function __construct( + ModuleReader $moduleReader, + ConfigWriterInterface $configWriter + ) { + $this->moduleReader = $moduleReader; + $this->configWriter = $configWriter; + } + + /** + * @inheritDoc + */ + public function doOperation() + { + $actionList = $this->moduleReader->getActionFiles(); + $this->configWriter->write( + 'app_action_list', + $actionList + ); + } + + /** + * @inheritDoc + */ + public function getName() + { + return 'App action list generation'; + } +} diff --git a/setup/src/Magento/Setup/Module/Di/App/Task/OperationFactory.php b/setup/src/Magento/Setup/Module/Di/App/Task/OperationFactory.php index 8b423a0adef83..607790e41421c 100644 --- a/setup/src/Magento/Setup/Module/Di/App/Task/OperationFactory.php +++ b/setup/src/Magento/Setup/Module/Di/App/Task/OperationFactory.php @@ -5,6 +5,12 @@ */ namespace Magento\Setup\Module\Di\App\Task; +use Magento\Setup\Module\Di\App\Task\Operation\AppActionListGenerator; +use Magento\Setup\Module\Di\App\Task\Operation\PluginListGenerator; + +/** + * Factory that creates list of OperationInterface classes + */ class OperationFactory { /** @@ -47,6 +53,11 @@ class OperationFactory */ const APPLICATION_CODE_GENERATOR = 'application_code_generator'; + /** + * Application action list generator + */ + const APPLICATION_ACTION_LIST_GENERATOR = 'application_action_list_generator'; + /** * Operations definitions * @@ -61,6 +72,7 @@ class OperationFactory self::INTERCEPTION_CACHE => \Magento\Setup\Module\Di\App\Task\Operation\InterceptionCache::class, self::REPOSITORY_GENERATOR => \Magento\Setup\Module\Di\App\Task\Operation\RepositoryGenerator::class, self::PROXY_GENERATOR => \Magento\Setup\Module\Di\App\Task\Operation\ProxyGenerator::class, + self::APPLICATION_ACTION_LIST_GENERATOR => AppActionListGenerator::class, ]; /** diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Command/DiCompileCommandTest.php b/setup/src/Magento/Setup/Test/Unit/Console/Command/DiCompileCommandTest.php index ca94a1b6fd559..1eb2388fe1d53 100644 --- a/setup/src/Magento/Setup/Test/Unit/Console/Command/DiCompileCommandTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Console/Command/DiCompileCommandTest.php @@ -143,7 +143,7 @@ public function testExecute() ->with(\Symfony\Component\Console\Helper\ProgressBar::class) ->willReturn($progressBar); - $this->managerMock->expects($this->exactly(7))->method('addOperation') + $this->managerMock->expects($this->exactly(8))->method('addOperation') ->withConsecutive( [OperationFactory::PROXY_GENERATOR, []], [OperationFactory::REPOSITORY_GENERATOR, $this->anything()], @@ -160,7 +160,8 @@ public function testExecute() })], [OperationFactory::INTERCEPTION, $this->anything()], [OperationFactory::AREA_CONFIG_GENERATOR, $this->anything()], - [OperationFactory::INTERCEPTION_CACHE, $this->anything()] + [OperationFactory::INTERCEPTION_CACHE, $this->anything()], + [OperationFactory::APPLICATION_ACTION_LIST_GENERATOR, $this->anything()] ) ;