Open simonihmig opened 7 years ago
Another usecase here https://github.com/tomdale/ember-cli-addon-tests/pull/106#issuecomment-315264011
Testing of development server middleware registered by an addon (serverMiddleware
hook) is another use case. E.g. ember-cli-content-security-policy verifies that correct HTTP headers are applied: https://github.com/rwjblue/ember-cli-content-security-policy/blob/9a44defc15af31e30a3e05e68f95ca092a07e70f/node-tests/e2e/deliver-test.js#L89-L97
Similar to testing with different dependencies it could be used to test against different options passed to ember commands. E.g. ember-cli-content-security-policy uses it to test that it respects a --live-reload-host
option used on ember serve
: https://github.com/rwjblue/ember-cli-content-security-policy/blob/9a44defc15af31e30a3e05e68f95ca092a07e70f/node-tests/e2e/deliver-test.js#L158-L181
This issue is for collecting possible use cases for this addon, as suggested by @stefanpenner, as this can be used in various ways that might not be obvious at the first look. The outcome of this could maybe find its way into the documentation at some point. So please feel free to supplement this with your own cases!
General use cases:
Reasons to use this addon as opposed to setting up your tests manually:
run addon e2e tests on a temporarily created app. Instead of running tests directly on the addon's dummy app, this can be useful/required:
the simpler
app
model (https://github.com/tomdale/ember-cli-addon-tests/blob/master/lib/models/app.js) can be used to run e2e tests on your existing app (rather than a temporary app created by theaddon-test-app
model), while still abstracting away things like running ember commands, starting a server (and waiting for it to be ready) etc. This is used e.g. in https://github.com/kaliber5/ember-fastboot-app-tests