ember-fastboot / ember-cli-head

Ember Cli Addon for Adding Content to HTML Head
MIT License
98 stars 34 forks source link

Acceptance testing #38

Closed robwebdev closed 6 years ago

robwebdev commented 6 years ago

Is there a recommended way to test the contents of the head?

rwjblue commented 6 years ago

In the current version, you can just invoke the component {{head-layout}} in a component integration test and make the same sort of DOM assertions that you would do in any other component integration test...

robwebdev commented 6 years ago

Thanks, that works for integration testing. I was thinking from an acceptance test perspective though. I am changing properties on the head-data service during page transitions and want to test that everything is hooked up correctly.

rwjblue commented 6 years ago

Ah, thats easier. Just do normal DOM assertions on the contents in document.head.

robwebdev commented 6 years ago

That works perfectly. For some reason I had assumed the head of the qunit test page was not the place to be looking, but it is. Thanks!