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.
In reviewing other code, I have noticed that the "warnfix" parameter does not always work. We should add a test for this in both the D7 & D8 tests.
The test should create a node, open the URL node/1?amp&warnfix
, and test for the following text:
AMP-HTML Validation Issues and Fixes
-------------------------------------
PASS
Comment | File | Size | Author |
---|---|---|---|
#8 | 2745071-8-d7-warnfix-text.patch | 1.86 KB | mtift |
#8 | 2745071-8-d7-interdiff.txt | 893 bytes | mtift |
#4 | 2745071-4-d8-warnfix-text.patch | 2.4 KB | mtift |
Comments
Comment #2
mtiftComment #3
mtiftThis issue revealed that our previous tests were not actually testing AMP pages, so I added a few other other things to test that the warnfix test is working (which, I'd say is a good thing).
Comment #4
mtiftAnd here's the D8 version.
Comment #5
RainbowArrayTested the D7 test. Tests are passing. Code review looks good.
Comment #6
RainbowArrayI wonder about the bit about testing whether My Account is present on the non-amp vs amp page. That would depend on which blocks are placed in the theme. Is that something we need to test for the module?
Comment #7
RainbowArrayTested the D8 version. You need to have composer_manager downloaded (but not necessarily enabled) for this test to work. That feels a little strange since we don't require Composer Manager for the module itself. Not sure what to do about that since presumably that is necessary for the AMP library to work with the test suite.
Comment #8
mtiftRegarding the Drupal 7 version...
- I'm fine removing the My account tests, since that was mostly for testing the tests
- The tests pass with composer_manager and fail without it. So unless you have another suggestion, I'm going to leave that part in
Updated patches attached
Comment #9
mtiftAnd I guess there is nothing to change with the D8 patch
Comment #10
RainbowArrayLooks good ahead. Let's get these in.
Comment #13
mtiftThanks, Marc. Pushed to 7.x-1.x and 8.x-1.x.
Comment #15
mtift