Skip to content

Commit 15ff71b

Browse files
committed
MC-3155: Create/Update tests
- Resolve CR comments
1 parent 783e560 commit 15ff71b

File tree

3 files changed

+45
-27
lines changed

3 files changed

+45
-27
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="openPageBuilderForProductAttribute">
12+
<arguments>
13+
<argument name="attributeCode" type="string"/>
14+
</arguments>
15+
<!-- Opening Page Builder for attribute -->
16+
<comment userInput="Opening Page Builder for attribute" stepKey="commentOpeningPageBuilder"/>
17+
<waitForElementVisible selector="{{PageBuilderProductAttribute.PageBuilderBtn(attributeCode)}}" stepKey="seePagebuilderBtn"/>
18+
<click selector="{{PageBuilderProductAttribute.PageBuilderBtn(attributeCode)}}" stepKey="enablePageBuilder"/>
19+
<waitForElementVisible selector="{{PageBuilderPanel.generalGroup}}" stepKey="waiForPageBuilderVisible" />
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/EditFormActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
<waitForElementVisible time="5" selector="{{EditPanelForm.editFormSave}}" stepKey="waitForColumnSaveButton" />
5151
<click selector="{{EditPanelForm.editFormSave}}" stepKey="clickSaveColumn"/>
5252
<waitForElementNotVisible time="5" selector="{{EditPanelForm.editForm}}" stepKey="waitForEditFormNotVisible" />
53+
<waitForPageLoad stepKey="waitForSavePanelClose"/>
5354
</actionGroup>
5455
<actionGroup name="expandConfigurationSection">
5556
<arguments>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminCreateProductTest.xml

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -198,37 +198,35 @@
198198
<comment userInput="Create a new product" stepKey="commentCreateNewProduct"/>
199199
<amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'simple')}}" stepKey="navigateToNewProduct"/>
200200
<waitForPageLoad stepKey="waitForProductPage"/>
201+
<!-- Set background colour of row for custom attribute -->
202+
<comment userInput="Set background colour of row for custom attribute" stepKey="commentSetBackgroundColor"/>
203+
<actionGroup ref="openPageBuilderForProductAttribute" stepKey="openPageBuilderForProductAttribute">
204+
<argument name="attributeCode" value="$$createWysiwygAttribute.attribute_code$$"/>
205+
</actionGroup>
206+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
207+
<argument name="contentType" value="PageBuilderRowContentType"/>
208+
</actionGroup>
209+
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBackgroundColor">
210+
<argument name="property" value="PageBuilderBackgroundColor_Plaintext_Green"/>
211+
</actionGroup>
212+
<actionGroup ref="saveEditPanelSettingsFullScreen" stepKey="saveEditPanelSettings"/>
213+
<click selector="{{PageBuilderStage.exitFullScreen}}" stepKey="exitPageBuilderFullScreen" />
214+
<waitForPageLoad stepKey="waitForPageLoadExitFullScreen"/>
201215
<!-- Set background colour of row for description -->
202216
<comment userInput="Set background colour of row for description" stepKey="commentSetDescriptionRowBackgroundColor"/>
203217
<click selector="{{AdminProductContentSection.sectionHeader}}" stepKey="openContentSection"/>
204-
<waitForElementVisible selector="{{PageBuilderProductAttribute.PageBuilderBtn('description')}}" stepKey="seeDescriptionPageBuilderButton"/>
205-
<click selector="{{PageBuilderProductAttribute.PageBuilderBtn('description')}}" stepKey="enableDescriptionPageBuilder"/>
206-
<waitForElementVisible selector="{{PageBuilderPanel.generalGroup}}" stepKey="waiForDescriptionPageBuilderVisible" />
218+
<actionGroup ref="openPageBuilderForProductAttribute" stepKey="openPageBuilderForDescription">
219+
<argument name="attributeCode" value="description"/>
220+
</actionGroup>
207221
<actionGroup ref="openPageBuilderEditPanel" stepKey="openDescriptionEditMenuOnStage">
208222
<argument name="contentType" value="PageBuilderRowContentType"/>
209223
</actionGroup>
210224
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterDescriptionRowBackgroundColor">
211225
<argument name="property" value="PageBuilderBackgroundColor_HSV_Orange"/>
212226
</actionGroup>
213227
<actionGroup ref="saveEditPanelSettingsFullScreen" stepKey="saveDescriptionEditPanelSettings"/>
214-
<waitForPageLoad stepKey="waitForDescriptionSavePanelClose"/>
215228
<click selector="{{PageBuilderStage.exitFullScreen}}" stepKey="exitDescriptionPageBuilderFullScreen" />
216229
<waitForPageLoad stepKey="waitForDescriptionPageLoadExitFullScreen"/>
217-
<!-- Set background colour of row for custom attribute -->
218-
<comment userInput="Set background colour of row for custom attribute" stepKey="commentSetBackgroundColor"/>
219-
<waitForElementVisible selector="{{PageBuilderProductAttribute.PageBuilderBtn($$createWysiwygAttribute.attribute_code$$)}}" stepKey="seePagebuilderBtn"/>
220-
<click selector="{{PageBuilderProductAttribute.PageBuilderBtn($$createWysiwygAttribute.attribute_code$$)}}" stepKey="enablePageBuilder"/>
221-
<waitForElementVisible selector="{{PageBuilderPanel.generalGroup}}" stepKey="waiForPageBuilderVisible" />
222-
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
223-
<argument name="contentType" value="PageBuilderRowContentType"/>
224-
</actionGroup>
225-
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBackgroundColor">
226-
<argument name="property" value="PageBuilderBackgroundColor_HSV_Orange"/>
227-
</actionGroup>
228-
<actionGroup ref="saveEditPanelSettingsFullScreen" stepKey="saveEditPanelSettings"/>
229-
<waitForPageLoad stepKey="waitForSavePanelClose"/>
230-
<click selector="{{PageBuilderStage.exitFullScreen}}" stepKey="exitPageBuilderFullScreen" />
231-
<waitForPageLoad stepKey="waitForPageLoadExitFullScreen"/>
232230
<!-- Fill the remaining product fields accordingly -->
233231
<comment userInput="Fill the remaining product fields accordingly" stepKey="commentFillProductFields"/>
234232
<actionGroup ref="fillMainProductForm" stepKey="fillMainProductForm">
@@ -348,32 +346,30 @@
348346
<waitForPageLoad stepKey="waitForProductPage"/>
349347
<!-- Set background colour of row for our first custom attribute -->
350348
<comment userInput="Set background colour of row for our first custom attribute" stepKey="commentSetBackgroundColor"/>
351-
<waitForElementVisible selector="{{PageBuilderProductAttribute.PageBuilderBtn($$createPageBuilderAttribute1.attribute_code$$)}}" stepKey="seePagebuilderBtn"/>
352-
<click selector="{{PageBuilderProductAttribute.PageBuilderBtn($$createPageBuilderAttribute1.attribute_code$$)}}" stepKey="enablePageBuilder"/>
353-
<waitForElementVisible selector="{{PageBuilderPanel.generalGroup}}" stepKey="waiForPageBuilderVisible" />
349+
<actionGroup ref="openPageBuilderForProductAttribute" stepKey="openPageBuilderForProductAttribute1">
350+
<argument name="attributeCode" value="$$createPageBuilderAttribute1.attribute_code$$"/>
351+
</actionGroup>
354352
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
355353
<argument name="contentType" value="PageBuilderRowContentType"/>
356354
</actionGroup>
357355
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBackgroundColor">
358356
<argument name="property" value="PageBuilderBackgroundColor_HSV_Orange"/>
359357
</actionGroup>
360358
<actionGroup ref="saveEditPanelSettingsFullScreen" stepKey="saveEditPanelSettings"/>
361-
<waitForPageLoad stepKey="waitForSavePanelClose"/>
362359
<click selector="{{PageBuilderStage.exitFullScreen}}" stepKey="exitPageBuilderFullScreen" />
363360
<waitForPageLoad stepKey="waitForPageLoadExitFullScreen"/>
364361
<!-- Set background colour of row for our second custom attribute -->
365362
<comment userInput="Set background colour of row for our second custom attribute" stepKey="commentSetBackgroundColor1"/>
366-
<waitForElementVisible selector="{{PageBuilderProductAttribute.PageBuilderBtn($$createPageBuilderAttribute2.attribute_code$$)}}" stepKey="seePagebuilderBtn1"/>
367-
<click selector="{{PageBuilderProductAttribute.PageBuilderBtn($$createPageBuilderAttribute2.attribute_code$$)}}" stepKey="enablePageBuilder1"/>
368-
<waitForElementVisible selector="{{PageBuilderPanel.generalGroup}}" stepKey="waiForPageBuilderVisible1" />
363+
<actionGroup ref="openPageBuilderForProductAttribute" stepKey="openPageBuilderForProductAttribute2">
364+
<argument name="attributeCode" value="$$createPageBuilderAttribute2.attribute_code$$"/>
365+
</actionGroup>
369366
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage1">
370367
<argument name="contentType" value="PageBuilderRowContentType"/>
371368
</actionGroup>
372369
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterBackgroundColor1">
373370
<argument name="property" value="PageBuilderBackgroundColor_Plaintext_Green"/>
374371
</actionGroup>
375372
<actionGroup ref="saveEditPanelSettingsFullScreen" stepKey="saveEditPanelSettings1"/>
376-
<waitForPageLoad stepKey="waitForSavePanelClose1"/>
377373
<click selector="{{PageBuilderStage.exitFullScreen}}" stepKey="exitPageBuilderFullScreen1" />
378374
<waitForPageLoad stepKey="waitForPageLoadExitFullScreen1"/>
379375
<!-- Fill the remaining product fields accordingly -->

0 commit comments

Comments
 (0)