Skip to content

Commit

Permalink
Merge branch '2.4-develop' into 2.4-bugfixes-121621
Browse files Browse the repository at this point in the history
  • Loading branch information
sidolov authored Dec 21, 2021
2 parents d28a873 + 7996e89 commit 8290e5e
Show file tree
Hide file tree
Showing 61 changed files with 258 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<description>Checks if Dashboard is displayed properly</description>
</annotations>

<seeElement selector="{{AdminDashboardSection.dashboardDiagramOrderContentTab}}" stepKey="seeOrderContentTab"/>
<seeElement selector="{{AdminDashboardSection.dashboardDiagramContent}}" stepKey="seeDiagramContent"/>
<waitForElementVisible selector="{{AdminDashboardSection.dashboardDiagramOrderContentTab}}" stepKey="seeOrderContentTab"/>
<waitForElementVisible selector="{{AdminDashboardSection.dashboardDiagramContent}}" stepKey="seeDiagramContent"/>
<click selector="{{AdminDashboardSection.dashboardDiagramAmounts}}" stepKey="clickDashboardAmount"/>
<waitForLoadingMaskToDisappear stepKey="waitForDashboardAmountLoading"/>
<seeElement selector="{{AdminDashboardSection.dashboardDiagramAmountsContentTab}}" stepKey="seeDiagramAmountContent"/>
<seeElement selector="{{AdminDashboardSection.dashboardDiagramTotals}}" stepKey="seeAmountTotals"/>
<waitForPageLoad stepKey="waitForDashboardAmountLoading"/>
<waitForElementVisible selector="{{AdminDashboardSection.dashboardDiagramAmountsContentTab}}" stepKey="seeDiagramAmountContent"/>
<waitForElementVisible selector="{{AdminDashboardSection.dashboardDiagramTotals}}" stepKey="seeAmountTotals"/>
<dontSeeJsError stepKey="dontSeeJsError"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminCheckDashboardWithChartsTest">
<annotations>
Expand All @@ -22,6 +22,9 @@
</annotations>
<before>
<magentoCLI command="config:set admin/dashboard/enable_charts 1" stepKey="setEnableCharts"/>
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
<argument name="tags" value="config full_page"/>
</actionGroup>
<createData entity="SimpleProduct2" stepKey="createProduct">
<field key="price">150</field>
</createData>
Expand All @@ -43,11 +46,15 @@
</before>
<after>
<magentoCLI command="config:set admin/dashboard/enable_charts 0" stepKey="setDisableChartsAsDefault"/>
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
<argument name="tags" value="config full_page"/>
</actionGroup>
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>

<waitForElementVisible selector="{{AdminDashboardSection.dashboardTotals('Quantity')}}" stepKey="waitForQuantityBefore"/>
<grabTextFrom selector="{{AdminDashboardSection.dashboardTotals('Quantity')}}" stepKey="grabQuantityBefore"/>

<updateData createDataKey="createCustomerCart" entity="CustomerOrderPaymentMethod" stepKey="sendCustomerPaymentInformation">
Expand All @@ -60,8 +67,9 @@
<requiredEntity createDataKey="createCustomerCart"/>
</createData>

<reloadPage stepKey="refreshPage"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/>
<actionGroup ref="AssertAdminDashboardDisplayedWithNoErrorsActionGroup" stepKey="assertAdminDashboardNotBroken"/>
<waitForElementVisible selector="{{AdminDashboardSection.dashboardTotals('Quantity')}}" stepKey="waitForQuantityAfter"/>
<grabTextFrom selector="{{AdminDashboardSection.dashboardTotals('Quantity')}}" stepKey="grabQuantityAfter"/>
<assertGreaterThan stepKey="checkQuantityWasChanged">
<actualResult type="const">$grabQuantityAfter</actualResult>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
<argument name="image" defaultValue="ProductImage"/>
</arguments>

