10 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex;
11 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew;
12 use Magento\Mtf\Fixture\FixtureFactory;
13 use Magento\Mtf\TestCase\Injectable;
44 CatalogProductIndex $productGrid,
45 CatalogProductNew $newProductPage,
46 FixtureFactory $fixtureFactory,
47 array $websiteCategories
54 foreach ($websiteCategories as $websiteCategory) {
57 $categoryListItem = $fixtureFactory->createByCode(
'category', [
'dataset' =>
$category]);
58 $categoryListItem->persist();
59 $categoryParent[
$category] = $categoryListItem->getDataFieldConfig(
'parent_id')[
'source']
60 ->getParentCategory();
63 $storeGroup = $fixtureFactory->createByCode(
'storeGroup', [
66 'root_category_id' => [
72 $store = $fixtureFactory->createByCode(
'store', [
88 $product = $fixtureFactory->createByCode(
89 'catalogProductSimple',
91 'dataset' =>
'default',
98 $productGrid->getGridPageActionBlock()->addProduct(
'simple');
99 $newProductPage->getProductForm()->fill(
$product);
100 $newProductPage->getFormPageActions()->save();
testCreate(CatalogProductSimple $product, CatalogProductIndex $productGrid, CatalogProductNew $newProductPage, FixtureFactory $fixtureFactory, array $websiteCategories)