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.
I ran the test locally (on top of Drupal 9.2) and it failed as well on a clean install.
The error is: The string "<a href="http://drupal.local/sites/simpletest/81722527/files/2021-08/image-test.png" type="image/png; length=125">image-test.png</a>" was not found anywhere in the HTML response of the current page. whereas the actual string is <a href="http://drupal.local/sites/simpletest/81722527/files/2021-08/image-test.png" type="image/png">image-test.png</a> so I am guessing that this could be linked to the Media changes that we are seeing in core?
update the test string to <a href="http://drupal.local/sites/simpletest/81722527/files/2021-08/image-test.png" type="image/png">image-test.png</a> (the actual string from the test)
did some digging. these assertions go back a very long time, seems to be part of the very first version of that test that one of our first ever students did, that was before john was working for us, although he did work on that test once as well
I would propose that we simplify that and just assert for the image url, we don't have to test core markup that not even core itself was testing for.
Comments
Comment #2
mathilde_dumond CreditAttribution: mathilde_dumond at MD Systems GmbH commentedComment #3
mathilde_dumond CreditAttribution: mathilde_dumond at MD Systems GmbH commentedRelated core issue -> https://www.drupal.org/project/drupal/issues/2991219
Comment #4
mathilde_dumond CreditAttribution: mathilde_dumond at MD Systems GmbH commentedProblem/Motivation
Creating this issue after a test fail here https://www.drupal.org/pift-ci-job/2155358 on ParagraphsAdministrationTest.
I ran the test locally (on top of Drupal 9.2) and it failed as well on a clean install.
The error is:
The string "<a href="http://drupal.local/sites/simpletest/81722527/files/2021-08/image-test.png" type="image/png; length=125">image-test.png</a>" was not found anywhere in the HTML response of the current page.
whereas the actual string is<a href="http://drupal.local/sites/simpletest/81722527/files/2021-08/image-test.png" type="image/png">image-test.png</a>
so I am guessing that this could be linked to the Media changes that we are seeing in core?From https://www.drupal.org/pift-ci-job/2155358 I see that the last success was in May and 8.9 got some changes in the meantime.
Steps to reproduce
Proposed resolution
update the test string to
<a href="http://drupal.local/sites/simpletest/81722527/files/2021-08/image-test.png" type="image/png">image-test.png</a>
(the actual string from the test)Comment #5
Berdirdid some digging. these assertions go back a very long time, seems to be part of the very first version of that test that one of our first ever students did, that was before john was working for us, although he did work on that test once as well
I would propose that we simplify that and just assert for the image url, we don't have to test core markup that not even core itself was testing for.
Comment #6
sleitner CreditAttribution: sleitner commentedComment #8
sleitner CreditAttribution: sleitner commentedComment #9
sleitner CreditAttribution: sleitner commentedComment #10
sleitner CreditAttribution: sleitner commentedReplaced some asserts with more general ones to fit with both Drupal 8 and 9.
There is currently a problem in search_api which leads to the failure with Mysql 5.5: https://www.drupal.org/project/search_api/issues/3247781
Comment #11
sleitner CreditAttribution: sleitner commentedComment #12
alexpottThese are button texts... at least the positive assertion could be
$this->assertSession()->buttonExists('Add paragraph_type_test');
Comment #13
alexpottLike this.
Comment #15
alexpottWhoops
Comment #18
BerdirWell, that's at least some green :)
Will update the test configuration after this to more recent PHP versions and D9 only.
I don't bother updating test dependencies, it doesn't work in patches and merge requests anyway. Committed without that part.