Problem/Motivation
Spin off from #2809533: Convert AJAX part of \Drupal\system\Tests\Ajax\FrameworkTest to JavascriptTestBase
While converting tests it turned out that 'stylesheets-remove' wasn't removing css files at all. There is existing test coverage for this, but when this is updated to work properly, this breaks too.
The file was removing a non existing file but the test was using assertNoText which doesn't look at tag attributes so that was always going to pass, negative assertions--
Proposed resolution
Figure out why the BrowserTestBase tests break and either update those or fix the functionality
Fix the test
Remaining tasks
Figure out what the problem is.
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#8 | 3006625-8.patch | 1.62 KB | Lendude |
#8 | interdiff-3006625-4-8.txt | 1.02 KB | Lendude |
#4 | 3006625-4.patch | 1.46 KB | Lendude |
#4 | interdiff-3006625-2-4.txt | 408 bytes | Lendude |
#2 | 3006625-2.patch | 937 bytes | Lendude |
Comments
Comment #2
LendudeThis should pass, but doesn't.... this might be a problem in how the test is set up and not a bug, but we need to figure out which it is.
Comment #3
LendudeComment #4
Lendudethis seems to work better, which indicates that its just the coverage that is broken.
Comment #6
Lendudeupdated IS with the findings
Comment #7
borisson_Not sure why the question mark here is needed in the filename? Otherwise this is looking great.
Comment #8
Lendude@borisson_ fair question :)
Stole that from \Drupal\system\Tests\Ajax\FrameworkTest (which led me to this test)
// We add a "?" to the assertion, because drupalSettings may include
// information about the file; we only really care about whether it appears
// in a LINK or STYLE tag, for which Drupal always adds a query string for
// cache control.
Added the comment and took out the assertion message which isn't a thing in that assertion
Comment #9
borisson_Awesome, thanks for making that clear.
Comment #11
lauriiiCommitted 9c98f29 and pushed to 8.7.x. Thanks!
Comment #13
alexpottAs a test-only fix backported to 8.6.x and also to backport #2809533: Convert AJAX part of \Drupal\system\Tests\Ajax\FrameworkTest to JavascriptTestBase