|
10 | 10 | <test name="StorefrontAddMultipleStoreProductsToWishlistTest">
|
11 | 11 | <annotations>
|
12 | 12 | <features value="Wishlist"/>
|
13 |
| - <stories value="Adding to wishlist"/> |
| 13 | + <stories value="Add product to wishlist"/> |
14 | 14 | <title value="Customer should be able to add products to wishlist from different stores"/>
|
15 | 15 | <description value="All products added to wishlist should be visible on any store. Even if product visibility was set to 'Not Visible Individually' for this store"/>
|
16 | 16 | <group value="wishlist"/>
|
17 | 17 | <severity value="AVERAGE"/>
|
18 |
| - <testCaseId value="MAGETWO-95678"/> |
19 |
| - <skip> |
20 |
| - <issueId value="MC-13867"/> |
21 |
| - </skip> |
| 18 | + <testCaseId value="MC-6243"/> |
22 | 19 | </annotations>
|
| 20 | + |
23 | 21 | <before>
|
24 | 22 | <createData entity="customStoreGroup" stepKey="storeGroup"/>
|
25 | 23 | <createData entity="SimpleSubCategory" stepKey="categoryHandle"/>
|
|
36 | 34 | <argument name="storeGroupName" value="$$storeGroup.group[name]$$"/>
|
37 | 35 | </actionGroup>
|
38 | 36 | </before>
|
| 37 | + |
39 | 38 | <after>
|
40 | 39 | <deleteData createDataKey="product" stepKey="deleteFirstProduct"/>
|
41 | 40 | <deleteData createDataKey="secondProduct" stepKey="deleteSecondProduct"/>
|
42 | 41 | <deleteData createDataKey="customer" stepKey="deleteCustomer"/>
|
43 | 42 | <actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteCustomStoreGroup">
|
44 | 43 | <argument name="storeGroupName" value="$$storeGroup.group[name]$$"/>
|
45 | 44 | </actionGroup>
|
46 |
| - <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> |
| 45 | + <actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearWebsitesGridFilter"/> |
| 46 | + |
| 47 | + <!--Clear products filter--> |
| 48 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> |
| 49 | + <actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearProductsFilters"/> |
| 50 | + <!--Logout everywhere--> |
| 51 | + <actionGroup ref="logout" stepKey="logoutFromAdmin"/> |
| 52 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> |
47 | 53 | </after>
|
| 54 | + |
48 | 55 | <!-- Change products visibility on store-view level -->
|
49 | 56 | <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForProduct1">
|
50 | 57 | <argument name="product" value="$$product$$"/>
|
51 | 58 | </actionGroup>
|
52 | 59 | <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct1">
|
53 | 60 | <argument name="product" value="$$product$$"/>
|
54 | 61 | </actionGroup>
|
| 62 | + <scrollToTopOfPage stepKey="scrollToTopToChangeStore"/> |
55 | 63 | <click selector="{{AdminProductFormActionSection.changeStoreButton}}" stepKey="clickSwitchStoreMenuForProduct1"/>
|
| 64 | + <waitForElementVisible selector="{{AdminProductFormChangeStoreSection.storeSelector(customStore.name)}}" stepKey="waitCustomStoreItemAppers"/> |
56 | 65 | <click selector="{{AdminProductFormChangeStoreSection.storeSelector(customStore.name)}}" stepKey="clickOnStoreNameItemForProduct1"/>
|
57 | 66 | <waitForElementVisible selector="{{AdminProductFormChangeStoreSection.acceptButton}}" stepKey="waitAcceptStoreSwitchingForProduct1n"/>
|
58 | 67 | <click selector="{{AdminProductFormChangeStoreSection.acceptButton}}" stepKey="acceptStoreSwitchingForProduct1"/>
|
|
65 | 74 | <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct2">
|
66 | 75 | <argument name="product" value="$$secondProduct$$"/>
|
67 | 76 | </actionGroup>
|
| 77 | + <scrollToTopOfPage stepKey="scrollToTopToChangeStoreAgain"/> |
68 | 78 | <click selector="{{AdminProductFormActionSection.changeStoreButton}}" stepKey="clickSwitchStoreMenuForProduct2"/>
|
| 79 | + <waitForElementVisible selector="{{AdminProductFormChangeStoreSection.storeSelector(customStore.name)}}" stepKey="waitDefaultStoreItemAppers"/> |
69 | 80 | <click selector="{{AdminProductFormChangeStoreSection.storeSelector('Default Store View')}}" stepKey="clickOnStoreNameItemForProduct2"/>
|
70 | 81 | <waitForElementVisible selector="{{AdminProductFormChangeStoreSection.acceptButton}}" stepKey="waitAcceptStoreSwitchingForProduct2"/>
|
71 | 82 | <click selector="{{AdminProductFormChangeStoreSection.acceptButton}}" stepKey="acceptStoreSwitchingForProduct2"/>
|
72 | 83 | <click selector="{{AdminProductFormSection.visibilityUseDefault}}" stepKey="uncheckVisibilityUseDefaultValueForProduct2"/>
|
73 | 84 | <selectOption userInput="Not Visible Individually" selector="{{AdminProductFormSection.visibility}}" stepKey="makeProductNotVisibleOnDefaultStoreView"/>
|
74 | 85 | <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveEditedProductForProduct2"/>
|
| 86 | + |
75 | 87 | <!-- Sign in as customer -->
|
76 |
| - <amOnPage url="{{StorefrontCustomerSignInPage.url}}" stepKey="amOnSignInPage"/> |
77 |
| - <fillField userInput="$$customer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}" stepKey="fillEmail"/> |
78 |
| - <fillField userInput="$$customer.password$$" selector="{{StorefrontCustomerSignInFormSection.passwordField}}" stepKey="fillPassword"/> |
79 |
| - <waitForElementVisible selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}" stepKey="waitForButton"/> |
80 |
| - <click selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}" stepKey="clickSignInAccountButton"/> |
| 88 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> |
| 89 | + <argument name="Customer" value="$$customer$$" /> |
| 90 | + </actionGroup> |
81 | 91 | <see userInput="$$customer.firstname$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" stepKey="seeFirstName"/>
|
82 | 92 | <see userInput="$$customer.lastname$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" stepKey="seeLastName"/>
|
83 | 93 | <see userInput="$$customer.email$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" stepKey="seeEmail"/>
|
84 | 94 | <!-- Add product visible on default store to wishlist -->
|
85 |
| - <amOnPage url="$$product.name$$.html" stepKey="navigateToProductPageOnDefaultStore"/> |
| 95 | + <amOnPage url="{{StorefrontProductPage.url($$product.custom_attributes[url_key]$$)}}" stepKey="navigateToProductPageOnDefaultStore"/> |
86 | 96 | <see userInput="$$product.name$$" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertFirstProductNameTitle"/>
|
87 | 97 | <click selector="{{StorefrontProductPageSection.addToWishlist}}" stepKey="addFirstProductToWishlist"/>
|
88 | 98 | <!-- Switch to second store and add second product (visible on second store) to wishlist -->
|
89 |
| - <click selector="{{StorefrontFooterSection.switchStoreButton}}" stepKey="ClickSwitchStoreButtonOnDefaultStore"/> |
90 |
| - <click selector="{{StorefrontFooterSection.storeLink($$storeGroup.group[name]$$)}}" stepKey="SelectSecondStoreToSwitchOn"/> |
| 99 | + <click selector="{{StorefrontFooterSection.switchStoreButton}}" stepKey="clickSwitchStoreButtonOnDefaultStore"/> |
| 100 | + <click selector="{{StorefrontFooterSection.storeLink($$storeGroup.group[name]$$)}}" stepKey="selectSecondStoreToSwitchOn"/> |
91 | 101 | <!-- Verify that both products are visible in wishlist on both stores -->
|
92 |
| - <amOnPage url="$$secondProduct.name$$.html" stepKey="navigateToProductPageOnSecondStore"/> |
| 102 | + <amOnPage url="{{StorefrontProductPage.url($$secondProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToProductPageOnSecondStore"/> |
93 | 103 | <see userInput="$$secondProduct.name$$" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertSecondProductNameTitle"/>
|
94 | 104 | <click selector="{{StorefrontProductPageSection.addToWishlist}}" stepKey="addSecondProductToWishlist"/>
|
95 | 105 | <see userInput="$$secondProduct.name$$" selector="{{StorefrontCustomerWishlistSection.productItemNameText}}" stepKey="seeProduct2InWishlistOnSecondStore"/>
|
96 |
| - <click selector="{{StorefrontFooterSection.switchStoreButton}}" stepKey="ClickSwitchStoreButtonOnSecondStore"/> |
97 |
| - <click selector="{{StorefrontFooterSection.storeLink('Main Website Store')}}" stepKey="SelectDefaultStoreToSwitchOn"/> |
| 106 | + <click selector="{{StorefrontFooterSection.switchStoreButton}}" stepKey="clickSwitchStoreButtonOnSecondStore"/> |
| 107 | + <click selector="{{StorefrontFooterSection.storeLink('Main Website Store')}}" stepKey="selectDefaultStoreToSwitchOn"/> |
98 | 108 | <see userInput="$$product.name$$" selector="{{StorefrontCustomerWishlistSection.productItemNameText}}" stepKey="seeProduct1InWishlistOnDefaultStore"/>
|
99 | 109 | </test>
|
100 | 110 | </tests>
|
0 commit comments