Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Provide updated test case for Views Exposed filter for when the exposed block is turned off. Testing that the exposed block disappears but the attach filter appears.
Original Post
Follow-up from #2078217: [meta] Write tests for deleting blocks provided by derivatives.
If you have your exposed filters exposed as a block, and then you change the view to no longer provide them as blocks, you get a nice exception.
Comment | File | Size | Author |
---|---|---|---|
#21 | 2078305-21.patch | 1.19 KB | Nikhil_110 |
#20 | 2078305-nr-bot.txt | 144 bytes | needs-review-queue-bot |
#18 | 2078305-18.patch | 1.23 KB | smustgrave |
Comments
Comment #1
tim.plunkettComment #3
dawehnerI guess we should go with the proper solution of #2031859: Invoke an event[s] when a plugin ID disappears but +1 for the test coverage.
Comment #15
darvanenDiscussed as part of the Bug Smash Initiative (#bugsmash in slack), suspected as no longer a bug.
I tested manually to determine whether issue still exists following the steps to reproduce in the IS.
I tried it both with placing the block and not placing it and could trigger any errors or strange behaviour by switching the exposed filter on and off again.
@quietone suggested it would be nice to keep the test, so switching to a task to get that done.
Comment #16
smustgrave CreditAttribution: smustgrave at Mobomo commentedAttaching a reroll
Assuming the initial patch was testing when a views exposed block is turned off and on does the block get removed from the page.
Comment #17
quietone CreditAttribution: quietone at PreviousNext commentedThanks for updating the test!
I ran the test locally and looked at the html output. I didn't see any pages where the exposed block was not visible. I then looked at the code and the new test is not running. I modified it to run and still did not see the exposed block removed.
Looking at the dataprovider for the test method, $display is never 'page_display'. It should be 'page_1'
Drupal doesn't use messages in assertions unless needed because the assertion is in a loop.
I moved the lines that created this result to before the new test added here. This result is also zero before the exposed block is disabled.
Comment #18
smustgrave CreditAttribution: smustgrave at Mobomo commentedAddressed the issues in #17
And provided an updated issue summary to the best of my ability
Comment #20
needs-review-queue-bot CreditAttribution: needs-review-queue-bot as a volunteer commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #21
Nikhil_110 CreditAttribution: Nikhil_110 at Srijan | A Material+ Company commentedAttached patch against Drupal 9.5.x
Patch #18 is not applied for Drupal 9.5.x so Inter-diff file is not added.