Building further on top of the existing Test Cases in the file block_class.test and following up with #2639340: Menu Block integration: Missing text field for Adding Menu Block, I just realized there were no Automated Test Cases yet, to enforce compatibility and check from code whether the integration of Block Class with Views would work as expected:

Test Cases:

  • Enable a default/existing view, preferably with a block, the Archive view, for example.
  • Create some data for the Views block to display.
  • Display the Views Archive Block in the content region.
  • Run the standard tests on the default Archive view block configured previously.

 
Please let me know if you would have any questions, objections, comments, suggestions, recommendations or concerns on any aspects of this task, I would be glad to provide more information or explain in more details.

Any questions, feedback, testing, changes, ideas or recommendations would be highly appreciated.
Thanks to all in advance.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DYdave created an issue. See original summary.

DYdave’s picture

Status: Active » Needs review
FileSize
2.31 KB

Quick follow-up on this task:

Modified the file block_class.test to add a new Test Case Class, called BlockClassViewsTestCase which performs the tests described in the issue summary:

As it was done for #1940122-24: Block Class doesn't work with Context, the tests rely on BlockClassUpdateDisplayTestCase by way of inheritance. The new test class (BlockClassViewsTestCase) only mostly implements a setUp to build the necessary and relevant environment for standard tests to run.

The default Archive view is programmatically enabled (pretty suitable for testing since it is disabled and provides a block display by default) based on the code sample provided at #820110-1: disable a view programmatically -- possible?.
The View: Archive block is then configued to display in the content region of the default theme (Bartik).
Lastly a single node is programmatically created to ensure the block can display some basic data.

Please find attached to this comment a patch against block_class-7.x-2.x at 43978a6, which implements the changes detailed above to fix this issue.
File attached as: block_class-views-integration-2699409-2.patch.

Feel free to let me know if you would have any questions, objections, concerns, or issues, on the patch, suggested approach or the module in general, I would surely be glad to provide more information or explain in more details.

Thanks again very much for your interest, testing/reporting this issue and in advance to all for your testing, comments and reviews.
Cheers!

  • DYdave committed d08ec9c on 7.x-2.x
    Issue #2699409 by DYdave: Added automated Test Case for Block Class...
DYdave’s picture

Status: Needs review » Fixed

Alright, since the tests passed, I went ahead and got the patch from #2 committed against block_class-7.x-2.x at d08ec9c.

Therefore, I allowed myself to mark this issue as Fixed for now, but feel free to re-open it, or post a new ticket, at any time if you have any further objections with the approach suggested in this ticket or related commit (we would surely be happy to hear your feedback).

Please let me know if you would have any further comments, feedback, questions, issues, objections, suggestions or concerns on this comment or this ticket in general, we would be glad to provide more information or explain in more details.

Many thanks to everyone for your great help, reviews, testing/reporting, feedback and comments on this issue.
Cheers!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.