Skip to content

Commit

Permalink
Merge branch '2.4-develop' into eav-graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
svera authored Apr 25, 2023
2 parents 1906051 + 83b7f30 commit e27f246
Show file tree
Hide file tree
Showing 44 changed files with 1,730 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
<element name="localeDisabled" type="select" selector="#general_locale_code[disabled=disabled]"/>
<element name="useDefault" type="checkbox" selector="#general_locale_timezone_inherit"/>
<element name="defaultLocale" type="checkbox" selector="#general_locale_code_inherit"/>
<element name="checkIfTabExpand" type="button" selector="#general_locale-head:not(.open)"/>
<element name="timeZoneDropdown" type="select" selector="//select[@id='general_locale_timezone']"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@
<element name="productAttributeName" type="button" selector="//div[@class='filter-options-title' and contains(text(),'{{var1}}')]" parameterized="true"/>
<element name="productAttributeOptionValue" type="button" selector="//div[@id='narrow-by-list']//a[contains(text(), '{{var1}}')]" parameterized="true"/>
<element name="outOfStockProductCategoryPage" type="text" selector="//div[@class='stock unavailable']//span[text()='Out of stock']"/>
<element name="ListedProductAttributes" type="block" selector="//div[@aria-label='{{vs_attribute}}']//div[@aria-label='{{attribute_name}}']" parameterized="true"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
<element name="ProductAddToCompareByName" type="text" selector="//*[contains(@class,'product-item-info')][descendant::a[contains(text(), '{{var1}}')]]//a[contains(@class, 'tocompare')]" parameterized="true"/>
<element name="ProductImageByNameAndSrc" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//img[contains(@src, '{{src}}')]" parameterized="true"/>
<element name="ProductStockUnavailable" type="text" selector="//*[text()='Out of stock']"/>
<element name="listedProductOnProductPage" type="block" selector="//div[contains(@aria-labelledBy,'{{attribute_code}}')]//div[@aria-label='{{attribute_name}}']" parameterized="true"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
<element name="productOptionFile" type="file" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'OptionFile')]/../div[@class='control']//input[@type='file']" parameterized="true"/>
<element name="productOptionSelect" type="select" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{var1}}')]/../div[@class='control']//select" parameterized="true"/>
<element name="asLowAs" type="input" selector="span[class='price-wrapper '] "/>
<element name="asLowAsLabel" type="input" selector="//strong[@id='block-related-heading']/following::span[@class='price-label'][1]"/>
<element name="asLowAsLabelAgain" type="input" selector="//strong[@id='block-related-heading']/following::span[@class='price-label'][2]"/>
<element name="specialPriceValue" type="text" selector="//span[@class='special-price']//span[@class='price']"/>
<element name="mapPrice" type="text" selector="//div[@class='price-box price-final_price']//span[contains(@class, 'price-msrp_price')]"/>
<element name="clickForPriceLink" type="text" selector="//div[@class='price-box price-final_price']//a[contains(text(), 'Click for price')]"/>
Expand Down Expand Up @@ -106,7 +108,7 @@
<element name="customOptionHour" type="date" selector="//div[@class='field date required']//span[text()='{{option}}']/../..//div/select[@data-calendar-role='hour']" parameterized="true"/>
<element name="customOptionMinute" type="date" selector="//div[@class='field date required']//span[text()='{{option}}']/../..//div/select[@data-calendar-role='minute']" parameterized="true"/>
<element name="customOptionDayPart" type="date" selector="//div[@class='field date required']//span[text()='{{option}}']/../..//div/select[@data-calendar-role='day_part']" parameterized="true"/>

<element name="swatchOptionDisabled" type="text" selector=".//*[@class='swatch-option color disabled']"/>
<element name="addToCartEnabled" type="button" selector="#product-addtocart-button:not([disabled])"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
<!-- Login as admin -->
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>

<!-- remove the Filter From the page-->
<actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clearFilterFromProductIndex"/>

<!--Create Category-->
<createData entity="SimpleSubCategory" stepKey="createCategory"/>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<!-- Test XML Example -->
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminChecksIfOnlyOneQuantityConfigurationIsDisplayedForBundleProductWhileCreatingAnOrderTest">
<annotations>
<features value="Bundle"/>
<stories value="Create Admin checks if only one Quantity Configuration is displayed for Bundle product while creating an order"/>
<title value="Admin checks if only one Quantity Configuration is displayed for Bundle product while creating an order"/>
<description value="create Admin checks if only one Quantity Configuration is displayed for Bundle product "/>
<severity value="MAJOR"/>
<testCaseId value="AC-5237"/>
</annotations>
<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
<createData entity="Simple_US_Customer_NY" stepKey="createCustomer"/>
</before>
<after>
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
<!--Delete customer-->
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<!-- Go to bundle product creation page -->
<amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/>
<waitForPageLoad stepKey="waitForBundleProductCreationPage"/>
<!-- Entering Bundle Product name,SKU, category, url key -->
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
<!-- Create bundle product options -->
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/>
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions"/>
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle"/>
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType"/>
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProductsToBundle"/>
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToOption"/>
<waitForPageLoad stepKey="waitForPageLoadAfterBundleProducts"/>
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions">
<argument name="product" value="$$simpleProduct1$$"/>
</actionGroup>
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/>
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions2">
<argument name="product" value="$$simpleProduct2$$"/>
</actionGroup>
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/>
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/>
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty1"/>
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty2"/>
<!--Save the product-->
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButton"/>
<!--Create new order-->
<actionGroup ref="AdminNavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer">
<argument name="customer" value="Simple_US_Customer_NY"/>
</actionGroup>
<click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
<click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearch"/>
<scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/>
<checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectProduct"/>
<waitForPageLoad stepKey="waitForProductLoad"/>
</test>
</tests>
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?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="AdminCreateCategoryWithAPIForMultiStoresTest">
<annotations>
<stories value="Create categories"/>
<title value="Create Category Using API post"/>
<description value="Create Category Using API post when there are more than stores existing"/>
<testCaseId value="AC-5384"/>
<severity value="MAJOR"/>
<group value="Catalog"/>
<group value="mtf_migrated"/>
</annotations>

