Skip to content

Commit 9923890

Browse files
author
Stas Puga
committed
MC-40209: [JetTeam] Unskip StorefrontSwatchAttributesDisplayInWidgetCMSTest
1 parent 3b860f5 commit 9923890

File tree

2 files changed

+122
-4
lines changed

2 files changed

+122
-4
lines changed
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontSwatchAttributeDisplayedInWidgetCMSTest">
12+
<annotations>
13+
<features value="Swatches"/>
14+
<stories value="Swatches in CMS Widget"/>
15+
<title value="Swatch Attribute is displayed in the Widget CMS"/>
16+
<description value="Swatch Attribute is displayed in the Widget CMS"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-28607"/>
19+
<group value="configurableProduct"/>
20+
<group value="cms"/>
21+
<group value="widget"/>
22+
<group value="swatch"/>
23+
<group value="WYSIWYGDisabled"/>
24+
</annotations>
25+
<before>
26+
<!-- Create Configurable product -->
27+
<createData entity="_defaultCategory" stepKey="createCategory"/>
28+
<createData entity="ApiConfigurableProduct" stepKey="createConfigurableProduct">
29+
<requiredEntity createDataKey="createCategory"/>
30+
</createData>
31+
32+
<!-- Create product swatch attribute with 1 variations -->
33+
<createData entity="VisualSwatchProductAttributeForm" stepKey="createVisualSwatchAttribute"/>
34+
<createData entity="SwatchProductAttributeOption1" stepKey="swatchAttributeOption">
35+
<requiredEntity createDataKey="createVisualSwatchAttribute"/>
36+
</createData>
37+
38+
<!-- Create CMS Page -->
39+
<createData entity="_defaultCmsPage" stepKey="createCmsPage"/>
40+
41+
<!-- Login to Admin -->
42+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
43+
44+
<!-- Open configurable product edit page -->
45+
<amOnPage url="{{AdminProductEditPage.url($createConfigurableProduct.id$)}}" stepKey="goToConfigurableProduct"/>
46+
47+
<!-- Add attributes to configurable product-->
48+
<conditionalClick selector="{{AdminProductFormConfigurationsSection.sectionHeader}}" dependentSelector="{{AdminProductFormConfigurationsSection.createConfigurations}}" visible="false" stepKey="openConfigurationSection"/>
49+
<click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="openConfigurationPanel"/>
50+
51+
<!-- Find Swatch attribute in grid and select it -->
52+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearAttributeGridFiltersToFindSwatchAttribute"/>
53+
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openFiltersPaneForSwatchAttribute"/>
54+
<fillField selector="{{AdminDataGridHeaderSection.attributeCodeFilterInput}}" userInput="$createVisualSwatchAttribute.attribute_code$" stepKey="fillAttributeCodeFilterFieldForSwatchAttribute"/>
55+
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickApplyFiltersButtonForSwatchAttribute"/>
56+
<click selector="{{AdminDataGridTableSection.rowCheckbox('1')}}" stepKey="selectSwatchAttribute"/>
57+
58+
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNextToSelectOptions"/>
59+
<click selector="{{AdminCreateProductConfigurationsPanel.selectAllByAttribute($createVisualSwatchAttribute.frontend_label[0]$)}}" stepKey="selectAllSwatchAttributeOptions"/>
60+
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNextToApplyQuantity"/>
61+
<click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/>
62+
<fillField selector="{{AdminCreateProductConfigurationsPanel.quantity}}" userInput="100" stepKey="enterAttributeQuantity"/>
63+
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextToProceedToSummary"/>
64+
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickGenerateProductsButton"/>
65+
66+
<!-- Save Product -->
67+
<actionGroup ref="SaveConfigurableProductAddToCurrentAttributeSetActionGroup" stepKey="saveConfigurableProduct"/>
68+
69+
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
70+
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
71+
72+
<!-- Open edit CMS Page -->
73+
<actionGroup ref="AdminOpenCmsPageActionGroup" stepKey="openEditCmsPage">
74+
<argument name="page_id" value="$createCmsPage.id$"/>
75+
</actionGroup>
76+
77+
<conditionalClick selector="{{CmsNewPagePageActionsSection.contentSectionName}}" dependentSelector="{{CmsNewPagePageActionsSection.showHideEditor}}" visible="false" stepKey="expandContentSectionIfNotVisible"/>
78+
<waitForPageLoad stepKey="waitForPageLoadContentSection"/>
79+
<conditionalClick selector="{{CmsNewPagePageActionsSection.showHideEditor}}" dependentSelector="{{CatalogWidgetSection.insertWidgetButton}}" visible="false" stepKey="clickNextShowHideEditorIfVisible"/>
80+
81+
<!-- Insert Widget -->
82+
<actionGroup ref="AdminInsertWidgetToCmsPageContentActionGroup" stepKey="insertWidgetToCmsPageContent">
83+
<argument name="widgetType" value="Catalog Products List"/>
84+
</actionGroup>
85+
<actionGroup ref="AdminFillCatalogProductsListWidgetCategoryActionGroup" stepKey="fillCatalogProductsListWidgetOptions">
86+
<argument name="categoryName" value="$createCategory.name$"/>
87+
</actionGroup>
88+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidgetButton"/>
89+
90+
<!-- Save CMS Page -->
91+
<actionGroup ref="AdminSaveAndContinueEditCmsPageActionGroup" stepKey="saveCmsPage"/>
92+
</before>
93+
94+
<after>
95+
<!-- Delete Category -->
96+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
97+
<!-- Delete Configurable Product -->
98+
<deleteData createDataKey="createConfigurableProduct" stepKey="deleteConfigurableProduct"/>
99+
<!-- Delete Attribute -->
100+
<deleteData createDataKey="createVisualSwatchAttribute" stepKey="deleteVisualSwatchAttribute"/>
101+
<!-- Delete CMS Page -->
102+
<deleteData createDataKey="createCmsPage" stepKey="deleteCmsPage"/>
103+
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
104+
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
105+
<!-- Logout from Admin -->
106+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
107+
</after>
108+
109+
<conditionalClick selector="{{CmsNewPagePageSeoSection.header}}" dependentSelector="{{CmsNewPagePageSeoSection.urlKey}}" visible="false" stepKey="clickToExpandSeoSection"/>
110+
<scrollTo selector="{{CmsNewPagePageSeoSection.urlKey}}" stepKey="scrollToUrlKey"/>
111+
<grabValueFrom selector="{{CmsNewPagePageSeoSection.urlKey}}" stepKey="grabTextFromUrlKey"/>
112+
113+
<!-- Open Storefront CMS page -->
114+
<amOnPage url="{{StorefrontHomePage.url}}$grabTextFromUrlKey" stepKey="gotToCreatedCmsPage"/>
115+
<waitForPageLoad stepKey="waitForPageLoad"/>
116+
<seeElement selector="{{StorefrontProductInfoMainSection.productSwatch($swatchAttributeOption.option[store_labels][0][label]$)}}" stepKey="seeAddedWidget"/>
117+
</test>
118+
</tests>

