Skip to content

Added The return of Post Value when an Integration Exception is thrown while Save Action #26660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function execute()
$this->_redirectOnSaveError();
} catch (IntegrationException $e) {
$this->messageManager->addError($this->escaper->escapeHtml($e->getMessage()));
$this->_getSession()->setIntegrationData($integrationData);
$this->_getSession()->setIntegrationData($this->getRequest()->getPostValue());
$this->_redirectOnSaveError();
} catch (\Magento\Framework\Exception\LocalizedException $e) {
$this->messageManager->addError($this->escaper->escapeHtml($e->getMessage()));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AssertAdminIntegrationNameInFormActionGroup">
<arguments>
<argument name="name" type="string"/>
</arguments>
<seeInField userInput="{{name}}" selector="{{AdminNewIntegrationSection.name}}" stepKey="checkEnteredValueIsPreserved"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,8 @@
<argument name="message" value="The integration with name &quot;{{defaultIntegrationData.name}}&quot; exists."/>
<argument value="error" name="messageType"/>
</actionGroup>
<actionGroup ref="AssertAdminIntegrationNameInFormActionGroup" stepKey="checkEnteredValueIsPreserved">
<argument name="name" value="{{defaultIntegrationData.name}}"/>
</actionGroup>
</test>
</tests>