Skip to content

Commit 8112a38

Browse files
authored
Merge pull request #5001 from magento-tsg/2.3-develop-pr85
[TSG] TESTs Fixes for 2.3 (pr85) (2.3-develop)
2 parents 970abcb + 90b95f3 commit 8112a38

File tree

45 files changed

+875
-214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+875
-214
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCreateWidgetActionGroup.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,24 @@
1919
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessageAppears"/>
2020
<see selector="{{AdminMessagesSection.success}}" userInput="The widget instance has been saved" stepKey="seeSuccess"/>
2121
</actionGroup>
22+
23+
<actionGroup name="AdminCreateCatalogProductWidgetActionGroup" extends="AdminCreateWidgetActionGroup">
24+
<annotations>
25+
<description>EXTENDS: AdminCreateWidgetActionGroup. Creates Catalog Category Link Widget.</description>
26+
</annotations>
27+
<arguments>
28+
<argument name="categoryName" type="string" defaultValue="{{DefaultCategory.name}}"/>
29+
</arguments>
30+
31+
<waitForElementVisible selector="{{AdminNewWidgetSection.selectCategory}}" after="clickWidgetOptions" stepKey="waitForSelectCategoryButtonVisible"/>
32+
<click selector="{{AdminNewWidgetSection.selectCategory}}" stepKey="clickOnSelectCategory"/>
33+
<waitForPageLoad stepKey="waitForCategoryTreeLoaded"/>
34+
<click selector="{{AdminCategorySidebarTreeSection.expandRootCategoryByName(DefaultCategory.name)}}" stepKey="clickToExpandDefaultCategory"/>
35+
<waitForElementVisible selector="{{AdminCategorySidebarTreeSection.categoryInTree(categoryName)}}" stepKey="waitForCategoryVisible"/>
36+
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(categoryName)}}" stepKey="selectCategory"/>
37+
<waitForPageLoad stepKey="waitForWidgetPageLoaded"/>
38+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveButton"/>
39+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
40+
<see selector="{{AdminMessagesSection.success}}" userInput="The widget instance has been saved" stepKey="seeSuccessMessage"/>
41+
</actionGroup>
2242
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,4 +1328,9 @@
13281328
<entity name="SimpleProductUpdatePrice16" type="product2">
13291329
<data key="price">16.00</data>
13301330
</entity>
1331+
<entity name="ProductWithTwoTextFieldOptions" type="product">
1332+
<var key="sku" entityType="product" entityKey="sku" />
1333+
<requiredEntity type="product_option">ProductOptionField</requiredEntity>
1334+
<requiredEntity type="product_option">ProductOptionField2</requiredEntity>
1335+
</entity>
13311336
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/ProductOptionData.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<entity name="ProductOptionField" type="product_option">
1212
<var key="product_sku" entityType="product" entityKey="sku" />
1313
<data key="title">OptionField</data>
14+
<data key="sku">OptionField</data>
1415
<data key="type">field</data>
1516
<data key="is_require">true</data>
1617
<data key="sort_order">1</data>
@@ -21,6 +22,7 @@
2122
<entity name="ProductOptionField2" type="product_option">
2223
<var key="product_sku" entityType="product" entityKey="sku" />
2324
<data key="title">OptionField2</data>
25+
<data key="sku">OptionField2</data>
2426
<data key="type">field</data>
2527
<data key="is_require">true</data>
2628
<data key="sort_order">1</data>

app/code/Magento/Catalog/Test/Mftf/Data/WidgetsData.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,15 @@
3232
<data key="display_on">All Pages</data>
3333
<data key="container">Sidebar Additional</data>
3434
</entity>
35+
<entity name="CatalogCategoryLinkWidget" type="widget">
36+
<data key="type">Catalog Category Link</data>
37+
<data key="design_theme">Magento Luma</data>
38+
<data key="name" unique="suffix">Test Widget</data>
39+
<array key="store_ids">
40+
<item>All Store Views</item>
41+
</array>
42+
<data key="sort_order">0</data>
43+
<data key="display_on">All Pages</data>
44+
<data key="container">Main Content Area</data>
45+
</entity>
3546
</entities>

app/code/Magento/Catalog/Test/Mftf/Page/StorefrontCategoryPage.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11-
<page name="StorefrontCategoryPage" url="/{{var1}}.html" area="storefront" module="Catalog" parameterized="true">
11+
<page name="StorefrontCategoryPage" url="/{{var1}}.html" area="storefront" module="Magento_Catalog" parameterized="true">
1212
<section name="StorefrontCategoryMainSection"/>
1313
<section name="WYSIWYGToolbarSection"/>
1414
</page>