app/code/Magento/Swatches/Test/Mftf/Test/StorefrontSwatchAttributesDisplayInWidgetCMSTest.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="StorefrontSwatchAttributesDisplayInWidgetCMSTest">
11+
<test name="StorefrontSwatchAttributesDisplayInWidgetCMSTest" deprecated="Use StorefrontSwatchAttributeDisplayedInWidgetCMSTest instead">
1212
<annotations>
1313
<features value="ConfigurableProduct"/>
1414
<stories value="Swatches"/>
15-
<title value="Swatch Attribute is not displayed in the Widget CMS"/>
16-
<description value="Swatch Attribute is not displayed in the Widget CMS"/>
15+
<title value="Deprecated. Swatch Attribute is not displayed in the Widget CMS"/>
16+
<description value="Deprecated. Swatch Attribute is not displayed in the Widget CMS"/>
1717
<severity value="MAJOR"/>
1818
<testCaseId value="MAGETWO-96469"/>
1919
<useCaseId value="MAGETWO-96406"/>
2020
<group value="ConfigurableProduct"/>
2121
<skip>
22-
<issueId value="MQE-1424" />
22+
<issueId value="DEPRECATED">Use StorefrontSwatchAttributeDisplayedInWidgetCMSTest instead</issueId>
2323
</skip>
2424
</annotations>
2525

0 commit comments

Comments
 (0)