Skip to content

Commit 812d943

Browse files
committed
resolve conflict, link check added
1 parent ee2f0cc commit 812d943

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontCustomerAddProductToCartFromWishlistUsingSidebarActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@
1919
<click selector="{{StorefrontCustomerWishlistSidebarSection.ProductAddToCartByName(product.name)}}" stepKey="AddProductToCartFromWishlistUsingSidebarClickAddToCartFromWishlist"/>
2020
<waitForElement selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="AddProductToCartFromWishlistUsingSidebarWaitForSuccessMessage"/>
2121
<see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added {{product.name}} to your shopping cart." stepKey="AddProductToCartFromWishlistUsingSidebarSeeProductNameAddedToCartFromWishlist"/>
22+
<seeLink userInput="shopping cart" stepKey="seeLinkInSuccessMsg"/>
2223
</actionGroup>
2324
</actionGroups>

app/code/Magento/Wishlist/Test/Unit/Controller/Index/CartTest.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
use Magento\Catalog\Helper\Product as ProductHelper;
1111
use Magento\Catalog\Model\Product;
1212
use Magento\Catalog\Model\Product\Exception as ProductException;
13-
use Magento\Checkout\Model\Cart as CheckoutCart;
1413
use Magento\Checkout\Helper\Cart as CartHelper;
14+
use Magento\Checkout\Model\Cart as CheckoutCart;
1515
use Magento\Framework\App\Action\Context;
1616
use Magento\Framework\App\RequestInterface;
1717
use Magento\Framework\App\Response\RedirectInterface;
@@ -620,14 +620,8 @@ protected function prepareExecuteWithQuantityArray($isAjax = false)
620620
->method('getName')
621621
->willReturn($productName);
622622

623-
$this->escaperMock->expects($this->once())
624-
->method('escapeHtml')
625-
->with($productName, null)
626-
->willReturn($productName);
627-
628623
$this->messageManagerMock->expects($this->once())
629-
->method('addSuccessMessage')
630-
->with('You added ' . $productName . ' to your shopping cart.', null)
624+
->method('addComplexSuccessMessage')
631625
->willReturnSelf();
632626

633627
$this->cartHelperMock->expects($this->once())

dev/tests/integration/testsuite/Magento/Wishlist/Controller/Index/CartTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ public function testAddSimpleProductToCart(): void
6969
$item = $this->getWishlistByCustomerId->getItemBySku(1, 'simple-1');
7070
$this->assertNotNull($item);
7171
$this->performAddToCartRequest(['item' => $item->getId(), 'qty' => 3]);
72-
$message = sprintf('You added %s to your shopping cart.', $item->getName());
72+
$message = sprintf("\n" . 'You added %s to your ' .
73+
'<a href="http://localhost/index.php/checkout/cart/">shopping cart</a>.', $item->getName());
7374
$this->assertSessionMessages($this->equalTo([(string)__($message)]), MessageInterface::TYPE_SUCCESS);
7475
$this->assertCount(0, $this->getWishlistByCustomerId->execute(1)->getItemCollection());
7576
$cart = $this->cartFactory->create();

0 commit comments

Comments
 (0)