當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CatalogProductNew::getFormPageActions方法代碼示例

本文整理匯總了PHP中Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew::getFormPageActions方法的典型用法代碼示例。如果您正苦於以下問題:PHP CatalogProductNew::getFormPageActions方法的具體用法?PHP CatalogProductNew::getFormPageActions怎麽用?PHP CatalogProductNew::getFormPageActions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew的用法示例。


在下文中一共展示了CatalogProductNew::getFormPageActions方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: testCreateDownloadableProduct

 /**
  * Test create downloadable product
  *
  * @param DownloadableProductInjectable $product
  * @param CatalogCategory $category
  * @return void
  */
 public function testCreateDownloadableProduct(DownloadableProductInjectable $product, CatalogCategory $category)
 {
     $this->catalogProductIndex->open();
     $this->catalogProductIndex->getGridPageActionBlock()->addProduct('downloadable');
     $productBlockForm = $this->catalogProductNew->getProductForm();
     $productBlockForm->fill($product, null, $category);
     $this->catalogProductNew->getFormPageActions()->save();
 }
開發者ID:zhangjiachao,項目名稱:magento2,代碼行數:15,代碼來源:CreateDownloadableProductEntityTest.php

示例7: 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:opexsw,項目名稱:magento2,代碼行數:15,代碼來源:CreateGroupedProductEntityTest.php

示例8: processAssert

 /**
  * Assert that deleted attribute can't be added to attribute set on Product Page via Add Attribute control.
  *
  * @param CatalogProductAttribute $productAttribute
  * @param CatalogProductIndex $productGrid
  * @param CatalogProductNew $newProductPage
  * @return void
  */
 public function processAssert(CatalogProductAttribute $productAttribute, CatalogProductIndex $productGrid, CatalogProductNew $newProductPage)
 {
     $productGrid->open();
     $productGrid->getGridPageActionBlock()->addProduct('simple');
     $newProductPage->getFormPageActions()->addNewAttribute();
     $filter = ['label' => $productAttribute->getFrontendLabel()];
     \PHPUnit_Framework_Assert::assertFalse($newProductPage->getProductForm()->getAttributesSearchGrid()->isRowVisible($filter), 'Attribute \'' . $productAttribute->getFrontendLabel() . '\' is found in Attributes grid.');
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:16,代碼來源:AssertProductAttributeAbsenceInSearchOnProductForm.php

示例9: test

 /**
  * Run update product simple entity test.
  *
  * @param CatalogProductSimple $product
  * @param string $configData
  * @return array
  */
 public function test(CatalogProductSimple $product, $configData = null)
 {
     $this->configData = $configData;
     // Preconditions
     $this->objectManager->create('Magento\\Config\\Test\\TestStep\\SetupConfigurationStep', ['configData' => $this->configData])->run();
     // Steps
     // * 1. Go to backend.
     $this->productGrid->open();
     // * 2. Open simple product page to create a new one.
     $this->productGrid->getGridPageActionBlock()->addProduct('simple');
     // * 3. Click "Add Video" in "Images and Videos" section.
     // * 4. Fill fields regarding to Test Data.
     // * 5. Click "Save" button on "Add Video" panel.
     $this->newProductPage->getProductForm()->fill($product);
     // * 6. Click "Save" button on product page.
     $this->newProductPage->getFormPageActions()->save();
     return ['product' => $product];
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:25,代碼來源:AddProductVideoTest.php

示例10: testCreate

 /**
  * Run create product simple entity test.
  *
  * @param CatalogProductSimple $product
  * @param Category $category
  * @param CatalogProductIndex $productGrid
  * @param CatalogProductNew $newProductPage
  * @param string $configData
  * @return array
  */
 public function testCreate(CatalogProductSimple $product, Category $category, CatalogProductIndex $productGrid, CatalogProductNew $newProductPage, $configData = null)
 {
     $this->configData = $configData;
     // Preconditions
     $this->objectManager->create('Magento\\Config\\Test\\TestStep\\SetupConfigurationStep', ['configData' => $this->configData])->run();
     // Steps
     $productGrid->open();
     $productGrid->getGridPageActionBlock()->addProduct('simple');
     $newProductPage->getProductForm()->fill($product, null, $category);
     $newProductPage->getFormPageActions()->save();
     return ['product' => $product];
 }
開發者ID:koliaGI,項目名稱:magento2,代碼行數:22,代碼來源:CreateSimpleProductEntityTest.php

示例11: processAssert

 /**
  * Assert that created product template:
  * 1. Displays in product template suggest container dropdown
  * 2. Can be used for new created product.
  *
  * @param FixtureFactory $fixtureFactory
  * @param CatalogProductEdit $productEdit
  * @param CatalogProductIndex $productGrid
  * @param CatalogAttributeSet $attributeSet
  * @param CatalogAttributeSet $attributeSetOriginal
  * @param CatalogProductNew $newProductPage
  * @param CatalogProductAttribute $productAttribute
  * @return void
  */
 public function processAssert(FixtureFactory $fixtureFactory, CatalogProductEdit $productEdit, CatalogProductIndex $productGrid, CatalogAttributeSet $attributeSet, CatalogProductNew $newProductPage, CatalogProductAttribute $productAttribute, CatalogAttributeSet $attributeSetOriginal = null)
 {
     $productGrid->open();
     $productGrid->getGridPageActionBlock()->addProduct('simple');
     $productBlockForm = $newProductPage->getProductForm();
     /**@var CatalogProductSimple $catalogProductSimple */
     $productSimple = $fixtureFactory->createByCode('catalogProductSimple', ['dataSet' => 'default', 'data' => ['attribute_set_id' => ['attribute_set' => $attributeSet]]]);
     $productBlockForm->fill($productSimple);
     $newProductPage->getFormPageActions()->save();
     $formData = $productEdit->getProductForm()->getData($productSimple);
     $formAttributeSet = $formData['attribute_set_id'];
     \PHPUnit_Framework_Assert::assertEquals($attributeSet->getAttributeSetName(), $formAttributeSet, 'Attribute Set not found on Product form.' . "\nExpected: " . $attributeSet->getAttributeSetName() . "\nActual: " . $formAttributeSet);
     if ($attributeSetOriginal === null) {
         $productEdit->getProductForm()->openTab('product-details');
         \PHPUnit_Framework_Assert::assertTrue($productEdit->getProductForm()->checkAttributeLabel($productAttribute), "Product Attribute is absent on Product form.");
     }
 }
開發者ID:buskamuza,項目名稱:magento2-skeleton,代碼行數:31,代碼來源:AssertProductTemplateOnProductForm.php


注:本文中的Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew::getFormPageActions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。