File tree Expand file tree Collapse file tree 2 files changed +8
-14
lines changed
app/code/Magento/Wishlist Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 55
55
<selectOption userInput =" {{colorProductAttribute2.name}}" selector =" {{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey =" selectOption2" />
56
56
<click selector =" {{StorefrontProductInfoMainSection.productAttributeOptions1}}" stepKey =" clickDropDownProductOption" />
57
57
58
- <!-- Add the product to Wish List-->
58
+ <!-- Click Add to Wish List link -->
59
59
<click selector =" {{StorefrontProductPageSection.addToWishlist}}" stepKey =" addFirstPnroductToWishlist" />
60
- <waitForPageLoad stepKey =" waitForLoading" />
61
- <!-- Click "Add All to Cart" button-->
62
- <click selector =" {{StorefrontCustomerWishlistProductSection.ProductAddAllToCart}}" stepKey =" addAllToCart" />
63
- <waitForElementVisible stepKey =" waitForErrorAppears" selector =" {{StorefrontMessagesSection.error}}" />
64
60
65
61
<!-- Assert Correct Error Message-->
66
- <see userInput =" You need to choose options for your item for" stepKey =" assertCorrectErrorMessage" />
67
- <dontSee userInput =" 1 product(s) have been added to shopping cart" stepKey =" dontSeeSuccessMessage" />
62
+ <see userInput =" This is a required field" selector =" {{StorefrontProductInfoMainSection.productAttributeOptionsError}}" stepKey =" seeError" />
68
63
</test >
69
64
</tests >
Original file line number Diff line number Diff line change @@ -154,16 +154,15 @@ define([
154
154
$ . each ( elementValue , function ( key , option ) {
155
155
data [ elementName + '[' + option + ']' ] = option ;
156
156
} ) ;
157
- } else {
158
- if ( elementName . substr ( elementName . length - 2 ) == '[]' ) { //eslint-disable-line eqeqeq, max-depth
159
- elementName = elementName . substring ( 0 , elementName . length - 2 ) ;
157
+ } else if ( elementName . substr ( elementName . length - 2 ) == '[]' ) { //eslint-disable-line eqeqeq, max-depth
158
+ elementName = elementName . substring ( 0 , elementName . length - 2 ) ;
160
159
161
- data [ elementName + '[' + elementValue + ']' ] = elementValue ;
162
- } else {
163
- data [ elementName ] = elementValue ;
164
- }
160
+ data [ elementName + '[' + elementValue + ']' ] = elementValue ;
161
+ } else {
162
+ data [ elementName ] = elementValue ;
165
163
}
166
164
165
+
167
166
return data ;
168
167
} ,
169
168
You can’t perform that action at this time.
0 commit comments