mardi 7 août 2018

Grails compile .gsp to .html from gradle/command line

Is there any way that I can compile a gsp view into an html given a provided model from a groovy script without having to run all the Grails application?

The use case is that due to client demands we have to use Javascript/jQuery to create the front-end of the application. We've already had the architecture definition, but we're having issues creating integration front-end tests since our front-end composes of .gsp, javascript and css, all componentized. For instance: Button may have a .gsp a .js and a .css associated to it.

Ideal solution to create front-end component integration tests: Have the .gsp compiled into html before the tests run so we can run the assertions in the *.test.js files. Since we don't need database, services or other instances to compile the .gsp, no need for the application to be running, avoiding the time to boot up the app.

Thanks in advance!

Aucun commentaire:

Enregistrer un commentaire