|
44 | 44 |
|
45 | 45 | <!--Add content-->
|
46 | 46 | <!--A generic scroll scrolls past this element, in doing this it fails to execute certain actions on the element and others below it. By scrolling slightly above it it resolves this issue.-->
|
47 |
| - <scrollTo selector="{{AdminProductContentSection.sectionHeader}}" x="0" y="-100" stepKey="scrollTo"/> |
48 |
| - <click selector="{{AdminProductContentSection.sectionHeader}}" stepKey="openDescriptionDropDown"/> |
49 |
| - <fillField selector="{{AdminProductContentSection.descriptionTextArea}}" userInput="This is the long description" stepKey="fillLongDescription"/> |
50 |
| - <fillField selector="{{AdminProductContentSection.shortDescriptionTextArea}}" userInput="This is the short description" stepKey="fillShortDescription"/> |
| 47 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="scrollTo"/> |
| 48 | + <actionGroup ref="AdminOpenContentSectionOnProductPageActionGroup" stepKey="openDescriptionDropDown"/> |
| 49 | + <actionGroup ref="AdminFillInProductDescriptionActionGroup" stepKey="fillLongDescription"> |
| 50 | + <argument name="description" value="This is the long description"/> |
| 51 | + </actionGroup> |
| 52 | + <actionGroup ref="AdminFillInProductShortDescriptionActionGroup" stepKey="fillShortDescription"> |
| 53 | + <argument name="shortDescription" value="This is the short description"/> |
| 54 | + </actionGroup> |
51 | 55 |
|
52 | 56 | <!--save the product-->
|
53 | 57 | <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/>
|
54 |
| - <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/> |
| 58 | + <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShown"> |
| 59 | + <argument name="message" value="You saved the product."/> |
| 60 | + </actionGroup> |
55 | 61 |
|
56 | 62 | <!--Edit content-->
|
57 |
| - <click selector="{{AdminProductContentSection.sectionHeader}}" stepKey="openDescriptionDropDownEdit"/> |
58 |
| - <scrollTo selector="{{AdminProductContentSection.sectionHeader}}" stepKey="scrollToEdit"/> |
59 |
| - <fillField selector="{{AdminProductContentSection.descriptionTextArea}}" userInput="EDIT ~ This is the long description ~ EDIT" stepKey="editLongDescription"/> |
60 |
| - <fillField selector="{{AdminProductContentSection.shortDescriptionTextArea}}" userInput="EDIT ~ This is the short description ~ EDIT" stepKey="editShortDescription"/> |
| 63 | + <actionGroup ref="AdminOpenContentSectionOnProductPageActionGroup" stepKey="openDescriptionDropDownEdit"/> |
| 64 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="scrollToEdit"/> |
| 65 | + <actionGroup ref="AdminFillInProductDescriptionActionGroup" stepKey="editLongDescription"> |
| 66 | + <argument name="description" value="EDIT ~ This is the long description ~ EDIT"/> |
| 67 | + </actionGroup> |
| 68 | + <actionGroup ref="AdminFillInProductShortDescriptionActionGroup" stepKey="editShortDescription"> |
| 69 | + <argument name="shortDescription" value="EDIT ~ This is the short description ~ EDIT"/> |
| 70 | + </actionGroup> |
61 | 71 |
|
62 | 72 | <!--save the product-->
|
63 | 73 | <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButtonAfterEdit"/>
|
64 |
| - <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShownAgain"/> |
| 74 | + <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShownAgain"> |
| 75 | + <argument name="message" value="You saved the product."/> |
| 76 | + </actionGroup> |
65 | 77 |
|
66 | 78 | <!--Checking content admin-->
|
67 |
| - <click selector="{{AdminProductContentSection.sectionHeader}}" stepKey="openDescriptionDropDownAgain"/> |
68 |
| - <scrollTo selector="{{AdminProductContentSection.sectionHeader}}" stepKey="scrollToAgain"/> |
69 |
| - <seeInField selector="{{AdminProductContentSection.descriptionTextArea}}" userInput="EDIT ~ This is the long description ~ EDIT" stepKey="seeLongDescriptionAdmin"/> |
70 |
| - <seeInField selector="{{AdminProductContentSection.shortDescriptionTextArea}}" userInput="EDIT ~ This is the short description ~ EDIT" stepKey="seeShortDescriptionAdmin"/> |
| 79 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="openDescriptionDropDownAgain"/> |
| 80 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="scrollToAgain"/> |
| 81 | + <actionGroup ref="AssertProductDescriptionInProductEditFormActionGroup" stepKey="seeLongDescriptionAdmin"> |
| 82 | + <argument name="productDescription" value="EDIT ~ This is the long description ~ EDIT"/> |
| 83 | + </actionGroup> |
| 84 | + <actionGroup ref="AssertAdminProductShortDescriptionOnProductEditFormActionGroup" stepKey="seeShortDescriptionAdmin"> |
| 85 | + <argument name="productShortDescription" value="EDIT ~ This is the short description ~ EDIT"/> |
| 86 | + </actionGroup> |
71 | 87 |
|
72 | 88 | <!--Checking content storefront-->
|
73 |
| - <amOnPage url="{{SimpleProduct.urlKey}}.html" stepKey="goToStorefront"/> |
74 |
| - <waitForPageLoad stepKey="waitForStorefront"/> |
75 |
| - <see selector="{{StorefrontProductInfoMainSection.productDescription}}" userInput="EDIT ~ This is the long description ~ EDIT" stepKey="seeLongDescriptionStorefront"/> |
76 |
| - <see selector="{{StorefrontProductInfoMainSection.productShortDescription}}" userInput="EDIT ~ This is the short description ~ EDIT" stepKey="seeShortDescriptionStorefront"/> |
| 89 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToStorefront"> |
| 90 | + <argument name="productUrl" value="{{SimpleProduct.urlKey}}"/> |
| 91 | + </actionGroup> |
| 92 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForStorefront"/> |
| 93 | + <actionGroup ref="AssertStorefrontProductDescriptionActionGroup" stepKey="seeLongDescriptionStorefront"> |
| 94 | + <argument name="productDescription" value="EDIT ~ This is the long description ~ EDIT"/> |
| 95 | + </actionGroup> |
| 96 | + <actionGroup ref="AssertStorefrontShortProductDescriptionActionGroup" stepKey="seeShortDescriptionStorefront"> |
| 97 | + <argument name="productShortDescription" value="EDIT ~ This is the short description ~ EDIT"/> |
| 98 | + </actionGroup> |
77 | 99 | </test>
|
78 | 100 | </tests>
|
0 commit comments