-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport of MAGETWO-59512 for Magento 2.1: Products in wishlist show …
…$0.00 price #6866 MAGETWO-59512: [GitHub] Products in wishlist show $0.00 price #6866 (cherry picked from commit c7d18bd) MAGETWO-59512: [GitHub] Products in wishlist show $0.00 price #6866 (cherry picked from commit 42dbe3f) MAGETWO-59512: [GitHub] Products in wishlist show $0.00 price #6866 -- functional test (cherry picked from commit 199456a) MAGETWO-59512: [GitHub] Products in wishlist show $0.00 price #6866 -- functional test (cherry picked from commit c0ec134)
Showing
5 changed files
with
86 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...sts/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductPriceIsNotZero.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Wishlist\Test\Constraint; | ||
|
||
class AssertProductPriceIsNotZero extends \Magento\Mtf\Constraint\AbstractConstraint | ||
{ | ||
/** | ||
* Assert that product price is not zero in default wishlist. | ||
* | ||
* @param \Magento\Cms\Test\Page\CmsIndex $cmsIndex | ||
* @param \Magento\Customer\Test\Page\CustomerAccountIndex $customerAccountIndex | ||
* @param \Magento\Wishlist\Test\Page\WishlistIndex $wishlistIndex | ||
* @param \Magento\Mtf\Fixture\InjectableFixture $product | ||
* | ||
* @return void | ||
*/ | ||
public function processAssert( | ||
\Magento\Cms\Test\Page\CmsIndex $cmsIndex, | ||
\Magento\Customer\Test\Page\CustomerAccountIndex $customerAccountIndex, | ||
\Magento\Wishlist\Test\Page\WishlistIndex $wishlistIndex, | ||
\Magento\Mtf\Fixture\InjectableFixture $product | ||
) { | ||
$cmsIndex->getLinksBlock()->openLink('My Account'); | ||
$customerAccountIndex->getAccountMenuBlock()->openMenuItem('My Wish List'); | ||
$wishlistItem = $wishlistIndex->getWishlistBlock()->getProductItemsBlock()->getItemProduct($product); | ||
|
||
\PHPUnit_Framework_Assert::assertNotEquals( | ||
'0.00', | ||
$wishlistItem->getPrice(), | ||
$product->getName() . ' has zero price on Wish List page.' | ||
); | ||
} | ||
|
||
/** | ||
* Returns a string representation of the object. | ||
* | ||
* @return string | ||
*/ | ||
public function toString() | ||
{ | ||
return 'Product price is not zero in default Wish List.'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters