Skip to content

ui select list visible even though it is disabled #27896

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

Mohamed-Asar
Copy link
Contributor

@Mohamed-Asar Mohamed-Asar commented Apr 19, 2020

Description (*)

This PR fixes the following bug,
If we disable the UI select component by using this.disabled(true). still its options are visible when we click it. please see the below image for reference.

Before:

before

After:

after

Manual testing scenarios (*)

Navigate to the product edit page.
Disable any one of the UI select using the following code (this.disabled(true))
Now click the UI select, list options are not visible anymore when it's disabled

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)

Resolved issues:

  1. resolves [Issue] ui select list visible even though it is disabled #29098: ui select list visible even though it is disabled

@m2-assistant
Copy link

m2-assistant bot commented Apr 19, 2020

Hi @Mohamed-Asar. 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.

@Mohamed-Asar Mohamed-Asar changed the title Bug fix ui select list visible eventhough it is disabled ui select list visible even though it is disabled Apr 19, 2020
@Mohamed-Asar
Copy link
Contributor Author

@lenaorobei please review it.

@Mohamed-Asar
Copy link
Contributor Author

@magento run Functional Tests CE

Copy link
Contributor

@lenaorobei lenaorobei left a comment

Choose a reason for hiding this comment

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

Hi @Mohamed-Asar. From the description it is hard to understand the actual issue and and the value of fix. Could you please provide more information?

@Mohamed-Asar
Copy link
Contributor Author

Hi, @lenaorobei I have updated the issue description. please check. let me know if you need more information.

@Mohamed-Asar Mohamed-Asar requested a review from lenaorobei May 21, 2020 15:53
@engcom-Echo
Copy link
Contributor

engcom-Echo commented Jun 3, 2020

Hi @Mohamed-Asar.
Could you please cover these changes with autotests.
It is required according to the Definition of Done

@engcom-Charlie
Copy link
Contributor

Hi @Mohamed-Asar, I'm closing this PR now due to inactivity.
Please reopen and update if you wish to continue.
Thank you for your collaboration.

@m2-assistant
Copy link

m2-assistant bot commented Jun 25, 2020

Hi @Mohamed-Asar, 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.

@Mohamed-Asar
Copy link
Contributor Author

@engcom-Charlie Please re-open this PR

@engcom-Echo I could n't able to cover mftf for this case. because this issue exists only when the ui-select dropdown is disabled, Not able to disable the ui-select by mftf.

@m2-assistant
Copy link

m2-assistant bot commented Jun 30, 2020

Hi @Mohamed-Asar. 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.

@VladimirZaets
Copy link
Contributor

@magento create issue

@Mohamed-Asar
Copy link
Contributor Author

Hi @gabrieldagama, I couldn't able to cover MFTF for this issue. Which tests do I need to cover?

@gabrieldagama
Copy link
Contributor

Hi, @Mohamed-Asar I think we can use MFTF tests to make sure when the user clicks on the select, if the field is disabled the underneath window doesn't open, what do you think?

@engcom-Echo engcom-Echo self-assigned this Sep 1, 2020
@engcom-Echo
Copy link
Contributor

Hi, @Mohamed-Asar. It may be easier for you to cover this with Jasmine test.
Look file dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/form/ui-select.test.js

@Mohamed-Asar
Copy link
Contributor Author

@engcom-Echo Sure Will do.

@Mohamed-Asar
Copy link
Contributor Author

@magento run all tests

@Mohamed-Asar
Copy link
Contributor Author

@engcom-Echo @gabrieldagama covered this change with the jasmine test. please review

Copy link
Contributor

@gabrieldagama gabrieldagama 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 @Mohamed-Asar, the changes are approved.

@magento-engcom-team
Copy link
Contributor

Hi @gabrieldagama, thank you for the review.
ENGCOM-8152 has been created to process this Pull Request
✳️ @gabrieldagama, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@engcom-Alfa engcom-Alfa self-assigned this Sep 8, 2020
@engcom-Alfa engcom-Alfa added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Sep 8, 2020
@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Manual testing scenario:

  1. Navigate to the product edit page;
  2. Disable any one of the UI select using the following code:
this.disabled(true);
  1. Now click on the UI select;

Before: ✖️ after disabling the options are still visible

Peek 2020-09-08 12-29

After: ✔️ list options are not visible anymore when it's disabled

Peek 2020-09-08 12-57

@m2-assistant
Copy link

m2-assistant bot commented Sep 9, 2020

Hi @Mohamed-Asar, 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 Component: Ui 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 QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Risk: low Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Issue] ui select list visible even though it is disabled
8 participants