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

comments & validation added in cookie configuration #26886

Conversation

ajithkumar-maragathavel
Copy link
Contributor

@ajithkumar-maragathavel ajithkumar-maragathavel commented Feb 15, 2020

Description (*)

Go to Stores -> Settings -> Configuration -> General -> Web and expand Default Cookie Settings section.

  1. Added comments to each field for a better understanding of the admin user.
  2. Added number validation for cookie lifetime field to make sure it only accepts numbers.

Manual testing scenarios (*)

  1. Given string characters in the cookie lifetime field and verify number validation is working
  2. Verify the comments are displayed under each field of the section.

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)

@m2-assistant
Copy link

m2-assistant bot commented Feb 15, 2020

Hi @ajithkumar-maragathavel. 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

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

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 @ajithkumar-maragathavel. Thank you for providing this change. I would kindly ask you to cover the validation process using an MFTF test.

Please, follow the best practices for functional tests described here

@ajithkumar-maragathavel
Copy link
Contributor Author

@rogyar I will cover the changes with the MFTF test and will commit the changes and let you know.
Thanks for the review.

@engcom-Echo engcom-Echo self-assigned this Feb 25, 2020
@ajithkumar-maragathavel
Copy link
Contributor Author

@rogyar I have covered the validation using the MFTF test. Please review it and share your suggestions.

@rogyar
Copy link
Contributor

rogyar commented Apr 20, 2020

Hi @ajithkumar-maragathavel. Thank you for covering the solution with MFTF test, great job!

There's one more improvement that we can bring here. In the test, you've covered only the negative scenario (putting invalid value to the field). We may also introduce a positive scenario. So the steps will be the following:

  • Go to settings, fill the field with an incorrect value
  • Assert that the validation error is present
  • Fill the field with the correct value
  • Assert that there's no validation error.

Thank you!

@ajithkumar-maragathavel
Copy link
Contributor Author

Hi @ajithkumar-maragathavel. Thank you for covering the solution with MFTF test, great job!

There's one more improvement that we can bring here. In the test, you've covered only the negative scenario (putting invalid value to the field). We may also introduce a positive scenario. So the steps will be the following:

* Go to settings, fill the field with an incorrect value

* Assert that the validation error is present

* Fill the field with the correct value

* Assert that there's no validation error.

Thank you!

@rogyar Thanks for the review. I will also cover the positive scenario.
Just have one doubt. Please clarify me.

The assertion should be written as a separate action group. Right?

@ajithkumar-maragathavel
Copy link
Contributor Author

@rogyar I have also covered the positive case scenario for the cookie lifetime save operation in Magento admin. Please review it.

@rogyar rogyar added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: MFTF test coverage labels Apr 26, 2020
@magento-engcom-team
Copy link
Contributor

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

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Before:
Screenshot from 2020-04-27 09-15-01

After:
Screenshot from 2020-04-27 09-21-03

@engcom-Echo
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests EE

@engcom-Echo
Copy link
Contributor

Failed functional tests not related to the changes in this PR

@slavvka slavvka added this to the 2.4.0 milestone Apr 27, 2020
@slavvka slavvka added Priority: P3 May be fixed according to the position in the backlog. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Apr 27, 2020
@magento-engcom-team magento-engcom-team merged commit efdd8a8 into magento:2.4-develop Apr 29, 2020
@m2-assistant
Copy link

m2-assistant bot commented Apr 29, 2020

Hi @ajithkumar-maragathavel, 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 Award: MFTF test coverage Component: Cookie Partner: Ziffity partners-contribution Pull Request is created by Magento Partner Priority: P3 May be fixed according to the position in the backlog. Progress: accept Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants