Skip to content

Commit 16bfaf2

Browse files
committed
MAGETWO-52577: [GitHub] Set Product as New from Date and Design Active From is set when setting Special Price #4387
1 parent 331e44f commit 16bfaf2

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@
4545
<visibility>
4646
<input>select</input>
4747
</visibility>
48-
<news_from_date />
48+
<news_from_date>
49+
<selector>[name="product[news_from_date]"]</selector>
50+
<strategy>css selector</strategy>
51+
</news_from_date>
4952
<news_to_date>
5053
<selector>[name="product[news_to_date]"]</selector>
5154
<strategy>css selector</strategy>
@@ -190,6 +193,12 @@
190193
<class>\Magento\Ui\Test\Block\Adminhtml\Section</class>
191194
<selector>[data-index='schedule-design-update']</selector>
192195
<strategy>css selector</strategy>
196+
<fields>
197+
<custom_design_from>
198+
<selector>[name="product[custom_design_from]"]</selector>
199+
<strategy>css selector</strategy>
200+
</custom_design_from>
201+
</fields>
193202
</schedule-design-update>
194203
<customer-options>
195204
<class>\Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Section\Options</class>

dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
<field name="country_of_manufacture" is_required="0" />
3030
<field name="created_at" is_required="1" />
3131
<field name="custom_design" is_required="0" />
32-
<field name="custom_design_from" is_required="0" />
33-
<field name="custom_design_to" is_required="0" />
32+
<field name="custom_design_from" is_required="0" group="schedule-design-update" source="Magento\Backend\Test\Fixture\Source\Date" />
33+
<field name="custom_design_to" is_required="0" group="schedule-design-update" source="Magento\Backend\Test\Fixture\Source\Date" />
3434
<field name="custom_layout_update" is_required="0" />
3535
<field name="description" is_required="0" group="content" />
3636
<field name="gallery" is_required="0" />
@@ -80,8 +80,8 @@
8080
<field name="custom_options" is_required="0" group="customer-options" source="Magento\Catalog\Test\Fixture\Product\CustomOptions" repository="Magento\Catalog\Test\Repository\Product\CustomOptions" />
8181
<field name="website_ids" group="websites" source="Magento\Catalog\Test\Fixture\Product\WebsiteIds" />
8282
<field name="is_returnable" is_required="0" group="product-details" />
83-
<field name="news_from_date" is_required="0" source="Magento\Backend\Test\Fixture\Source\Date" />
84-
<field name="news_to_date" is_required="0" source="Magento\Backend\Test\Fixture\Source\Date" />
83+
<field name="news_from_date" is_required="0" group="product-details" source="Magento\Backend\Test\Fixture\Source\Date" />
84+
<field name="news_to_date" is_required="0" group="product-details" source="Magento\Backend\Test\Fixture\Source\Date" />
8585
<field name="stock_data" group="advanced-inventory" />
8686
<field name="checkout_data" group="null" repository="Magento\Catalog\Test\Repository\CatalogProductSimple\CheckoutData" />
8787
<field name="cross_sell_products" group="related" source="Magento\Catalog\Test\Fixture\Product\RelatedProducts" />

dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,14 @@
5555
<data name="product/data/short_description" xsi:type="string">Simple Product short_description %isolation%</data>
5656
<data name="product/data/description" xsi:type="string">Simple Product description %isolation%</data>
5757
<data name="product/data/weight" xsi:type="string">52</data>
58+
<data name="product/data/news_from_date" xsi:type="string"></data>
59+
<data name="product/data/custom_design_from" xsi:type="string"></data>
5860
<data name="product/data/quantity_and_stock_status/qty" xsi:type="string">659</data>
5961
<data name="product/data/custom_options/dataset" xsi:type="string">drop_down_with_one_option_fixed_price</data>
6062
<data name="product/data/checkout_data/dataset" xsi:type="string">simple_drop_down_with_one_option_fixed_price</data>
6163
<data name="product/data/price/dataset" xsi:type="string">MAGETWO-23029</data>
6264
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSaveMessage" />
65+
<constraint name="Magento\Catalog\Test\Constraint\AssertProductForm" />
6366
<constraint name="Magento\Catalog\Test\Constraint\AssertProductInGrid" />
6467
<constraint name="Magento\Catalog\Test\Constraint\AssertProductInCategory" />
6568
<constraint name="Magento\Catalog\Test\Constraint\AssertProductPage" />

0 commit comments

Comments
 (0)