<waitForElementVisible selector="{{AdminProductImagesSection.productImagesToggle}}" stepKey="waitForImagesSection"/>
<conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesSection"/>
<waitForPageLoad time="30" stepKey="waitForPageRefresh"/>
<waitForPageLoad stepKey="waitForPageRefresh"/>
<waitForElementVisible selector="{{AdminProductImagesSection.imageUploadButton}}" stepKey="seeImageSectionIsReady"/>
<attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="{{image.file}}" stepKey="uploadFile"/>
<waitForPageLoad stepKey="waitForImageUpload"/>
<waitForElementNotVisible selector="{{AdminProductImagesSection.uploadProgressBar}}" stepKey="waitForUpload"/>
<waitForElementVisible selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="waitForThumbnail"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<arguments>
<argument name="image" defaultValue="{{MagentoLogo.filename}}" type="string"/>
</arguments>
<waitForElementVisible selector="{{AdminProductImagesSection.productImagesToggle}}" stepKey="waitForProductImagesSection"/>
<conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageUploadButton}}" visible="false" stepKey="openProductImagesSection"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<waitForElementVisible selector="{{AdminProductImagesSection.imageFile(image)}}" stepKey="seeImage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,20 @@
<argument name="image" defaultValue="ProductImage"/>
<argument name="altText" defaultValue="{{ProductImage.title}}" type="string"/>
</arguments>
<waitForElementVisible selector="{{AdminProductImagesSection.productImagesToggle}}" stepKey="waitForImagesSection"/>
<conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageFile(image.fileName)}}" visible="false" stepKey="expandImages"/>
<waitForPageLoad stepKey="waitForImages"/>
<waitForElementVisible selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="seeProductImageName"/>
<click selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="clickProductImage"/>
<waitForPageLoad stepKey="waitForImageDetails"/>
<waitForElementVisible selector="{{AdminProductImagesSection.altText}}" stepKey="seeAltTextSection"/>
<grabValueFrom selector="{{AdminProductImagesSection.altText}}" stepKey="actualAltText"/>
<assertEquals stepKey="assertAltText">
<expectedResult type="string">{{altText}}</expectedResult>
<actualResult type="variable">actualAltText</actualResult>
</assertEquals>
<click selector="{{AdminSlideOutDialogSection.closeButton}}" stepKey="clickCloseButton"/>
<waitForPageLoad stepKey="waitForClose"/>
<waitForElementNotVisible selector="{{AdminProductImagesSection.altText}}" stepKey="waitForDetailsGone"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@
<argument name="image" defaultValue="ProductImage"/>
<argument name="altText" defaultValue="{{ProductImage.title}}" type="string"/>
</arguments>
<waitForElementVisible selector="{{AdminProductImagesSection.productImagesToggle}}" stepKey="waitForImagesSection"/>
<conditionalClick selector="{{AdminProductImagesSection.productImagesToggle}}" dependentSelector="{{AdminProductImagesSection.imageFile(image.fileName)}}" visible="false" stepKey="expandImages"/>
<waitForPageLoad stepKey="waitForImages"/>
<waitForElementVisible selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="seeProductImageName"/>
<click selector="{{AdminProductImagesSection.imageFile(image.fileName)}}" stepKey="clickProductImage"/>
<waitForPageLoad stepKey="waitForImageDetails"/>
<waitForElementVisible selector="{{AdminProductImagesSection.altText}}" stepKey="seeAltTextSection"/>
<fillField selector="{{AdminProductImagesSection.altText}}" userInput="{{altText}}" stepKey="fillAltTextSection"/>
<click selector="{{AdminSlideOutDialogSection.closeButton}}" stepKey="clickCloseButton"/>
<waitForPageLoad stepKey="waitForClose"/>
<waitForElementNotVisible selector="{{AdminProductImagesSection.altText}}" stepKey="waitForDetailsGone"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
<actionGroup ref="AdminDeleteProductAttributeByLabelActionGroup" stepKey="deleteCreatedAttribute">
<argument name="productAttributeLabel" value="{{ProductAttributeFrontendLabel.label}}"/>
</actionGroup>
<!-- Reindex after deleting product attribute -->
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
<argument name="indices" value=""/>
</actionGroup>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdminPanel"/>
</after>
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="navigateToProductPage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
<actionGroup ref="AdminDeleteProductAttributeByLabelActionGroup" stepKey="deleteCreatedAttribute">
<argument name="productAttributeLabel" value="{{ProductAttributeFrontendLabel.label}}"/>
</actionGroup>
<!-- Reindex after deleting product attribute -->
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
<argument name="indices" value=""/>
</actionGroup>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdminPanel"/>
</after>
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="navigateToProductPage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
<actionGroup ref="AdminDeleteProductAttributeByLabelActionGroup" stepKey="deleteAttribute">
<argument name="productAttributeLabel" value="{{colorProductAttribute.default_label}}" />
</actionGroup>
<!-- Reindex after deleting product attribute -->
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
<argument name="indices" value=""/>
</actionGroup>
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
</after>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
<argument name="successMessageContainer">{{AdminMessagesSection.success}}</argument>
<argument name="successMessage">You deleted the rule.</argument>
</helper>
<!-- Reindex after deleting product attribute -->
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
<argument name="indices" value=""/>
</actionGroup>
<comment userInput="BIC workaround" stepKey="waitForCatalogRuleGridPageLoaded"/>
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearCatalogRuleGridFilters"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
<actionGroup ref="AdminDeleteProductAttributeByLabelActionGroup" stepKey="deleteProductAttribute">
<argument name="productAttributeLabel" value="{{colorProductAttribute.default_label}}"/>
</actionGroup>
<!-- Reindex after deleting product attribute -->
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
<argument name="indices" value=""/>
</actionGroup>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
</after>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToFrontPage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@
<selectOption selector="{{CheckoutShippingSection.region}}" userInput="{{customerAddressVar.state}}" stepKey="selectRegion"/>
<fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{customerAddressVar.postcode}}" stepKey="enterPostcode"/>
<fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{customerAddressVar.telephone}}" stepKey="enterTelephone"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
<waitForElement selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('shippingMethod')}}" stepKey="waitForShippingMethod"/>
<waitForPageLoad stepKey="waitForLoadingMask"/>
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('shippingMethod')}}" stepKey="waitForShippingMethod"/>
<click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('shippingMethod')}}" stepKey="selectShippingMethod"/>
<waitForElement selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/>
<waitForPageLoad stepKey="waitForShippingLoading"/>
<waitForElementVisible selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/>
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoaded"/>
<waitForPageLoad stepKey="waitForPaymentLoading"/>
<waitForElementVisible selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoaded"/>
<seeInCurrentUrl url="{{CheckoutPage.url}}/#payment" stepKey="assertCheckoutPaymentUrl"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<element name="showCart" type="button" selector="a.showcart" timeout="60"/>
<element name="quantity" type="button" selector="span.counter-number"/>
<element name="miniCartOpened" type="button" selector="a.showcart.active"/>
<element name="goToCheckout" type="button" selector="#top-cart-btn-checkout" timeout="30"/>
<element name="goToCheckout" type="button" selector="#top-cart-btn-checkout" timeout="60"/>
<element name="viewAndEditCart" type="button" selector=".action.viewcart" timeout="30"/>
<element name="miniCartItemsText" type="text" selector=".minicart-items"/>
<element name="editMiniCartItem" type="button" selector=".action.edit" timeout="30"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
<description>Clicks on the Browse button in the 'Insert/edit image' model.</description>
</annotations>

