Closed jb-int closed 7 years ago
Hey,
This is something I've wondered about - but no I don't think it's possible. This answer on SO sums it up nicely: http://stackoverflow.com/questions/25965884/should-we-use-css-in-karma-unit-level-tests-in-angularjs-projects
Basically, the most you should be doing in unit testing is checking that elements have expected classes applied to them.
Happy to be corrected.
Stephen
Is there a way to get styles in Karma tests, so I can run a unit test to show the screen at a particular state and tweak the design that way?
I'm aware Protractor could work, but as far as I know protractor doesn't allow for mocking up services that I need to get to a particular state. That part is much easier using Karma.