From 5018f2fb9e68a5d3d9c1cf37285385b789bbdc01 Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Mon, 25 May 2015 13:17:10 -0500 Subject: [PATCH] Clean up Ember router map No Issue - Switch resources to routes. - No longer nest "settings" routes so the router reflects the way the templates are rendered. - Remove renderTemplate override from settings routes. - Remove unneeded routes, controllers, and views. - Adjust users page so that infinite scroll loading of users works and markup remains the same for Zelda styling. --- core/client/app/controllers/settings.js | 32 ------- core/client/app/router.js | 27 ++---- core/client/app/routes/about.js | 12 +-- core/client/app/routes/settings.js | 10 -- core/client/app/routes/settings/about.js | 10 -- core/client/app/routes/settings/apps.js | 4 - .../app/routes/settings/code-injection.js | 9 +- core/client/app/routes/settings/general.js | 10 +- core/client/app/routes/settings/index.js | 29 ------ core/client/app/routes/settings/labs.js | 11 +-- core/client/app/routes/settings/navigation.js | 7 +- core/client/app/routes/settings/tags.js | 15 ++- .../client/app/routes/settings/users/index.js | 6 +- core/client/app/routes/settings/users/user.js | 6 +- core/client/app/templates/about.hbs | 66 ++++++------- .../app/templates/components/gh-nav-menu.hbs | 2 +- .../app/templates/settings/users/index.hbs | 94 +++++++++---------- core/client/app/views/about.js | 5 - core/client/app/views/settings.js | 20 ---- core/client/app/views/settings/index.js | 5 - .../views/settings/users/users-list-view.js | 8 -- core/client/app/views/users-list.js | 7 ++ core/client/bower.json | 1 - core/test/functional/base.js | 7 +- .../functional/client/settings_about_test.js | 10 -- core/test/functional/client/settings_test.js | 16 ++-- 26 files changed, 126 insertions(+), 303 deletions(-) delete mode 100644 core/client/app/controllers/settings.js delete mode 100644 core/client/app/routes/settings.js delete mode 100644 core/client/app/routes/settings/about.js delete mode 100644 core/client/app/routes/settings/index.js delete mode 100644 core/client/app/views/about.js delete mode 100644 core/client/app/views/settings.js delete mode 100644 core/client/app/views/settings/index.js delete mode 100644 core/client/app/views/settings/users/users-list-view.js create mode 100644 core/client/app/views/users-list.js delete mode 100644 core/test/functional/client/settings_about_test.js diff --git a/core/client/app/controllers/settings.js b/core/client/app/controllers/settings.js deleted file mode 100644 index 27346eef997e..000000000000 --- a/core/client/app/controllers/settings.js +++ /dev/null @@ -1,32 +0,0 @@ -import Ember from 'ember'; -var SettingsController = Ember.Controller.extend({ - - needs: ['feature'], - - showGeneral: Ember.computed('session.user.name', function () { - return this.get('session.user.isAuthor') || this.get('session.user.isEditor') ? false : true; - }), - showUsers: Ember.computed('session.user.name', function () { - return this.get('session.user.isAuthor') ? false : true; - }), - showTags: Ember.computed('session.user.name', function () { - return this.get('session.user.isAuthor') ? false : true; - }), - showNavigation: Ember.computed('session.user.name', function () { - return this.get('session.user.isAuthor') || this.get('session.user.isEditor') ? false : true; - }), - showCodeInjection: Ember.computed('session.user.name', function () { - return this.get('session.user.isAuthor') || this.get('session.user.isEditor') ? false : true; - }), - showLabs: Ember.computed('session.user.name', function () { - return this.get('session.user.isAuthor') || this.get('session.user.isEditor') ? false : true; - }), - showAbout: Ember.computed('session.user.name', function () { - return this.get('session.user.isAuthor') ? false : true; - }), - showPassProtection: Ember.computed('session.user.name', 'controllers.feature.passProtectUI', function () { - return this.get('session.user.isAuthor') || this.get('session.user.isEditor') || !this.get('controllers.feature.passProtectUI') ? false : true; - }) -}); - -export default SettingsController; diff --git a/core/client/app/router.js b/core/client/app/router.js index 615df78d4fb8..bc4421740834 100644 --- a/core/client/app/router.js +++ b/core/client/app/router.js @@ -22,32 +22,23 @@ Router.map(function () { this.route('reset', {path: '/reset/:token'}); this.route('about', {path: '/about'}); - this.resource('posts', {path: '/'}, function () { + this.route('posts', {path: '/'}, function () { this.route('post', {path: ':post_id'}); }); - this.resource('editor', function () { + this.route('editor', function () { this.route('new', {path: ''}); this.route('edit', {path: ':post_id'}); }); - this.resource('settings', function () { - this.route('general'); - - this.resource('settings.users', {path: '/users'}, function () { - this.route('user', {path: '/:slug'}); - }); - - // Redirect about page - this.route('about'); - this.route('tags'); - this.route('labs'); - this.route('code-injection'); - this.route('navigation'); + this.route('settings.general', {path: '/settings/general'}); + this.route('settings.users', {path: '/settings/users'}, function () { + this.route('user', {path: ':slug'}); }); - - // Redirect debug to settings labs - this.route('debug'); + this.route('settings.tags', {path: '/settings/tags'}); + this.route('settings.labs', {path: '/settings/labs'}); + this.route('settings.code-injection', {path: '/settings/code-injection'}); + this.route('settings.navigation', {path: '/settings/navigation'}); // Redirect legacy content to posts this.route('content'); diff --git a/core/client/app/routes/about.js b/core/client/app/routes/about.js index 8263b55cb95d..6d5832795348 100644 --- a/core/client/app/routes/about.js +++ b/core/client/app/routes/about.js @@ -1,15 +1,17 @@ import AuthenticatedRoute from 'ghost/routes/authenticated'; import styleBody from 'ghost/mixins/style-body'; -var AboutRoute = AuthenticatedRoute.extend(styleBody, { +export default AuthenticatedRoute.extend(styleBody, { titleToken: 'About', classNames: ['view-about'], cachedConfig: false, + model: function () { var cachedConfig = this.get('cachedConfig'), self = this; + if (cachedConfig) { return cachedConfig; } @@ -17,18 +19,14 @@ var AboutRoute = AuthenticatedRoute.extend(styleBody, { return ic.ajax.request(this.get('ghostPaths.url').api('configuration')) .then(function (configurationResponse) { var configKeyValues = configurationResponse.configuration; + cachedConfig = {}; configKeyValues.forEach(function (configKeyValue) { cachedConfig[configKeyValue.key] = configKeyValue.value; }); self.set('cachedConfig', cachedConfig); + return cachedConfig; }); - }, - - renderTemplate: function () { - this.render('about', {into: 'application'}); } }); - -export default AboutRoute; diff --git a/core/client/app/routes/settings.js b/core/client/app/routes/settings.js deleted file mode 100644 index fb8722875774..000000000000 --- a/core/client/app/routes/settings.js +++ /dev/null @@ -1,10 +0,0 @@ -import AuthenticatedRoute from 'ghost/routes/authenticated'; -import styleBody from 'ghost/mixins/style-body'; - -var SettingsRoute = AuthenticatedRoute.extend(styleBody, { - titleToken: 'Settings', - - classNames: ['settings'] -}); - -export default SettingsRoute; diff --git a/core/client/app/routes/settings/about.js b/core/client/app/routes/settings/about.js deleted file mode 100644 index 26ffe22e58ae..000000000000 --- a/core/client/app/routes/settings/about.js +++ /dev/null @@ -1,10 +0,0 @@ -import AuthenticatedRoute from 'ghost/routes/authenticated'; -import styleBody from 'ghost/mixins/style-body'; - -var SettingsAboutRoute = AuthenticatedRoute.extend(styleBody, { - beforeModel: function () { - this.transitionTo('about'); - } -}); - -export default SettingsAboutRoute; diff --git a/core/client/app/routes/settings/apps.js b/core/client/app/routes/settings/apps.js index 842bee04fcbd..143a64b1e0c4 100644 --- a/core/client/app/routes/settings/apps.js +++ b/core/client/app/routes/settings/apps.js @@ -19,10 +19,6 @@ var AppsRoute = AuthenticatedRoute.extend(styleBody, CurrentUserSettings, { model: function () { return this.store.find('app'); - }, - - renderTemplate: function () { - this.render('settings/apps', {into: 'application'}); } }); diff --git a/core/client/app/routes/settings/code-injection.js b/core/client/app/routes/settings/code-injection.js index 4a2b69e55b27..49b1360c4ec4 100644 --- a/core/client/app/routes/settings/code-injection.js +++ b/core/client/app/routes/settings/code-injection.js @@ -2,7 +2,8 @@ import AuthenticatedRoute from 'ghost/routes/authenticated'; import CurrentUserSettings from 'ghost/mixins/current-user-settings'; import styleBody from 'ghost/mixins/style-body'; -var SettingsCodeInjectionRoute = AuthenticatedRoute.extend(styleBody, CurrentUserSettings, { +export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, { + titleToken: 'Settings - Code Injection', classNames: ['settings-view-code'], beforeModel: function () { @@ -17,15 +18,9 @@ var SettingsCodeInjectionRoute = AuthenticatedRoute.extend(styleBody, CurrentUse }); }, - renderTemplate: function () { - this.render('settings/code-injection', {into: 'application'}); - }, - actions: { save: function () { this.get('controller').send('save'); } } }); - -export default SettingsCodeInjectionRoute; diff --git a/core/client/app/routes/settings/general.js b/core/client/app/routes/settings/general.js index 47b7a43923ad..8d78d961518c 100644 --- a/core/client/app/routes/settings/general.js +++ b/core/client/app/routes/settings/general.js @@ -2,8 +2,8 @@ import AuthenticatedRoute from 'ghost/routes/authenticated'; import CurrentUserSettings from 'ghost/mixins/current-user-settings'; import styleBody from 'ghost/mixins/style-body'; -var SettingsGeneralRoute = AuthenticatedRoute.extend(styleBody, CurrentUserSettings, { - titleToken: 'General', +export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, { + titleToken: 'Settings - General', classNames: ['settings-view-general'], @@ -19,15 +19,9 @@ var SettingsGeneralRoute = AuthenticatedRoute.extend(styleBody, CurrentUserSetti }); }, - renderTemplate: function () { - this.render('settings/general', {into: 'application'}); - }, - actions: { save: function () { this.get('controller').send('save'); } } }); - -export default SettingsGeneralRoute; diff --git a/core/client/app/routes/settings/index.js b/core/client/app/routes/settings/index.js deleted file mode 100644 index 73fc430837c4..000000000000 --- a/core/client/app/routes/settings/index.js +++ /dev/null @@ -1,29 +0,0 @@ -import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin'; -import MobileIndexRoute from 'ghost/routes/mobile-index-route'; -import CurrentUserSettings from 'ghost/mixins/current-user-settings'; -import mobileQuery from 'ghost/utils/mobile'; - -var SettingsIndexRoute = MobileIndexRoute.extend(AuthenticatedRouteMixin, CurrentUserSettings, { - titleToken: 'Settings', - - // Redirect users without permission to view settings, - // and show the settings.general route unless the user - // is mobile - beforeModel: function () { - var self = this; - return this.get('session.user') - .then(this.transitionAuthor()) - .then(this.transitionEditor()) - .then(function () { - if (!mobileQuery.matches) { - self.transitionTo('settings.general'); - } - }); - }, - - desktopTransition: function () { - this.transitionTo('settings.general'); - } -}); - -export default SettingsIndexRoute; diff --git a/core/client/app/routes/settings/labs.js b/core/client/app/routes/settings/labs.js index dbf8a77f80da..8e98b670eddc 100644 --- a/core/client/app/routes/settings/labs.js +++ b/core/client/app/routes/settings/labs.js @@ -2,10 +2,11 @@ import AuthenticatedRoute from 'ghost/routes/authenticated'; import styleBody from 'ghost/mixins/style-body'; import CurrentUserSettings from 'ghost/mixins/current-user-settings'; -var LabsRoute = AuthenticatedRoute.extend(styleBody, CurrentUserSettings, { - titleToken: 'Labs', +export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, { + titleToken: 'Settings - Labs', classNames: ['settings'], + beforeModel: function () { return this.get('session.user') .then(this.transitionAuthor()) @@ -16,11 +17,5 @@ var LabsRoute = AuthenticatedRoute.extend(styleBody, CurrentUserSettings, { return this.store.find('setting', {type: 'blog,theme'}).then(function (records) { return records.get('firstObject'); }); - }, - - renderTemplate: function () { - this.render('settings/labs', {into: 'application'}); } }); - -export default LabsRoute; diff --git a/core/client/app/routes/settings/navigation.js b/core/client/app/routes/settings/navigation.js index f4fe79e30845..4ec275648c30 100644 --- a/core/client/app/routes/settings/navigation.js +++ b/core/client/app/routes/settings/navigation.js @@ -3,8 +3,7 @@ import CurrentUserSettings from 'ghost/mixins/current-user-settings'; import styleBody from 'ghost/mixins/style-body'; var NavigationRoute = AuthenticatedRoute.extend(styleBody, CurrentUserSettings, { - - titleToken: 'Navigation', + titleToken: 'Settings - Navigation', classNames: ['settings-view-navigation'], @@ -19,10 +18,6 @@ var NavigationRoute = AuthenticatedRoute.extend(styleBody, CurrentUserSettings, }); }, - renderTemplate: function () { - this.render('settings/navigation', {into: 'application'}); - }, - actions: { save: function () { // since shortcuts are run on the route, we have to signal to the components diff --git a/core/client/app/routes/settings/tags.js b/core/client/app/routes/settings/tags.js index e19be9aa2819..698e8d6d15f6 100644 --- a/core/client/app/routes/settings/tags.js +++ b/core/client/app/routes/settings/tags.js @@ -12,13 +12,7 @@ paginationSettings = { }; TagsRoute = AuthenticatedRoute.extend(CurrentUserSettings, PaginationRouteMixin, { - actions: { - willTransition: function () { - this.send('closeSettingsMenu'); - } - }, - - titleToken: 'Tags', + titleToken: 'Settings - Tags', beforeModel: function () { return this.get('session.user') @@ -40,7 +34,6 @@ TagsRoute = AuthenticatedRoute.extend(CurrentUserSettings, PaginationRouteMixin, renderTemplate: function (controller, model) { this._super(controller, model); - this.render('settings/tags', {into: 'application'}); this.render('settings/tags/settings-menu', { into: 'application', outlet: 'settings-menu', @@ -50,6 +43,12 @@ TagsRoute = AuthenticatedRoute.extend(CurrentUserSettings, PaginationRouteMixin, deactivate: function () { this.controller.send('resetPagination'); + }, + + actions: { + willTransition: function () { + this.send('closeSettingsMenu'); + } } }); diff --git a/core/client/app/routes/settings/users/index.js b/core/client/app/routes/settings/users/index.js index 738d9056eb09..12321b36bf35 100644 --- a/core/client/app/routes/settings/users/index.js +++ b/core/client/app/routes/settings/users/index.js @@ -13,7 +13,7 @@ paginationSettings = { }; UsersIndexRoute = AuthenticatedRoute.extend(styleBody, CurrentUserSettings, PaginationRouteMixin, { - titleToken: 'Users', + titleToken: 'Team', classNames: ['settings-view-users'], @@ -47,10 +47,6 @@ UsersIndexRoute = AuthenticatedRoute.extend(styleBody, CurrentUserSettings, Pagi }); }, - renderTemplate: function () { - this.render('settings/users/index', {into: 'application'}); - }, - actions: { reload: function () { this.refresh(); diff --git a/core/client/app/routes/settings/users/user.js b/core/client/app/routes/settings/users/user.js index 4dbca6b70014..72c2cd2ecdc9 100644 --- a/core/client/app/routes/settings/users/user.js +++ b/core/client/app/routes/settings/users/user.js @@ -3,7 +3,7 @@ import CurrentUserSettings from 'ghost/mixins/current-user-settings'; import styleBody from 'ghost/mixins/style-body'; var SettingsUserRoute = AuthenticatedRoute.extend(styleBody, CurrentUserSettings, { - titleToken: 'User', + titleToken: 'Team - User', classNames: ['settings-view-user'], @@ -49,10 +49,6 @@ var SettingsUserRoute = AuthenticatedRoute.extend(styleBody, CurrentUserSettings this._super(); }, - renderTemplate: function () { - this.render('settings/users/user', {into: 'application'}); - }, - actions: { save: function () { this.get('controller').send('save'); diff --git a/core/client/app/templates/about.hbs b/core/client/app/templates/about.hbs index cc3e9814cbc6..8d20c938532d 100644 --- a/core/client/app/templates/about.hbs +++ b/core/client/app/templates/about.hbs @@ -1,41 +1,41 @@ -
- -
- - - {{gh-notifications location="about-upgrade" notify="updateNotificationChange"}} -
+
+
+
+ + + {{gh-notifications location="about-upgrade" notify="updateNotificationChange"}} +
+ +
+
    +
  • Version {{model.version}}
  • +
  • Environment {{model.environment}}
  • +
  • Database {{model.database}}
  • +
  • Mail {{#if model.mail}}{{model.mail}}{{else}}Native{{/if}}
  • +
+ +
-
-
    -
  • Version {{model.version}}
  • -
  • Environment {{model.environment}}
  • -
  • Database {{model.database}}
  • -
  • Mail {{#if model.mail}}{{model.mail}}{{else}}Native{{/if}}
  • -
- -
+
+

The People Who Made it Possible

-
-

The People Who Made it Possible

+
+ {{partial "contributors"}} +
-
- {{partial "contributors"}} -
+

Ghost is built by an incredible group of contributors from all over the world. Here are just a few of the people who helped create the version you’re using right now.

-

Ghost is built by an incredible group of contributors from all over the world. Here are just a few of the people who helped create the version you’re using right now.

+ Find out how you can get involved - Find out how you can get involved +
+
- - -
diff --git a/core/client/app/templates/components/gh-nav-menu.hbs b/core/client/app/templates/components/gh-nav-menu.hbs index 25e47d8c1fbe..e84b393ccd3c 100644 --- a/core/client/app/templates/components/gh-nav-menu.hbs +++ b/core/client/app/templates/components/gh-nav-menu.hbs @@ -8,7 +8,7 @@ {{/gh-dropdown-button}} {{#gh-dropdown tagName="div" classNames="dropdown" name="user-menu" closeOnClick="true"}}
-
+ {{#view "users-list"}} + {{#if invitedUsers}} +
- {{#if invitedUsers}} +

Invited users

-
+ {{#each user in invitedUsers itemController="settings/users/user"}} +
+ ic -

Invited users

+
+ {{user.email}}
+ {{#if user.model.pending}} + Invitation not sent - please try again + {{else}} + Invitation sent: {{user.model.created_at}} + {{/if}} +
+ +
+ {{/each}} + +
+ {{/if}} - {{#each user in invitedUsers itemController="settings/users/user"}} -
- ic +
+ +

Active users

+ + {{#each user in activeUsers itemController="settings/users/user"}} + {{#link-to 'settings.users.user' user.model class="user-list-item" }} + + +
- {{user.email}}
- {{#if user.model.pending}} - Invitation not sent - please try again - {{else}} - Invitation sent: {{user.model.created_at}} - {{/if}} + + {{user.model.name}} + +
+ Last seen: {{user.last_login}}
-
+ {{/link-to}} {{/each}}
- - {{/if}} - -
- -

Active users

- - {{#each user in activeUsers itemController="settings/users/user"}} - {{#link-to 'settings.users.user' user.model class="user-list-item" }} - - - - -
- - {{user.model.name}} - -
- Last seen: {{user.last_login}} -
- - {{/link-to}} - {{/each}} - -
- -
{{! .content settings-users }} + {{/view}} diff --git a/core/client/app/views/about.js b/core/client/app/views/about.js deleted file mode 100644 index ca97178f90bb..000000000000 --- a/core/client/app/views/about.js +++ /dev/null @@ -1,5 +0,0 @@ -import BaseView from 'ghost/views/settings/content-base'; - -var AboutView = BaseView.extend(); - -export default AboutView; diff --git a/core/client/app/views/settings.js b/core/client/app/views/settings.js deleted file mode 100644 index 516ca3adc708..000000000000 --- a/core/client/app/views/settings.js +++ /dev/null @@ -1,20 +0,0 @@ -import MobileParentView from 'ghost/views/mobile/parent-view'; - -var SettingsView = MobileParentView.extend({ - // MobileParentView callbacks - showMenu: function () { - $('.js-settings-header-inner').css('display', 'none'); - $('.js-settings-menu').css({right: '0', left: '0', 'margin-right': '0'}); - $('.js-settings-content').css({right: '-100%', left: '100%', 'margin-left': '15'}); - }, - showContent: function () { - $('.js-settings-menu').css({right: '100%', left: '-110%', 'margin-right': '15px'}); - $('.js-settings-content').css({right: '0', left: '0', 'margin-left': '0'}); - $('.js-settings-header-inner').css('display', 'block'); - }, - showAll: function () { - $('.js-settings-menu, .js-settings-content').removeAttr('style'); - } -}); - -export default SettingsView; diff --git a/core/client/app/views/settings/index.js b/core/client/app/views/settings/index.js deleted file mode 100644 index 2ffb98081392..000000000000 --- a/core/client/app/views/settings/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import MobileIndexView from 'ghost/views/mobile/index-view'; - -var SettingsIndexView = MobileIndexView.extend(); - -export default SettingsIndexView; diff --git a/core/client/app/views/settings/users/users-list-view.js b/core/client/app/views/settings/users/users-list-view.js deleted file mode 100644 index 23425e0ea847..000000000000 --- a/core/client/app/views/settings/users/users-list-view.js +++ /dev/null @@ -1,8 +0,0 @@ -import Ember from 'ember'; -import PaginationViewMixin from 'ghost/mixins/pagination-view-infinite-scroll'; - -var UsersListView = Ember.View.extend(PaginationViewMixin, { - classNames: ['js-users-list-view'] -}); - -export default UsersListView; diff --git a/core/client/app/views/users-list.js b/core/client/app/views/users-list.js new file mode 100644 index 000000000000..31596c70ce49 --- /dev/null +++ b/core/client/app/views/users-list.js @@ -0,0 +1,7 @@ +import Ember from 'ember'; +import PaginationViewMixin from 'ghost/mixins/pagination-view-infinite-scroll'; + +export default Ember.View.extend(PaginationViewMixin, { + tagName: 'section', + classNames: ['js-users-list-view', 'view-content', 'settings-users'] +}); diff --git a/core/client/bower.json b/core/client/bower.json index 1ab7884fb172..f6ead3719739 100644 --- a/core/client/bower.json +++ b/core/client/bower.json @@ -20,7 +20,6 @@ "loader.js": "3.2.1", "moment": "2.10.2", "normalize.css": "3.0.3", - "nprogress": "0.1.6", "password-generator": "git://github.com/bermi/password-generator#49accd7", "rangyinputs": "1.2.0", "showdown-ghost": "0.3.6", diff --git a/core/test/functional/base.js b/core/test/functional/base.js index b8026db3b7fb..e784e2958718 100644 --- a/core/test/functional/base.js +++ b/core/test/functional/base.js @@ -76,7 +76,7 @@ screens = { selector: '.gh-nav-main-editor.active' }, about: { - url: 'ghost/settings/about', + url: 'ghost/about', linkSelector: '.gh-nav-menu-about', selector: '.gh-about-header' }, @@ -89,11 +89,6 @@ screens = { url: 'ghost/settings/general', selector: '.gh-nav-settings-general.active' }, - 'settings.about': { - url: 'ghost/settings/about', - linkSelector: '.gh-nav-menu-about', - selector: '.gh-about-header' - }, 'settings.users': { url: 'ghost/settings/users', linkSelector: '.gh-nav-main-users', diff --git a/core/test/functional/client/settings_about_test.js b/core/test/functional/client/settings_about_test.js deleted file mode 100644 index 4dcde4581dc4..000000000000 --- a/core/test/functional/client/settings_about_test.js +++ /dev/null @@ -1,10 +0,0 @@ -// # Settings About Test -// Tests that the settings about page is redirected - -/*globals CasperTest, casper */ - -CasperTest.begin('About screen is correct', 1, function suite(test) { - casper.thenOpenAndWaitForPageLoad('settings.about', function testTitleAndUrl() { - test.assertUrlMatch(/ghost\/about\/$/, 'Redirected to the correct URL'); - }); -}); diff --git a/core/test/functional/client/settings_test.js b/core/test/functional/client/settings_test.js index 5ddf89634a9e..cff9c9ca086c 100644 --- a/core/test/functional/client/settings_test.js +++ b/core/test/functional/client/settings_test.js @@ -198,7 +198,7 @@ CasperTest.begin('Users screen is correct', 9, function suite(test) { // ### User settings tests CasperTest.begin('Can save settings', 7, function suite(test) { casper.thenOpenAndWaitForPageLoad('settings.users.user', function testTitleAndUrl() { - test.assertTitle('Settings - User - Test Blog', 'Ghost Admin title is correct'); + test.assertTitle('Team - User - Test Blog', 'Ghost Admin title is correct'); test.assertUrlMatch(/ghost\/settings\/users\/test\/$/, 'settings.users.user has correct URL'); }); @@ -273,7 +273,7 @@ CasperTest.begin('User settings screen resets all whitespace slug to original va var slug; casper.thenOpenAndWaitForPageLoad('settings.users.user', function testTitleAndUrl() { - test.assertTitle('Settings - User - Test Blog', 'Ghost admin has incorrect title'); + test.assertTitle('Team - User - Test Blog', 'Ghost admin has incorrect title'); test.assertUrlMatch(/ghost\/settings\/users\/test\/$/, 'Ghost doesn\'t require login this time'); }); @@ -301,7 +301,7 @@ CasperTest.begin('User settings screen change slug handles duplicate slug', 4, f var slug; casper.thenOpenAndWaitForPageLoad('settings.users.user', function testTitleAndUrl() { - test.assertTitle('Settings - User - Test Blog', 'Ghost admin has incorrect title'); + test.assertTitle('Team - User - Test Blog', 'Ghost admin has incorrect title'); test.assertUrlMatch(/ghost\/settings\/users\/test\/$/, 'Ghost doesn\'t require login this time'); }); @@ -332,7 +332,7 @@ CasperTest.begin('User settings screen validates email', 6, function suite(test) var email; casper.thenOpenAndWaitForPageLoad('settings.users.user', function testTitleAndUrl() { - test.assertTitle('Settings - User - Test Blog', 'Ghost admin has incorrect title'); + test.assertTitle('Team - User - Test Blog', 'Ghost admin has incorrect title'); test.assertUrlMatch(/ghost\/settings\/users\/test\/$/, 'Ghost doesn\'t require login this time'); }); @@ -378,7 +378,7 @@ CasperTest.begin('User settings screen validates email', 6, function suite(test) // TODO: user needs to be loaded whenever it is edited (multi user) CasperTest.begin('User settings screen shows remaining characters for Bio properly', 4, function suite(test) { casper.thenOpenAndWaitForPageLoad('settings.users.user', function testTitleAndUrl() { - test.assertTitle('Settings - User - Test Blog', 'Ghost admin has incorrect title'); + test.assertTitle('Team - User - Test Blog', 'Ghost admin has incorrect title'); test.assertUrlMatch(/ghost\/settings\/users\/test\/$/, 'Ghost doesn\'t require login this time'); }); @@ -403,7 +403,7 @@ CasperTest.begin('User settings screen shows remaining characters for Bio proper CasperTest.begin('Ensure user bio field length validation', 3, function suite(test) { casper.thenOpenAndWaitForPageLoad('settings.users.user', function testTitleAndUrl() { - test.assertTitle('Settings - User - Test Blog', 'Ghost admin has incorrect title'); + test.assertTitle('Team - User - Test Blog', 'Ghost admin has incorrect title'); test.assertUrlMatch(/ghost\/settings\/users\/test\/$/, 'Ghost doesn\'t require login this time'); }); @@ -422,7 +422,7 @@ CasperTest.begin('Ensure user bio field length validation', 3, function suite(te CasperTest.begin('Ensure user url field validation', 3, function suite(test) { casper.thenOpenAndWaitForPageLoad('settings.users.user', function testTitleAndUrl() { - test.assertTitle('Settings - User - Test Blog', 'Ghost admin has incorrect title'); + test.assertTitle('Team - User - Test Blog', 'Ghost admin has incorrect title'); test.assertUrlMatch(/ghost\/settings\/users\/test\/$/, 'Ghost doesn\'t require login this time'); }); @@ -441,7 +441,7 @@ CasperTest.begin('Ensure user url field validation', 3, function suite(test) { CasperTest.begin('Ensure user location field length validation', 3, function suite(test) { casper.thenOpenAndWaitForPageLoad('settings.users.user', function testTitleAndUrl() { - test.assertTitle('Settings - User - Test Blog', 'Ghost admin has incorrect title'); + test.assertTitle('Team - User - Test Blog', 'Ghost admin has incorrect title'); test.assertUrlMatch(/ghost\/settings\/users\/test\/$/, 'Ghost doesn\'t require login this time'); });