<waitForElementVisible selector="{{MediaGallerySection.Browse}}" stepKey="waitForBrowseButton"/>
<click selector="{{MediaGallerySection.Browse}}" stepKey="clickBrowse"/>
<waitForPageLoad stepKey="waitForPageLoad1"/>
<waitForElementVisible selector="{{MediaGallerySection.mediaGalleryModal}}" stepKey="waitForMediaGallery"/>
<waitForPageLoad stepKey="waitForPageLoad2"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<description>Clicks on the 'Insert/edit image' TinyMCE button.</description>
</annotations>

<waitForElementVisible selector="{{TinyMCESection.InsertImageIcon}}" stepKey="waitForInsertImageBtn" />
<click selector="{{TinyMCESection.InsertImageIcon}}" stepKey="clickInsertImageBtn" />
<waitForPageLoad stepKey="waitForPageLoad"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
<conditionalClick selector="{{CmsPagesPageActionsSection.clearAllButton}}" dependentSelector="{{CmsPagesPageActionsSection.activeFilters}}" stepKey="clickToResetFilter" visible="true"/>
<waitForPageLoad stepKey="waitForPageLoad2"/>
<conditionalClick selector="{{BlockPageActionsSection.idColumn}}" dependentSelector="//span[contains(text(), 'ID')]/parent::th[not(contains(@class, '_descend'))]/parent::tr/parent::thead/parent::table/parent::div[contains(@data-role, 'grid-wrapper')]" stepKey="clickToAttemptSortByIdDescending" visible="true"/>
<waitForLoadingMaskToDisappear stepKey="waitForFirstIdSortDescendingToFinish"/>
<waitForPageLoad stepKey="waitForFirstIdSortDescendingToFinish"/>

