|
31 | 31 | <actionGroup ref="logout" stepKey="logout"/>
|
32 | 32 | </after>
|
33 | 33 |
|
| 34 | + <!-- Go to Inventory configuration page --> |
34 | 35 | <amOnPage url="{{AdminInventoryProductStockOptionsConfigPage.url}}" stepKey="openInventoryConfigPage"/>
|
35 | 36 | <uncheckOption selector="{{AdminInventoryProductStockOptionsConfigSection.maxSaleQtyInherit}}" stepKey="uncheckUseDefaultValueForMaxSaleQty"/>
|
36 | 37 | <!-- Validate zero value -->
|
37 |
| - <fillField selector="{{AdminInventoryProductStockOptionsConfigSection.maxSaleQty}}" userInput="0" stepKey="setMaxSaleQtyValueToZero"/> |
38 |
| - <click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveConfigButton"/> |
39 |
| - <waitForElementVisible selector="{{AdminInventoryProductStockOptionsConfigSection.maxSaleQtyError}}" stepKey="waitValidationErrorMessageAppearsZero"/> |
40 |
| - <see selector="{{AdminInventoryProductStockOptionsConfigSection.maxSaleQtyError}}" userInput="Please enter a number greater than 0 in this field." stepKey="checkValidationErrorMessageZero"/> |
| 38 | + <actionGroup ref="AdminCatalogInventoryConfigurationMaxQtyAllowedInShoppingCartValidationActionGroup" stepKey="validateZeroValue"> |
| 39 | + <argument name="qty" value="0"/> |
| 40 | + <argument name="errorMessage" value="Please enter a number greater than 0 in this field."/> |
| 41 | + </actionGroup> |
41 | 42 | <!-- Validate negative value -->
|
42 |
| - <fillField selector="{{AdminInventoryProductStockOptionsConfigSection.maxSaleQty}}" userInput="-1" stepKey="setMaxSaleQtyValueToNegative"/> |
43 |
| - <click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveConfigButtonNegative"/> |
44 |
| - <waitForElementVisible selector="{{AdminInventoryProductStockOptionsConfigSection.maxSaleQtyError}}" stepKey="waitValidationErrorMessageAppearsNegative"/> |
45 |
| - <see selector="{{AdminInventoryProductStockOptionsConfigSection.maxSaleQtyError}}" userInput="Please enter a number greater than 0 in this field." stepKey="checkValidationErrorMessageNegative"/> |
| 43 | + <actionGroup ref="AdminCatalogInventoryConfigurationMaxQtyAllowedInShoppingCartValidationActionGroup" stepKey="validateNegativeValue"> |
| 44 | + <argument name="qty" value="-1"/> |
| 45 | + <argument name="errorMessage" value="Please enter a number greater than 0 in this field."/> |
| 46 | + </actionGroup> |
46 | 47 | <!-- Validate alphabetical value -->
|
47 |
| - <fillField selector="{{AdminInventoryProductStockOptionsConfigSection.maxSaleQty}}" userInput="abc" stepKey="setMaxSaleQtyValueToAlphabetical"/> |
48 |
| - <click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveConfigButtonAlphabetical"/> |
49 |
| - <waitForElementVisible selector="{{AdminInventoryProductStockOptionsConfigSection.maxSaleQtyError}}" stepKey="waitValidationErrorMessageAppearsAlphabetical"/> |
50 |
| - <see selector="{{AdminInventoryProductStockOptionsConfigSection.maxSaleQtyError}}" userInput="Please enter a valid number in this field." stepKey="checkValidationErrorMessageAlphabetical"/> |
| 48 | + <actionGroup ref="AdminCatalogInventoryConfigurationMaxQtyAllowedInShoppingCartValidationActionGroup" stepKey="validateAlphabeticalValue"> |
| 49 | + <argument name="qty" value="abc"/> |
| 50 | + <argument name="errorMessage" value="Please enter a valid number in this field."/> |
| 51 | + </actionGroup> |
51 | 52 | <!-- Fill correct value -->
|
52 | 53 | <fillField selector="{{AdminInventoryProductStockOptionsConfigSection.maxSaleQty}}" userInput="100" stepKey="setMaxSaleQtyValueToCorrectNumber"/>
|
53 | 54 | <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfigWithCorrectNumber"/>
|
54 | 55 |
|
55 | 56 | <!-- Go to product page -->
|
56 | 57 | <amOnPage url="{{AdminProductEditPage.url($$createdProduct.id$$)}}" stepKey="openAdminProductEditPage"/>
|
57 | 58 | <!-- Validate zero value -->
|
58 |
| - <actionGroup ref="AdminProductSetMaxQtyAllowedInShoppingCart" stepKey="setProductMaxQtyAllowedInShoppingCartToZero"> |
| 59 | + <actionGroup ref="AdminProductMaxQtyAllowedInShoppingCartValidationActionGroup" stepKey="productValidateZeroValue"> |
59 | 60 | <argument name="qty" value="0"/>
|
| 61 | + <argument name="errorMessage" value="Please enter a number greater than 0 in this field."/> |
60 | 62 | </actionGroup>
|
61 |
| - <waitForElementVisible selector="{{AdminProductFormAdvancedInventorySection.maxiQtyAllowedInCartError}}" stepKey="waitProductValidationErrorMessageAppearsZero"/> |
62 |
| - <see selector="{{AdminProductFormAdvancedInventorySection.maxiQtyAllowedInCartError}}" userInput="Please enter a number greater than 0 in this field." stepKey="checkProductValidationErrorMessageZero"/> |
63 | 63 | <!-- Validate negative value -->
|
64 |
| - <actionGroup ref="AdminProductSetMaxQtyAllowedInShoppingCart" stepKey="setProductMaxQtyAllowedInShoppingCartToNegative"> |
| 64 | + <actionGroup ref="AdminProductMaxQtyAllowedInShoppingCartValidationActionGroup" stepKey="productValidateNegativeValue"> |
65 | 65 | <argument name="qty" value="-1"/>
|
| 66 | + <argument name="errorMessage" value="Please enter a number greater than 0 in this field."/> |
66 | 67 | </actionGroup>
|
67 |
| - <waitForElementVisible selector="{{AdminProductFormAdvancedInventorySection.maxiQtyAllowedInCartError}}" stepKey="waitProductValidationErrorMessageAppearsNegative"/> |
68 |
| - <see selector="{{AdminProductFormAdvancedInventorySection.maxiQtyAllowedInCartError}}" userInput="Please enter a number greater than 0 in this field." stepKey="checkProductValidationErrorMessageNegative"/> |
69 | 68 | <!-- Validate alphabetical value -->
|
70 |
| - <actionGroup ref="AdminProductSetMaxQtyAllowedInShoppingCart" stepKey="setProductMaxQtyAllowedInShoppingCartToAlphabetical"> |
| 69 | + <actionGroup ref="AdminProductMaxQtyAllowedInShoppingCartValidationActionGroup" stepKey="productValidateAlphabeticalValue"> |
71 | 70 | <argument name="qty" value="abc"/>
|
| 71 | + <argument name="errorMessage" value="Please enter a valid number in this field."/> |
72 | 72 | </actionGroup>
|
73 |
| - <waitForElementVisible selector="{{AdminProductFormAdvancedInventorySection.maxiQtyAllowedInCartError}}" stepKey="waitProductValidationErrorMessageAppearsAlphabetical"/> |
74 |
| - <see selector="{{AdminProductFormAdvancedInventorySection.maxiQtyAllowedInCartError}}" userInput="Please enter a valid number in this field." stepKey="checkProductValidationErrorMessageAlphabetical"/> |
75 |
| - |
76 | 73 | <!-- Fill correct value -->
|
77 | 74 | <actionGroup ref="AdminProductSetMaxQtyAllowedInShoppingCart" stepKey="setProductMaxQtyAllowedInShoppingCartToCorrectNumber">
|
78 | 75 | <argument name="qty" value="50"/>
|
|
0 commit comments