app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySidebarTreeSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<element name="lastCreatedCategory" type="block" selector=".x-tree-root-ct li li:last-child" />
2020
<element name="treeContainer" type="block" selector=".tree-holder" />
2121
<element name="expandRootCategory" type="text" selector="img.x-tree-elbow-end-plus"/>
22+
<element name="expandRootCategoryByName" type="button" selector="//div[@class='x-tree-root-node']/li/div/a/span[contains(., '{{categoryName}}')]/../../img[contains(@class, 'x-tree-elbow-end-plus')]" parameterized="true" timeout="30"/>
2223
<element name="categoryByName" type="text" selector="//div[contains(@class, 'categories-side-col')]//a/span[contains(text(), '{{categoryName}}')]" parameterized="true" timeout="30"/>
2324
</section>
2425
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/AdminNewWidgetSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminNewWidgetSection">
1212
<element name="selectProduct" type="button" selector=".btn-chooser" timeout="30"/>
13+
<element name="selectCategory" type="button" selector="button[title='Select Category...']" timeout="30"/>
1314
</section>
1415
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductCustomizableOptionsSection.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@
5959
<element name="importOptions" type="button" selector="//button[@data-index='button_import']" timeout="30"/>
6060
</section>
6161
<section name="AdminProductImportOptionsSection">
62-
<element name="selectProductTitle" type="text" selector="//h1[contains(text(), 'Select Product')]" timeout="30"/>
63-
<element name="filterButton" type="button" selector="//button[@data-action='grid-filter-expand']" timeout="30"/>
64-
<element name="nameField" type="input" selector="//input[@name='name']" timeout="30"/>
65-
<element name="applyFiltersButton" type="button" selector="//button[@data-action='grid-filter-apply']" timeout="30"/>
66-
<element name="resetFiltersButton" type="button" selector="//button[@data-action='grid-filter-reset']" timeout="30"/>
67-
<element name="firstRowItemCheckbox" type="input" selector="//input[@data-action='select-row']" timeout="30"/>
68-
<element name="importButton" type="button" selector="//button[contains(@class, 'action-primary')]/span[contains(text(), 'Import')]" timeout="30"/>
62+
<element name="selectProductTitle" type="text" selector="//aside[contains(@class, 'product_form_product_form_import_options_modal')]//h1[contains(text(), 'Select Product')]" timeout="30"/>
63+
<element name="filterButton" type="button" selector="aside.product_form_product_form_import_options_modal button[data-action='grid-filter-expand']" timeout="30"/>
64+
<element name="nameField" type="input" selector="aside.product_form_product_form_import_options_modal input[name='name']" timeout="30"/>
65+
<element name="applyFiltersButton" type="button" selector="aside.product_form_product_form_import_options_modal button[data-action='grid-filter-apply']" timeout="30"/>
66+
<element name="resetFiltersButton" type="button" selector="aside.product_form_product_form_import_options_modal button[data-action='grid-filter-reset']" timeout="30"/>
67+
<element name="firstRowItemCheckbox" type="input" selector="aside.product_form_product_form_import_options_modal input[data-action='select-row']" timeout="30"/>
68+
<element name="importButton" type="button" selector="//aside[contains(@class, 'product_form_product_form_import_options_modal')]//button[contains(@class, 'action-primary')]/span[contains(text(), 'Import')]" timeout="30"/>
6969
</section>
7070
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryMainSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@
3434
<element name="productsList" type="block" selector="#maincontent .column.main"/>
3535
<element name="productName" type="text" selector=".product-item-name"/>
3636
<element name="productOptionList" type="text" selector="#narrow-by-list"/>
37+
<element name="productNameByPosition" type="text" selector=".products-grid li:nth-of-type({{position}}) .product-item-name a" parameterized="true"/>
3738
</section>
3839
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontWidgetsSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
<element name="widgetRecentlyViewedProductsGrid" type="block" selector=".block.widget.block-viewed-products-grid"/>
1313
<element name="widgetRecentlyComparedProductsGrid" type="block" selector=".block.widget.block-compared-products-grid"/>
1414
<element name="widgetRecentlyOrderedProductsGrid" type="block" selector=".block.block-reorder"/>
15+
<element name="widgetCategoryLinkByName" type="text" selector="//div[contains(@class, 'block-category-link')]/a/span[contains(., '{{categoryName}}')]" parameterized="true"/>
1516
</section>
16-
</sections>
17+
</sections>

0 commit comments

Comments
 (0)