|
15 | 15 | use Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\Collection;
|
16 | 16 | use Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\CollectionFactory;
|
17 | 17 | use Magento\Framework\App\Request\Http as HttpRequest;
|
| 18 | +use Magento\Framework\Message\MessageInterface; |
18 | 19 | use Magento\Framework\Serialize\Serializer\Json;
|
19 | 20 | use Magento\TestFramework\Eav\Model\AttributeSet;
|
20 | 21 | use Magento\TestFramework\TestCase\AbstractBackendController;
|
@@ -80,6 +81,10 @@ public function testUpdateAttributeSetName(): void
|
80 | 81 | $updateName = 'New attribute set name';
|
81 | 82 | $postData['attribute_set_name'] = $updateName;
|
82 | 83 | $this->performRequest((int)$attributeSet->getAttributeSetId(), $postData);
|
| 84 | + $this->assertSessionMessages( |
| 85 | + $this->equalTo([(string)__('You saved the attribute set.')]), |
| 86 | + MessageInterface::TYPE_SUCCESS |
| 87 | + ); |
83 | 88 | $updatedAttributeSet = $this->attributeSetRepository->get((int)$attributeSet->getAttributeSetId());
|
84 | 89 | $this->assertEquals($updateName, $updatedAttributeSet->getAttributeSetName());
|
85 | 90 | $updatedAttributeSet->setAttributeSetName($currentAttrSetName);
|
@@ -110,6 +115,10 @@ public function testUpdateAttributeSetWithNewGroup(): void
|
110 | 115 | $newGroupSortOrder,
|
111 | 116 | ];
|
112 | 117 | $this->performRequest($attrSetId, $postData);
|
| 118 | + $this->assertSessionMessages( |
| 119 | + $this->equalTo([(string)__('You saved the attribute set.')]), |
| 120 | + MessageInterface::TYPE_SUCCESS |
| 121 | + ); |
113 | 122 | $updatedAttrGroups = $this->getAttributeSetGroupCollection($attrSetId)->getItems();
|
114 | 123 | $diffGroups = array_diff_key($updatedAttrGroups, $currentAttrGroups);
|
115 | 124 | $this->assertCount(1, $diffGroups);
|
@@ -149,6 +158,10 @@ public function testDeleteCustomGroupFromCustomAttributeSet(): void
|
149 | 158 | $customGroup->getAttributeGroupId()
|
150 | 159 | ];
|
151 | 160 | $this->performRequest($attrSetId, $postData);
|
| 161 | + $this->assertSessionMessages( |
| 162 | + $this->equalTo([(string)__('You saved the attribute set.')]), |
| 163 | + MessageInterface::TYPE_SUCCESS |
| 164 | + ); |
152 | 165 | $updatedAttrGroups = $this->getAttributeSetGroupCollection($attrSetId)->getItems();
|
153 | 166 | $diffGroups = array_diff_key($currentAttrGroups, $updatedAttrGroups);
|
154 | 167 | $this->assertCount(1, $diffGroups);
|
|
0 commit comments