Skip to content

Commit 0918ea5

Browse files
committed
ACP2E-23: [Magento Cloud] Error message in PDP disappearing quickly
1 parent be88683 commit 0918ea5

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

app/code/Magento/Customer/Test/Mftf/Test/StorefrontAddProductToCartVerifyThatErrorMessageShouldNotDisappearTest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545

4646
<actionGroup ref="StorefrontProductPageAddSimpleProductToCartActionGroup" stepKey="addProductToCart"/>
4747
<!-- Check that error remains -->
48-
<see userInput="The requested qty is not available" stepKey="assertProductErrorRemains"/>
48+
<actionGroup ref="StorefrontAssertProductAddToCartErrorMessageActionGroup" stepKey="assertFailure">
49+
<argument name="message" value="The requested qty is not available"/>
50+
</actionGroup>
4951
</test>
5052
</tests>

app/code/Magento/Theme/CustomerData/Messages.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,13 @@ private function sectionTimestampFlag(): bool
104104
$forceNewSectionTimestampFlg = true;
105105

106106
if ((bool) $this->appConfig->getValue($this->synchronizer::ALLOW_SYNC_WITH_BACKEND_PATH)) {
107-
$sections = $this->request->getParam('sections');
108-
$sectionNames = explode(",", $sections);
109-
if (!empty($sections) && in_array('cart', $sectionNames)) {
107+
$sections = $this->request->getParam('sections') ?? null;
108+
$sectionNames = $sections ? explode(',', $sections) : [];
109+
110+
if (in_array('cart', $sectionNames)) {
110111
$forceNewSectionTimestampFlg = false;
111112
$forceNewSectionTimestamp = $this->request->getParam('force_new_section_timestamp')
112-
?? $this->request->getParam('force_new_section_timestamp');
113+
?? null;
113114

114115
if ('true' === $forceNewSectionTimestamp) {
115116
$forceNewSectionTimestampFlg = true;

app/code/Magento/Theme/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"magento/module-require-js": "*",
1717
"magento/module-store": "*",
1818
"magento/module-ui": "*",
19-
"magento/module-widget": "*"
19+
"magento/module-widget": "*",
20+
"magento/module-catalog": "*"
2021
},
2122
"suggest": {
2223
"magento/module-theme-sample-data": "*",

0 commit comments

Comments
 (0)