|
34 | 34 | <deleteData createDataKey="category" stepKey="deletePreReqCategory"/>
|
35 | 35 | <deleteData createDataKey="firstProduct" stepKey="deleteFirstProduct"/>
|
36 | 36 | <deleteData createDataKey="secondProduct" stepKey="deleteSecondProduct"/>
|
37 |
| - <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> |
| 37 | + <actionGroup ref="logout" stepKey="logoutFromAdmin"/> |
38 | 38 | </after>
|
39 | 39 |
|
40 | 40 | <!-- Go to the first product edit page -->
|
|
55 | 55 | <click selector="{{AdminProductImagesSection.productImagesToggle}}" stepKey="expandImages"/>
|
56 | 56 |
|
57 | 57 | <!-- *.bmp is not allowed -->
|
58 |
| - <attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="bmp.bmp" stepKey="attachBmp"/> |
59 |
| - <waitForPageLoad stepKey="waitForUploadBmp"/> |
60 |
| - <see selector="{{AdminProductMessagesSection.attentionMessage}}" userInput="We don't recognize or support this file extension type." stepKey="seeErrorBmp"/> |
61 |
| - <click selector="{{AdminProductImagesSection.modalOkBtn}}" stepKey="closeModalBmp"/> |
| 58 | + <actionGroup ref="AdminProductCheckUnsupportedFileActionGroup" stepKey="attachBmp"> |
| 59 | + <argument name="filename" value="bmp.bmp"/> |
| 60 | + </actionGroup> |
62 | 61 |
|
63 | 62 | <!-- *.ico is not allowed -->
|
64 |
| - <attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="ico.ico" stepKey="attachIco"/> |
65 |
| - <waitForPageLoad stepKey="waitForUploadIco"/> |
66 |
| - <see selector="{{AdminProductMessagesSection.attentionMessage}}" userInput="We don't recognize or support this file extension type." stepKey="seeErrorIco"/> |
67 |
| - <click selector="{{AdminProductImagesSection.modalOkBtn}}" stepKey="closeModalIco"/> |
| 63 | + <actionGroup ref="AdminProductCheckUnsupportedFileActionGroup" stepKey="attachIco"> |
| 64 | + <argument name="filename" value="ico.ico"/> |
| 65 | + </actionGroup> |
68 | 66 |
|
69 | 67 | <!-- *.svg is not allowed -->
|
70 |
| - <attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="svg.svg" stepKey="attachSvg"/> |
71 |
| - <waitForPageLoad stepKey="waitForUploadSvg"/> |
72 |
| - <see selector="{{AdminProductMessagesSection.attentionMessage}}" userInput="We don't recognize or support this file extension type." stepKey="seeErrorSvg"/> |
73 |
| - <click selector="{{AdminProductImagesSection.modalOkBtn}}" stepKey="closeModalSvg"/> |
| 68 | + <actionGroup ref="AdminProductCheckUnsupportedFileActionGroup" stepKey="attachSvg"> |
| 69 | + <argument name="filename" value="svg.svg"/> |
| 70 | + </actionGroup> |
| 71 | + |
74 | 72 |
|
75 | 73 | <!-- 0kb size is not allowed -->
|
76 |
| - <attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="empty.jpg" stepKey="attachEmpty"/> |
77 |
| - <waitForPageLoad stepKey="waitForUploadEmpty"/> |
78 |
| - <see selector="{{AdminProductMessagesSection.attentionMessage}}" userInput="We don't recognize or support this file extension type." stepKey="seeErrorEmpty"/> |
79 |
| - <click selector="{{AdminProductImagesSection.modalOkBtn}}" stepKey="closeModalEmpty"/> |
| 74 | + <actionGroup ref="AdminProductCheckUnsupportedFileActionGroup" stepKey="attachEmpty"> |
| 75 | + <argument name="filename" value="empty.jpg"/> |
| 76 | + </actionGroup> |
80 | 77 |
|
81 | 78 | <!-- 1~ kb is allowed -->
|
82 | 79 | <attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="small.jpg" stepKey="attachSmall"/>
|
83 | 80 | <waitForPageLoad stepKey="waitForUploadSmall"/>
|
84 |
| - <dontSeeElement selector="{{AdminProductMessagesSection.attentionMessage}}" stepKey="dontSeeErrorSmall"/> |
| 81 | + <dontSeeElement selector="{{AdminConfirmationModalSection.message}}" stepKey="dontSeeErrorSmall"/> |
85 | 82 |
|
86 | 83 | <!-- 1~ mb is allowed -->
|
87 | 84 | <attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="medium.jpg" stepKey="attachMedium"/>
|
88 | 85 | <waitForPageLoad stepKey="waitForUploadMedium"/>
|
89 |
| - <dontSeeElement selector="{{AdminProductMessagesSection.attentionMessage}}" stepKey="dontSeeErrorMedium"/> |
| 86 | + <dontSeeElement selector="{{AdminConfirmationModalSection.message}}" stepKey="dontSeeErrorMedium"/> |
90 | 87 |
|
91 | 88 | <!-- 10~ mb is allowed -->
|
92 | 89 | <attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="large.jpg" stepKey="attachLarge"/>
|
93 | 90 | <waitForPageLoad stepKey="waitForUploadLarge"/>
|
94 |
| - <dontSeeElement selector="{{AdminProductMessagesSection.attentionMessage}}" stepKey="dontSeeErrorLarge"/> |
| 91 | + <dontSeeElement selector="{{AdminConfirmationModalSection.message}}" stepKey="dontSeeErrorLarge"/> |
95 | 92 |
|
96 | 93 | <!-- *.gif is allowed -->
|
97 | 94 | <attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="gif.gif" stepKey="attachGif"/>
|
98 | 95 | <waitForPageLoad stepKey="waitForUploadGif"/>
|
99 |
| - <dontSeeElement selector="{{AdminProductMessagesSection.attentionMessage}}" stepKey="dontSeeErrorGif"/> |
| 96 | + <dontSeeElement selector="{{AdminConfirmationModalSection.message}}" stepKey="dontSeeErrorGif"/> |
100 | 97 |
|
101 | 98 | <!-- *.jpg is allowed -->
|
102 | 99 | <attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="jpg.jpg" stepKey="attachJpg"/>
|
103 | 100 | <waitForPageLoad stepKey="waitForUploadJpg"/>
|
104 |
| - <dontSeeElement selector="{{AdminProductMessagesSection.attentionMessage}}" stepKey="dontSeeErrorJpg"/> |
| 101 | + <dontSeeElement selector="{{AdminConfirmationModalSection.message}}" stepKey="dontSeeErrorJpg"/> |
105 | 102 |
|
106 | 103 | <!-- *.png is allowed -->
|
107 | 104 | <attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="png.png" stepKey="attachPng"/>
|
108 | 105 | <waitForPageLoad stepKey="waitForUploadPng"/>
|
109 |
| - <dontSeeElement selector="{{AdminProductMessagesSection.attentionMessage}}" stepKey="dontSeeErrorPng"/> |
| 106 | + <dontSeeElement selector="{{AdminConfirmationModalSection.message}}" stepKey="dontSeeErrorPng"/> |
110 | 107 |
|
111 | 108 | <!-- Save the first product and go to the storefront -->
|
112 | 109 | <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/>
|
113 | 110 | <amOnPage url="$$firstProduct.name$$.html" stepKey="goToStorefront"/>
|
114 |
| - <waitForPageLoad stepKey="waitForStorefront"/> |
| 111 | + <waitForPageLoad stepKey="waitForStorefront1"/> |
115 | 112 |
|
116 | 113 | <!-- See all of the images that we uploaded -->
|
117 | 114 | <seeElementInDOM selector="{{StorefrontProductMediaSection.imageFile('small')}}" stepKey="seeSmall"/>
|
|
140 | 137 | <click selector="{{AdminProductImagesSection.productImagesToggle}}" stepKey="expandImages2"/>
|
141 | 138 | <attachFile selector="{{AdminProductImagesSection.imageFileUpload}}" userInput="large.jpg" stepKey="attachLarge2"/>
|
142 | 139 | <waitForPageLoad stepKey="waitForUploadLarge2"/>
|
143 |
| - <dontSeeElement selector="{{AdminProductMessagesSection.attentionMessage}}" stepKey="dontSeeErrorLarge2"/> |
| 140 | + <dontSeeElement selector="{{AdminConfirmationModalSection.message}}" stepKey="dontSeeErrorLarge2"/> |
144 | 141 |
|
145 | 142 | <!-- Set url key -->
|
146 | 143 | <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSection2"/>
|
|
160 | 157 |
|
161 | 158 | <!-- Go to the category page and see the uploaded image -->
|
162 | 159 | <amOnPage url="$$category.name$$.html" stepKey="goToCategoryPage2"/>
|
| 160 | + <waitForPageLoad stepKey="waitForStorefront2"/> |
163 | 161 | <seeElement selector="{{StorefrontCategoryMainSection.categoryPageProductImage('large')}}" stepKey="seeUploadedImg"/>
|
164 | 162 |
|
165 | 163 | <!-- Go to the product page and see the uploaded image -->
|
166 | 164 | <amOnPage url="$$secondProduct.name$$.html" stepKey="goToStorefront2"/>
|
167 |
| - <waitForPageLoad stepKey="waitForStorefront2"/> |
| 165 | + <waitForPageLoad stepKey="waitForStorefront3"/> |
168 | 166 | <seeElementInDOM selector="{{StorefrontProductMediaSection.imageFile('large')}}" stepKey="seeLarge2"/>
|
169 | 167 | </test>
|
170 | 168 | </tests>
|
0 commit comments