Problem/Motivation

In the process of working on #1806334: Replace the node listing at /node with a view, we're discovering that a lot of automated tests make all kinds of assumptions about the default frontpage listing, including that node will always be available (despite that the node module is not required), that the front page will always be node (despite that it's configurable) and that the page is formatted in a certain way (causing problems along the lines of those that blocked #823380: Read More link is always visible on teaser. forever). This is bad for DX, slows down tests, and makes it really difficult to swap out Drupal's default front page.

See background in issues:

Proposed resolution

  • Decouple tests from the node module (and specifically the front page listing) where appropriate.
  • Change tests on a case-by-case basis, because each change should probably be reviewed separately, we don't want to accidentally remove coverage, and smaller changes will be less disruptive (plus easier to merge in for #1806334: Replace the node listing at /node with a view).
  • In some cases, if all that is needed is a valid response, the new test_page_test module can be added as a dependency, and the test-page path can be substituted (either in a direct request, or configured as the front page).
  • In other cases, the node module can be added as an explicit dependency when the node listing is actually being used for more than just a test request.
  • Some of the tests will need more involved solutions.

Issues

Comments

Lars Toomre’s picture

Note that #1797200-6: Remove t() from assertion messages in node.module tests which completes the removal of t() from Node test assert messages is still awaiting review. I am not sure what Node Tests may be moved around here to other modules, but please check t() wrapping of test assert messages for anything that gets moved. Thanks.

xjm’s picture

This is me you're talking to. ;)

xjm’s picture

Issue summary: View changes

Updated issue summary.

Lars Toomre’s picture

*smiles* I know that @xjm. However, you created this as a meta issue so there could well be someone else decides to move a existing test to say the User module. Hence, I added my comment. Keep up your great work!

sun’s picture

Title: [META] Decouple many automated tests from the node module » [meta] Decouple tests from Node module
Issue tags: +Testing system
sun’s picture

Issue summary: View changes

Updated issue summary.

xjm’s picture

Issue summary: View changes

Updated issue summary.

xjm’s picture

Issue summary: View changes

Updated issue summary.

xjm’s picture

Issue summary: View changes

Updated issue summary.

xjm’s picture

Issue summary: View changes

.

xjm’s picture

Issue summary: View changes

.

xjm’s picture

Issue summary: View changes

Updated issue summary.

xjm’s picture

Issue summary: View changes

Updated issue summary.

xjm’s picture

Issue summary: View changes

Updated issue summary.

xjm’s picture

Issue summary: View changes

Updated issue summary.

xjm’s picture

Issue summary: View changes

Updated issue summary.

xjm’s picture

Status: Active » Fixed

So everything in this other than #1541298: Remove Node module dependency from Testing profile and #1847540: [META] Clean up comment module tests and decouple from node is long since fixed -- retroactively marking this fixed as well.

Status: Fixed » Closed (fixed)

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