You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running integration tests with a fresh Grails 6.2.2 project built using Grails Forge, there should be no warnings in the console when the website is opened and all assets (like jquery etc.) are loaded.
The last known version where this worked as expected was Grails 6.1.1.
Actual Behaviour
When running integration tests with a fresh Grails 6.2.2 project built using Grails Forge, there when the website is opened, the following warnings are logged to the browser's console:
Loading failed for the <script> with source “http://localhost:64114/assets/jquery-3.5.1.min.js?compile=false”. [localhost:64114:184:81](http://localhost:64114/)
Loading failed for the <script> with source “http://localhost:64114/assets/popper.min.js?compile=false”. [localhost:64114:185:75](http://localhost:64114/)
Loading failed for the <script> with source “http://localhost:64114/assets/bootstrap.js?compile=false”. [localhost:64114:186:74](http://localhost:64114/)
Loading failed for the <script> with source “http://localhost:64114/assets/application.js?compile=false”. [localhost:64114:187:76](http://localhost:64114/)
Also, any JavaScript code included in the assets is NOT executed.
Steps To Reproduce
Reproduction Steps
Locally check out minimal reproducible example
Execute in a terminal window: ./gradlew clean -Dgeb.env=firefox integrationTest
As soon as the Firefox browser window opens, open the browser's console
The warnings Loading failed for the <script> with source... appear
Workaround
Cancel test execution in the terminal window
Execute in a terminal window: ./gradlew bootRun
Open the URL in the browser (can be any browser, even in an incognito window)
No warnings appear in the console.
Cancel bootRun in the terminal window
Execute in a terminal window: ./gradlew -Dgeb.env=firefox integrationTest (withoutclean!)
As soon as the Firefox browser window opens, open the browser's console
No warnings are visible.
Step 3 (opening the URL in the browser) is essential, when going through the steps of the workaround WITHOUT opening the URL in the browser, the warnings still appear.
When running ./gradlew clean -Dgeb.env=firefox integrationTest (with clean) the bug is reproducible again.
How the provided minimal reproducible example was created
In src/integration-test/groovy/com/example/DemoSpec.groovy, add Thread.sleep(500000) after the line go '/' (this ensures the browser stays open long enough to check the console)
In build.gradle, change geckodriver '0.33.0' to geckodriver '0.35.0' to be able to run the tests using the latest Firefox version
The text was updated successfully, but these errors were encountered:
martinfrancois
changed the title
Assets are not compiled when running integration tests with Grails 6.2.2
Loading of assets fails when running integration tests with Grails 6.2.2
Dec 21, 2024
Expected Behavior
When running integration tests with a fresh Grails 6.2.2 project built using Grails Forge, there should be no warnings in the console when the website is opened and all assets (like jquery etc.) are loaded.
The last known version where this worked as expected was Grails 6.1.1.
Actual Behaviour
When running integration tests with a fresh Grails 6.2.2 project built using Grails Forge, there when the website is opened, the following warnings are logged to the browser's console:
Also, any JavaScript code included in the assets is NOT executed.
Steps To Reproduce
Reproduction Steps
./gradlew clean -Dgeb.env=firefox integrationTest
Loading failed for the <script> with source...
appearWorkaround
./gradlew bootRun
bootRun
in the terminal window./gradlew -Dgeb.env=firefox integrationTest
(withoutclean
!)Step 3 (opening the URL in the browser) is essential, when going through the steps of the workaround WITHOUT opening the URL in the browser, the warnings still appear.
When running
./gradlew clean -Dgeb.env=firefox integrationTest
(withclean
) the bug is reproducible again.How the provided minimal reproducible example was created
src/integration-test/groovy/com/example/DemoSpec.groovy
, addThread.sleep(500000)
after the linego '/'
(this ensures the browser stays open long enough to check the console)build.gradle
, changegeckodriver '0.33.0'
togeckodriver '0.35.0'
to be able to run the tests using the latest Firefox versionEnvironment Information
Example Application
https://github.com/martinfrancois/grails-622-bug-repro
Version
6.2.2
The text was updated successfully, but these errors were encountered: