Karma: add html and css files in graphics, add 'text' module

The previous commit broke tests because the html templates are in
separate files now, and there was no pattern in karma configuration
for them.  Also text module needs to be added manually to the
requirejs configuration.

Also, make the patterns in karma configuration consistent.