Skip to content

#1760: Media Gallery Page opened successfully if "Enhanced Media Gallery" disabled #29632

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

Conversation

jmonteros422
Copy link
Contributor

@jmonteros422 jmonteros422 commented Aug 18, 2020

Description (*)

This PR will fixes issue magento/adobe-stock-integration#1760

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes Media Gallery Page opened successfully if "Enhanced Media Gallery" disabled  adobe-stock-integration#1760: Media Gallery page and Category grid page opened successfully if "Enhanced Media Gallery" disabled 

Preconditions (*)

  1. Install Magento 2.4-develop with Adobe Stock Integration and IMS
  2. Enhanced Media Gallery Disabled

Steps to reproduce (*)

  1. Open https://yourdomain.com/admin/media_gallery/media/index link

Expected result (*)

404 page

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

… grid page opened successfully if "Enhanced Media Gallery" disabled - redirect to 404 if enhanced media gallery config is disabled.
@m2-assistant
Copy link

m2-assistant bot commented Aug 18, 2020

Hi @jmonteros422. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@jmonteros422
Copy link
Contributor Author

@magento run all tests

@jmonteros422 jmonteros422 changed the title magento/adobe-stock-integration#1760: Media Gallery page and Category grid page opened successfully if "Enhanced Media Gallery" disabled #1760: Media Gallery page and Category grid page opened successfully if "Enhanced Media Gallery" disabled Aug 18, 2020
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 PR @jmonteros422 ! Can you please revert the changes for the Category grid page, only the Media Gallery page should not be acccesible.

Can you please also cover the changes by MFTF tests: 404 page should be returned trying to access media gallery by URL if it's disabled

@ghost ghost assigned sivaschenko Aug 18, 2020
@jmonteros422 jmonteros422 changed the title #1760: Media Gallery page and Category grid page opened successfully if "Enhanced Media Gallery" disabled #1760: Media Gallery Page opened successfully if "Enhanced Media Gallery" disabled Aug 18, 2020
… grid page opened successfully if "Enhanced Media Gallery" disabled - revert category grid no route redirect when media gallery is disabled, MFTF test coverage
@jmonteros422
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 updates @jmonteros422 ! Please see my comments

<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1337102/scenarios/5106786"/>
<description value="Standalone Media Gallery Page should return 404 if Media Gallery is disabled"/>
<severity value="CRITICAL"/>
<group value="media_gallery_ui"/>
Copy link
Member

Choose a reason for hiding this comment

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

Please intorduce a new media_gallery_ui_disabled suite that will not enable the new media gallery (that suite does not need any before/after actions actually)

*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Copy link
Member

Choose a reason for hiding this comment

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

Please introduce this action group as app/code/Magento/Backend/Test/Mftf/ActionGroup/AssertAdminPageIs404ActionGroup.xml

… grid page opened successfully if "Enhanced Media Gallery" disabled - MFTF Apply PR suggestions
@jmonteros422
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 updates @jmonteros422 ! Please see my comments

</annotations>
<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminMediaGalleryEnhancedEnableActionGroup" stepKey="disableEnhancedMediaGallery"/>
Copy link
Member

Choose a reason for hiding this comment

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

There is no need to disable media gallery as it is disabled by default

<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminMediaGalleryEnhancedEnableActionGroup" stepKey="disableEnhancedMediaGallery"/>
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/>
Copy link
Member

Choose a reason for hiding this comment

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

opening media gallery is actually part of the test, not the precondition


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

Choose a reason for hiding this comment

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

please move the action group to Backend module (see the exact path in the comment from previous review)

… grid page opened successfully if "Enhanced Media Gallery" disabled - MFTF Apply PR suggestions
@jmonteros422
Copy link
Contributor Author

@magento run all tests

@sivaschenko
Copy link
Member

@magento run Functional Tests EE

@sivaschenko sivaschenko added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Auto-Tests: Covered All changes in Pull Request is covered by auto-tests labels Aug 24, 2020
@magento-engcom-team
Copy link
Contributor

Hi @sivaschenko, thank you for the review.
ENGCOM-8064 has been created to process this Pull Request

@chalov-anton
Copy link
Contributor

✔️ QA Passed

If thee New Media Gallery is disabled, the https://yourdomain.com/admin/media_gallery/media/index link leads to 404 Page not found

Manual testing scenario - https://studio.cucumber.io/projects/131313/test-plan/folders/1337102/scenarios/5106786

@m2-assistant
Copy link

m2-assistant bot commented Aug 26, 2020

Hi @jmonteros422, 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
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: Backend Component: MediaGalleryUi Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept Project: ASI QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Media Gallery Page opened successfully if "Enhanced Media Gallery" disabled
4 participants