- Issue created by @bgreco
- Merge request !104Issue #3421243 by bgreco, Grevil, Anybody: Aggregated JS knocked out → (Merged) created by bgreco
- Status changed to Needs review
about 1 year ago 9:19pm 13 February 2024 - 🇩🇪Germany Anybody Porta Westfalica
Thanks @bgreco! Good finding! This makes sense to me, but I'd like to ensure it works using FunctionalJavascriptTests.
Could you please add a simple test, based on the existing, which fails with the current implementation and succeeds with the new one?
I'm also fine to test, if the script is present separately or something like that.@Grevil: Could you perhaps test this manually by time?
I enabled JS aggregation for some tests, and that seems to be enough. The updated tests fail without this fix, and pass again with it.
- Assigned to Grevil
- 🇩🇪Germany Anybody Porta Westfalica
Thanks @bgreco that looks great!
Wouldn't it perhaps make sense to test both: With and without aggregation enabled? So we should perhaps better have 2 tests calling a helper method?
// Test that scripts are knocked out even when JS aggregation is enabled. $this->config('system.performance')->set('js.preprocess', TRUE)->save();
@Grevil what do you think?
- Issue was unassigned.
- First commit to issue fork.
- 🇩🇪Germany Grevil
Alright, I added some js aggregation tests on submodules, where I could easily just copy the pre-existing "testXXXJsCorrectlyKnocked" test and add a
$this->config('system.performance')->set('js.preprocess', TRUE)->save();
in front of it.Additionally, I threw in some automatic phpcs fixes for good measures (and to make the MR unreadable :P).
- 🇩🇪Germany Grevil
As these tests nor the phpcs fixes require a big review (since @Anybody and I already reviewed the core functionality), I'll just merge em, when the tests succeed.
LGTM!
- Status changed to RTBC
about 1 year ago 12:10pm 21 February 2024 - Status changed to Needs review
about 1 year ago 12:13pm 21 February 2024 - Status changed to Fixed
about 1 year ago 12:50pm 21 February 2024 - 🇩🇪Germany Grevil
Created a new release: https://www.drupal.org/project/cookies/releases/1.2.9 → .
Automatically closed - issue fixed for 2 weeks with no activity.