From 7a04c04bec1fa3525d8b43ca684e13da3cb37974 Mon Sep 17 00:00:00 2001 From: Pascal Brouwers Date: Fri, 24 Jan 2020 15:42:02 +0100 Subject: [PATCH 01/19] issue/26526 Fix orderRepository does not check if there are no extensionAttributes --- app/code/Magento/Sales/Model/OrderRepository.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/code/Magento/Sales/Model/OrderRepository.php b/app/code/Magento/Sales/Model/OrderRepository.php index f93de4c32d888..baac39b333712 100644 --- a/app/code/Magento/Sales/Model/OrderRepository.php +++ b/app/code/Magento/Sales/Model/OrderRepository.php @@ -157,6 +157,9 @@ public function get($id) private function setOrderTaxDetails(OrderInterface $order) { $extensionAttributes = $order->getExtensionAttributes(); + if ($extensionAttributes === null) { + $extensionAttributes = $this->orderExtensionFactory->create(); + } $orderTaxDetails = $this->orderTaxManagement->getOrderTaxDetails($order->getEntityId()); $appliedTaxes = $orderTaxDetails->getAppliedTaxes(); @@ -180,6 +183,9 @@ private function setOrderTaxDetails(OrderInterface $order) private function setPaymentAdditionalInfo(OrderInterface $order): void { $extensionAttributes = $order->getExtensionAttributes(); + if ($extensionAttributes === null) { + $extensionAttributes = $this->orderExtensionFactory->create(); + } $paymentAdditionalInformation = $order->getPayment()->getAdditionalInformation(); $objects = []; From 3f616adb872b020c2ec132f2998d806ef7da2b8a Mon Sep 17 00:00:00 2001 From: Ashoka de Wit Date: Thu, 26 Mar 2020 12:19:06 +0800 Subject: [PATCH 02/19] Convert MSRP currency of configurable product options The MSRP of configurable products is updated in Javascript when an option is chosen. Javascript uses an object with prices of the options. The prices in this object are converted to the chosen currency. MSRP prices however were not converted, leading to the price being displayed in a wrong currency. --- .../Block/Product/View/Type/Configurable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php b/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php index 55c0c8f6ca4ce..7fe0aca43c5b8 100644 --- a/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php +++ b/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php @@ -321,7 +321,7 @@ protected function getOptionPrices() 'tierPrices' => $tierPrices, 'msrpPrice' => [ 'amount' => $this->localeFormat->getNumber( - $product->getMsrp() + $this->priceCurrency->convertAndRound($product->getMsrp()) ), ], ]; From 96ea4d5f260113b010f385b22548410ee57e95f6 Mon Sep 17 00:00:00 2001 From: joweecaquicla Date: Fri, 4 Sep 2020 00:18:12 +0800 Subject: [PATCH 03/19] magento/adobe-stock-integration#1794: [MFTF] Unskip AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest - unskip test --- ...ediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml index 8191d5570f1e8..36df5bf736d1b 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml +++ b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml @@ -9,9 +9,6 @@ - - - @@ -84,9 +81,8 @@ <deleteData createDataKey="category" stepKey="deleteCategory"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> - <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetailsToVerfifyEmptyUsedIn"/> + <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetailsToVerifyEmptyUsedIn"/> <actionGroup ref="AssertAdminEnhancedMediaGalleryUsedInSectionNotDisplayedActionGroup" stepKey="assertThereIsNoUsedInSection"/> <actionGroup ref="AdminEnhancedMediaGalleryCloseViewDetailsActionGroup" stepKey="closeDetails"/> - </test> </tests> From cbca0326509f10f80085055bf67a241436e246b2 Mon Sep 17 00:00:00 2001 From: joweecaquicla <joie@abovethefray.io> Date: Fri, 4 Sep 2020 03:58:35 +0800 Subject: [PATCH 04/19] magento/adobe-stock-integration#1794: [MFTF] Unskip AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest - modified assert image column --- .../AssertAdminCategoryGridPageImageColumnActionGroup.xml | 7 ++++++- .../AdminMediaGalleryCatalogUiCategoryGridSection.xml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/ActionGroup/AssertAdminCategoryGridPageImageColumnActionGroup.xml b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/ActionGroup/AssertAdminCategoryGridPageImageColumnActionGroup.xml index b110ce44a8469..9cd627e900873 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/ActionGroup/AssertAdminCategoryGridPageImageColumnActionGroup.xml +++ b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/ActionGroup/AssertAdminCategoryGridPageImageColumnActionGroup.xml @@ -15,6 +15,11 @@ <description>Assert category grid page image column a specific category</description> </annotations> - <seeElement selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.image(file)}}" stepKey="assertImageColumn"/> + <grabAttributeFrom selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.image}}" userInput="src" + stepKey="getImageSrc"/> + <assertStringContainsString stepKey="assertImageSrc"> + <actualResult type="string">{$getImageSrc}</actualResult> + <expectedResult type="string">{{file}}</expectedResult> + </assertStringContainsString> </actionGroup> </actionGroups> diff --git a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Section/AdminMediaGalleryCatalogUiCategoryGridSection.xml b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Section/AdminMediaGalleryCatalogUiCategoryGridSection.xml index f65ec84bc2ec8..96b4bad5d5add 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Section/AdminMediaGalleryCatalogUiCategoryGridSection.xml +++ b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Section/AdminMediaGalleryCatalogUiCategoryGridSection.xml @@ -11,7 +11,7 @@ <section name="AdminMediaGalleryCatalogUiCategoryGridSection"> <element name="clearFilters" type="button" selector=".admin__data-grid-header [data-action='grid-filter-reset']" timeout="30"/> <element name="activeFilterPlaceholder" type="text" selector="//div[@class='admin__current-filters-list-wrap']//li//span[contains(text(), '{{filterPlaceholder}}')]" parameterized="true"/> - <element name="image" type="text" selector="//tr//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Image')]/preceding-sibling::th) +1]//img[contains(@src, '{{file}}')]" parameterized="true"/> + <element name="image" type="text" selector="//tr//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Image')]/preceding-sibling::th) +1]//img"/> <element name="columnValue" type="text" selector="//tr//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., '{{columnName}}')]/preceding-sibling::th) +1 ]//div" parameterized="true"/> <element name="edit" type="button" selector="//tr[td//text()[contains(., '{{categoryName}}')]]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., 'Action')]/preceding-sibling::th) +1 ]//*[text()='{{actionButton}}']" parameterized="true"/> </section> From bb408984f2d58d301eef6d8faf3bff2c268f385f Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky <engcom-vendorworker-foxtrot@adobe.com> Date: Fri, 4 Sep 2020 15:24:24 +0300 Subject: [PATCH 05/19] magento/magento2#26526: OrderRepository does not check if there are no extensionAttributes. --- .../Test/Unit/Model/OrderRepositoryTest.php | 69 +++++++++++++++++-- 1 file changed, 64 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php index 84c66d12c10d8..407d158e6f8d4 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php @@ -18,12 +18,13 @@ use Magento\Sales\Api\Data\OrderInterface; use Magento\Sales\Api\Data\OrderPaymentInterface; use Magento\Sales\Api\Data\OrderSearchResultInterfaceFactory as SearchResultFactory; +use Magento\Sales\Model\Order; use Magento\Sales\Model\Order\Shipping; use Magento\Sales\Model\Order\ShippingAssignment; use Magento\Sales\Model\Order\ShippingAssignmentBuilder; use Magento\Sales\Model\OrderRepository; use Magento\Sales\Model\ResourceModel\Metadata; -use Magento\Sales\Model\ResourceModel\Order; +use Magento\Sales\Model\ResourceModel\Order as OrderResource; use Magento\Sales\Model\ResourceModel\Order\Collection; use Magento\Tax\Api\Data\OrderTaxDetailsInterface; use Magento\Tax\Api\OrderTaxManagementInterface; @@ -70,6 +71,11 @@ class OrderRepositoryTest extends TestCase */ private $paymentAdditionalInfoFactory; + /** + * @var OrderExtensionFactory|\PHPUnit_Framework_MockObject_MockObject + */ + private $orderExtensionFactoryMock; + /** * Setup the test * @@ -88,7 +94,7 @@ protected function setUp(): void $this->collectionProcessor = $this->createMock( CollectionProcessorInterface::class ); - $orderExtensionFactoryMock = $this->getMockBuilder(OrderExtensionFactory::class) + $this->orderExtensionFactoryMock = $this->getMockBuilder(OrderExtensionFactory::class) ->disableOriginalConstructor() ->getMock(); $this->orderTaxManagementMock = $this->getMockBuilder(OrderTaxManagementInterface::class) @@ -103,7 +109,7 @@ protected function setUp(): void 'metadata' => $this->metadata, 'searchResultFactory' => $this->searchResultFactory, 'collectionProcessor' => $this->collectionProcessor, - 'orderExtensionFactory' => $orderExtensionFactoryMock, + 'orderExtensionFactory' => $this->orderExtensionFactoryMock, 'orderTaxManagement' => $this->orderTaxManagementMock, 'paymentAdditionalInfoFactory' => $this->paymentAdditionalInfoFactory ] @@ -178,10 +184,10 @@ public function testGetList() */ public function testSave() { - $mapperMock = $this->getMockBuilder(Order::class) + $mapperMock = $this->getMockBuilder(OrderResource::class) ->disableOriginalConstructor() ->getMock(); - $orderEntity = $this->createMock(\Magento\Sales\Model\Order::class); + $orderEntity = $this->createMock(Order::class); $extensionAttributes = $this->getMockBuilder(OrderExtension::class) ->addMethods(['getShippingAssignments']) ->getMock(); @@ -207,4 +213,57 @@ public function testSave() $orderEntity->expects($this->any())->method('getEntityId')->willReturn(1); $this->orderRepository->save($orderEntity); } + + /** + * Test for method get. + * + * @return void + */ + public function testGet() + { + $orderId = 1; + $appliedTaxes = 'applied_taxes'; + $items = 'items'; + $paymentInfo = []; + + $orderEntity = $this->createMock(Order::class); + $paymentMock = $this->getMockBuilder(OrderPaymentInterface::class) + ->disableOriginalConstructor()->getMockForAbstractClass(); + $paymentMock->expects($this->once())->method('getAdditionalInformation')->willReturn($paymentInfo); + $orderExtension = $this->getMockBuilder(OrderExtension::class) + ->setMethods( + [ + 'getShippingAssignments', + 'setAppliedTaxes', + 'setConvertingFromQuote', + 'setItemAppliedTaxes', + 'setPaymentAdditionalInfo' + ] + ) + ->disableOriginalConstructor() + ->getMockForAbstractClass(); + $orderExtension->expects($this->once())->method('getShippingAssignments')->willReturn(true); + $orderExtension->expects($this->once())->method('setAppliedTaxes')->with($appliedTaxes); + $orderExtension->expects($this->once())->method('setConvertingFromQuote')->with(true); + $orderExtension->expects($this->once())->method('setItemAppliedTaxes')->with($items); + $orderExtension->expects($this->once())->method('setPaymentAdditionalInfo')->with($paymentInfo); + $this->orderExtensionFactoryMock->expects($this->once())->method('create')->willReturn($orderExtension); + $orderEntity->expects($this->once())->method('load')->with($orderId)->willReturn($orderEntity); + $orderEntity->expects($this->exactly(2))->method('getEntityId')->willReturn($orderId); + $orderEntity->expects($this->once())->method('getPayment')->willReturn($paymentMock); + $orderEntity->expects($this->exactly(2))->method('setExtensionAttributes')->with($orderExtension); + $orderEntity->expects($this->exactly(3)) + ->method('getExtensionAttributes') + ->willReturnOnConsecutiveCalls(null, $orderExtension, $orderExtension); + $this->metadata->expects($this->once())->method('getNewInstance')->willReturn($orderEntity); + $orderTaxDetailsMock = $this->getMockBuilder(OrderTaxDetailsInterface::class) + ->disableOriginalConstructor() + ->setMethods(['setAppliedTaxes'])->getMockForAbstractClass(); + $orderTaxDetailsMock->expects($this->once())->method('getAppliedTaxes')->willReturn($appliedTaxes); + $orderTaxDetailsMock->expects($this->once())->method('getItems')->willReturn($items); + $this->orderTaxManagementMock->expects($this->atLeastOnce())->method('getOrderTaxDetails') + ->willReturn($orderTaxDetailsMock); + + $this->orderRepository->get($orderId); + } } From 86e96564509e78fb04670d2f2d7157d08e9d0189 Mon Sep 17 00:00:00 2001 From: joweecaquicla <joie@abovethefray.io> Date: Fri, 4 Sep 2020 21:06:15 +0800 Subject: [PATCH 06/19] magento/adobe-stock-integration#1794: [MFTF] Unskip AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest - fixed spacing on data --- .../Test/Mftf/Data/AdminEnhancedMediaGalleryImageData.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Data/AdminEnhancedMediaGalleryImageData.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Data/AdminEnhancedMediaGalleryImageData.xml index dbc298798ee8e..4adf92b1c4c09 100644 --- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Data/AdminEnhancedMediaGalleryImageData.xml +++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Data/AdminEnhancedMediaGalleryImageData.xml @@ -24,7 +24,7 @@ <data key="fileName">png</data> <data key="extension">png</data> </entity> - <entity name="ImageUploadGif" type="uploadImage"> + <entity name="ImageUploadGif" type="uploadImage"> <data key="title" unique="suffix">Image1</data> <data key="file_type">Upload File</data> <data key="value">gif.gif</data> From f3ea93f27c2d7b6258bab7c165ede0ca5a219af0 Mon Sep 17 00:00:00 2001 From: joweecaquicla <joie@abovethefray.io> Date: Sat, 5 Sep 2020 01:02:06 +0800 Subject: [PATCH 07/19] magento/adobe-stock-integration#1794: [MFTF] Unskip AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest - modified actiongroup, test and added new category data entity --- ...eProductsInMenuEnabledColumnsActionGroup.xml | 5 +++++ .../AdminEnhancedMediaGalleryCategoryData.xml | 17 +++++++++++++++++ ...atalogUiVerifyUsedInLinkCategoryGridTest.xml | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Data/AdminEnhancedMediaGalleryCategoryData.xml diff --git a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/ActionGroup/AssertAdminCategoryGridPageProductsInMenuEnabledColumnsActionGroup.xml b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/ActionGroup/AssertAdminCategoryGridPageProductsInMenuEnabledColumnsActionGroup.xml index e5d6f26e777fc..15b0ff149d807 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/ActionGroup/AssertAdminCategoryGridPageProductsInMenuEnabledColumnsActionGroup.xml +++ b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/ActionGroup/AssertAdminCategoryGridPageProductsInMenuEnabledColumnsActionGroup.xml @@ -12,6 +12,11 @@ <description>Assert category grid page products, in menu, and enabled column values for a specific category</description> </annotations> + <grabTextFrom selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.columnValue('Display Mode')}}" stepKey="grabDisplayModeColumnValue"/> + <assertEquals stepKey="assertDisplayModeColumn"> + <expectedResult type="string">PRODUCTS</expectedResult> + <actualResult type="variable">grabDisplayModeColumnValue</actualResult> + </assertEquals> <grabTextFrom selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.columnValue('Products')}}" stepKey="grabProductsColumnValue"/> <assertEquals stepKey="assertProductsColumn"> <expectedResult type="string">0</expectedResult> diff --git a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Data/AdminEnhancedMediaGalleryCategoryData.xml b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Data/AdminEnhancedMediaGalleryCategoryData.xml new file mode 100644 index 0000000000000..34cc0f4fa752c --- /dev/null +++ b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Data/AdminEnhancedMediaGalleryCategoryData.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> + <entity name="TestSubCategory" type="category"> + <data key="name">TestSubCategory</data> + <data key="name_lwr">testsubcategory</data> + <data key="is_active">true</data> + <data key="include_in_menu">true</data> + </entity> +</entities> diff --git a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml index 36df5bf736d1b..dba78d0cf5261 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml +++ b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml @@ -19,7 +19,7 @@ <group value="media_gallery_ui"/> </annotations> <before> - <createData entity="SimpleSubCategory" stepKey="category"/> + <createData entity="TestSubCategory" stepKey="category"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> From 27a9befc488ef2fd097d3779d150a0a9de75363c Mon Sep 17 00:00:00 2001 From: joweecaquicla <joie@abovethefray.io> Date: Sat, 5 Sep 2020 03:43:34 +0800 Subject: [PATCH 08/19] magento/adobe-stock-integration#1794: [MFTF] Unskip AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest - modified custom category entity, actiongroup, and test --- ...oryGridPageProductsInMenuEnabledColumnsActionGroup.xml | 5 ----- .../Mftf/Data/AdminEnhancedMediaGalleryCategoryData.xml | 4 ++-- ...iaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml | 8 ++++++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/ActionGroup/AssertAdminCategoryGridPageProductsInMenuEnabledColumnsActionGroup.xml b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/ActionGroup/AssertAdminCategoryGridPageProductsInMenuEnabledColumnsActionGroup.xml index 15b0ff149d807..e5d6f26e777fc 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/ActionGroup/AssertAdminCategoryGridPageProductsInMenuEnabledColumnsActionGroup.xml +++ b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/ActionGroup/AssertAdminCategoryGridPageProductsInMenuEnabledColumnsActionGroup.xml @@ -12,11 +12,6 @@ <description>Assert category grid page products, in menu, and enabled column values for a specific category</description> </annotations> - <grabTextFrom selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.columnValue('Display Mode')}}" stepKey="grabDisplayModeColumnValue"/> - <assertEquals stepKey="assertDisplayModeColumn"> - <expectedResult type="string">PRODUCTS</expectedResult> - <actualResult type="variable">grabDisplayModeColumnValue</actualResult> - </assertEquals> <grabTextFrom selector="{{AdminMediaGalleryCatalogUiCategoryGridSection.columnValue('Products')}}" stepKey="grabProductsColumnValue"/> <assertEquals stepKey="assertProductsColumn"> <expectedResult type="string">0</expectedResult> diff --git a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Data/AdminEnhancedMediaGalleryCategoryData.xml b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Data/AdminEnhancedMediaGalleryCategoryData.xml index 34cc0f4fa752c..d123cce516533 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Data/AdminEnhancedMediaGalleryCategoryData.xml +++ b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Data/AdminEnhancedMediaGalleryCategoryData.xml @@ -9,8 +9,8 @@ <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> <entity name="TestSubCategory" type="category"> - <data key="name">TestSubCategory</data> - <data key="name_lwr">testsubcategory</data> + <data key="name" unique="suffix">TestSubCategory</data> + <data key="name_lwr" unique="suffix">testsubcategory</data> <data key="is_active">true</data> <data key="include_in_menu">true</data> </entity> diff --git a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml index dba78d0cf5261..aaba740930267 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml +++ b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml @@ -21,13 +21,16 @@ <before> <createData entity="TestSubCategory" stepKey="category"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> + <argument name="tags" value=""/> + </actionGroup> </before> <after> <actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/> <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectSecondImageToDelete"> <argument name="imageName" value="{{UpdatedImageDetails.title}}"/> </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryClickDeleteImagesButtonActionGroup" stepKey="clikDeleteSelectedButton"/> + <actionGroup ref="AdminEnhancedMediaGalleryClickDeleteImagesButtonActionGroup" stepKey="clickDeleteSelectedButton"/> <actionGroup ref="AdminEnhancedMediaGalleryConfirmDeleteImagesActionGroup" stepKey="deleteImages"/> </after> @@ -36,6 +39,7 @@ <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromImageUploader"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetCategoryImageGalleryGridToDefaultView"/> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/> </actionGroup> @@ -77,7 +81,7 @@ <actionGroup ref="AssertAdminMediaGalleryAssetFilterPlaceHolderActionGroup" stepKey="assertFilterAppliedAfterUrlFilterApplier"> <argument name="filterPlaceholder" value="{{UpdatedImageDetails.title}}"/> </actionGroup> - <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="secondResetAdminDataGridToDefaultView"/> <deleteData createDataKey="category" stepKey="deleteCategory"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> From 811861c0609edcb71e7ae7cbb8e019e8e53aaa65 Mon Sep 17 00:00:00 2001 From: joweecaquicla <joie@abovethefray.io> Date: Mon, 7 Sep 2020 19:04:47 +0800 Subject: [PATCH 09/19] magento/adobe-stock-integration#1794: [MFTF] Unskip AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest - change to cache clean --- ...nMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml index aaba740930267..eb2f75dad0151 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml +++ b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml @@ -21,8 +21,8 @@ <before> <createData entity="TestSubCategory" stepKey="category"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> - <argument name="tags" value=""/> + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache"> + <argument name="tags" value="config full_page"/> </actionGroup> </before> <after> From d0ba33745ab8bedcd4a18f6757c7d5dd9ac4712a Mon Sep 17 00:00:00 2001 From: Oleh Usik <o.usik@atwix.com> Date: Mon, 7 Sep 2020 16:17:13 +0300 Subject: [PATCH 10/19] added AdminDeleteTaxRateActionGroup --- .../AdminDeleteTaxRateActionGroup.xml | 28 +++++++++++++++++++ .../AdminCreateTaxRateAllPostCodesTest.xml | 9 ++---- .../Test/AdminCreateTaxRateLargeRateTest.xml | 9 ++---- ...AdminCreateTaxRateSpecificPostcodeTest.xml | 9 ++---- ...dminCreateTaxRateWiderZipCodeRangeTest.xml | 9 ++---- .../AdminCreateTaxRateZipCodeRangeTest.xml | 9 ++---- .../Mftf/Test/DeleteTaxRateEntityTest.xml | 11 +++----- 7 files changed, 47 insertions(+), 37 deletions(-) create mode 100644 app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminDeleteTaxRateActionGroup.xml diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminDeleteTaxRateActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminDeleteTaxRateActionGroup.xml new file mode 100644 index 0000000000000..b609ef8827764 --- /dev/null +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminDeleteTaxRateActionGroup.xml @@ -0,0 +1,28 @@ +<?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="AdminDeleteTaxRateActionGroup"> + <annotations> + <description>Goes to the Admin Tax Rate grid page. Deletes the provided Tax Rate Code.</description> + </annotations> + <arguments> + <argument name="taxRateCode" type="string"/> + </arguments> + + <click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters"/> + <fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{taxRateCode}}" stepKey="fillNameFilter"/> + <click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch"/> + <waitForPageLoad stepKey="waitForTaxRuleSearch"/> + <click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + <click selector="{{AdminTaxRateFormSection.deleteRate}}" stepKey="clickDeleteRate"/> + <click selector="{{AdminTaxRateFormSection.ok}}" stepKey="clickOk"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml index be7185a5166a2..f2f7d78ea2650 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml @@ -23,12 +23,9 @@ </before> <after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex"/> - <click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters2"/> - <fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="fillNameFilter"/> - <click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch"/> - <click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow"/> - <click selector="{{AdminTaxRateFormSection.deleteRate}}" stepKey="clickDeleteRate"/> - <click selector="{{AdminTaxRateFormSection.ok}}" stepKey="clickOk"/> + <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"> + <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> + </actionGroup> </after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex1"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml index 89cfdd0eb9943..144f6b644d168 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml @@ -23,12 +23,9 @@ </before> <after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex"/> - <click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters2"/> - <fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="fillNameFilter"/> - <click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch"/> - <click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow"/> - <click selector="{{AdminTaxRateFormSection.deleteRate}}" stepKey="clickDeleteRate"/> - <click selector="{{AdminTaxRateFormSection.ok}}" stepKey="clickOk"/> + <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"> + <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> + </actionGroup> </after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex1"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml index a3386cada436f..49a89b33d55d0 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml @@ -23,12 +23,9 @@ </before> <after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex"/> - <click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters2"/> - <fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="fillNameFilter"/> - <click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch"/> - <click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow"/> - <click selector="{{AdminTaxRateFormSection.deleteRate}}" stepKey="clickDeleteRate"/> - <click selector="{{AdminTaxRateFormSection.ok}}" stepKey="clickOk"/> + <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"> + <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> + </actionGroup> </after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex1"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml index 6ceeae953139c..620ad1909c6f8 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml @@ -23,12 +23,9 @@ </before> <after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex"/> - <click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters2"/> - <fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="fillNameFilter"/> - <click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch"/> - <click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow"/> - <click selector="{{AdminTaxRateFormSection.deleteRate}}" stepKey="clickDeleteRate"/> - <click selector="{{AdminTaxRateFormSection.ok}}" stepKey="clickOk"/> + <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"> + <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> + </actionGroup> </after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex1"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml index 4f9e876fed696..fe8f67f880f49 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml @@ -23,12 +23,9 @@ </before> <after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex"/> - <click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters2"/> - <fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{SimpleTaxRate.code}}" stepKey="fillNameFilter"/> - <click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch"/> - <click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow1"/> - <click selector="{{AdminTaxRateFormSection.deleteRate}}" stepKey="clickDeleteRate"/> - <click selector="{{AdminTaxRateFormSection.ok}}" stepKey="clickOk"/> + <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"> + <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> + </actionGroup> </after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex1"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml index eb774297b8322..baae945bd8d1d 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml @@ -25,14 +25,11 @@ <!-- Search the tax rate on tax grid page --> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex1"/> - <click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters1"/> - <fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="$$initialTaxRate.code$$" stepKey="fillCode"/> - <click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch1"/> - <click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow1"/> - <!-- Delete values on the tax rate form page --> - <click selector="{{AdminTaxRateFormSection.deleteRate}}" stepKey="clickDeleteRate"/> - <click selector="{{AdminTaxRateFormSection.ok}}" stepKey="clickOk"/> + <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"> + <argument name="taxRateCode" value="{{initialTaxRate.code}}" /> + </actionGroup> + <see selector="{{AdminMessagesSection.success}}" userInput="You Deleted the tax rate." stepKey="seeSuccess1"/> <!-- Confirm Deleted TaxIdentifier(from the above step) on the tax rate grid page --> From caaf4699d348236e951ea094a886b38e1391c6bf Mon Sep 17 00:00:00 2001 From: Oleh Usik <o.usik@atwix.com> Date: Mon, 7 Sep 2020 22:23:33 +0300 Subject: [PATCH 11/19] add code review recommendations --- .../AdminDeleteTaxRateActionGroup.xml | 16 +++---------- .../AdminFilterTaxRateByCodeActionGroup.xml | 23 +++++++++++++++++++ .../AdminCreateTaxRateAllPostCodesTest.xml | 7 +++++- .../Test/AdminCreateTaxRateLargeRateTest.xml | 7 +++++- ...AdminCreateTaxRateSpecificPostcodeTest.xml | 7 +++++- ...dminCreateTaxRateWiderZipCodeRangeTest.xml | 7 +++++- .../AdminCreateTaxRateZipCodeRangeTest.xml | 7 +++++- .../Mftf/Test/DeleteTaxRateEntityTest.xml | 10 +++++--- .../AdminClickRowInGridActionGroup.xml | 19 +++++++++++++++ .../Section/AdminDataGridTableSection.xml | 2 +- 10 files changed, 83 insertions(+), 22 deletions(-) create mode 100644 app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminFilterTaxRateByCodeActionGroup.xml create mode 100644 app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminClickRowInGridActionGroup.xml diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminDeleteTaxRateActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminDeleteTaxRateActionGroup.xml index b609ef8827764..1aab6ea2c4eec 100644 --- a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminDeleteTaxRateActionGroup.xml +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminDeleteTaxRateActionGroup.xml @@ -10,19 +10,9 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> <actionGroup name="AdminDeleteTaxRateActionGroup"> <annotations> - <description>Goes to the Admin Tax Rate grid page. Deletes the provided Tax Rate Code.</description> + <description>Delete Tax Rate.</description> </annotations> - <arguments> - <argument name="taxRateCode" type="string"/> - </arguments> - - <click selector="{{AdminDataGridHeaderSection.clearFilters}}" stepKey="clickClearFilters"/> - <fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{taxRateCode}}" stepKey="fillNameFilter"/> - <click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch"/> - <waitForPageLoad stepKey="waitForTaxRuleSearch"/> - <click selector="{{AdminTaxRateGridSection.nthRow('1')}}" stepKey="clickFirstRow"/> - <waitForPageLoad stepKey="waitForPageLoad"/> - <click selector="{{AdminTaxRateFormSection.deleteRate}}" stepKey="clickDeleteRate"/> - <click selector="{{AdminTaxRateFormSection.ok}}" stepKey="clickOk"/> + <click selector="{{AdminMainActionsSection.delete}}" stepKey="clickDeleteRate"/> + <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="clickOk"/> </actionGroup> </actionGroups> diff --git a/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminFilterTaxRateByCodeActionGroup.xml b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminFilterTaxRateByCodeActionGroup.xml new file mode 100644 index 0000000000000..2b110e969b113 --- /dev/null +++ b/app/code/Magento/Tax/Test/Mftf/ActionGroup/AdminFilterTaxRateByCodeActionGroup.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="AdminFilterTaxRateByCodeActionGroup"> + <annotations> + <description>Filter Tax Rates by tax rate code.</description> + </annotations> + <arguments> + <argument name="taxRateCode" type="string"/> + </arguments> + + <fillField selector="{{AdminTaxRateGridSection.filterByTaxIdentifier}}" userInput="{{taxRateCode}}" stepKey="fillNameFilter"/> + <click selector="{{AdminTaxRateGridSection.search}}" stepKey="clickSearch"/> + <waitForPageLoad stepKey="waitForTaxRuleSearch"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml index f2f7d78ea2650..494c0ae74c375 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml @@ -23,9 +23,14 @@ </before> <after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex"/> - <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clickClearFilters"/> + <actionGroup ref="AdminFilterTaxRateByCodeActionGroup" stepKey="filterByCode"> <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> </actionGroup> + <actionGroup ref="AdminClickRowInGridActionGroup" stepKey="clickFirstRow"> + <argument name="row_number" value="1" /> + </actionGroup> + <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"/> </after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex1"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml index 144f6b644d168..e195a0b86cb26 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml @@ -23,9 +23,14 @@ </before> <after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex"/> - <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clickClearFilters"/> + <actionGroup ref="AdminFilterTaxRateByCodeActionGroup" stepKey="filterByCode"> <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> </actionGroup> + <actionGroup ref="AdminClickRowInGridActionGroup" stepKey="clickFirstRow"> + <argument name="row_number" value="1" /> + </actionGroup> + <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"/> </after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex1"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml index 49a89b33d55d0..bff1bb95e9540 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml @@ -23,9 +23,14 @@ </before> <after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex"/> - <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clickClearFilters"/> + <actionGroup ref="AdminFilterTaxRateByCodeActionGroup" stepKey="filterByCode"> <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> </actionGroup> + <actionGroup ref="AdminClickRowInGridActionGroup" stepKey="clickFirstRow"> + <argument name="row_number" value="1" /> + </actionGroup> + <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"/> </after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex1"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml index 620ad1909c6f8..570608bb6adf6 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml @@ -23,9 +23,14 @@ </before> <after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex"/> - <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clickClearFilters"/> + <actionGroup ref="AdminFilterTaxRateByCodeActionGroup" stepKey="filterByCode"> <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> </actionGroup> + <actionGroup ref="AdminClickRowInGridActionGroup" stepKey="clickFirstRow"> + <argument name="row_number" value="1" /> + </actionGroup> + <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"/> </after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex1"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml index fe8f67f880f49..a8e47b77e27c0 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml @@ -23,9 +23,14 @@ </before> <after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex"/> - <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clickClearFilters"/> + <actionGroup ref="AdminFilterTaxRateByCodeActionGroup" stepKey="filterByCode"> <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> </actionGroup> + <actionGroup ref="AdminClickRowInGridActionGroup" stepKey="clickFirstRow"> + <argument name="row_number" value="1" /> + </actionGroup> + <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"/> </after> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex1"/> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml index baae945bd8d1d..341b2e1aa6344 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml @@ -25,10 +25,14 @@ <!-- Search the tax rate on tax grid page --> <actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRateIndex1"/> - - <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"> - <argument name="taxRateCode" value="{{initialTaxRate.code}}" /> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clickClearFilters"/> + <actionGroup ref="AdminFilterTaxRateByCodeActionGroup" stepKey="filterByCode"> + <argument name="taxRateCode" value="$$initialTaxRate.code$$" /> + </actionGroup> + <actionGroup ref="AdminClickRowInGridActionGroup" stepKey="clickFirstRow"> + <argument name="row_number" value="1" /> </actionGroup> + <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"/> <see selector="{{AdminMessagesSection.success}}" userInput="You Deleted the tax rate." stepKey="seeSuccess1"/> diff --git a/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminClickRowInGridActionGroup.xml b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminClickRowInGridActionGroup.xml new file mode 100644 index 0000000000000..c538a6d530645 --- /dev/null +++ b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminClickRowInGridActionGroup.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminClickRowInGridActionGroup"> + <arguments> + <argument name="row_number" type="string"/> + </arguments> + + <click selector="{{AdminDataGridTableSection.row(row_number)}}" stepKey="clickOnFirstRow"/> + <waitForPageLoad stepKey="waitForPageLoad"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridTableSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridTableSection.xml index fcee31c0bd80c..11e42353a0663 100644 --- a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridTableSection.xml +++ b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridTableSection.xml @@ -13,7 +13,7 @@ <element name="columnHeader" type="button" selector="//div[@data-role='grid-wrapper']//table[contains(@class, 'data-grid')]/thead/tr/th[contains(@class, 'data-grid-th')]/span[text() = '{{label}}']" parameterized="true" timeout="30"/> <element name="column" type="text" selector="//tr//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., '{{col}}')]/preceding-sibling::th) +1 ]" parameterized="true"/> <element name="rowCheckbox" type="checkbox" selector="table.data-grid tbody > tr:nth-of-type({{row}}) td.data-grid-checkbox-cell input" parameterized="true"/> - <element name="row" type="text" selector="table.data-grid tbody > tr:nth-of-type({{row}})" parameterized="true"/> + <element name="row" type="text" selector="table.data-grid tbody > tr:nth-of-type({{row}})" parameterized="true" timeout="30"/> <element name="rows" type="text" selector="table.data-grid tbody > tr.data-row"/> <!--Specific cell e.g. {{Section.gridCell('1', 'Name')}}--> <element name="gridCell" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., '{{column}}')]/preceding-sibling::th) +1 ]" parameterized="true"/> From e31ab0041482ae52f08da44548ca70b9e16cdb50 Mon Sep 17 00:00:00 2001 From: joweecaquicla <joie@abovethefray.io> Date: Tue, 8 Sep 2020 18:48:07 +0800 Subject: [PATCH 12/19] magento/adobe-stock-integration#1794: [MFTF] Unskip AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest - modified test --- ...alogUiVerifyUsedInLinkCategoryGridTest.xml | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml index eb2f75dad0151..40a5cf8e591fc 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml +++ b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml @@ -21,25 +21,31 @@ <before> <createData entity="TestSubCategory" stepKey="category"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> - <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache"> - <argument name="tags" value="config full_page"/> - </actionGroup> </before> <after> - <actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/> - <actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectSecondImageToDelete"> - <argument name="imageName" value="{{UpdatedImageDetails.title}}"/> + <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectFolderForDelete"> + <argument name="name" value="categoryImage"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryFolderDeleteActionGroup" stepKey="deleteFolder"/> + <actionGroup ref="AdminMediaGalleryAssertFolderDoesNotExistActionGroup" stepKey="assertFolderWasDeleted"> + <argument name="name" value="categoryImage"/> </actionGroup> - <actionGroup ref="AdminEnhancedMediaGalleryClickDeleteImagesButtonActionGroup" stepKey="clickDeleteSelectedButton"/> - <actionGroup ref="AdminEnhancedMediaGalleryConfirmDeleteImagesActionGroup" stepKey="deleteImages"/> </after> - <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> <actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromImageUploader"/> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetCategoryImageGalleryGridToDefaultView"/> + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> + <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> + <actionGroup ref="AdminMediaGalleryCreateNewFolderActionGroup" stepKey="createCategoryImageFolder"> + <argument name="name" value="categoryImage"/> + </actionGroup> + <actionGroup ref="AdminMediaGalleryAssertFolderNameActionGroup" stepKey="assertCategoryImageFolderCreated"> + <argument name="name" value="categoryImage"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> <argument name="image" value="ImageUpload"/> </actionGroup> @@ -52,6 +58,10 @@ <actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedCategoryImage"/> <actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromImageUploaderToVerifyLink"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCategoryImageFolder"> + <argument name="name" value="categoryImage"/> + </actionGroup> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetails"/> <actionGroup ref="AdminEnhancedMediaGalleryClickEntityUsedInActionGroup" stepKey="clickUsedInCategories"> <argument name="entityName" value="Categories"/> @@ -85,6 +95,9 @@ <deleteData createDataKey="category" stepKey="deleteCategory"/> <actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/> + <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="openCategoryImageFolder"> + <argument name="name" value="categoryImage"/> + </actionGroup> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetailsToVerifyEmptyUsedIn"/> <actionGroup ref="AssertAdminEnhancedMediaGalleryUsedInSectionNotDisplayedActionGroup" stepKey="assertThereIsNoUsedInSection"/> <actionGroup ref="AdminEnhancedMediaGalleryCloseViewDetailsActionGroup" stepKey="closeDetails"/> From ff12e395b639b2f3155efcd730c8c20fc9389b50 Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky <engcom-vendorworker-foxtrot@adobe.com> Date: Tue, 8 Sep 2020 14:16:18 +0300 Subject: [PATCH 13/19] magento/magento2#25147: Totals Information Management - setting quote shipping method when address method is null - static test fix. --- app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php index 407d158e6f8d4..2e51bd8d75b89 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php @@ -72,7 +72,7 @@ class OrderRepositoryTest extends TestCase private $paymentAdditionalInfoFactory; /** - * @var OrderExtensionFactory|\PHPUnit_Framework_MockObject_MockObject + * @var OrderExtensionFactory|\MockObject */ private $orderExtensionFactoryMock; From 204c4d9f933df1bb2949f060d6f53df68eab3994 Mon Sep 17 00:00:00 2001 From: Oleh Usik <o.usik@atwix.com> Date: Wed, 9 Sep 2020 15:45:35 +0300 Subject: [PATCH 14/19] some changes --- .../AdminCreateTaxRateAllPostCodesTest.xml | 4 +--- .../Test/AdminCreateTaxRateLargeRateTest.xml | 5 ++--- ...AdminCreateTaxRateSpecificPostcodeTest.xml | 4 +--- ...dminCreateTaxRateWiderZipCodeRangeTest.xml | 4 +--- .../AdminCreateTaxRateZipCodeRangeTest.xml | 4 +--- .../Mftf/Test/DeleteTaxRateEntityTest.xml | 4 +--- .../AdminClickRowInGridActionGroup.xml | 19 ------------------- .../Section/AdminDataGridTableSection.xml | 4 ++-- 8 files changed, 9 insertions(+), 39 deletions(-) delete mode 100644 app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminClickRowInGridActionGroup.xml diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml index 494c0ae74c375..ceb04a9c42e66 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateAllPostCodesTest.xml @@ -27,9 +27,7 @@ <actionGroup ref="AdminFilterTaxRateByCodeActionGroup" stepKey="filterByCode"> <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> </actionGroup> - <actionGroup ref="AdminClickRowInGridActionGroup" stepKey="clickFirstRow"> - <argument name="row_number" value="1" /> - </actionGroup> + <actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="clickFirstRow"/> <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"/> </after> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml index e195a0b86cb26..7497b950a8c0e 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateLargeRateTest.xml @@ -27,9 +27,8 @@ <actionGroup ref="AdminFilterTaxRateByCodeActionGroup" stepKey="filterByCode"> <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> </actionGroup> - <actionGroup ref="AdminClickRowInGridActionGroup" stepKey="clickFirstRow"> - <argument name="row_number" value="1" /> - </actionGroup> + <actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="clickFirstRow"/> + <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"/> </after> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml index bff1bb95e9540..da89ad3e9337c 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateSpecificPostcodeTest.xml @@ -27,9 +27,7 @@ <actionGroup ref="AdminFilterTaxRateByCodeActionGroup" stepKey="filterByCode"> <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> </actionGroup> - <actionGroup ref="AdminClickRowInGridActionGroup" stepKey="clickFirstRow"> - <argument name="row_number" value="1" /> - </actionGroup> + <actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="clickFirstRow"/> <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"/> </after> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml index 570608bb6adf6..da30157d94182 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateWiderZipCodeRangeTest.xml @@ -27,9 +27,7 @@ <actionGroup ref="AdminFilterTaxRateByCodeActionGroup" stepKey="filterByCode"> <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> </actionGroup> - <actionGroup ref="AdminClickRowInGridActionGroup" stepKey="clickFirstRow"> - <argument name="row_number" value="1" /> - </actionGroup> + <actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="clickFirstRow"/> <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"/> </after> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml index a8e47b77e27c0..93e0f6514e83b 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/AdminCreateTaxRateZipCodeRangeTest.xml @@ -27,9 +27,7 @@ <actionGroup ref="AdminFilterTaxRateByCodeActionGroup" stepKey="filterByCode"> <argument name="taxRateCode" value="{{SimpleTaxRate.code}}" /> </actionGroup> - <actionGroup ref="AdminClickRowInGridActionGroup" stepKey="clickFirstRow"> - <argument name="row_number" value="1" /> - </actionGroup> + <actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="clickFirstRow"/> <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"/> </after> diff --git a/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml b/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml index 341b2e1aa6344..751989497d10e 100644 --- a/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml +++ b/app/code/Magento/Tax/Test/Mftf/Test/DeleteTaxRateEntityTest.xml @@ -29,9 +29,7 @@ <actionGroup ref="AdminFilterTaxRateByCodeActionGroup" stepKey="filterByCode"> <argument name="taxRateCode" value="$$initialTaxRate.code$$" /> </actionGroup> - <actionGroup ref="AdminClickRowInGridActionGroup" stepKey="clickFirstRow"> - <argument name="row_number" value="1" /> - </actionGroup> + <actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="clickFirstRow"/> <actionGroup ref="AdminDeleteTaxRateActionGroup" stepKey="deleteTaxRate"/> <see selector="{{AdminMessagesSection.success}}" userInput="You Deleted the tax rate." stepKey="seeSuccess1"/> diff --git a/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminClickRowInGridActionGroup.xml b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminClickRowInGridActionGroup.xml deleted file mode 100644 index c538a6d530645..0000000000000 --- a/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminClickRowInGridActionGroup.xml +++ /dev/null @@ -1,19 +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="AdminClickRowInGridActionGroup"> - <arguments> - <argument name="row_number" type="string"/> - </arguments> - - <click selector="{{AdminDataGridTableSection.row(row_number)}}" stepKey="clickOnFirstRow"/> - <waitForPageLoad stepKey="waitForPageLoad"/> - </actionGroup> -</actionGroups> diff --git a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridTableSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridTableSection.xml index 11e42353a0663..c5b000259e265 100644 --- a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridTableSection.xml +++ b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridTableSection.xml @@ -9,11 +9,11 @@ <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="AdminDataGridTableSection"> - <element name="firstRow" type="button" selector="tr.data-row:nth-of-type(1)" timeout="60"/> + <element name="firstRow" type="button" selector="table.data-grid tbody > tr:nth-of-type(1)" timeout="60"/> <element name="columnHeader" type="button" selector="//div[@data-role='grid-wrapper']//table[contains(@class, 'data-grid')]/thead/tr/th[contains(@class, 'data-grid-th')]/span[text() = '{{label}}']" parameterized="true" timeout="30"/> <element name="column" type="text" selector="//tr//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., '{{col}}')]/preceding-sibling::th) +1 ]" parameterized="true"/> <element name="rowCheckbox" type="checkbox" selector="table.data-grid tbody > tr:nth-of-type({{row}}) td.data-grid-checkbox-cell input" parameterized="true"/> - <element name="row" type="text" selector="table.data-grid tbody > tr:nth-of-type({{row}})" parameterized="true" timeout="30"/> + <element name="row" type="text" selector="table.data-grid tbody > tr:nth-of-type({{row}})" parameterized="true"/> <element name="rows" type="text" selector="table.data-grid tbody > tr.data-row"/> <!--Specific cell e.g. {{Section.gridCell('1', 'Name')}}--> <element name="gridCell" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., '{{column}}')]/preceding-sibling::th) +1 ]" parameterized="true"/> From dd99a7ffec7c3e34c171b1c53da9fe7f35da45f5 Mon Sep 17 00:00:00 2001 From: joweecaquicla <joie@abovethefray.io> Date: Thu, 10 Sep 2020 01:34:25 +0800 Subject: [PATCH 15/19] magento/adobe-stock-integration#1802: The three dots context menu is not closed after unsuccessful licensing from Media Gallery - modified image.js --- .../view/adminhtml/web/js/grid/columns/image.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js b/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js index bf852d0ddae68..2ddc601385496 100644 --- a/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js +++ b/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js @@ -270,6 +270,7 @@ define([ */ addMessage: function (code, message) { this.messages().add(code, message); + this.closeContextMenu(); this.messages().scheduleCleanup(); }, @@ -284,6 +285,13 @@ define([ !this.massaction().massActionMode()) { this.deselectImage(); } + }, + + /** + * Action to close the context menu in media gallery. + */ + closeContextMenu: function () { + $('.media-gallery-wrap').click(); } }); }); From d07e0a9031b0f4942dbeba0d7a32e2b77021cf5c Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Wed, 9 Sep 2020 17:30:53 +0300 Subject: [PATCH 16/19] add MFTF test --- ...frontConfigurableProductMSRPCovertTest.xml | 122 ++++++++++++++++++ .../AdminSetAdvancedPricingActionGroup.xml | 29 +++++ 2 files changed, 151 insertions(+) create mode 100644 app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductMSRPCovertTest.xml create mode 100644 app/code/Magento/Msrp/Test/Mftf/ActionGroup/AdminSetAdvancedPricingActionGroup.xml diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductMSRPCovertTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductMSRPCovertTest.xml new file mode 100644 index 0000000000000..9526e8568b26d --- /dev/null +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductMSRPCovertTest.xml @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="StorefrontConfigurableProductMSRPCovertTest"> + <annotations> + <features value="ConfigurableProduct"/> + <stories value="View configurable product options, verify convert MSRP currency on storefront."/> + <title value="Verify convert MSRP currency of configurable product options"/> + <description value="Check convert MSRP currency of configurable product options."/> + <testCaseId value="MC-37575"/> + <severity value="MAJOR"/> + <group value="ConfigurableProduct"/> + </annotations> + + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + + <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> + <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </createData> + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + </getData> + + <createData entity="ApiSimpleProductWithPrice50" stepKey="createConfigChildProduct1"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + </createData> + <createData entity="ApiSimpleProductWithPrice60" stepKey="createConfigChildProduct2"> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigProductAttribute"/> + <requiredEntity createDataKey="getConfigAttributeOption1"/> + <requiredEntity createDataKey="getConfigAttributeOption2"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct1"/> + </createData> + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> + <requiredEntity createDataKey="createConfigProduct"/> + <requiredEntity createDataKey="createConfigChildProduct2"/> + </createData> + + <createData entity="MsrpEnableMAP" stepKey="enableMAP"/> + <magentoCLI command="config:set currency/options/allow EUR,USD" stepKey="setCurrencyAllow"/> + </before> + <after> + + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> + <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> + <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> + <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> + <createData entity="MsrpDisableMAP" stepKey="disableMAP"/> + <magentoCLI command="config:set currency/options/allow USD" stepKey="setCurrencyAllow"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> + </after> + + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToFirstChildProductEditPage"> + <argument name="productId" value="$$createConfigChildProduct1.id$$"/> + </actionGroup> + <waitForPageLoad stepKey="waitForProductPageLoad"/> + <actionGroup ref="AdminSetAdvancedPricingActionGroup" stepKey="setAdvancedPricingFirst"> + <argument name="advancedPrice" value="100"/> + </actionGroup> + + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToSecondChildProductEditPage"> + <argument name="productId" value="$$createConfigChildProduct2.id$$"/> + </actionGroup> + <waitForPageLoad stepKey="waitForProductPageLoad1"/> + <actionGroup ref="AdminSetAdvancedPricingActionGroup" stepKey="setAdvancedPricingSecond"> + <argument name="advancedPrice" value="100"/> + </actionGroup> + + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> + <argument name="tags" value=""/> + </actionGroup> + + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="navigateToProduct"> + <argument name="productUrlKey" value="$$createConfigProduct.custom_attributes[url_key]$$"/> + </actionGroup> + + <actionGroup ref="StorefrontSwitchCurrencyActionGroup" stepKey="switchEURCurrency"> + <argument name="currency" value="EUR"/> + </actionGroup> + + <selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="$$getConfigAttributeOption1.value$$" stepKey="selectFirstOption"/> + <waitForElement selector="{{StorefrontProductInfoMainSection.mapPrice}}" stepKey="waitForLoad"/> + <grabTextFrom selector="{{StorefrontProductInfoMainSection.mapPrice}}" stepKey="grabProductMapPrice"/> + <assertNotEquals stepKey="assertProductMapPrice"> + <actualResult type="const">($grabProductMapPrice)</actualResult> + <expectedResult type="string">€100.00</expectedResult> + </assertNotEquals> + </test> +</tests> diff --git a/app/code/Magento/Msrp/Test/Mftf/ActionGroup/AdminSetAdvancedPricingActionGroup.xml b/app/code/Magento/Msrp/Test/Mftf/ActionGroup/AdminSetAdvancedPricingActionGroup.xml new file mode 100644 index 0000000000000..d9a34bbd03e4f --- /dev/null +++ b/app/code/Magento/Msrp/Test/Mftf/ActionGroup/AdminSetAdvancedPricingActionGroup.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> + +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> + <actionGroup name="AdminSetAdvancedPricingActionGroup"> + <annotations> + <description>Set advanced pricing and Save product on the Admin Product creation/edit page.</description> + </annotations> + <arguments> + <argument name="advancedPrice" type="string"/> + </arguments> + + <click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton"/> + <waitForElement selector="{{AdminProductFormAdvancedPricingSection.msrp}}" stepKey="waitForMsrp"/> + <fillField selector="{{AdminProductFormAdvancedPricingSection.msrp}}" userInput="{{advancedPrice}}" stepKey="setMsrpForFirstChildProduct"/> + <click selector="{{AdminProductFormAdvancedPricingSection.doneButton}}" stepKey="clickDoneButton"/> + <scrollToTopOfPage stepKey="scrollTopPageProduct"/> + <waitForElementVisible selector="{{AdminProductFormActionSection.saveButton}}" stepKey="waitForSaveProductButton"/> + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/> + <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitProductSaveSuccessMessage"/> + <see selector="{{AdminMessagesSection.success}}" userInput="You saved the product." stepKey="seeSaveConfirmation"/> + </actionGroup> +</actionGroups> \ No newline at end of file From 5cc8b4d640c3acca3ed949016a4936011db92040 Mon Sep 17 00:00:00 2001 From: joweecaquicla <joie@abovethefray.io> Date: Thu, 10 Sep 2020 22:52:58 +0800 Subject: [PATCH 17/19] magento/adobe-stock-integration#1802: The three dots context menu is not closed after unsuccessful licensing from Media Gallery - modified selector --- .../MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js b/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js index 2ddc601385496..b6e51fc65f3c4 100644 --- a/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js +++ b/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js @@ -16,6 +16,7 @@ define([ deleteImageUrl: 'media_gallery/image/delete', addSelectedBtnSelector: '#add_selected', deleteSelectedBtnSelector: '#delete_selected', + gridSelector: '[data-id="media-gallery-masonry-grid"]', selected: null, fields: { id: 'id', @@ -291,7 +292,7 @@ define([ * Action to close the context menu in media gallery. */ closeContextMenu: function () { - $('.media-gallery-wrap').click(); + $(this.gridSelector).click(); } }); }); From 18023284e0a443fc21eebdce8556667800e07646 Mon Sep 17 00:00:00 2001 From: joweecaquicla <joie@abovethefray.io> Date: Fri, 11 Sep 2020 22:08:34 +0800 Subject: [PATCH 18/19] magento/adobe-stock-integration#1802: The three dots context menu is not closed after unsuccessful licensing from Media Gallery - added action group and modified sections in media gallery ui mftf --- ...nMediaGalleryContextMenuOpenedActionGroup.xml | 16 ++++++++++++++++ ...inEnhancedMediaGalleryImageActionsSection.xml | 1 + 2 files changed, 17 insertions(+) create mode 100644 app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AssertAdminMediaGalleryContextMenuOpenedActionGroup.xml diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AssertAdminMediaGalleryContextMenuOpenedActionGroup.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AssertAdminMediaGalleryContextMenuOpenedActionGroup.xml new file mode 100644 index 0000000000000..ede7052712b4b --- /dev/null +++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AssertAdminMediaGalleryContextMenuOpenedActionGroup.xml @@ -0,0 +1,16 @@ +<?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="AssertAdminMediaGalleryContextMenuOpenedActionGroup"> + <annotations> + <description>Verify that context menu is closed in Media Gallery.</description> + </annotations> + <dontSeeElement selector="{{AdminEnhancedMediaGalleryImageActionsSection.contextMenuItem}}" stepKey="verifyContextMenuIsClosed" /> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Section/AdminEnhancedMediaGalleryImageActionsSection.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Section/AdminEnhancedMediaGalleryImageActionsSection.xml index 3f13a57697e6f..f36fca88dc760 100644 --- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Section/AdminEnhancedMediaGalleryImageActionsSection.xml +++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Section/AdminEnhancedMediaGalleryImageActionsSection.xml @@ -9,6 +9,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> <section name="AdminEnhancedMediaGalleryImageActionsSection"> <element name="openContextMenu" type="button" selector=".three-dots"/> + <element name="contextMenuItem" type="block" selector="//div[@class='media-gallery-image']//ul[@class='action-menu _active']//li//a[@class='action-menu-item']"/> <element name="viewDetails" type="button" selector="[data-ui-id='action-image-details']"/> <element name="delete" type="button" selector="[data-ui-id='action-delete']"/> <element name="edit" type="button" selector="[data-ui-id='action-edit']"/> From a7a1038b116b7c4c962d28defb3feb3eed7664fd Mon Sep 17 00:00:00 2001 From: joweecaquicla <joie@abovethefray.io> Date: Sat, 12 Sep 2020 00:32:41 +0800 Subject: [PATCH 19/19] magento/adobe-stock-integration#1794: [MFTF] Unskip AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest - removed custom category entity and modified test --- .../AdminEnhancedMediaGalleryCategoryData.xml | 17 ----------------- ...atalogUiVerifyUsedInLinkCategoryGridTest.xml | 5 +++-- 2 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Data/AdminEnhancedMediaGalleryCategoryData.xml diff --git a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Data/AdminEnhancedMediaGalleryCategoryData.xml b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Data/AdminEnhancedMediaGalleryCategoryData.xml deleted file mode 100644 index d123cce516533..0000000000000 --- a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Data/AdminEnhancedMediaGalleryCategoryData.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - /** - * Copyright © Magento, Inc. All rights reserved. - * See COPYING.txt for license details. - */ ---> - -<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd"> - <entity name="TestSubCategory" type="category"> - <data key="name" unique="suffix">TestSubCategory</data> - <data key="name_lwr" unique="suffix">testsubcategory</data> - <data key="is_active">true</data> - <data key="include_in_menu">true</data> - </entity> -</entities> diff --git a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml index 40a5cf8e591fc..f9ffda43d2547 100644 --- a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml +++ b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml @@ -19,7 +19,7 @@ <group value="media_gallery_ui"/> </annotations> <before> - <createData entity="TestSubCategory" stepKey="category"/> + <createData entity="SimpleSubCategory" stepKey="category"/> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> </before> <after> @@ -37,6 +37,7 @@ <argument name="category" value="$$category$$"/> </actionGroup> <actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromImageUploader"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear" /> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetCategoryImageGalleryGridToDefaultView"/> <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> <actionGroup ref="AdminMediaGalleryOpenNewFolderFormActionGroup" stepKey="openNewFolderForm"/> @@ -61,7 +62,7 @@ <actionGroup ref="AdminMediaGalleryFolderSelectActionGroup" stepKey="selectCategoryImageFolder"> <argument name="name" value="categoryImage"/> </actionGroup> - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear2"/> <actionGroup ref="AdminEnhancedMediaGalleryViewImageDetails" stepKey="openViewImageDetails"/> <actionGroup ref="AdminEnhancedMediaGalleryClickEntityUsedInActionGroup" stepKey="clickUsedInCategories"> <argument name="entityName" value="Categories"/>