I’m writing a selenium test using the Play! Framework and some tests have common bits. I want to pull those common bits out into a Play! tag. In production code, tags would live under app/views/tags. However, where would a tag live to be only seen by test templates?
I tried putting my tag under test/tags and test/views/tags, but both ways resulted in the error:
The template tags/Login.html or tags/Login.tag does not exist.
If I put the tag under app/views/tags it works fine. But obviously this tag is for testing purposes only.
Tags must be under app/views/tags (any subfolder of it), otherwise Play won’t get them. You canc reate this path: app/views/tags/testing and put in there the test-only tags, so developers know not to use them.
To use a tag Demo in that folder use:
If you want to disable them in production (for extra safety) check this api. Add to your tag something like: