diff --git a/app/components/huegasm-footer.js b/app/components/huegasm-footer.js deleted file mode 100644 index 2bbbc14..0000000 --- a/app/components/huegasm-footer.js +++ /dev/null @@ -1,7 +0,0 @@ -import Em from 'ember'; - -export default Em.Component.extend({ - tagName: 'footer', - - classNames: ['footer'] -}); diff --git a/app/components/modals/add-group-modal.js b/app/pods/components/add-group-modal/component.js similarity index 100% rename from app/components/modals/add-group-modal.js rename to app/pods/components/add-group-modal/component.js diff --git a/app/templates/components/modals/add-group-modal.hbs b/app/pods/components/add-group-modal/template.hbs similarity index 100% rename from app/templates/components/modals/add-group-modal.hbs rename to app/pods/components/add-group-modal/template.hbs diff --git a/app/components/bridge-finder.js b/app/pods/components/bridge-finder/component.js similarity index 100% rename from app/components/bridge-finder.js rename to app/pods/components/bridge-finder/component.js diff --git a/app/templates/components/bridge-finder.hbs b/app/pods/components/bridge-finder/template.hbs similarity index 95% rename from app/templates/components/bridge-finder.hbs rename to app/pods/components/bridge-finder/template.hbs index af833da..6551257 100644 --- a/app/templates/components/bridge-finder.hbs +++ b/app/pods/components/bridge-finder/template.hbs @@ -17,7 +17,7 @@ {{#if bridgeFindMultiple}}
Found multiple hue bridges.
- Please select the one you want to use for this application.
Are you sure you want to delete group "{{groupName}}"?
+ + {{#paper-button action="close"}}Close{{/paper-button}} + {{#paper-button class="pull-right" action="delete" primary=true}}Delete{{/paper-button}} + + {{/modal-dialog}} +{{/if}} \ No newline at end of file diff --git a/app/components/controls/group-control.js b/app/pods/components/groups-list/component.js similarity index 100% rename from app/components/controls/group-control.js rename to app/pods/components/groups-list/component.js diff --git a/app/templates/components/controls/group-control.hbs b/app/pods/components/groups-list/template.hbs similarity index 64% rename from app/templates/components/controls/group-control.hbs rename to app/pods/components/groups-list/template.hbs index fb10a6d..91a0994 100644 --- a/app/templates/components/controls/group-control.hbs +++ b/app/pods/components/groups-list/template.hbs @@ -8,7 +8,7 @@ {{/each}} {{/paper-list}} -{{modals/add-group-modal lightsData=lightsData groupsData=groupsData isShowingAddGroupsModal=isShowingAddGroupsModal apiURL=apiURL updateGroupsData=updateGroupsData +{{add-group-modal lightsData=lightsData groupsData=groupsData isShowingAddGroupsModal=isShowingAddGroupsModal apiURL=apiURL updateGroupsData=updateGroupsData action="toggleAddGroupsModal"}} -{{modals/confirm-delete-modal groupName=deleteGroupName groupId=deleteGroupId groupsData=groupsData isShowingConfirmDeleteModal=isShowingConfirmDeleteModal apiURL=apiURL updateGroupsData=updateGroupsData groupIdSelection=groupIdSelection action="toggleConfirmDeleteGroupsModal"}} \ No newline at end of file +{{delete-group-modal groupName=deleteGroupName groupId=deleteGroupId groupsData=groupsData isShowingConfirmDeleteModal=isShowingConfirmDeleteModal apiURL=apiURL updateGroupsData=updateGroupsData groupIdSelection=groupIdSelection action="toggleConfirmDeleteGroupsModal"}} \ No newline at end of file diff --git a/app/components/bridge-controls.js b/app/pods/components/hue-controls/component.js similarity index 95% rename from app/components/bridge-controls.js rename to app/pods/components/hue-controls/component.js index 6f412e1..9026e14 100644 --- a/app/components/bridge-controls.js +++ b/app/pods/components/hue-controls/component.js @@ -2,7 +2,7 @@ import Em from 'ember'; export default Em.Component.extend({ classNames: ['container-fluid'], - elementId: 'bridgeControls', + elementId: 'hueControls', bridgeIp: null, manualBridgeIp: null, @@ -44,7 +44,7 @@ export default Em.Component.extend({ }, apiURL: function(){ - return 'http://' + this.get('bridgeIp') + '/api/' + this.get('bridgeUsername'); + return 'http://' + this.get('bridgeIp') + '/api/' + this.get('bridgeUsername'); }.property('bridgeIp', 'bridgeUsername'), didInsertElement(){ @@ -61,7 +61,7 @@ export default Em.Component.extend({ } }); - observer.observe(Em.$('#bridgeControls')[0], {childList: true, subtree: true}); + observer.observe(Em.$('#hueControls')[0], {childList: true, subtree: true}); // automatically close the group menu when the user clicks somewhere else Em.$(document).click(function() { diff --git a/app/templates/components/bridge-controls.hbs b/app/pods/components/hue-controls/template.hbs similarity index 66% rename from app/templates/components/bridge-controls.hbs rename to app/pods/components/hue-controls/template.hbs index 432eec4..b102fce 100644 --- a/app/templates/components/bridge-controls.hbs +++ b/app/pods/components/hue-controls/template.hbs @@ -2,7 +2,7 @@Made by egorphilippov.me © 2015 Huegasm
\ No newline at end of file diff --git a/app/templates/components/light-group.hbs b/app/templates/components/light-group.hbs deleted file mode 100644 index 284007a..0000000 --- a/app/templates/components/light-group.hbs +++ /dev/null @@ -1,5 +0,0 @@ -{{#each lightsList as |light|}} -Are you sure you want to delete group "{{groupName}}"?
- - {{#paper-button action="close"}}Close{{/paper-button}} - {{#paper-button class="pull-right" action="delete" primary=true}}Delete{{/paper-button}} - - {{/modal-dialog}} -{{/if}} \ No newline at end of file diff --git a/config/environment.js b/config/environment.js index 2960aab..cf9747c 100644 --- a/config/environment.js +++ b/config/environment.js @@ -3,6 +3,7 @@ module.exports = function(environment) { var ENV = { modulePrefix: 'huegasm', + podModulePrefix: 'huegasm/pods', environment: environment, baseURL: '/', locationType: 'auto', diff --git a/tests/integration/pods/components/add-group-modal/component-test.js b/tests/integration/pods/components/add-group-modal/component-test.js new file mode 100644 index 0000000..43767d1 --- /dev/null +++ b/tests/integration/pods/components/add-group-modal/component-test.js @@ -0,0 +1,26 @@ +import { moduleForComponent, test } from 'ember-qunit'; +import hbs from 'htmlbars-inline-precompile'; + +moduleForComponent('add-group-modal', 'Integration | Component | add group modal', { + integration: true +}); + +test('it renders', function(assert) { + assert.expect(2); + + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); + + this.render(hbs`{{add-group-modal}}`); + + assert.equal(this.$().text().trim(), ''); + + // Template block usage: + this.render(hbs` + {{#add-group-modal}} + template block text + {{/add-group-modal}} + `); + + assert.equal(this.$().text().trim(), 'template block text'); +}); diff --git a/tests/integration/pods/components/bridge-finder/component-test.js b/tests/integration/pods/components/bridge-finder/component-test.js new file mode 100644 index 0000000..c42803d --- /dev/null +++ b/tests/integration/pods/components/bridge-finder/component-test.js @@ -0,0 +1,26 @@ +import { moduleForComponent, test } from 'ember-qunit'; +import hbs from 'htmlbars-inline-precompile'; + +moduleForComponent('bridge-finder', 'Integration | Component | bridge finder', { + integration: true +}); + +test('it renders', function(assert) { + assert.expect(2); + + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); + + this.render(hbs`{{bridge-finder}}`); + + assert.equal(this.$().text().trim(), ''); + + // Template block usage: + this.render(hbs` + {{#bridge-finder}} + template block text + {{/bridge-finder}} + `); + + assert.equal(this.$().text().trim(), 'template block text'); +}); diff --git a/tests/integration/pods/components/color-picker/component-test.js b/tests/integration/pods/components/color-picker/component-test.js new file mode 100644 index 0000000..fb1d925 --- /dev/null +++ b/tests/integration/pods/components/color-picker/component-test.js @@ -0,0 +1,26 @@ +import { moduleForComponent, test } from 'ember-qunit'; +import hbs from 'htmlbars-inline-precompile'; + +moduleForComponent('color-picker', 'Integration | Component | color picker', { + integration: true +}); + +test('it renders', function(assert) { + assert.expect(2); + + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); + + this.render(hbs`{{color-picker}}`); + + assert.equal(this.$().text().trim(), ''); + + // Template block usage: + this.render(hbs` + {{#color-picker}} + template block text + {{/color-picker}} + `); + + assert.equal(this.$().text().trim(), 'template block text'); +}); diff --git a/tests/integration/pods/components/delete-group-modal/component-test.js b/tests/integration/pods/components/delete-group-modal/component-test.js new file mode 100644 index 0000000..0555ede --- /dev/null +++ b/tests/integration/pods/components/delete-group-modal/component-test.js @@ -0,0 +1,26 @@ +import { moduleForComponent, test } from 'ember-qunit'; +import hbs from 'htmlbars-inline-precompile'; + +moduleForComponent('delete-group-modal', 'Integration | Component | delete group modal', { + integration: true +}); + +test('it renders', function(assert) { + assert.expect(2); + + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); + + this.render(hbs`{{delete-group-modal}}`); + + assert.equal(this.$().text().trim(), ''); + + // Template block usage: + this.render(hbs` + {{#delete-group-modal}} + template block text + {{/delete-group-modal}} + `); + + assert.equal(this.$().text().trim(), 'template block text'); +}); diff --git a/tests/integration/pods/components/groups-list/component-test.js b/tests/integration/pods/components/groups-list/component-test.js new file mode 100644 index 0000000..aa4dcff --- /dev/null +++ b/tests/integration/pods/components/groups-list/component-test.js @@ -0,0 +1,26 @@ +import { moduleForComponent, test } from 'ember-qunit'; +import hbs from 'htmlbars-inline-precompile'; + +moduleForComponent('groups-list', 'Integration | Component | groups list', { + integration: true +}); + +test('it renders', function(assert) { + assert.expect(2); + + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); + + this.render(hbs`{{groups-list}}`); + + assert.equal(this.$().text().trim(), ''); + + // Template block usage: + this.render(hbs` + {{#groups-list}} + template block text + {{/groups-list}} + `); + + assert.equal(this.$().text().trim(), 'template block text'); +}); diff --git a/tests/integration/pods/components/hue-controls/component-test.js b/tests/integration/pods/components/hue-controls/component-test.js new file mode 100644 index 0000000..1d1ebc2 --- /dev/null +++ b/tests/integration/pods/components/hue-controls/component-test.js @@ -0,0 +1,26 @@ +import { moduleForComponent, test } from 'ember-qunit'; +import hbs from 'htmlbars-inline-precompile'; + +moduleForComponent('hue-controls', 'Integration | Component | hue controls', { + integration: true +}); + +test('it renders', function(assert) { + assert.expect(2); + + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); + + this.render(hbs`{{hue-controls}}`); + + assert.equal(this.$().text().trim(), ''); + + // Template block usage: + this.render(hbs` + {{#hue-controls}} + template block text + {{/hue-controls}} + `); + + assert.equal(this.$().text().trim(), 'template block text'); +}); diff --git a/tests/integration/pods/components/huegasm-app/component-test.js b/tests/integration/pods/components/huegasm-app/component-test.js new file mode 100644 index 0000000..53484b6 --- /dev/null +++ b/tests/integration/pods/components/huegasm-app/component-test.js @@ -0,0 +1,26 @@ +import { moduleForComponent, test } from 'ember-qunit'; +import hbs from 'htmlbars-inline-precompile'; + +moduleForComponent('huegasm-app', 'Integration | Component | huegasm app', { + integration: true +}); + +test('it renders', function(assert) { + assert.expect(2); + + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); + + this.render(hbs`{{huegasm-app}}`); + + assert.equal(this.$().text().trim(), ''); + + // Template block usage: + this.render(hbs` + {{#huegasm-app}} + template block text + {{/huegasm-app}} + `); + + assert.equal(this.$().text().trim(), 'template block text'); +}); diff --git a/tests/integration/pods/components/light-group/component-test.js b/tests/integration/pods/components/light-group/component-test.js new file mode 100644 index 0000000..22a66cd --- /dev/null +++ b/tests/integration/pods/components/light-group/component-test.js @@ -0,0 +1,26 @@ +import { moduleForComponent, test } from 'ember-qunit'; +import hbs from 'htmlbars-inline-precompile'; + +moduleForComponent('light-group', 'Integration | Component | light group', { + integration: true +}); + +test('it renders', function(assert) { + assert.expect(2); + + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); + + this.render(hbs`{{light-group}}`); + + assert.equal(this.$().text().trim(), ''); + + // Template block usage: + this.render(hbs` + {{#light-group}} + template block text + {{/light-group}} + `); + + assert.equal(this.$().text().trim(), 'template block text'); +}); diff --git a/tests/integration/pods/components/lights-tab/component-test.js b/tests/integration/pods/components/lights-tab/component-test.js new file mode 100644 index 0000000..d7af880 --- /dev/null +++ b/tests/integration/pods/components/lights-tab/component-test.js @@ -0,0 +1,26 @@ +import { moduleForComponent, test } from 'ember-qunit'; +import hbs from 'htmlbars-inline-precompile'; + +moduleForComponent('lights-tab', 'Integration | Component | lights tab', { + integration: true +}); + +test('it renders', function(assert) { + assert.expect(2); + + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); + + this.render(hbs`{{lights-tab}}`); + + assert.equal(this.$().text().trim(), ''); + + // Template block usage: + this.render(hbs` + {{#lights-tab}} + template block text + {{/lights-tab}} + `); + + assert.equal(this.$().text().trim(), 'template block text'); +}); diff --git a/tests/integration/pods/components/music-tab/component-test.js b/tests/integration/pods/components/music-tab/component-test.js new file mode 100644 index 0000000..d9636e1 --- /dev/null +++ b/tests/integration/pods/components/music-tab/component-test.js @@ -0,0 +1,26 @@ +import { moduleForComponent, test } from 'ember-qunit'; +import hbs from 'htmlbars-inline-precompile'; + +moduleForComponent('music-tab', 'Integration | Component | music tab', { + integration: true +}); + +test('it renders', function(assert) { + assert.expect(2); + + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); + + this.render(hbs`{{music-tab}}`); + + assert.equal(this.$().text().trim(), ''); + + // Template block usage: + this.render(hbs` + {{#music-tab}} + template block text + {{/music-tab}} + `); + + assert.equal(this.$().text().trim(), 'template block text'); +});