Skip to content

Commit 79befe8

Browse files
jilu1tomreece
authored andcommitted
MQE-377: Addressed review feedback regarding wishlist test.
1 parent 57a4765 commit 79befe8

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!-- Test XML Example -->
33
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
4-
<cest name="StorefrontCustomerCreateWishlistCest">
4+
<cest name="StorefrontDeletePersistedWishlistCest">
55
<annotations>
6-
<features value="Persist a wishlist for a customer"/>
7-
<stories value="Persist a wishlist for a customer"/>
6+
<features value="Delete a persist wishlist for a customer"/>
7+
<stories value="Delete a persist wishlist for a customer"/>
88
<env value="chrome"/>
99
<env value="firefox"/>
1010
<env value="phantomjs"/>
@@ -26,10 +26,10 @@
2626
<deleteData mergeKey="deleteCategory" createDataKey="category"/>
2727
<deleteData mergeKey="deleteCustomer" createDataKey="customer"/>
2828
</after>
29-
<test name="StorefrontCustomerCreateWishlistTest">
29+
<test name="StorefrontDeletePersistedWishlistTest">
3030
<annotations>
31-
<title value="Persist a wishlist for a customer"/>
32-
<description value="Persist a wishlist for a customer"/>
31+
<title value="Delete a persist wishlist for a customer"/>
32+
<description value="Delete a persist wishlist for a customer"/>
3333
</annotations>
3434
<amOnPage mergeKey="amOnSignInPage" url="{{StorefrontCustomerSignInPage.url}}"/>
3535
<fillField mergeKey="fillEmail" userInput="$$customer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}"/>
@@ -41,7 +41,11 @@
4141
<see mergeKey="seeEmail" userInput="$$customer.email$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" />
4242
<waitForPageLoad mergeKey="15"/>
4343
<amOnPage mergeKey="amOnWishlist" url="{{StorefrontCustomerWishlistPage.url}}"/>
44-
<see mergeKey="seeInField" userInput="$$product.name$$" selector="{{StorefrontCustomerWishlistSection.productItemName}}"/>
44+
<see mergeKey="seeWishlist" userInput="$$product.name$$" selector="{{StorefrontCustomerWishlistSection.productItemNameText}}"/>
45+
<moveMouseOver mergeKey="mouseOver" selector="{{StorefrontCustomerWishlistSection.productItemNameText}}"/>
46+
<waitForElementVisible mergeKey="waitForRemoveButton" selector="{{StorefrontCustomerWishlistSection.removeWishlistButton}}"/>
47+
<click mergeKey="clickRemove" selector="{{StorefrontCustomerWishlistSection.removeWishlistButton}}"/>
48+
<see mergeKey="seeEmptyWishlist" userInput="You have no items in your wish list" selector="{{StorefrontCustomerWishlistSection.emptyWishlistText}}"/>
4549
</test>
4650
</cest>
4751
</config>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Section/StorefrontCustomerWishlistSection.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="StorefrontCustomerWishlistSection">
12-
<element name="productItemName" type="text" selector=".products-grid .product-item-name a"/>
12+
<element name="productItemNameText" type="text" selector=".products-grid .product-item-name a"/>
13+
<element name="removeWishlistButton" type="button" selector=".products-grid .btn-remove.action.delete>span" timeout="30"/>
14+
<element name="emptyWishlistText" type="text" selector=".message.info.empty>span"/>
1315
</section>
1416
</config>

0 commit comments

Comments
 (0)