/** * Configure customer wish list on backend. * * @param Customer $customer * @param string $product * @param CustomerIndex $customerIndex * @param CustomerIndexEdit $customerIndexEdit * @return array */ public function test(Customer $customer, $product, CustomerIndex $customerIndex, CustomerIndexEdit $customerIndexEdit) { // Preconditions $product = $this->createProducts($product)[0]; $this->loginCustomer($customer); $this->addToWishlist([$product]); // Steps $customerIndex->open(); $customerIndex->getCustomerGridBlock()->searchAndOpen(['email' => $customer->getEmail()]); $customerForm = $customerIndexEdit->getCustomerForm(); $customerForm->openTab('wishlist'); $customerForm->getTabElement('wishlist')->getSearchGridBlock()->searchAndAction(['product_name' => $product->getName()], 'Configure'); $customerIndexEdit->getConfigureProductBlock()->configProduct($product); return ['product' => $product]; }