9 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit;
10 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex;
12 use Magento\Mtf\Fixture\FixtureInterface;
35 'cross_sell_products::id',
36 'up_sell_products::id',
37 'related_products::id',
57 CatalogProductIndex $productGrid,
58 CatalogProductEdit $productPage
60 $filter = [
'sku' =>
$product->getSku()];
62 $productGrid->getProductGrid()->searchAndOpen($filter);
65 if (
$product->hasData(
'custom_options')) {
66 $customOptionsSource =
$product->getDataFieldConfig(
'custom_options')[
'source'];
67 $productData[
'custom_options'] = $customOptionsSource->getCustomOptions();
71 $error = $this->
verifyData($fixtureData, $formData);
72 \PHPUnit\Framework\Assert::assertTrue(empty($error), $error);
84 $data = array_diff_key(
$data, array_flip($this->skippedFixtureFields));
86 if (isset(
$data[
'website_ids']) && !is_array(
$data[
'website_ids'])) {
90 if (!empty($this->specialArray)) {
94 if (isset(
$data[
'price'])) {
95 $data[
'price'] = number_format(
$data[
'price'], 2);
113 foreach ($this->specialArray as $key =>
$value) {
114 if (array_key_exists($key,
$fields)) {
115 if (isset(
$value[
'type']) &&
$value[
'type'] ==
'date') {
116 $fields[$key] = vsprintf(
'%d/%d/%d', explode(
'/',
$fields[$key]));
146 return 'Form data equal the fixture data.';