-
Notifications
You must be signed in to change notification settings - Fork 9.4k
fix category image is not removed from tmp folder after category save #29906
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
magento-engcom-team
merged 8 commits into
magento:2.4-develop
from
engcom-Golf:asi-1792
Sep 10, 2020
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
70b0d06
adobe-stock-integration#1792: fix category image is not removed from …
879a74e
adobe-stock-integration#1792: cover by mftf test
b3e5989
Merge remote-tracking branch 'magento/2.4-develop' into asi-1792
7f0a495
adobe-stock-integration#1792: update after review
1f733fe
Merge branch '2.4-develop' into asi-1792
sivaschenko 5584b4c
Added stories annotation for the test
sivaschenko 86cc39c
magento/magento2#29906: Added test case id for AdminUploadSameImageDe…
sivaschenko b21a245
Merge branch '2.4-develop' into asi-1792
sivaschenko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...ryCatalogIntegration/Test/Mftf/Test/AdminUploadSameImageDeleteFromTemporaryFolderTest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminUploadSameImageDeleteFromTemporaryFolderTest"> | ||
<annotations> | ||
<features value="AdminUploadSameImageDeleteFromTemporaryFolderTest"/> | ||
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1792"/> | ||
<title value="Image is deleted from tmp folder if is uploaded second time"/> | ||
<description value="Image is deleted from tmp folder if is uploaded second time"/> | ||
<stories value="Image is deleted from tmp folder if is uploaded second time"/> | ||
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/943908/scenarios/4836631"/> | ||
<severity value="CRITICAL"/> | ||
<group value="media_gallery_ui"/> | ||
</annotations> | ||
<before> | ||
<createData entity="SimpleSubCategory" stepKey="category"/> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="category" stepKey="deleteCategory"/> | ||
</after> | ||
|
||
<!-- Upload test image to category twice --> | ||
<actionGroup ref="AdminOpenCategoryGridPageActionGroup" stepKey="openCategoryPage"/> | ||
<actionGroup ref="AdminEditCategoryInGridPageActionGroup" stepKey="editCategoryItem"> | ||
<argument name="categoryName" value="$category.name$"/> | ||
</actionGroup> | ||
<actionGroup ref="AddCategoryImageActionGroup" stepKey="addCategoryImage"/> | ||
<actionGroup ref="AdminSaveCategoryFormActionGroup" stepKey="saveCategoryForm"/> | ||
<actionGroup ref="AddCategoryImageActionGroup" stepKey="addCategoryImageSecondTime"/> | ||
<actionGroup ref="AdminSaveCategoryFormActionGroup" stepKey="saveCategoryFormSecondTime"/> | ||
|
||
<!-- Open tmp/category folder --> | ||
<actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGallery"/> | ||
<actionGroup ref="AdminEnhancedMediaGalleryExpandCatalogTmpFolderActionGroup" stepKey="expandTmpFolder"/> | ||
<actionGroup ref="AdminMediaGalleryFolderSelectByFullPathActionGroup" stepKey="selectCategoryFolder"> | ||
<argument name="path" value="catalog/tmp/category"/> | ||
</actionGroup> | ||
|
||
<!-- Assert folder is empty --> | ||
<actionGroup ref="AdminAssertMediaGalleryEmptyActionGroup" stepKey="assertEmptyFolder"/> | ||
</test> | ||
</tests> |
17 changes: 17 additions & 0 deletions
17
.../Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminAssertMediaGalleryEmptyActionGroup.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?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="AdminAssertMediaGalleryEmptyActionGroup"> | ||
<annotations> | ||
<description>Requires select folder in directory tree. Assert that selected folder is empty.</description> | ||
</annotations> | ||
|
||
<seeElement selector="{{AdminMediaGalleryGridSection.noDataMessage}}" stepKey="assertNoDataMessageDisplayed" /> | ||
</actionGroup> | ||
</actionGroups> |
21 changes: 21 additions & 0 deletions
21
...ryUi/Test/Mftf/ActionGroup/AdminEnhancedMediaGalleryExpandCatalogTmpFolderActionGroup.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?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="AdminEnhancedMediaGalleryExpandCatalogTmpFolderActionGroup"> | ||
<annotations> | ||
<description>Expand media gallery tmp folder tree</description> | ||
</annotations> | ||
<waitForLoadingMaskToDisappear stepKey="waitLoadingMask"/> | ||
<conditionalClick selector="//li[@id='catalog']/ins" dependentSelector="//li[@id='catalog']/ul" visible="false" stepKey="expandCatalog"/> | ||
<wait time="2" stepKey="waitCatalogExpanded"/> | ||
<conditionalClick selector="//li[@id='catalog/tmp']/ins" dependentSelector="//li[@id='catalog/tmp']/ul" visible="false" stepKey="expandTmp"/> | ||
<wait time="2" stepKey="waitTmpExpanded"/> | ||
</actionGroup> | ||
</actionGroups> |
19 changes: 19 additions & 0 deletions
19
...diaGalleryUi/Test/Mftf/ActionGroup/AdminMediaGalleryFolderSelectByFullPathActionGroup.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?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="AdminMediaGalleryFolderSelectByFullPathActionGroup"> | ||
<arguments> | ||
<argument name="path" type="string"/> | ||
</arguments> | ||
<wait time="2" stepKey="waitBeforeClickOnFolder"/> | ||
<click selector="//li[@id='{{path}}']" stepKey="selectSubFolder" after="waitBeforeClickOnFolder"/> | ||
<waitForLoadingMaskToDisappear stepKey="waitForFolderContents"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.