/** * Share wish list. * * @param Customer $customer * @param CatalogProductSimple $product * @param array $sharingInfo * @return void */ public function test(Customer $customer, CatalogProductSimple $product, array $sharingInfo) { //Steps $this->objectManager->create('Magento\\Customer\\Test\\TestStep\\LoginCustomerOnFrontendStep', ['customer' => $customer])->run(); $this->objectManager->create('Magento\\Wishlist\\Test\\TestStep\\AddProductsToWishlistStep', ['products' => [$product]])->run(); $this->wishlistIndex->getMessagesBlock()->waitSuccessMessage(); $this->wishlistIndex->getWishlistBlock()->clickShareWishList(); $this->cmsIndex->getCmsPageBlock()->waitPageInit(); $this->wishlistShare->getSharingInfoForm()->fillForm($sharingInfo); $this->wishlistShare->getSharingInfoForm()->shareWishlist(); }
/** * Share wish list. * * @param BrowserInterface $browser * @param Customer $customer * @param CatalogProductSimple $product * @param array $sharingInfo * @return void */ public function test(BrowserInterface $browser, Customer $customer, CatalogProductSimple $product, array $sharingInfo) { //Steps $this->loginCustomer($customer); $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); $this->catalogProductView->getViewBlock()->clickAddToWishlist(); $this->wishlistIndex->getMessagesBlock()->waitSuccessMessage(); $this->wishlistIndex->getWishlistBlock()->clickShareWishList(); $this->cmsIndex->getCmsPageBlock()->waitPageInit(); $this->wishlistShare->getSharingInfoForm()->fillForm($sharingInfo); $this->wishlistShare->getSharingInfoForm()->shareWishlist(); }
/** * Share wish list * * @param Browser $browser * @param CustomerInjectable $customer * @param CatalogProductSimple $product * @param array $sharingInfo * @return void */ public function test(Browser $browser, CustomerInjectable $customer, CatalogProductSimple $product, array $sharingInfo) { //Steps $this->loginCustomer($customer); $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); $this->catalogProductView->getViewBlock()->addToWishlist(); $this->wishlistIndex->getWishlistBlock()->clickShareWishList(); $this->wishlistShare->getSharingInfoForm()->fillForm($sharingInfo); $this->wishlistShare->getSharingInfoForm()->shareWishlist(); }
/** * Share wish list * * @param CustomerInjectable $customer * @param CatalogProductSimple $product * @param array $sharingInfo * @return void */ public function test(CustomerInjectable $customer, CatalogProductSimple $product, $sharingInfo) { //Steps $this->loginCustomer($customer); $this->catalogProductView->init($product); $this->catalogProductView->open()->getViewBlock()->addToWishlist(); $this->wishlistIndex->getWishlistBlock()->clickShareWishList(); $this->wishlistShare->getSharingInfoForm()->fillForm($sharingInfo); $this->wishlistShare->getSharingInfoForm()->shareWishlist(); }