Open azavisha-snap opened 3 years ago
This is a very big problem that broke most of our functional tests after upgrading to Grails 3.
I believe the issue is that the following line does not do what it is supposed to in integration/functional tests:
assets "com.bertramlabs.plugins:less-asset-pipeline:2.15.1"
Replacing the assets
scope/configuration with runtime
like so seems to help:
runtime "com.bertramlabs.plugins:less-asset-pipeline:2.15.1"
Adding testCompile "com.bertramlabs.plugins:less-asset-pipeline:2.15.1"
works
Steps to reproduce:
assets "com.bertramlabs.plugins:less-asset-pipeline:2.15.1"
to dependencies in build.gradleassets/stylesheets/application.css
toassets/stylesheets/application.less
<asset:stylesheet src="application.less"/>
inmain.gsp
layoutintegrationTest
gradle taskExpected result:
Actual result:
asset:stylesheet
tag does not generate a stylesheet link on the page/assets/application.css
is not foundNote that everything works fine in
bootRun
mode. The issue is only with functional tests.Tried versions of asset-pipeline from 2.15.1 to 3.2.4. Same result in all of them.