<!-- Conditional Click again in case it goes from default state to ascending on first click -->
<conditionalClick selector="{{BlockPageActionsSection.idColumn}}" dependentSelector="//span[contains(text(), 'ID')]/parent::th[not(contains(@class, '_descend'))]/parent::tr/parent::thead/parent::table/parent::div[contains(@data-role, 'grid-wrapper')]" stepKey="secondClickToAttemptSortByIdDescending" visible="true"/>
<waitForLoadingMaskToDisappear stepKey="waitForSecondIdSortDescendingToFinish"/>
<waitForPageLoad stepKey="waitForSecondIdSortDescendingToFinish"/>
<click selector="{{BlockPageActionsSection.select(CMSBlockPage.identifier)}}" stepKey="clickSelectCreatedCMSBlock"/>
<click selector="{{BlockPageActionsSection.edit(CMSBlockPage.identifier)}}" stepKey="navigateToCreatedCMSBlock"/>
<waitForPageLoad stepKey="waitForPageLoad3"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskOfStagingSection"/>
<waitForPageLoad stepKey="waitForLoadingMaskOfStagingSection"/>
</actionGroup>
</actionGroups>
2 changes: 1 addition & 1 deletion app/code/Magento/Cms/Test/Mftf/Data/CmsPageData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<data key="height">1000</data>
</entity>
<entity name="ImageUpload3" type="uploadImage">
<data key="title" unique="suffix">Image1</data>
<data key="title">Title of the magento image</data>
<data key="price">1.00</data>
<data key="file_type">Upload File</data>
<data key="shareable">Yes</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
<element name="insertEditImageModalWindow" type="block" selector=".mce-floatpanel.mce-window[aria-label='Insert/edit image']"/>
<element name="mediaGalleryFolderTreeIconCollapsed" type="button" parameterized="true" selector="//li[a[text()='{{folderName}}' and @aria-expanded='false']]/i"/>
<element name="mediaGalleryFolderTreeIconExpanded" type="button" parameterized="true" selector="//li[a[text()='{{folderName}}' and @aria-expanded='true']]/i"/>
<element name="mediaGalleryModal" type="block" selector="//aside[contains(@class,'_show')]//div[@class='media-gallery-container' or @class='media-gallery-modal']"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,15 @@
<actionGroup ref="SaveImageActionGroup" stepKey="insertImage"/>
<actionGroup ref="AdminMediaGalleryClickOkButtonTinyMceActionGroup" stepKey="clickOk"/>
<click selector="{{TinyMCESection.ShowHideBtn}}" stepKey="clickShowHideBtnFirstTime"/>
<waitForPageLoad stepKey="waitForPageLoad1"/>
<click selector="{{TinyMCESection.ShowHideBtn}}" stepKey="clickShowHideBtnSecondTime"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<!--Switch to content frame and click on image-->
<comment userInput="Switch to content frame and click on image" stepKey="commentSwitchToIframe"/>
<switchToIFrame selector="{{TinyMCESection.EditAreaIframe}}" stepKey="switchToContentFrame"/>
<click selector="{{TinyMCESection.IframeContent}} {{BlockContentSection.image}}" stepKey="clickImage"/>
<switchToIFrame stepKey="switchBack"/>
<waitForPageLoad stepKey="waitForPageLoad2"/>
<!--Add image second time and assert-->
<comment userInput="Add image second time and assert" stepKey="commentAddImageAndAssert"/>
<comment userInput="BIC workaround" stepKey="addImageSecondTime"/>
Expand Down
Loading

0 comments on commit 8290e5e

Please sign in to comment.