Skip to content

Commit 9e39870

Browse files
authored
ENGCOM-7637: MFTF: Replace redundant Xpath for @id attribute with CSS selector #28606
2 parents d2ed23c + 7580e9c commit 9e39870

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<element name="widgets" type="button" selector="#nav li[data-ui-id='menu-magento-widget-cms-widget-instance']"/>
1818
<element name="stores" type="button" selector="#menu-magento-backend-stores"/>
1919
<element name="configuration" type="button" selector="#nav li[data-ui-id='menu-magento-config-system-config']"/>
20-
<element name="dashboard" type="button" selector="//li[@id='menu-magento-backend-dashboard']"/>
21-
<element name="sales" type="button" selector="//li[@id='menu-magento-sales-sales']"/>
22-
<element name="marketing" type="button" selector="//li[@id='menu-magento-backend-marketing']"/>
23-
<element name="system" type="button" selector="//li[@id='menu-magento-backend-system']"/>
24-
<element name="findPartners" type="button" selector="//li[@id='menu-magento-marketplace-partners']"/>
20+
<element name="dashboard" type="button" selector="#menu-magento-backend-dashboard"/>
21+
<element name="sales" type="button" selector="#menu-magento-sales-sales"/>
22+
<element name="marketing" type="button" selector="#menu-magento-backend-marketing"/>
23+
<element name="system" type="button" selector="#menu-magento-backend-system"/>
24+
<element name="findPartners" type="button" selector="#menu-magento-marketplace-partners"/>
2525

2626
<!-- Navigate menu selectors -->
2727
<element name="menuItem" type="button" selector="li[data-ui-id='menu-{{dataUiId}}']" parameterized="true" timeout="30"/>

app/code/Magento/Bundle/Test/Mftf/Section/BundleStorefrontSection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<element name="bundleOptionSelection" type="checkbox" selector="//div[@class='nested options-list']/div[{{optionNumber}}]/label[@class='label']" parameterized="true"/>
1515
<!--Description-->
1616
<!--CE exclusively-->
17-
<element name="longDescriptionText" type="text" selector="//*[@id='description']/div/div" timeout="30"/>
18-
<element name="shortDescriptionText" type="text" selector="//div[@class='product attribute overview']" timeout="30"/>
17+
<element name="longDescriptionText" type="text" selector="#description>div>div" timeout="30"/>
18+
<element name="shortDescriptionText" type="text" selector="div.product.attribute.overview" timeout="30"/>
1919
<!--NameOfProductOnProductPage-->
2020
<element name="bundleProductName" type="text" selector="//*[@id='maincontent']//span[@itemprop='name']"/>
2121
<!--PageNotFoundErrorMessage-->

app/code/Magento/Bundle/Test/Mftf/Section/StorefrontBundledSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<element name="updateCart" type="button" selector="#product-updatecart-button" timeout="30"/>
1818
<element name="configuredPrice" type="block" selector=".price-configured_price .price"/>
1919
<element name="fixedPricing" type="text" selector="//div[@class='price-box price-final_price']//span[@id]//..//span[contains(text(),'{{var1}}')]" parameterized="true"/>
20-
<element name="customizeProduct" type="button" selector="//*[@id='bundle-slide']"/>
20+
<element name="customizeProduct" type="button" selector="#bundle-slide"/>
2121
<element name="customizableBundleItemOption" type="text" selector="//div[@class='field choice'][1]//input[@type='checkbox']"/>
2222
<element name="customizableBundleItemOption2" type="text" selector="//div[@class='field choice'][2]//input[@type='checkbox']"/>
2323
<element name="nthOptionDiv" type="block" selector="#product-options-wrapper div.field.option:nth-of-type({{var}})" parameterized="true"/>

