Skip to content
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

#1094 : [MFTF] User deletes images using Delete button #1384

Conversation

konarshankar07
Copy link
Contributor

Description (*)

This PR will add MFTF test coverage for the user deleting the image from enhanced media gallery

Fixed Issues (if relevant)

  1. [MFTF] User deletes images using Delete button #1094: [MFTF] User deletes images using Delete button

@konarshankar07
Copy link
Contributor Author

@magento run Functional Tests CE

@konarshankar07
Copy link
Contributor Author

@magento run Functional Tests CE

@konarshankar07
Copy link
Contributor Author

@magento run all tests

Copy link
Member

@sivaschenko sivaschenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request @konarshankar07 ! Please see my review comments

<group value="media_gallery_ui"/>
</annotations>
<before>
<magentoCLI command="config:set {{MediaGalleryConfigDataEnabled.path}} {{MediaGalleryConfigDataEnabled.value}}" stepKey="enableEnhancedMediaGallery"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enhanced media gallery is enable in the suite precondition using the AdminMediaGalleryEnhancedEnableActionGroup.

There is no need to enable disable it in the individual test precondition, as suite preconditions are always executed for the matching tests

<argument name="imageName" value="{{ImageUpload.file}}"/>
</actionGroup>
<actionGroup ref="AdminMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"/>
<see userInput='You have successfully removed the image "{{ImageUpload.filename}}"' stepKey="verifyDeleteImage"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move that to the AssertAdminMediaGalleryAssetDeleted action group for extensibility

<features value="MediaGallery"/>
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1094"/>
<title value="Deleting new image file functionality in Enhanced Media Gallery"/>
<stories value="Deleting new image file functionality in Enhanced Media Gallery"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the <testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1054245/scenarios/4756652"/>

@konarshankar07
Copy link
Contributor Author

@magento run all tests

@lenaorobei lenaorobei added this to the 2.0.0 Stabilization milestone May 26, 2020
@lenaorobei lenaorobei linked an issue May 26, 2020 that may be closed by this pull request
<argument name="imageName" type="string" defaultValue=""/>
</arguments>

<see userInput='You have successfully removed the image "{{imageName}}"' stepKey="verifyDeleteImage"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add this verification to existing AssertEnhancedMediaGalleryImageDeletedActionGroup (it would be good to rename that actionGroup to AssertAdminEnhancedMediaGalleryImageDeletedActionGroup)

<actionGroup ref="AdminOpenMediaGalleryForPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/>
</before>
<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the logout is not required as every test is executed in an isolated session

@konarshankar07
Copy link
Contributor Author

@magento run all tests

1 similar comment
@konarshankar07
Copy link
Contributor Author

@magento run all tests

@@ -8,14 +8,14 @@

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AssertEnhancedMediaGalleryImageDeletedActionGroup">
<actionGroup name="AssertAdminEnhancedMediaGalleryImageDeletedActionGroup">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@konarshankar07 thanks for the updates! Please rename the file according to the action group name change

@konarshankar07
Copy link
Contributor Author

@magento run all tests

@sivaschenko sivaschenko merged commit e805747 into magento:2.0.0-stabilization Jun 3, 2020
@ghost
Copy link

ghost commented Jun 3, 2020

Hi @konarshankar07, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MFTF] User deletes images using Delete button
3 participants