diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDateTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDateTest.xml
index d1f7adb8a902c..7d8d71f23535a 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDateTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDateTest.xml
@@ -34,7 +34,7 @@
-
+
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/Options/Type/DateTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/Options/Type/DateTest.php
index 91a54d8fc13fa..2cdc1e974a1b2 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/Options/Type/DateTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/Options/Type/DateTest.php
@@ -207,19 +207,21 @@ private function getHtmlDocument(string $source): \DOMDocument
*/
public function toHtmlWithDropDownDataProvider(): array
{
+ $currentYear = date('Y');
+
return [
[
[
'month' => '3',
'day' => '5',
- 'year' => '2020',
+ 'year' => $currentYear,
'hour' => '2',
'minute' => '15',
'day_part' => 'am',
- 'date_internal' => '2020-09-30 02:15:00'
+ 'date_internal' => sprintf('%s-09-30 02:15:00', $currentYear)
],
[
- '//select[@id="options_{id}_year"]/option[@selected]' => '2020',
+ '//select[@id="options_{id}_year"]/option[@selected]' => $currentYear,
'//select[@id="options_{id}_month"]/option[@selected]' => '3',
'//select[@id="options_{id}_day"]/option[@selected]' => '5',
'//select[@id="options_{id}_hour"]/option[@selected]' => '2',
@@ -233,10 +235,10 @@ public function toHtmlWithDropDownDataProvider(): array
'hour' => '2',
'minute' => '15',
'day_part' => 'am',
- 'date_internal' => '2020-09-30 02:15:00'
+ 'date_internal' => sprintf('%s-09-30 02:15:00', $currentYear)
],
[
- '//select[@id="options_{id}_year"]/option[@selected]' => '2020',
+ '//select[@id="options_{id}_year"]/option[@selected]' => $currentYear,
'//select[@id="options_{id}_month"]/option[@selected]' => '9',
'//select[@id="options_{id}_day"]/option[@selected]' => '30',
'//select[@id="options_{id}_hour"]/option[@selected]' => '2',