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


PHP CmsIndex::getTopLinksBlock方法代码示例

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


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

示例1: run

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

示例2: test

 /**
  * Run create existing customer account on frontend test.
  *
  * @param Customer $customer
  * @return void
  */
 public function test(Customer $customer)
 {
     //Steps
     $this->cmsIndex->open();
     $this->cmsIndex->getTopLinksBlock()->openAccount();
     $this->cmsIndex->getLinksBlock()->openLink('Register');
     $this->customerAccountCreate->getRegisterForm()->registerCustomer($customer);
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:14,代码来源:CreateExistingCustomerFrontendEntity.php

示例3: processAssert

 /**
  * Assert that product is not present in Wishlist on frontend.
  *
  * @param WishlistIndex $wishlistIndex
  * @param CmsIndex $cmsIndex
  * @param Customer $customer
  * @param FrontendActionsForCustomer $frontendActionsForCustomer
  * @param InjectableFixture[] $products
  * @return void
  */
 public function processAssert(WishlistIndex $wishlistIndex, CmsIndex $cmsIndex, Customer $customer, FrontendActionsForCustomer $frontendActionsForCustomer, array $products)
 {
     $frontendActionsForCustomer->loginCustomer($customer);
     $cmsIndex->getTopLinksBlock()->openAccountLink("My Wishlist");
     $itemBlock = $wishlistIndex->getItemsBlock();
     foreach ($products as $itemProduct) {
         \PHPUnit_Framework_Assert::assertFalse($itemBlock->getItemProductBlock($itemProduct)->isVisible(), "Product '{$itemProduct->getName()}' is present in Wishlist on frontend.");
     }
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:19,代码来源:AssertProductsIsAbsentInWishlist.php

示例4: processAssert

 /**
  * Assert that the correct option details are displayed on the "View Details" tool tip.
  *
  * @param CmsIndex $cmsIndex
  * @param WishlistIndex $wishlistIndex
  * @param InjectableFixture $product
  * @param FixtureFactory $fixtureFactory
  * @return void
  */
 public function processAssert(CmsIndex $cmsIndex, WishlistIndex $wishlistIndex, InjectableFixture $product, FixtureFactory $fixtureFactory)
 {
     $cmsIndex->getTopLinksBlock()->openAccount();
     $cmsIndex->getLinksBlock()->openLink("My Wishlist");
     $actualOptions = $wishlistIndex->getItemsBlock()->getItemProductBlock($product)->getOptions();
     $cartFixture = $fixtureFactory->createByCode('cart', ['data' => ['items' => ['products' => [$product]]]]);
     $expectedOptions = $this->prepareOptions($cartFixture);
     $errors = $this->verifyData($expectedOptions, $this->sortDataByPath($actualOptions, '::title'));
     \PHPUnit_Framework_Assert::assertEmpty($errors, $errors);
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:19,代码来源:AssertProductDetailsInWishlist.php

示例5: processAssert

 /**
  * Assert that products are present in custom wishlist.
  *
  * @param CmsIndex $cmsIndex
  * @param Wishlist $multipleWishlist
  * @param WishlistIndex $wishlistIndex
  * @param InjectableFixture[] $products
  * @param int[]|null $qtyToAction
  * @return void
  */
 public function processAssert(CmsIndex $cmsIndex, Wishlist $multipleWishlist, WishlistIndex $wishlistIndex, array $products, $qtyToAction = null)
 {
     $this->wishlistIndex = $wishlistIndex;
     $cmsIndex->getTopLinksBlock()->openAccount();
     $cmsIndex->getLinksBlock()->openLink("My Wishlist");
     $wishlistIndex->getManagementBlock()->selectWishlist($multipleWishlist);
     foreach ($products as $key => $product) {
         $expectedQty = $qtyToAction !== null && isset($qtyToAction[$key]) ? $qtyToAction[$key] : null;
         $this->verifyItemProduct($product, $expectedQty);
     }
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:21,代码来源:AssertProductsInCustomWishlist.php

示例6: processAssert

 /**
  * Assert that created store view can be localized.
  *
  * @param Store $store
  * @param CmsIndex $cmsIndex
  * @param FixtureFactory $fixtureFactory
  * @param ConfigData $config
  * @param Cache $adminCache
  * @return void
  */
 public function processAssert(Store $store, CmsIndex $cmsIndex, FixtureFactory $fixtureFactory, ConfigData $config, Cache $adminCache)
 {
     // Flush cache
     $adminCache->open();
     $adminCache->getPageActions()->flushCacheStorage();
     $adminCache->getMessagesBlock()->waitSuccessMessage();
     $this->cmsIndexPage = $cmsIndex;
     $this->setConfig($store, $fixtureFactory, $config);
     $cmsIndex->open();
     $this->selectStore($store);
     \PHPUnit_Framework_Assert::assertEquals(strtolower($cmsIndex->getTopLinksBlock()->getAccountLabelText()), self::EXPECTED_TEXT);
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:22,代码来源:AssertStoreLocalized.php

示例7: test

 /**
  * Run Change customer password test.
  *
  * @param Customer $initialCustomer
  * @param Customer $customer
  * @return void
  */
 public function test(Customer $initialCustomer, Customer $customer)
 {
     // Preconditions
     $initialCustomer->persist();
     // Steps
     $this->objectManager->create('Mage\\Customer\\Test\\TestStep\\LoginCustomerOnFrontendStep', ['customer' => $initialCustomer])->run();
     $this->cmsIndex->getTopLinksBlock()->openAccount();
     $this->cmsIndex->getLinksBlock()->openLink('My Account');
     $this->customerAccountIndex->getInfoBlock()->openChangePassword();
     $this->customerAccountEdit->getAccountInfoForm()->fill($customer);
     $this->customerAccountEdit->getAccountInfoForm()->submit();
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:19,代码来源:ChangeCustomerPasswordTest.php

示例8: processAssert

 /**
  * Assert that rma is correct display on frontend (MyAccount - My Returns):
  * - status on rma history page
  * - details and items on rma view page
  *
  * @param Rma $rma
  * @param CmsIndex $cmsIndex
  * @param CustomerAccountIndex $customerAccountIndex
  * @param RmaReturnHistory $rmaReturnHistory
  * @param RmaReturnView $rmaReturnView
  * @return void
  */
 public function processAssert(Rma $rma, CmsIndex $cmsIndex, CustomerAccountIndex $customerAccountIndex, RmaReturnHistory $rmaReturnHistory, RmaReturnView $rmaReturnView)
 {
     $this->rmaReturnHistory = $rmaReturnHistory;
     $this->rmaReturnView = $rmaReturnView;
     $this->order = $rma->getDataFieldConfig('order_id')['source']->getOrder();
     $this->customer = $this->order->getDataFieldConfig('customer_id')['source']->getCustomer();
     $this->productHandlerClass = $this->getProductHandlerClass();
     $this->login();
     $cmsIndex->getTopLinksBlock()->openAccountLink('My Account');
     $customerAccountIndex->getAccountNavigationBlock()->openNavigationItem('My Returns');
     $this->assertRmaStatus($rma);
     $rmaReturnHistory->getRmaHistory()->getItemRow($rma)->open();
     $this->assertRequestInformation($rma);
     $this->assertItemsData($rma);
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:27,代码来源:AssertRmaOnFrontendForCustomer.php

示例9: processAssert

 /**
  * Assert wish list is empty.
  *
  * @param CmsIndex $cmsIndex
  * @param WishlistIndex $wishlistIndex
  * @return void
  */
 public function processAssert(CmsIndex $cmsIndex, WishlistIndex $wishlistIndex)
 {
     $cmsIndex->getTopLinksBlock()->openAccountLink("My Wishlist");
     \PHPUnit_Framework_Assert::assertTrue($wishlistIndex->getWishlistBlock()->isEmptyBlockVisible(), 'Wish list is not empty.');
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:12,代码来源:AssertWishlistIsEmpty.php

示例10: processAssert

 /**
  * Assert that product is present in default wishlist.
  *
  * @param CmsIndex $cmsIndex
  * @param WishlistIndex $wishlistIndex
  * @param InjectableFixture $product
  * @return void
  */
 public function processAssert(CmsIndex $cmsIndex, WishlistIndex $wishlistIndex, InjectableFixture $product)
 {
     $cmsIndex->getTopLinksBlock()->openAccount();
     $cmsIndex->getLinksBlock()->openLink("My Wishlist");
     \PHPUnit_Framework_Assert::assertTrue($wishlistIndex->getItemsBlock()->getItemProductBlock($product)->isVisible(), $product->getName() . ' is not visible on wishlist page.');
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:14,代码来源:AssertProductIsPresentInWishlist.php

示例11: processAssert

 /**
  * Assert that selected language currently displays on frontend.
  *
  * @param CmsIndex $cmsIndex
  * @return void
  */
 public function processAssert(CmsIndex $cmsIndex)
 {
     $cmsIndex->open();
     \PHPUnit_Framework_Assert::assertEquals(strtolower($cmsIndex->getTopLinksBlock()->getAccountLabelText()), self::EXPECTED_TEXT);
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:11,代码来源:AssertLanguageSelected.php


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