app/code/Magento/Captcha/Test/Mftf/Section/CaptchaFormsDisplayingSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<element name="customer" type="button" selector="//div[@class='admin__page-nav-title title _collapsible']//strong[text()='Customers']"/>
1515
<element name="customerConfig" type="text" selector="//span[text()='Customer Configuration']"/>
1616
<element name="captcha" type="button" selector="#customer_captcha-head"/>
17-
<element name="dependent" type="button" selector="//a[@id='customer_captcha-head' and @class='open']"/>
17+
<element name="dependent" type="button" selector="a#customer_captcha-head.open"/>
1818
<element name="forms" type="multiselect" selector="#customer_captcha_forms"/>
1919
<element name="createUser" type="multiselect" selector="//select[@id='customer_captcha_forms']/option[@value='user_create']"/>
2020
<element name="forgotpassword" type="multiselect" selector="//select[@id='customer_captcha_forms']/option[@value='user_forgotpassword']"/>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/ProductDescriptionWYSIWYGToolbarSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="ProductDescriptionWYSIWYGToolbarSection">
11-
<element name="TinyMCE4" type="button" selector="//div[@id='editorproduct_form_description']//*[contains(@class,'mce-branding')]"/>
11+
<element name="TinyMCE4" type="button" selector="div#editorproduct_form_description .mce-branding"/>
1212
<element name="showHideBtn" type="button" selector="#toggleproduct_form_description"/>
1313
<element name="InsertImageBtn" type="button" selector="#buttonsproduct_form_description &gt; .scalable.action-add-image.plugin"/>
1414
<element name="Style" type="button" selector="//div[@id='editorproduct_form_description']//span[text()='Paragraph']"/>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection/ProductWYSIWYGSection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="ProductWYSIWYGSection">
11-
<element name="Switcher" type="button" selector="//select[@id='dropdown-switcher']"/>
11+
<element name="Switcher" type="button" selector="select#dropdown-switcher"/>
1212
<element name="v436" type="button" selector="//select[@id='dropdown-switcher']/option[text()='TinyMCE 4.3.6']"/>
1313
<element name="v3" type="button" selector="//select[@id='dropdown-switcher']/option[text()='TinyMCE 3.6(Deprecated)']"/>
1414
<element name="TinymceDescription3" type="button" selector="//span[text()='Description']"/>
1515
<element name="SaveConfig" type="button" selector="#save"/>
1616
<element name="v4" type="button" selector="#category_form_description_v4"/>
17-
<element name="WYSIWYGBtn" type="button" selector=".//button[@class='action-default scalable action-wysiwyg']"/>
17+
<element name="WYSIWYGBtn" type="button" selector="button.action-default.scalable.action-wysiwyg"/>
1818
</section>
1919
</sections>

app/code/Magento/Cms/Test/Mftf/Section/CmsPagesPageActionsSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<element name="filterButton" type="input" selector="//button[text()='Filters']"/>
1313
<element name="URLKey" type="input" selector="//div[@class='admin__form-field-control']/input[@name='identifier']"/>
1414
<element name="ApplyFiltersBtn" type="button" selector="//span[text()='Apply Filters']"/>
15-
<element name="searchInput" type="input" selector="//*[@id='fulltext']"/>
15+
<element name="searchInput" type="input" selector="#fulltext"/>
1616
<element name="searchButton" type="button" selector="//*[@id='fulltext']/parent::*/button"/>
1717
<element name="addNewPageButton" type="button" selector="#add" timeout="30"/>
1818
<element name="select" type="button" selector="//div[text()='{{var1}}']/parent::td//following-sibling::td[@class='data-grid-actions-cell']//button[text()='Select']" parameterized="true"/>

app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/MediaGallerySection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="MediaGallerySection">
1111
<element name="Browse" type="button" selector=".mce-i-browse"/>
12-
<element name="browseForImage" type="button" selector="//*[@id='srcbrowser']"/>
12+
<element name="browseForImage" type="button" selector="#srcbrowser"/>
1313
<element name="BrowseUploadImage" type="file" selector=".fileupload"/>
1414
<element name="image" type="text" selector="//small[text()='{{var1}}']" parameterized="true"/>
1515
<element name="imageOrImageCopy" type="text" selector="//div[contains(@class,'media-gallery-modal')]//img[contains(@alt, '{{arg1}}.{{arg2}}')]|//img[contains(@alt,'{{arg1}}_') and contains(@alt,'.{{arg2}}')]" parameterized="true"/>

0 commit comments

Comments
 (0)