-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Admin Grid Mass action Select / Unselect All issue #9610 #9611
Conversation
Admin Grid Mass action Select / Unselect All issue magento#9610
hi @minesh0111 thanks for your contribution. Quick question with your new implementation wouldn't this result in an additional load of the ids in the case that the massaction is the primary key? EDIT: disregard my comment - it looks like the clear() and different collection is already in the existing implementation. |
There are a couple of unit test failures in relation to the changes you made as outlined here - would you mind taking a look to see if you can get them updated to the new code? |
can someone guide me on The Travis CI build failed report and how to solve it ? |
@fooman i am new to unit test can you guide me to fix that ? |
Have a look at the failing test class and method
http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-test.html Tests can be hard to get your head around initially, but once you understand how phpunit is configured it really opens up doors and improves robustness of code. You can see the directories specified for unit testing here: https://github.com/magento/magento2/blob/develop/dev/tests/unit/phpunit.xml.dist#L14 (I don't work for magento, this just popped up on my feed) |
@convenient thanks for your feedback. yes i need to understand unit test first then will go for magento unit test. do we need to create unit test our self or PHP unit test will do this job ? |
There is already a test in place covering the area you changed I believe. Your changes tripped it up as they're a change in functionality which is now causing them to fail. You'll need to
|
@convenient do i need to make another pull request for same ? |
You should push up into the same branch. All code changes to make your feature work, as well as going green in the unit tests, should be in this Pull Request. 👍 |
@convenient All checks have passed 👍 |
good work @minesh0111 and thanks @convenient for helping out. @minesh0111 do you have a minimal example module that could be used to verify your changes? |
@fooman if a separate module is required for testing then I'll need to create a new one, because I had integrated the code in the existing files and not in a new module. Please let me know |
@minesh0111 looks good - nothing further needed for now. We'll be running a few more tests internally on this and get back to you. One question: do you see any reason why this change should not also be applied to |
@fooman yes you are right. i will update for |
@fooman Done for |
thanks @minesh0111 - the travis issue seems to have been some date issue. A rerun solved it. I'll progress your PR along and keep you posted. |
@minesh0111 unfortunately bad news - there is another failure coming from this functional test https://github.com/magento/magento2/blob/develop/dev/tests/functional/tests/app/Magento/PageCache/Test/TestCase/CacheStatusOnScheduledIndexingTest.php with this patch in place - I have requested some more info and will post back here when I know more. |
@fooman this commit going crazy now. can you point me on this. how can i test this functional test ? |
@minesh0111 I understand the frustration. You unfortunately picked a component (grids) which is used all over Magento so we need to make sure that the introduced changes don't break anything. @ishakhsuvarov do you mind providing some more guidance on what actually failed in the mentioned test? |
@ishakhsuvarov, @fooman any updates on this commit ? |
@minesh0111 Okay I found the culprit. With your changes applied when you head to System > Index Management the Select all, etc do not work any more. The problem comes from here. So Magento sometimes seems to set the MassactionIdField on the parent grid block and sometimes directly on the massaction block. One thing we could try is to change
to
and then we'll see how we go. |
@fooman updated as suggested. |
Thanks @minesh0111 for getting the build green again. I'll keep you posted. |
Thanks @minesh0111 for persevering - your contribution has been merged. |
Thanks @fooman, @magento-team, @convenient and all who helped me in this contribution |
Admin Grid Mass Action
Select All
andUnselect All
work only onprimary_key
of collection object no matter if we set other field as mass action field using grid methodsetMassactionIdField
other thanprimary_key
Preconditions
Steps to reproduce
primary_key
of collection.Expected result
Select All
andUnselect All
on click of optionMassactionIdField
on submitActual result
checked
andunchecked
not working on click of optionprimary_key
value of collection on submit