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


PHP CatalogProductIndex::open方法代码示例

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


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

示例1: test

 /**
  * Test create grouped product
  *
  * @param GroupedProduct $product
  * @param Category $category
  * @return void
  */
 public function test(GroupedProduct $product, Category $category)
 {
     //Steps
     $this->catalogProductIndex->open();
     $this->catalogProductIndex->getGridPageActionBlock()->addProduct('grouped');
     $this->catalogProductNew->getProductForm()->fill($product, null, $category);
     $this->catalogProductNew->getFormPageActions()->save();
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:15,代码来源:CreateGroupedProductEntityTest.php

示例2: test

 /**
  * Test create catalog Configurable product run
  *
  * @param ConfigurableProduct $product
  * @return void
  */
 public function test(ConfigurableProduct $product)
 {
     // Steps
     $this->productIndex->open();
     $this->productIndex->getGridPageActionBlock()->addProduct('configurable');
     $this->productNew->getProductForm()->fill($product);
     $this->productNew->getFormPageActions()->save($product);
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:14,代码来源:CreateConfigurableProductEntityTest.php

示例3: testCreate

 /**
  * Run create product virtual entity test
  *
  * @param CatalogProductVirtual $product
  * @param Category $category
  * @return void
  */
 public function testCreate(CatalogProductVirtual $product, Category $category)
 {
     // Steps
     $this->productGrid->open();
     $this->productGrid->getGridPageActionBlock()->addProduct('virtual');
     $this->newProductPage->getProductForm()->fill($product, null, $category);
     $this->newProductPage->getFormPageActions()->save();
 }
开发者ID:koliaGI,项目名称:magento2,代码行数:15,代码来源:CreateVirtualProductEntityTest.php

示例4: test

 /**
  * Test create bundle product
  *
  * @param BundleProduct $product
  * @param Category $category
  * @return void
  */
 public function test(BundleProduct $product, Category $category)
 {
     $this->catalogProductIndex->open();
     $this->catalogProductIndex->getGridPageActionBlock()->addProduct('bundle');
     $productBlockForm = $this->catalogProductNew->getProductForm();
     $productBlockForm->fill($product, null, $category);
     $this->catalogProductNew->getFormPageActions()->save();
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:15,代码来源:CreateBundleProductEntityTest.php

示例5: test

 /**
  * Test create catalog Configurable product run
  *
  * @param ConfigurableProduct $product
  * @return void
  */
 public function test(ConfigurableProduct $product)
 {
     $this->markTestIncomplete('MAGETWO-40002');
     // Steps
     $this->productIndex->open();
     $this->productIndex->getGridPageActionBlock()->addProduct('configurable');
     $this->productNew->getProductForm()->fill($product);
     $this->productNew->getFormPageActions()->save($product);
 }
开发者ID:nja78,项目名称:magento2,代码行数:15,代码来源:CreateConfigurableProductEntityTest.php

示例6: test

 /**
  * Test update grouped product.
  *
  * @param GroupedProduct $product
  * @param GroupedProduct $originalProduct
  * @return void
  */
 public function test(GroupedProduct $product, GroupedProduct $originalProduct)
 {
     // Precondition
     $originalProduct->persist();
     // Steps
     $this->catalogProductIndex->open();
     $this->catalogProductIndex->getProductGrid()->searchAndOpen(['sku' => $originalProduct->getSku()]);
     $this->catalogProductEdit->getProductForm()->fill($product);
     $this->catalogProductEdit->getFormPageActions()->save();
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:17,代码来源:UpdateGroupedProductEntityTest.php

示例7: test

 /**
  * Run product type switching on creation test
  *
  * @param string $createProduct
  * @param string $product
  * @return array
  */
 public function test($createProduct, $product)
 {
     // Steps
     $this->catalogProductIndex->open();
     $this->catalogProductIndex->getGridPageActionBlock()->addProduct($createProduct);
     list($fixture, $dataSet) = explode('::', $product);
     $product = $this->fixtureFactory->createByCode($fixture, ['dataSet' => $dataSet]);
     $this->catalogProductNew->getProductForm()->fill($product);
     $this->catalogProductNew->getFormPageActions()->save($product);
     return ['product' => $product];
 }
开发者ID:opexsw,项目名称:magento2,代码行数:18,代码来源:ProductTypeSwitchingOnCreationTest.php

示例8: test

 /**
  * Test update bundle product
  *
  * @param BundleProduct $product
  * @param BundleProduct $originalProduct
  * @return array
  */
 public function test(BundleProduct $product, BundleProduct $originalProduct)
 {
     // Preconditions
     $originalProduct->persist();
     $originalCategory = $originalProduct->hasData('category_ids') ? $originalProduct->getDataFieldConfig('category_ids')['source']->getCategories() : null;
     $category = $product->hasData('category_ids') ? $product->getDataFieldConfig('category_ids')['source']->getCategories() : $originalCategory;
     // Steps
     $filter = ['sku' => $originalProduct->getSku()];
     $this->catalogProductIndex->open();
     $this->catalogProductIndex->getProductGrid()->searchAndOpen($filter);
     $this->catalogProductEdit->getProductForm()->fill($product);
     $this->catalogProductEdit->getFormPageActions()->save();
     return ['category' => $category];
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:21,代码来源:UpdateBundleProductEntityTest.php

示例9: test

 /**
  * Run update product simple entity test
  *
  * @param CatalogProductSimple $initialProduct
  * @param CatalogProductSimple $product
  * @return array
  */
 public function test(CatalogProductSimple $initialProduct, CatalogProductSimple $product)
 {
     // Preconditions
     $initialProduct->persist();
     $initialCategory = $initialProduct->hasData('category_ids') ? $initialProduct->getDataFieldConfig('category_ids')['source']->getCategories()[0] : null;
     $category = $product->hasData('category_ids') && $product->getCategoryIds()[0] ? $product->getDataFieldConfig('category_ids')['source']->getCategories()[0] : $initialCategory;
     // Steps
     $filter = ['sku' => $initialProduct->getSku()];
     $this->productGrid->open();
     $this->productGrid->getProductGrid()->searchAndOpen($filter);
     $this->editProductPage->getProductForm()->fill($product);
     $this->editProductPage->getFormPageActions()->save();
     return ['category' => $category];
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:21,代码来源:UpdateSimpleProductEntityTest.php

示例10: test

 /**
  * Run delete product test.
  *
  * @param string $products
  * @param FixtureFactory $fixtureFactory
  * @param Category $category
  * @return array
  */
 public function test($products, FixtureFactory $fixtureFactory, Category $category)
 {
     //Steps
     $products = explode(',', $products);
     $deleteProducts = [];
     foreach ($products as &$product) {
         list($fixture, $dataset) = explode('::', $product);
         $product = $fixtureFactory->createByCode($fixture, ['dataset' => $dataset, 'data' => ['category_ids' => ['category' => $category]]]);
         $product->persist();
         $deleteProducts[] = ['sku' => $product->getSku()];
     }
     $this->catalogProductIndex->open();
     $this->catalogProductIndex->getProductGrid()->massaction($deleteProducts, 'Delete', true);
     return ['product' => $products];
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:23,代码来源:DeleteProductEntityTest.php

示例11: test

 /**
  * Run mass update product simple entity test.
  *
  * @param CatalogProductSimple $initialProduct
  * @param CatalogProductSimple $product
  * @param string $configData
  * @return array
  */
 public function test(CatalogProductSimple $initialProduct, CatalogProductSimple $product, $configData)
 {
     $this->configData = $configData;
     // Preconditions
     $initialProduct->persist();
     $this->objectManager->create('Magento\\Config\\Test\\TestStep\\SetupConfigurationStep', ['configData' => $configData])->run();
     // Steps
     $this->productGrid->open();
     $this->productGrid->getProductGrid()->updateAttributes([['sku' => $initialProduct->getSku()]]);
     $this->attributeMassActionPage->getAttributesBlockForm()->fill($product);
     $this->attributeMassActionPage->getFormPageActions()->save();
     $data = array_merge($initialProduct->getData(), $product->getData());
     $product = $this->objectManager->create('Magento\\Catalog\\Test\\Fixture\\CatalogProductSimple', ['data' => $data]);
     return ['category' => $initialProduct->getDataFieldConfig('category_ids')['source']->getCategories()[0], 'product' => $product];
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:23,代码来源:MassProductUpdateTest.php

示例12: processAssert

 /**
  * Assert that deleted attribute can't be added to product template on Product Page via Add Attribute control
  *
  * @param CatalogProductAttribute $productAttribute
  * @param CatalogProductIndex $productGrid
  * @param CatalogProductNew $newProductPage
  * @param CatalogProductEdit $productEdit
  * @return void
  */
 public function processAssert(CatalogProductAttribute $productAttribute, CatalogProductIndex $productGrid, CatalogProductEdit $productEdit, CatalogProductNew $newProductPage)
 {
     $productGrid->open();
     $productGrid->getGridPageActionBlock()->addProduct('simple');
     $productEdit->getForm()->openVariationsTab();
     \PHPUnit_Framework_Assert::assertFalse($newProductPage->getForm()->checkAttributeInVariationsSearchAttributeForm($productAttribute), "Product attribute found in Attribute Search form.");
 }
开发者ID:aiesh,项目名称:magento2,代码行数:16,代码来源:AssertProductAttributeAbsenceInVariationsSearch.php

示例13: processAssert

 /**
  * Assert that product is present in products grid and can be found by sku, type, status and attribute set.
  *
  * @param FixtureInterface $product
  * @param CatalogProductIndex $productIndex
  * @return void
  */
 public function processAssert(FixtureInterface $product, CatalogProductIndex $productIndex)
 {
     $this->product = $product;
     $productIndex->open();
     $productIndex->getProductGrid()->resetFilter();
     \PHPUnit_Framework_Assert::assertTrue($productIndex->getProductGrid()->isRowVisible($this->prepareFilter()), 'Product \'' . $this->product->getName() . '\' is absent in Products grid.');
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:14,代码来源:AssertProductInGrid.php

示例14: testUpdate

 /**
  * Run update product simple entity test
  *
  * @param CatalogProductSimple $product
  * @return void
  */
 public function testUpdate(CatalogProductSimple $product)
 {
     $filter = ['sku' => $this->product->getSku()];
     $this->productGrid->open()->getProductGrid()->searchAndOpen($filter);
     $this->editProductPage->getProductForm()->fill($product);
     $this->editProductPage->getFormPageActions()->save();
 }
开发者ID:buskamuza,项目名称:magento2-skeleton,代码行数:13,代码来源:UpdateSimpleProductEntityTest.php

示例15: test

 /**
  * Run update product simple entity test.
  *
  * @param CatalogProductSimple $initialProduct
  * @param CatalogProductSimple $product
  * @param string $configData
  * @return array
  */
 public function test(CatalogProductSimple $initialProduct, CatalogProductSimple $product, $configData = '')
 {
     $this->configData = $configData;
     // Preconditions
     $initialProduct->persist();
     $initialCategory = $initialProduct->hasData('category_ids') ? $initialProduct->getDataFieldConfig('category_ids')['source']->getCategories()[0] : null;
     $category = $product->hasData('category_ids') && $product->getCategoryIds()[0] ? $product->getDataFieldConfig('category_ids')['source']->getCategories()[0] : $initialCategory;
     $this->objectManager->create('Magento\\Config\\Test\\TestStep\\SetupConfigurationStep', ['configData' => $configData])->run();
     // Steps
     $filter = ['sku' => $initialProduct->getSku()];
     $this->productGrid->open();
     $this->productGrid->getProductGrid()->searchAndOpen($filter);
     $this->editProductPage->getProductForm()->fill($product);
     $this->editProductPage->getFormPageActions()->save();
     return ['category' => $category];
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:24,代码来源:UpdateSimpleProductEntityTest.php


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