diff --git a/core/client/tests/integration/components/gh-navigation-test.js b/core/client/tests/integration/components/gh-navigation-test.js index 2503b26836..ffb3d36e23 100644 --- a/core/client/tests/integration/components/gh-navigation-test.js +++ b/core/client/tests/integration/components/gh-navigation-test.js @@ -9,7 +9,7 @@ const { run } = Ember; describeComponent( 'gh-navigation', - 'Integration : Component : gh-navigation', + 'Integration: Component: gh-navigation', { integration: true }, diff --git a/core/client/tests/integration/components/gh-navitem-test.js b/core/client/tests/integration/components/gh-navitem-test.js index 5e444ef8ab..3df3789334 100644 --- a/core/client/tests/integration/components/gh-navitem-test.js +++ b/core/client/tests/integration/components/gh-navitem-test.js @@ -9,7 +9,7 @@ const { run } = Ember; describeComponent( 'gh-navitem', - 'Integration : Component : gh-navitem', + 'Integration: Component: gh-navitem', { integration: true }, diff --git a/core/client/tests/integration/components/gh-navitem-url-input-test.js b/core/client/tests/integration/components/gh-navitem-url-input-test.js index 1d5227d64e..fca474dcfa 100644 --- a/core/client/tests/integration/components/gh-navitem-url-input-test.js +++ b/core/client/tests/integration/components/gh-navitem-url-input-test.js @@ -14,7 +14,7 @@ const { run } = Ember, describeComponent( 'gh-navitem-url-input', - 'Integration : Component : gh-navitem-url-input', { + 'Integration: Component: gh-navitem-url-input', { integration: true }, function () { diff --git a/core/client/tests/unit/components/gh-alert-test.js b/core/client/tests/unit/components/gh-alert-test.js index 58de121abd..31286a2b91 100644 --- a/core/client/tests/unit/components/gh-alert-test.js +++ b/core/client/tests/unit/components/gh-alert-test.js @@ -9,7 +9,9 @@ import sinon from 'sinon'; describeComponent( 'gh-alert', - 'GhAlertComponent', { + 'Unit: Component: gh-alert', + { + unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }, diff --git a/core/client/tests/unit/components/gh-alerts-test.js b/core/client/tests/unit/components/gh-alerts-test.js index c1bdd142b4..41d4df02b0 100644 --- a/core/client/tests/unit/components/gh-alerts-test.js +++ b/core/client/tests/unit/components/gh-alerts-test.js @@ -10,7 +10,9 @@ import sinon from 'sinon'; describeComponent( 'gh-alerts', - 'GhAlertsComponent', { + 'Unit: Component: gh-alerts', + { + unit: true, // specify the other units that are required for this test needs: ['component:gh-alert'] }, diff --git a/core/client/tests/unit/components/gh-app-test.js b/core/client/tests/unit/components/gh-app-test.js index 4c9c034518..ddde049ced 100644 --- a/core/client/tests/unit/components/gh-app-test.js +++ b/core/client/tests/unit/components/gh-app-test.js @@ -7,10 +7,11 @@ import { describeComponent( 'gh-app', - 'GhAppComponent', + 'Unit: Component: gh-app', { - // specify the other units that are required for this test - // needs: ['component:foo', 'helper:bar'] + unit: true + // specify the other units that are required for this test + // needs: ['component:foo', 'helper:bar'] }, function () { it('renders', function () { diff --git a/core/client/tests/unit/components/gh-content-preview-content-test.js b/core/client/tests/unit/components/gh-content-preview-content-test.js index 6c507fb1c2..eaa8aee995 100644 --- a/core/client/tests/unit/components/gh-content-preview-content-test.js +++ b/core/client/tests/unit/components/gh-content-preview-content-test.js @@ -7,8 +7,9 @@ import { describeComponent( 'gh-content-preview-content', - 'GhContentPreviewContentComponent', + 'Unit: Component: gh-content-preview-content', { + unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }, diff --git a/core/client/tests/unit/components/gh-editor-save-button-test.js b/core/client/tests/unit/components/gh-editor-save-button-test.js index fb91697e33..a88cf4fd76 100644 --- a/core/client/tests/unit/components/gh-editor-save-button-test.js +++ b/core/client/tests/unit/components/gh-editor-save-button-test.js @@ -7,8 +7,9 @@ import { describeComponent( 'gh-editor-save-button', - 'GhEditorSaveButtonComponent', + 'Unit: Component: gh-editor-save-button', { + unit: true, needs: [ 'component:gh-dropdown-button', 'component:gh-dropdown', diff --git a/core/client/tests/unit/components/gh-editor-test.js b/core/client/tests/unit/components/gh-editor-test.js index dcbd33d2d3..2d80bf0d94 100644 --- a/core/client/tests/unit/components/gh-editor-test.js +++ b/core/client/tests/unit/components/gh-editor-test.js @@ -7,8 +7,9 @@ import { describeComponent( 'gh-editor', - 'GhEditorComponent', + 'Unit: Component: gh-editor', { + unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }, diff --git a/core/client/tests/unit/components/gh-infinite-scroll-box-test.js b/core/client/tests/unit/components/gh-infinite-scroll-box-test.js index 84abd3d7fd..bdb3fb95e3 100644 --- a/core/client/tests/unit/components/gh-infinite-scroll-box-test.js +++ b/core/client/tests/unit/components/gh-infinite-scroll-box-test.js @@ -7,8 +7,9 @@ import { describeComponent( 'gh-infinite-scroll-box', - 'GhInfiniteScrollBoxComponent', + 'Unit: Component: gh-infinite-scroll-box', { + unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }, diff --git a/core/client/tests/unit/components/gh-infinite-scroll-test.js b/core/client/tests/unit/components/gh-infinite-scroll-test.js index 412bd79a5f..f423db3ff3 100644 --- a/core/client/tests/unit/components/gh-infinite-scroll-test.js +++ b/core/client/tests/unit/components/gh-infinite-scroll-test.js @@ -7,8 +7,9 @@ import { describeComponent( 'gh-infinite-scroll', - 'GhInfiniteScrollComponent', + 'Unit: Component: gh-infinite-scroll', { + unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }, diff --git a/core/client/tests/unit/components/gh-navitem-url-input-test.js b/core/client/tests/unit/components/gh-navitem-url-input-test.js index 4d7203e898..54bd2e020d 100644 --- a/core/client/tests/unit/components/gh-navitem-url-input-test.js +++ b/core/client/tests/unit/components/gh-navitem-url-input-test.js @@ -8,8 +8,10 @@ import { describeComponent( 'gh-navitem-url-input', - 'GhNavitemUrlInputComponent', - {}, + 'Unit: Component: gh-navitem-url-input', + { + unit: true + }, function () { it('identifies a URL as the base URL', function () { var component = this.subject({ diff --git a/core/client/tests/unit/components/gh-notification-test.js b/core/client/tests/unit/components/gh-notification-test.js index e8b35eec82..6db8e125c2 100644 --- a/core/client/tests/unit/components/gh-notification-test.js +++ b/core/client/tests/unit/components/gh-notification-test.js @@ -9,7 +9,9 @@ import sinon from 'sinon'; describeComponent( 'gh-notification', - 'GhNotificationComponent', { + 'Unit: Component: gh-notification', + { + unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }, diff --git a/core/client/tests/unit/components/gh-notifications-test.js b/core/client/tests/unit/components/gh-notifications-test.js index e6cd6550d8..b5855a6cb4 100644 --- a/core/client/tests/unit/components/gh-notifications-test.js +++ b/core/client/tests/unit/components/gh-notifications-test.js @@ -9,8 +9,8 @@ from 'ember-mocha'; describeComponent( 'gh-notifications', - 'GhNotificationsComponent', { - // specify the other units that are required for this test + 'Unit: Component: gh-notifications', { + unit: true, needs: ['component:gh-notification'] }, function () { diff --git a/core/client/tests/unit/components/gh-posts-list-item-test.js b/core/client/tests/unit/components/gh-posts-list-item-test.js index 0db2005ef3..58a3ebbb0c 100644 --- a/core/client/tests/unit/components/gh-posts-list-item-test.js +++ b/core/client/tests/unit/components/gh-posts-list-item-test.js @@ -7,8 +7,9 @@ import { describeComponent( 'gh-posts-list-item', - 'GhPostsListItemComponent', + 'Unit: Component: gh-posts-list-item', { + unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }, diff --git a/core/client/tests/unit/components/gh-profile-image-test.js b/core/client/tests/unit/components/gh-profile-image-test.js index 2ed2aae6cb..9665aab5b8 100644 --- a/core/client/tests/unit/components/gh-profile-image-test.js +++ b/core/client/tests/unit/components/gh-profile-image-test.js @@ -6,9 +6,14 @@ import { it } from 'ember-mocha'; -describeComponent('gh-profile-image', 'GhProfileImageComponent', { +describeComponent( + 'gh-profile-image', + 'Unit: Component: gh-profile-image', + { + unit: true, needs: ['service:ghost-paths'] - }, function () { + }, + function () { it('renders', function () { // creates the component instance var component = this.subject(); diff --git a/core/client/tests/unit/components/gh-search-input-test.js b/core/client/tests/unit/components/gh-search-input-test.js index 281ebdc266..d261361b30 100644 --- a/core/client/tests/unit/components/gh-search-input-test.js +++ b/core/client/tests/unit/components/gh-search-input-test.js @@ -7,8 +7,9 @@ import { describeComponent( 'gh-search-input', - 'GhSearchInputComponent', + 'Unit: Component: gh-search-input', { + unit: true, needs: ['component:gh-selectize'] }, function () { diff --git a/core/client/tests/unit/components/gh-select-native-test.js b/core/client/tests/unit/components/gh-select-native-test.js index f6c049358d..b776de8bf2 100644 --- a/core/client/tests/unit/components/gh-select-native-test.js +++ b/core/client/tests/unit/components/gh-select-native-test.js @@ -7,8 +7,9 @@ import { describeComponent( 'gh-select-native', - 'GhSelectNativeComponent', + 'Unit: Component: gh-select-native', { + unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }, diff --git a/core/client/tests/unit/components/gh-spin-button-test.js b/core/client/tests/unit/components/gh-spin-button-test.js index 33fb3c167e..da030a5fe5 100644 --- a/core/client/tests/unit/components/gh-spin-button-test.js +++ b/core/client/tests/unit/components/gh-spin-button-test.js @@ -7,8 +7,9 @@ import { describeComponent( 'gh-spin-button', - 'GhSpinButtonComponent', + 'Unit: Component: gh-spin-button', { + unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }, diff --git a/core/client/tests/unit/components/gh-trim-focus-input_test.js b/core/client/tests/unit/components/gh-trim-focus-input_test.js index cb167d9df5..36ce4dc183 100644 --- a/core/client/tests/unit/components/gh-trim-focus-input_test.js +++ b/core/client/tests/unit/components/gh-trim-focus-input_test.js @@ -4,37 +4,44 @@ import { it } from 'ember-mocha'; -describeComponent('gh-trim-focus-input', function () { - it('trims value on focusOut', function () { - var component = this.subject({ - value: 'some random stuff ' +describeComponent( + 'gh-trim-focus-input', + 'Unit: Component: gh-trim-focus-input', + { + unit: true + }, + function () { + it('trims value on focusOut', function () { + var component = this.subject({ + value: 'some random stuff ' + }); + + this.render(); + + component.$().focusout(); + expect(component.$().val()).to.equal('some random stuff'); }); - this.render(); + it('does not have the autofocus attribute if not set to focus', function () { + var component = this.subject({ + value: 'some text', + focus: false + }); - component.$().focusout(); - expect(component.$().val()).to.equal('some random stuff'); - }); + this.render(); - it('does not have the autofocus attribute if not set to focus', function () { - var component = this.subject({ - value: 'some text', - focus: false + expect(component.$().attr('autofocus')).to.not.be.ok; }); - this.render(); + it('has the autofocus attribute if set to focus', function () { + var component = this.subject({ + value: 'some text', + focus: true + }); - expect(component.$().attr('autofocus')).to.not.be.ok; - }); + this.render(); - it('has the autofocus attribute if set to focus', function () { - var component = this.subject({ - value: 'some text', - focus: true + expect(component.$().attr('autofocus')).to.be.ok; }); - - this.render(); - - expect(component.$().attr('autofocus')).to.be.ok; - }); -}); + } +); diff --git a/core/client/tests/unit/components/gh-url-preview_test.js b/core/client/tests/unit/components/gh-url-preview_test.js index a31fa6fde0..061ad32c1a 100644 --- a/core/client/tests/unit/components/gh-url-preview_test.js +++ b/core/client/tests/unit/components/gh-url-preview_test.js @@ -3,7 +3,12 @@ import { it } from 'ember-mocha'; -describeComponent('gh-url-preview', +describeComponent( + 'gh-url-preview', + 'Unit: Component: gh-url-preview', + { + unit: true + }, function () { it('generates the correct preview URL with a prefix', function () { var component = this.subject({ diff --git a/core/client/tests/unit/components/gh-user-active-test.js b/core/client/tests/unit/components/gh-user-active-test.js index c3883e19d8..4a16a4e464 100644 --- a/core/client/tests/unit/components/gh-user-active-test.js +++ b/core/client/tests/unit/components/gh-user-active-test.js @@ -7,8 +7,9 @@ import { describeComponent( 'gh-user-active', - 'GhUserActiveComponent', + 'Unit: Component: gh-user-active', { + unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }, diff --git a/core/client/tests/unit/components/gh-user-invited-test.js b/core/client/tests/unit/components/gh-user-invited-test.js index a2e0545203..fbce5879c4 100644 --- a/core/client/tests/unit/components/gh-user-invited-test.js +++ b/core/client/tests/unit/components/gh-user-invited-test.js @@ -7,8 +7,9 @@ import { describeComponent( 'gh-user-invited', - 'GhUserInvitedComponent', + 'Unit: Component: gh-user-invited', { + unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }, diff --git a/core/client/tests/unit/controllers/post-settings-menu_test.js b/core/client/tests/unit/controllers/post-settings-menu-test.js similarity index 99% rename from core/client/tests/unit/controllers/post-settings-menu_test.js rename to core/client/tests/unit/controllers/post-settings-menu-test.js index 4e80f83718..555676e00e 100644 --- a/core/client/tests/unit/controllers/post-settings-menu_test.js +++ b/core/client/tests/unit/controllers/post-settings-menu-test.js @@ -6,6 +6,7 @@ import { describeModule( 'controller:post-settings-menu', + 'Unit: Controller: post-settings-menu', { needs: ['controller:application', 'service:notifications'] }, diff --git a/core/client/tests/unit/controllers/settings-general_test.js b/core/client/tests/unit/controllers/settings/general-test.js similarity index 98% rename from core/client/tests/unit/controllers/settings-general_test.js rename to core/client/tests/unit/controllers/settings/general-test.js index cd0d42f402..b4361f1619 100644 --- a/core/client/tests/unit/controllers/settings-general_test.js +++ b/core/client/tests/unit/controllers/settings/general-test.js @@ -6,6 +6,7 @@ import { describeModule( 'controller:settings/general', + 'Unit: Controller: settings/general', { needs: ['service:notifications'] }, diff --git a/core/client/tests/unit/controllers/settings/navigation-test.js b/core/client/tests/unit/controllers/settings/navigation-test.js index d5d617271c..88c822c71a 100644 --- a/core/client/tests/unit/controllers/settings/navigation-test.js +++ b/core/client/tests/unit/controllers/settings/navigation-test.js @@ -19,7 +19,7 @@ var navSettingJSON = `[ describeModule( 'controller:settings/navigation', - 'Unit : Controller : settings/navigation', + 'Unit: Controller: settings/navigation', { // Specify the other units that are required for this test. needs: ['service:config', 'service:notifications'] diff --git a/core/client/tests/unit/helpers/gh-user-can-admin-test.js b/core/client/tests/unit/helpers/gh-user-can-admin-test.js index 90b846abaf..364ba41527 100644 --- a/core/client/tests/unit/helpers/gh-user-can-admin-test.js +++ b/core/client/tests/unit/helpers/gh-user-can-admin-test.js @@ -6,7 +6,7 @@ import { ghUserCanAdmin } from 'ghost/helpers/gh-user-can-admin'; -describe ('GhUserCanAdminHelper', function () { +describe ('Unit: Helper: gh-user-can-admin', function () { // Mock up roles and test for truthy describe ('Owner role', function () { var user = {get: function (role) { diff --git a/core/client/tests/unit/helpers/is-equal-test.js b/core/client/tests/unit/helpers/is-equal-test.js index e229d64a73..a3edbebf97 100644 --- a/core/client/tests/unit/helpers/is-equal-test.js +++ b/core/client/tests/unit/helpers/is-equal-test.js @@ -8,7 +8,7 @@ import { isEqual } from 'ghost/helpers/is-equal'; -describe('IsEqualHelper', function () { +describe('Unit: Helper: is-equal', function () { // Replace this with your real tests. it('works', function () { var result = isEqual([42, 42]); diff --git a/core/client/tests/unit/helpers/is-not-test.js b/core/client/tests/unit/helpers/is-not-test.js index 0b49123127..19d07fdd61 100644 --- a/core/client/tests/unit/helpers/is-not-test.js +++ b/core/client/tests/unit/helpers/is-not-test.js @@ -8,7 +8,7 @@ import { isNot } from 'ghost/helpers/is-not'; -describe('IsNotHelper', function () { +describe('Unit: Helper: is-not', function () { // Replace this with your real tests. it('works', function () { var result = isNot(false); diff --git a/core/client/tests/unit/helpers/read-path-test.js b/core/client/tests/unit/helpers/read-path-test.js index 568c67919f..b8ea15ccd6 100644 --- a/core/client/tests/unit/helpers/read-path-test.js +++ b/core/client/tests/unit/helpers/read-path-test.js @@ -7,7 +7,7 @@ import { import {readPath} from 'ghost/helpers/read-path'; import Ember from 'ember'; -describe('ReadPathHelper', function () { +describe('Unit: Helper: read-path', function () { // Replace this with your real tests. it('works', function () { var result = readPath([Ember.Object.create({hi: 'there'}), 'hi']); diff --git a/core/client/tests/unit/mixins/infinite-scroll-test.js b/core/client/tests/unit/mixins/infinite-scroll-test.js index a5eec7fce3..a4d149569f 100644 --- a/core/client/tests/unit/mixins/infinite-scroll-test.js +++ b/core/client/tests/unit/mixins/infinite-scroll-test.js @@ -7,7 +7,7 @@ import { import Ember from 'ember'; import InfiniteScrollMixin from 'ghost/mixins/infinite-scroll'; -describe('InfiniteScrollMixin', function () { +describe('Unit: Mixin: infinite-scroll', function () { // Replace this with your real tests. it('works', function () { var InfiniteScrollObject = Ember.Object.extend(InfiniteScrollMixin), diff --git a/core/client/tests/unit/models/post_test.js b/core/client/tests/unit/models/post-test.js similarity index 97% rename from core/client/tests/unit/models/post_test.js rename to core/client/tests/unit/models/post-test.js index c53cac920d..52bf0d618e 100644 --- a/core/client/tests/unit/models/post_test.js +++ b/core/client/tests/unit/models/post-test.js @@ -4,7 +4,9 @@ import { it } from 'ember-mocha'; -describeModel('post', +describeModel( + 'post', + 'Unit: Model: post', { needs:['model:user', 'model:tag', 'model:role'] }, diff --git a/core/client/tests/unit/models/role_test.js b/core/client/tests/unit/models/role-test.js similarity index 90% rename from core/client/tests/unit/models/role_test.js rename to core/client/tests/unit/models/role-test.js index 2c3f83c0ce..ad2638c74f 100644 --- a/core/client/tests/unit/models/role_test.js +++ b/core/client/tests/unit/models/role-test.js @@ -4,7 +4,7 @@ import { it } from 'ember-mocha'; -describeModel('role', function () { +describeModel('role', 'Unit: Model: role', function () { it('provides a lowercase version of the name', function () { var model = this.subject({ name: 'Author' diff --git a/core/client/tests/unit/models/setting_test.js b/core/client/tests/unit/models/setting-test.js similarity index 78% rename from core/client/tests/unit/models/setting_test.js rename to core/client/tests/unit/models/setting-test.js index 832b686c4e..9eb755b3a5 100644 --- a/core/client/tests/unit/models/setting_test.js +++ b/core/client/tests/unit/models/setting-test.js @@ -3,7 +3,7 @@ import { it } from 'ember-mocha'; -describeModel('setting', function () { +describeModel('setting', 'Unit: Model: setting', function () { it('has a validation type of "setting"', function () { var model = this.subject(); diff --git a/core/client/tests/unit/models/tag_test.js b/core/client/tests/unit/models/tag-test.js similarity index 80% rename from core/client/tests/unit/models/tag_test.js rename to core/client/tests/unit/models/tag-test.js index c438c0fb6b..a45790962a 100644 --- a/core/client/tests/unit/models/tag_test.js +++ b/core/client/tests/unit/models/tag-test.js @@ -3,7 +3,7 @@ import { it } from 'ember-mocha'; -describeModel('tag', function () { +describeModel('tag', 'Unit: Model: tag', function () { it('has a validation type of "tag"', function () { var model = this.subject(); diff --git a/core/client/tests/unit/models/user_test.js b/core/client/tests/unit/models/user-test.js similarity index 98% rename from core/client/tests/unit/models/user_test.js rename to core/client/tests/unit/models/user-test.js index a5d124200d..e078f7d38e 100644 --- a/core/client/tests/unit/models/user_test.js +++ b/core/client/tests/unit/models/user-test.js @@ -4,7 +4,9 @@ import { it } from 'ember-mocha'; -describeModel('user', +describeModel( + 'user', + 'Unit: Model: user', { needs: ['model:role'] }, diff --git a/core/client/tests/unit/services/config-test.js b/core/client/tests/unit/services/config-test.js index 51e13d90dc..9cb723c94f 100644 --- a/core/client/tests/unit/services/config-test.js +++ b/core/client/tests/unit/services/config-test.js @@ -9,7 +9,7 @@ import Ember from 'ember'; describeModule( 'service:config', - 'ConfigService', + 'Unit: Service: config', { // Specify the other units that are required for this test. // needs: ['service:foo'] diff --git a/core/client/tests/unit/services/notifications-test.js b/core/client/tests/unit/services/notifications-test.js index 852a5f6a75..f46bfda647 100644 --- a/core/client/tests/unit/services/notifications-test.js +++ b/core/client/tests/unit/services/notifications-test.js @@ -9,7 +9,7 @@ import { describeModule( 'service:notifications', - 'NotificationsService', + 'Unit: Service: notifications', { // Specify the other units that are required for this test. // needs: ['model:notification'] diff --git a/core/client/tests/unit/utils/ghost-paths_test.js b/core/client/tests/unit/utils/ghost-paths-test.js similarity index 97% rename from core/client/tests/unit/utils/ghost-paths_test.js rename to core/client/tests/unit/utils/ghost-paths-test.js index dbeaac1a71..be209fc05d 100644 --- a/core/client/tests/unit/utils/ghost-paths_test.js +++ b/core/client/tests/unit/utils/ghost-paths-test.js @@ -1,6 +1,6 @@ import ghostPaths from 'ghost/utils/ghost-paths'; -describe('ghost-paths', function () { +describe('Unit: Util: ghost-paths', function () { describe('join', function () { var join = ghostPaths().url.join; diff --git a/core/client/tests/unit/validators/nav-item-test.js b/core/client/tests/unit/validators/nav-item-test.js index 6df58227b9..f8cf4aad74 100644 --- a/core/client/tests/unit/validators/nav-item-test.js +++ b/core/client/tests/unit/validators/nav-item-test.js @@ -32,7 +32,7 @@ testValidUrl = function (url) { expect(navItem.get('hasValidated')).to.include('url'); }; -describe('Unit : Validator : nav-item', function () { +describe('Unit: Validator: nav-item', function () { it('requires label presence', function () { let navItem = NavItem.create();