Skip to content

Fixed Redirect to the store view when trying to save attribute on product creation page #30400

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 3 commits into from
Nov 13, 2020

Conversation

shikhamis11
Copy link
Member

@shikhamis11 shikhamis11 commented Oct 10, 2020

#30362: Fixed Redirect to the store view when trying to save attribute on product creation page
also fixes #30361

Preconditions (*)

Magento 2.4-develop
Steps to reproduce (*)

Go to Catalog -> Products -> Add New Product
Click on the "Add Attribute" button (Upper right corner)
Click on the "Create New Attribute" button
Close the opened window
Click on the "Create New Attribute" button again
Close the opened window
Click on the "Create New Attribute" button again
Enter "Attribute Label", set type to drop-down and add two values -> Save

Expected result (*)

No redirect. Attribute is saved.
Actual result (*)
https://user-images.githubusercontent.com/30689417/95333312-48e4f780-08b5-11eb-884d-a2100962d1e7.gif
Redirect to the Home Page if trying to save a attribute on product creation page. Attribute isn`t saved

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)

…ttribute

magento#30362: Fixed Redirect to the store view when trying to save attribute on product creation page
@m2-assistant
Copy link

m2-assistant bot commented Oct 10, 2020

Hi @shikhamis11. 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

@shikhamis11
Copy link
Member Author

@magento give me test instance

@magento-deployment-service
Copy link

Hi @shikhamis11. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @shikhamis11, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@shikhamis11
Copy link
Member Author

@magento run all tests

@vijay-wagento
Copy link

#dmcdindia2020

@sivaschenko sivaschenko added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Oct 10, 2020
@m2-community-project m2-community-project bot added the Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. label Oct 10, 2020
Copy link
Contributor

@rogyar rogyar left a comment

Choose a reason for hiding this comment

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

Hi @shikhamis11. Thank you for your collaboration. According to the definition of done all changes should be covered by autotests. Could I ask you to cover you fix by an MFTF test, please?

Thank you!

@rogyar rogyar self-assigned this Oct 10, 2020
@rogyar rogyar mentioned this pull request Oct 10, 2020
@shikhamis11
Copy link
Member Author

hi @rogyar
Thanks for the review .
wanted to confirm , do you want me to create add MFTF test coverage with this scenario ?

Go to Catalog -> Products -> Add New Product
Click on the "Add Attribute" button (Upper right corner)
Click on the "Create New Attribute" button
Close the opened window
Click on the "Create New Attribute" button again
Close the opened window
Click on the "Create New Attribute" button again
Enter "Attribute Label", set type to drop-down and add two values -> Save

@rogyar
Copy link
Contributor

rogyar commented Oct 15, 2020

Hi @shikhamis11. Yes, that's right. Not literally all the steps. For example, you may use a fixture for product creation instead of adding it, etc. See the following example that shows fixtures in action

<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>

<createData entity="BaseConfigurableProduct" stepKey="createConfigProduct">

Hope it's helpful

@engcom-Hotel engcom-Hotel self-assigned this Oct 16, 2020
@engcom-Hotel
Copy link
Contributor

Will help with tests.

@engcom-Hotel
Copy link
Contributor

Hi @shikhamis11 . I can't add MFTF to your changes. Could you please allow changes to a pull request branch using the following steps:
https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork
Thank you.

@shikhamis11
Copy link
Member Author

@engcom-Hotel, there is no option for me to allow edits from maintainers , may be It's because I am using the fork repository of my organisation

@engcom-Hotel
Copy link
Contributor

Hello @shikhamis11 .
Please review the test and add it then.
MFTF_coverage_has_been_added_.zip
Thank you.

@shikhamis11
Copy link
Member Author

@engcom-Hotel I have added MFTF test provided by you
Thanks

@engcom-Hotel
Copy link
Contributor

@magento run all tests

@engcom-Hotel
Copy link
Contributor

Hello @shikhamis11 .
Could you please update the title of the test to make Stories + title combination unique.
Thank you.

@ghost ghost added the Severity: S1 Affects critical data or functionality and forces users to employ a workaround. label Oct 22, 2020
…tribute

Updated Mftf Test title stories and description
@shikhamis11
Copy link
Member Author

@magento run all tests

@rogyar rogyar added Award: test coverage Auto-Tests: Covered All changes in Pull Request is covered by auto-tests labels Oct 27, 2020
@rogyar
Copy link
Contributor

rogyar commented Oct 27, 2020

@shikhamis11. Thank you for providing the test. Just a suggestion. Next time, please, use action groups only for creating an MFTF test. It's part of the best practices and allows us to create reusable test actions instead of hardcoding them into the test body.

Thank you!

@magento-engcom-team
Copy link
Contributor

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

@engcom-Bravo
Copy link
Contributor

✔️ QA Passed

Manual testing scenario

  1. Go to Catalog -> Products -> Add New Product
  2. Click on the "Add Attribute" button (Upper right corner)
  3. Click on the "Create New Attribute" button
  4. Close the opened window
  5. Click on the "Create New Attribute" button again
  6. Close the opened window
  7. Click on the "Create New Attribute" button again
  8. Enter "Attribute Label", set the type to drop-down and add two values -> Save

Actual Result:
The Attribute is created and added to the Product. No error messages appear in dev console
attribute_created
Peek 2020-10-27 14-04

@engcom-Bravo engcom-Bravo added the QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope label Oct 27, 2020
@gabrieldagama
Copy link
Contributor

@magento run all tests

@m2-assistant
Copy link

m2-assistant bot commented Nov 13, 2020

Hi @shikhamis11, 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
Area: Frontend Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: test coverage Component: Catalog Component: Ui Event: dmcdindia2020 Partner: Cedcommerce partners-contribution Pull Request is created by Magento Partner Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S1 Affects critical data or functionality and forces users to employ a workaround. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

An empty window opens after the second click of the "Add Attribute" button
8 participants