<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/>
<!--Create a new additional store view for the default website and store-->
<actionGroup ref="CreateStoreViewActionGroup" stepKey="createNewSecondStoreviewForDefaultStore">
<argument name="storeView" value="SecondStoreGroupUnique"/>
</actionGroup>
<!--Create a new second store for the default website-->
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStoreForMainWebsite">
<argument name="website" value="{{_defaultWebsite.name}}"/>
<argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
<argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
</actionGroup>
<!--Create a store view for the second store-->
<actionGroup ref="CreateCustomStoreViewActionGroup" stepKey="createStoreviewForSecondStore"/>
<!--Create a second custom website-->
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createNewWebsite">
<argument name="newWebsiteName" value="{{secondCustomWebsite.name}}"/>
<argument name="websiteCode" value="{{secondCustomWebsite.code}}"/>
</actionGroup>
<!--Create a store for the second website-->
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createStoreForNewWebsite">
<argument name="website" value="{{secondCustomWebsite.name}}"/>
<argument name="storeGroupName" value="{{NewStoreData.name}}"/>
<argument name="storeGroupCode" value="{{NewStoreData.code}}"/>
</actionGroup>
<!--Create a store view of the new store of second website-->
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView">
<argument name="StoreGroup" value="NewStoreData"/>
<argument name="customStore" value="staticSecondStore"/>
</actionGroup>
</before>

<after>
<!--Delete the created category-->
<actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCategory">
<argument name="categoryEntity" value="SimpleSubCategory"/>
</actionGroup>
<!--Set the main website as default-->
<actionGroup ref="AdminSetDefaultWebsiteActionGroup" stepKey="setMainWebsiteAsDefault">
<argument name="websiteName" value="{{_defaultWebsite.name}}"/>
</actionGroup>
<!--Delete the second created website-->
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteCreatedWebsite">
<argument name="websiteName" value="{{secondCustomWebsite.name}}"/>
</actionGroup>
<!--Create a second store created for main website-->
<actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteCreatedCustomWebsiteStore">
<argument name="storeGroupName" value="customStoreGroup.name"/>
</actionGroup>
<!--Create a second store view created for main website-->
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteCreatedCustomStoreview">
<argument name="customStore" value="SecondStoreGroupUnique"/>
</actionGroup>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<!--Create a category and check that in storefront -->
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory"/>
<see userInput="$$createCategory.name$$" stepKey="assertCategoryNameOnStorefront" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
<waitForPageLoad stepKey="waitForCustomerCategoryPageLoad"/>
<!--Switch to second store view and check that created category in storefront-->
<actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchToSecondMainStoreView">
<argument name="storeView" value="SecondStoreGroupUnique"/>
</actionGroup>
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory2"/>
<see userInput="$$createCategory.name$$" stepKey="assertCategoryNameOnSecondMainStoreView" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
<waitForPageLoad stepKey="waitForCustomerCategoryPageLoad2"/>
<!--Switch to second store and check that created category in storefront-->
<actionGroup ref="StorefrontSwitchStoreActionGroup" stepKey="switchToSecondMainStore">
<argument name="storeName" value="{{customStoreGroup.name}}"/>
</actionGroup>
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory3"/>
<see userInput="$$createCategory.name$$" stepKey="assertCategoryNameOnSecondMainStore" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
<waitForPageLoad stepKey="waitForCustomerCategoryPageLoad3"/>
<!--Switch to second website and check that created category in storefront-->
<actionGroup ref="AdminSetDefaultWebsiteActionGroup" stepKey="setNewWebsiteAsDefault">
<argument name="websiteName" value="{{secondCustomWebsite.name}}"/>
</actionGroup>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage2"/>
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory4"/>
<see userInput="$$createCategory.name$$" stepKey="assertCategoryNameOnSecondWebsite" selector="{{StorefrontCategoryMainSection.CategoryTitle}}"/>
<waitForPageLoad stepKey="waitForCustomerCategoryPageLoad4"/>
</test>
</tests>
Loading

0 comments on commit e27f246

Please sign in to comment.