stefanpenner/ember-app-kit

Loading CSS in tests etc

Closed this issue · 1 comments

So my index.html has this sort of stuff in it:

  <!-- build:css(tmp/result) /assets/app.min.css -->
  <link rel="stylesheet" href="/vendormanual/bootstrap.css">
  <link rel="stylesheet" href="/assets/bootstrap_override.css">
  <link rel="stylesheet" href="/vendor/jquery-ui/themes/base/jquery-ui.css">
  <link rel="stylesheet" href="/assets/common.css">
  <link rel="stylesheet" href="/assets/dashboards.css">
  <link rel="stylesheet" href="/assets/icons.css">
  <link rel="stylesheet" href="/assets/responsive.css">
  <link rel="stylesheet" href="/assets/super-search.css">
  <link rel="stylesheet" href="/assets/view.css">
  <link rel="stylesheet" href="/assets/widgets.css">
  <!-- endbuild -->

Standard stuff.. the css files start as less, and compiled to css lah lah.
The whole app works great.. grunt server, grunt dist etc etc.. all is well.
BUT (there had to be a but right?)
When I do grunt test:ci/test:server etc.. doesn't matter

testem will show errors like:
Error: ENOENT, stat '/Users/rstudner/dev/viking/ui/assets/bootstrap_override.css'
Error: ENOENT, stat '/Users/rstudner/dev/viking/ui/assets/common.css'
Error: ENOENT, stat '/Users/rstudner/dev/viking/ui/assets/dashboards.css'
Error: ENOENT, stat '/Users/rstudner/dev/viking/ui/assets/icons.css'
Error: ENOENT, stat '/Users/rstudner/dev/viking/ui/assets/responsive.css'
Error: ENOENT, stat '/Users/rstudner/dev/viking/ui/assets/super-search.css'
Error: ENOENT, stat '/Users/rstudner/dev/viking/ui/assets/view.css'
Error: ENOENT, stat '/Users/rstudner/dev/viking/ui/assets/widgets.css'

Basically.. from testem's pov, none of those files exist/can be resolved.

all those files are in tmp/result/assets of course

Thoughts? is this normal behavior?

I worry that having no CSS as part of the phantomJS experience will of course greatly affect varoius tests.

I checked in EAK & EAK-todos and it just so happens neither of them every try to load anything like this and thus maybe nobody ever noticed?

Seems like the styles have to be listed in testem.json. See https://github.com/stefanpenner/ember-app-kit/blob/master/testem.json#L8.

Closing, as I believe this is the issue.