当前位置: 首页>>代码示例>>PHP>>正文


PHP CmsIndex::getLinksBlock方法代码示例

本文整理汇总了PHP中Magento\Cms\Test\Page\CmsIndex::getLinksBlock方法的典型用法代码示例。如果您正苦于以下问题:PHP CmsIndex::getLinksBlock方法的具体用法?PHP CmsIndex::getLinksBlock怎么用?PHP CmsIndex::getLinksBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magento\Cms\Test\Page\CmsIndex的用法示例。


在下文中一共展示了CmsIndex::getLinksBlock方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testCreateCustomer

 /**
  * Create Customer account on frontend
  *
  * @param CustomerInjectable $customer
  */
 public function testCreateCustomer(CustomerInjectable $customer)
 {
     //Steps
     $this->cmsIndex->open();
     $this->cmsIndex->getLinksBlock()->openLink('Register');
     $this->customerAccountCreate->getRegisterForm()->registerCustomer($customer);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:12,代码来源:CreateCustomerFrontendEntityTest.php

示例2: test

 /**
  * Create Customer account on Storefront.
  *
  * @param Customer $customer
  * @return void
  */
 public function test(Customer $customer)
 {
     // Steps
     $this->cmsIndex->open();
     $this->cmsIndex->getLinksBlock()->openLink('Create an Account');
     $this->customerAccountCreate->getRegisterForm()->registerCustomer($customer);
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:13,代码来源:RegisterCustomerFrontendEntityTest.php

示例3: processAssert

 /**
  * Assert that link "Compare Products..." on top menu of page
  *
  * @param array $products
  * @param CmsIndex $cmsIndex
  * @return void
  */
 public function processAssert(array $products, CmsIndex $cmsIndex)
 {
     $productQty = count($products);
     $qtyOnPage = $cmsIndex->getLinksBlock()->getQtyInCompareList();
     \PHPUnit_Framework_Assert::assertEquals($productQty, $qtyOnPage, 'Qty is not correct in "Compare Products" link.');
     $compareProductUrl = '/catalog/product_compare/';
     \PHPUnit_Framework_Assert::assertTrue(strpos($cmsIndex->getLinksBlock()->getLinkUrl('Compare Products'), $compareProductUrl) !== false, 'Compare product link isn\'t lead to Compare Product Page.');
 }
开发者ID:aiesh,项目名称:magento2,代码行数:15,代码来源:AssertProductCompareItemsLink.php

示例4: loginCustomerAndOpenOrderPage

 /**
  * Login customer and open Order page.
  *
  * @param Customer $customer
  * @return void
  */
 protected function loginCustomerAndOpenOrderPage(Customer $customer)
 {
     $this->cmsIndex->open();
     $loginCustomerOnFrontendStep = $this->objectManager->create('Magento\\Customer\\Test\\TestStep\\LoginCustomerOnFrontendStep', ['customer' => $customer]);
     $loginCustomerOnFrontendStep->run();
     $this->cmsIndex->getLinksBlock()->openLink('My Account');
     $this->customerAccountIndex->getAccountMenuBlock()->openMenuItem('My Orders');
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:14,代码来源:AbstractAssertOrderOnFrontend.php

示例5: run

 /**
  * Login customer.
  *
  * @return void
  */
 public function run()
 {
     $this->logoutCustomerOnFrontend->run();
     $this->cmsIndex->getLinksBlock()->openLink('Sign In');
     $this->cmsIndex->getCmsPageBlock()->waitPageInit();
     $this->customerAccountLogin->getLoginBlock()->login($this->customer);
     $this->cmsIndex->getCmsPageBlock()->waitPageInit();
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:13,代码来源:LoginCustomerOnFrontendStep.php

示例6: run

 /**
  * Logout customer
  *
  * @return void
  */
 public function run()
 {
     $this->cmsIndex->open();
     $this->cmsIndex->getCmsPageBlock()->waitPageInit();
     if ($this->cmsIndex->getLinksBlock()->isLinkVisible("Log Out")) {
         $this->cmsIndex->getLinksBlock()->openLink("Log Out");
         $this->cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible('Home Page');
     }
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:14,代码来源:LogoutCustomerOnFrontendStep.php

示例7: testCreateExistingCustomer

 /**
  * Create Existing Customer account on frontend.
  *
  * @param Customer $customer
  * @return void
  */
 public function testCreateExistingCustomer(Customer $customer)
 {
     // Precondition
     $existingCustomer = clone $customer;
     $customer->persist();
     // Steps
     $this->cmsIndex->open();
     $this->cmsIndex->getLinksBlock()->openLink('Create an Account');
     $this->customerAccountCreate->getRegisterForm()->registerCustomer($existingCustomer);
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:16,代码来源:CreateExistingCustomerFrontendEntity.php

示例8: processAssert

 /**
  * Assert that customer success log out.
  *
  * @param CustomerAccountIndex $customerAccountIndex
  * @param CmsIndex $cmsIndex
  * @return void
  */
 public function processAssert(CustomerAccountIndex $customerAccountIndex, CmsIndex $cmsIndex)
 {
     $customerAccountIndex->open();
     $cmsIndex->getCmsPageBlock()->waitPageInit();
     $cmsIndex->getLinksBlock()->openLink('Sign Out');
     $cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible(self::LOGOUT_PAGE_TITLE);
     $cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible(self::HOME_PAGE_TITLE);
     $cmsIndex->getCmsPageBlock()->waitPageInit();
     \PHPUnit_Framework_Assert::assertTrue($cmsIndex->getLinksBlock()->isLinkVisible('Sign In'), "Customer wasn't logged out.");
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:17,代码来源:AssertCustomerLogout.php

示例9: run

 /**
  * Logout customer.
  *
  * @return void
  */
 public function run()
 {
     $this->customerAccount->open();
     $this->cmsIndex->getCmsPageBlock()->waitPageInit();
     if ($this->cmsIndex->getTitleBlock()->getTitle() != 'Customer Login') {
         $this->cmsIndex->getLinksBlock()->openLink('Sign Out');
         $this->cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible('Home Page');
         $this->cmsIndex->getCmsPageBlock()->waitPageInit();
     }
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:15,代码来源:LogoutCustomerOnFrontendStep.php

示例10: run

 /**
  * Login customer.
  *
  * @return void
  */
 public function run()
 {
     $this->cmsIndex->open();
     $this->cmsIndex->getCmsPageBlock()->waitPageInit();
     if ($this->cmsIndex->getLinksBlock()->isLinkVisible("Log Out")) {
         $this->cmsIndex->getLinksBlock()->openLink("Log Out");
         $this->cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible('Home Page');
     }
     $this->cmsIndex->getLinksBlock()->openLink("Log In");
     $this->customerAccountLogin->getLoginBlock()->login($this->customer);
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:16,代码来源:LoginCustomerOnFrontendStep.php

示例11: processAssert

 /**
  * Assert that category name is different on different store view.
  *
  * @param BrowserInterface $browser
  * @param CatalogCategoryView $categoryView
  * @param Category $category
  * @param Category $initialCategory
  * @param CmsIndex $cmsIndex
  * @return void
  */
 public function processAssert(BrowserInterface $browser, CatalogCategoryView $categoryView, Category $category, Category $initialCategory, CmsIndex $cmsIndex)
 {
     $cmsIndex->open();
     $cmsIndex->getLinksBlock()->waitWelcomeMessage();
     $browser->open($_ENV['app_frontend_url'] . $initialCategory->getUrlKey() . '.html');
     \PHPUnit_Framework_Assert::assertEquals($initialCategory->getName(), $categoryView->getTitleBlock()->getTitle(), 'Wrong category name is displayed for default store.');
     $store = $category->getDataFieldConfig('store_id')['source']->store->getName();
     $cmsIndex->getStoreSwitcherBlock()->selectStoreView($store);
     $cmsIndex->getLinksBlock()->waitWelcomeMessage();
     $browser->open($_ENV['app_frontend_url'] . $initialCategory->getUrlKey() . '.html');
     \PHPUnit_Framework_Assert::assertEquals($category->getName(), $categoryView->getTitleBlock()->getTitle(), 'Wrong category name is displayed for ' . $store);
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:22,代码来源:AssertCategoryWithCustomStoreOnFrontend.php

示例12: test

 /**
  * Runs Delete Customer Address test.
  *
  * @param Customer $customer
  * @return array
  */
 public function test(Customer $customer)
 {
     $this->markTestIncomplete('Bug: MAGETWO-34634');
     // Precondition:
     $customer->persist();
     $addressToDelete = $customer->getDataFieldConfig('address')['source']->getAddresses()[1];
     // Steps:
     $this->cmsIndex->open();
     $this->cmsIndex->getLinksBlock()->openLink("Log In");
     $this->customerAccountLogin->getLoginBlock()->login($customer);
     $this->customerAccountIndex->getAccountMenuBlock()->openMenuItem('Address Book');
     $this->customerAccountIndex->getAdditionalAddressBlock()->deleteAdditionalAddress($addressToDelete);
     return ['deletedAddress' => $addressToDelete];
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:20,代码来源:DeleteCustomerAddressTest.php

示例13: loginCustomer

 /**
  * Login customer.
  *
  * @return void
  */
 protected function loginCustomer()
 {
     if (!$this->cmsIndex->getLinksBlock()->isLinkVisible('Log Out')) {
         $this->cmsIndex->getLinksBlock()->openLink("Log In");
         $this->customerAccountLogin->getLoginBlock()->login($this->customer);
     }
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:12,代码来源:AbstractCompareProductsTest.php

示例14: loginCustomer

 /**
  * Login customer
  *
  * @param CustomerInjectable $customer
  * @return void
  */
 protected function loginCustomer(CustomerInjectable $customer)
 {
     $this->cmsIndex->open();
     if (!$this->cmsIndex->getLinksBlock()->isLinkVisible('Log Out')) {
         $this->cmsIndex->getLinksBlock()->openLink('Log In');
         $this->customerAccountLogin->getLoginBlock()->login($customer);
     }
 }
开发者ID:buskamuza,项目名称:magento2-skeleton,代码行数:14,代码来源:DeleteProductFromCustomerWishlistOnBackendTest.php

示例15: processAssert

 /**
  * Assert that product is not present in Wishlist on Frontend
  *
  * @param CustomerAccountIndex $customerAccountIndex
  * @param WishlistIndex $wishlistIndex
  * @param InjectableFixture $product
  * @param CustomerInjectable $customer
  * @param CmsIndex $cmsIndex
  * @param CustomerAccountLogin $customerAccountLogin
  * @param CustomerAccountLogout $customerAccountLogout
  * @return void
  */
 public function processAssert(CustomerAccountIndex $customerAccountIndex, WishlistIndex $wishlistIndex, InjectableFixture $product, CustomerInjectable $customer, CmsIndex $cmsIndex, CustomerAccountLogin $customerAccountLogin, CustomerAccountLogout $customerAccountLogout)
 {
     $productName = $product->getName();
     $customerAccountLogout->open();
     $cmsIndex->getLinksBlock()->openLink('Log In');
     $customerAccountLogin->getLoginBlock()->login($customer);
     $customerAccountIndex->open()->getAccountMenuBlock()->openMenuItem("My Wish List");
     \PHPUnit_Framework_Assert::assertFalse($wishlistIndex->getWishlistBlock()->getProductItemsBlock()->isProductPresent($productName), 'Product \'' . $productName . '\' is present in Wishlist on Frontend.');
 }
开发者ID:buskamuza,项目名称:magento2-skeleton,代码行数:21,代码来源:AssertProductIsAbsentInWishlist.php


注:本文中的Magento\Cms\Test\Page\CmsIndex::getLinksBlock方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。