diff --git a/app/components/no-builds.coffee b/app/components/no-builds.coffee new file mode 100644 index 00000000..38e3b529 --- /dev/null +++ b/app/components/no-builds.coffee @@ -0,0 +1,5 @@ +`import Ember from 'ember'` + +NoBuildsComponent = Ember.Component.extend() + +`export default NoBuildsComponent` diff --git a/app/templates/builds.hbs b/app/templates/builds.hbs index ec885c71..e9cd7322 100644 --- a/app/templates/builds.hbs +++ b/app/templates/builds.hbs @@ -2,6 +2,8 @@ {{!-- --}} {{#each controller as |build|}} {{builds-item build=build}} + {{else}} + {{no-builds}} {{/each}} {{#if displayShowMoreButton}}

@@ -11,6 +13,7 @@ {{/if}}

{{/if}} + {{else}} {{loading-indicator}} {{/if}} diff --git a/app/templates/builds/not-found.hbs b/app/templates/builds/not-found.hbs index 35c85ad0..bd2b8add 100644 --- a/app/templates/builds/not-found.hbs +++ b/app/templates/builds/not-found.hbs @@ -1,63 +1 @@ -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

No builds for this repository

-

Want to start testing this project on Travis CI?

- Read the Docs on Getting Started -
+{{no-builds}} \ No newline at end of file diff --git a/app/templates/components/no-builds.hbs b/app/templates/components/no-builds.hbs new file mode 100644 index 00000000..35c85ad0 --- /dev/null +++ b/app/templates/components/no-builds.hbs @@ -0,0 +1,63 @@ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

No builds for this repository

+

Want to start testing this project on Travis CI?

+ Read the Docs on Getting Started +
diff --git a/tests/unit/components/no-builds-test.coffee b/tests/unit/components/no-builds-test.coffee new file mode 100644 index 00000000..c792f42a --- /dev/null +++ b/tests/unit/components/no-builds-test.coffee @@ -0,0 +1,17 @@ +`import { test, moduleForComponent } from 'ember-qunit'` + +moduleForComponent 'no-builds', { + # specify the other units that are required for this test + # needs: ['component:foo', 'helper:bar'] +} + +test 'it renders', (assert) -> + assert.expect 2 + + # creates the component instance + component = @subject() + assert.equal component._state, 'preRender' + + # renders the component to the page + @render() + assert.equal component._state, 'inDOM'