How can I get all JS files name of my application ?
I tested :
@Inject
private ClientInfrastructure javascriptStack;
void onActivate(){
mesJavaScripts=javascriptStack.getJavascriptStack();
for(Asset javascript : mesJavaScripts){
System.out.println(javascript.toString());
}
}
But I do not have all the JS. Do I use the good service ?
Thanks
I still don’t follow the need here; the question of whether necessary JS files are included in the response is an integration test issue; you can determine this using PageTester (by walking the returned DOM) or in Selenium (again, by walking the client DOM).
In fact, ideally (and this is difficult) you could write tests, in Selenium, that only pass if the necessary JS is in place.
Given that Tapestry will, in production mode, aggregate your scripts together into JS stacks (and that may change in some way in 5.3) you are testing state rather than behavior. Always test behavior.