Skip to content

Commit

Permalink
Merge pull request #7782 from magento-gl/functional--test--automation
Browse files Browse the repository at this point in the history
Functional Test Automation
  • Loading branch information
vzabaznov authored Aug 5, 2022
2 parents 8427030 + 318d249 commit c6aeb6a
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@
<element name="productOptionList" type="text" selector="#narrow-by-list"/>
<element name="productNameByPosition" type="text" selector=".products-grid li:nth-of-type({{position}}) .product-item-name a" parameterized="true"/>
<element name="sidebarAdditional" type="block" selector="#maincontent .sidebar.sidebar-additional"/>
<element name="searchStore" type="input" selector="//div/input[@id='search']" />
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
</assertStringContainsString>
<!--Remove the category from the product and assert that it removed-->
<comment userInput="Remove the category from the product and assert that it removed" stepKey="assertCategoryRemoved"/>
<scrollTo selector='//label/span[contains(text(),"Quantity")]' stepKey="scrollToCategorySection"/>

<actionGroup ref="RemoveCategoryFromProductActionGroup" stepKey="removeCategoryFromProduct">
<argument name="categoryName" value="$$createCategory.name$$"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
<severity value="BLOCKER"/>
<testCaseId value="MC-25687"/>
<group value="product"/>
<skip>
<issueId value="MQE-3515">Skipped</issueId>
</skip>
</annotations>
<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<actionGroup ref="StorefrontGoToCMSPageActionGroup" stepKey="navigateAndOpenCreatedCmsPage">
<argument name="identifier" value="$createCmsPage.identifier$"/>
</actionGroup>
<moveMouseOver selector="{{StorefrontCategoryMainSection.searchStore}}" stepKey="hoverSearchTextField"/>
<actionGroup ref="AssertStorefrontProductControlsAreNotVisibleWithoutHoverActionGroup" stepKey="assertProductControlsAreNotVisibleWithoutHoverOnCmsPage"/>
<seeElement selector="{{StorefrontCategoryMainSection.productLinkByHref($createFirstSimpleProduct.custom_attributes[url_key]$)}}" stepKey="assertProductName"/>
<seeElement selector="{{StorefrontCategoryMainSection.productPriceByName($createFirstSimpleProduct.name$)}}" stepKey="assertProductPrice"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<data key="productName" unique="prefix">Shoes</data>
<data key="price">60</data>
<data key="weight">100</data>
<data key="defaultLabel">design</data>
<data key="defaultLabel">design123</data>
<data key="adminFieldRed">red</data>
<data key="defaultStoreViewFieldRed">red123</data>
<data key="adminFieldBlue">blue</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<element name="searchDefaultLabelField" type="input" selector="//*[@id='attributeGrid_filter_frontend_label']"/>
<element name="searchButton" type="button" selector="//div[@class='admin__filter-actions']//*[contains(text(), 'Search')]"/>
<element name="storesProductItem" type="button" selector="//*[@data-ui-id='menu-magento-catalog-catalog-attributes-attributes']/a"/>
<element name="createdAttributeItem" type="button" selector="//td[contains(@class, 'col-label') and normalize-space()='design']"/>
<element name="createdAttributeItem" type="button" selector="//td[contains(@class, 'col-label') and normalize-space()='design123']"/>
<element name="deleteAttributeItem" type="button" selector="//*[@id='delete']"/>
<element name="okButton" type="button" selector="//footer[@class='modal-footer']//*[contains(text(),'OK')]"/>
<element name="messageSuccessSavedProduct" type="button" selector="//div[@data-ui-id='messages-message-success']"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<element name="configProductItem" type="button" selector="//*[@id='add_new_product']//*[contains(text(),'Configurable Product')]"/>
<element name="nextButton" type="button" selector="//div[@class='nav-bar-outer-actions']//*[contains(text(),'Next')]"/>
<element name="generateConfigure" type="button" selector="//div[@class='nav-bar-outer-actions']//*[contains(text(),'Generate Products')]"/>
<element name="selectCreatedAttribute" type="button" selector="//*[@class='admin__data-grid-wrap']//td[normalize-space()='design']/preceding-sibling::td"/>
<element name="selectCreatedAttribute" type="button" selector="//*[@class='admin__data-grid-wrap']//td[normalize-space()='design123']/preceding-sibling::td"/>
<element name="closeFrame" type="button" selector="//*[@class='modal-header']//*[contains(text(),'Create Product Configurations')]/following-sibling::button"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<argument name="expectedRgb" type="string" defaultValue="rgb(231, 77, 60)"/>
</arguments>

<grabAttributeFrom selector="{{StorefrontProductInfoMainSection.nthSwatchOption(nthSwatch)}}" userInput="style" stepKey="grabStyle1"/>
<executeJS function="return document.evaluate(&quot;//div[@class='swatch-option color'][{{nthSwatch}}]&quot;,
document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.style.cssText" stepKey="grabStyle1" />
<assertEquals stepKey="assertStyle1">
<actualResult type="string">{$grabStyle1}</actualResult>
<expectedResult type="string">background: center center no-repeat {{expectedRgb}};</expectedResult>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
<argument name="expectedStyle" type="string" defaultValue="background: rgb(0, 0, 0);"/>
</arguments>

<grabAttributeFrom selector="{{AdminManageSwatchSection.nthSwatch(nthSwatch)}}" userInput="style" stepKey="grabStyle1"/>
<executeJS function="return document.evaluate(&quot;//tbody[@data-role='swatch-visual-options-container']//tr[{{nthSwatch}}]//td[@class='swatches-visual-col col-default ']//div[@class='swatch_window']&quot;,
document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.style.cssText" stepKey="grabStyle1" />
<assertEquals stepKey="assertStyle1">
<actualResult type="string">{$grabStyle1}</actualResult>
<expectedResult type="string">{{expectedStyle}}</expectedResult>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
<element name="nthUploadFile" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) .swatch_row_name.btn_choose_file_upload" parameterized="true"/>
<element name="nthDelete" type="button" selector="#swatch-visual-options-panel table tbody tr:nth-of-type({{var}}) button.delete-option" parameterized="true"/>
<element name="deleteBtn" type="button" selector="#manage-options-panel:nth-of-type({{var}}) button.delete-option" parameterized="true"/>
<element name="manageSwatchSection" type="block" selector='//legend/span[contains(text(),"Manage Swatch (Values of Your Attribute)")]'/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

<!-- Set Update Product Preview Image to Yes-->
<selectOption selector="{{AttributePropertiesSection.UpdateProductPreviewImage}}" userInput="Yes" stepKey="setUpdateProductPreviewImage"/>
<scrollTo selector="{{AdminManageSwatchSection.manageSwatchSection}}" stepKey="scrollToAddSwatchSection"/>

<!-- This hack is because the same <input type="file"> is re-purposed used for all uploads. -->
<executeJS function="HTMLInputElement.prototype.click = function() { if(this.type !== 'file') HTMLElement.prototype.click.call(this); };" stepKey="disableClick"/>
Expand All @@ -57,7 +58,7 @@
<fillField selector="{{AdminManageSwatchSection.adminInputByIndex('0')}}" userInput="adobe-thumb" stepKey="fillAdmin1"/>

<!-- Set swatch #2 image using the file upload -->
<click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch2"/>
<executeJS function="jQuery('#add_new_swatch_visual_option_button').click()" stepKey="clickAddSwatch2"/>
<actionGroup ref="OpenSwatchMenuByIndexActionGroup" stepKey="clickSwatch2">
<argument name="index" value="1"/>
</actionGroup>
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c6aeb6a

Please sign in to comment.