mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-25 02:31:59 -05:00
Update Ember to 1.8.0.
Closes #4316 - Ember@1.8.0. - Ember-Data@1.0.0-beta.11. - Change templates to use new Ember.Select syntax and other minor cleanup. - Adjust functional tests.
This commit is contained in:
parent
3a8e8c9765
commit
de63f56f68
8 changed files with 35 additions and 16 deletions
|
@ -4,8 +4,8 @@
|
||||||
"codemirror": "4.0.1",
|
"codemirror": "4.0.1",
|
||||||
"Countable": "2.0.2",
|
"Countable": "2.0.2",
|
||||||
"device": "git://github.com/matthewhudson/device.js#5347a275b66020a0d4dfe9aad81a488f8cce448d",
|
"device": "git://github.com/matthewhudson/device.js#5347a275b66020a0d4dfe9aad81a488f8cce448d",
|
||||||
"ember": "1.7.0",
|
"ember": "1.8.0",
|
||||||
"ember-data": "~1.0.0-beta.8",
|
"ember-data": "1.0.0-beta.11",
|
||||||
"ember-load-initializers": "git://github.com/stefanpenner/ember-load-initializers.git#0.0.1",
|
"ember-load-initializers": "git://github.com/stefanpenner/ember-load-initializers.git#0.0.1",
|
||||||
"ember-resolver": "git://github.com/stefanpenner/ember-jj-abrams-resolver.git#181251821cf513bb58d3e192faa13245a816f75e",
|
"ember-resolver": "git://github.com/stefanpenner/ember-jj-abrams-resolver.git#181251821cf513bb58d3e192faa13245a816f75e",
|
||||||
"ember-simple-auth": "0.6.6",
|
"ember-simple-auth": "0.6.6",
|
||||||
|
|
|
@ -266,7 +266,7 @@ textarea {
|
||||||
// Select Component
|
// Select Component
|
||||||
// ---
|
// ---
|
||||||
// <span class="gh-select">
|
// <span class="gh-select">
|
||||||
// {{view Ember.Select
|
// {{view "select"
|
||||||
// id="activeTheme"
|
// id="activeTheme"
|
||||||
// name="general[activeTheme]"
|
// name="general[activeTheme]"
|
||||||
// content=themes
|
// content=themes
|
||||||
|
|
|
@ -7,6 +7,12 @@ var ApplicationController = Ember.Controller.extend({
|
||||||
showGlobalMobileNav: false,
|
showGlobalMobileNav: false,
|
||||||
showSettingsMenu: false,
|
showSettingsMenu: false,
|
||||||
|
|
||||||
|
userImageAlt: Ember.computed('session.user.name', function () {
|
||||||
|
var name = this.get('session.user.name');
|
||||||
|
|
||||||
|
return name + '\'s profile picture';
|
||||||
|
}),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
topNotificationChange: function (count) {
|
topNotificationChange: function (count) {
|
||||||
this.set('topNotificationCount', count);
|
this.set('topNotificationCount', count);
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<div class="nav-item user-menu" data-href="#">
|
<div class="nav-item user-menu" data-href="#">
|
||||||
{{#gh-dropdown-button dropdownName="user-menu" tagName="div" classNames="nav-label clearfix"}}
|
{{#gh-dropdown-button dropdownName="user-menu" tagName="div" classNames="nav-label clearfix"}}
|
||||||
{{#if session.user.image}}
|
{{#if session.user.image}}
|
||||||
<div class="image"><img {{bind-attr src="session.user.image"}} alt="{{session.user.name}}'s profile picture" /></div>
|
<div class="image"><img {{bind-attr src=session.user.image alt=userImageAlt}} /></div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="image"><img src="{{gh-path "blog" "shared/img/user-image.png"}}" alt="Profile picture" /></div>
|
<div class="image"><img src="{{gh-path "blog" "shared/img/user-image.png"}}" alt="Profile picture" /></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<label for="author-list">Author</label>
|
<label for="author-list">Author</label>
|
||||||
<span class="input-icon icon-user">
|
<span class="input-icon icon-user">
|
||||||
<span class="gh-select" tabindex="0">
|
<span class="gh-select" tabindex="0">
|
||||||
{{view Ember.Select
|
{{view "select"
|
||||||
name="post-setting-author"
|
name="post-setting-author"
|
||||||
id="author-list"
|
id="author-list"
|
||||||
content=authors
|
content=authors
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
<div class="form-group for-select">
|
<div class="form-group for-select">
|
||||||
<label for="activeTheme">Theme</label>
|
<label for="activeTheme">Theme</label>
|
||||||
<span class="gh-select" {{bind-attr data-select-text=selectedTheme.label}} tabindex="0">
|
<span class="gh-select" {{bind-attr data-select-text=selectedTheme.label}} tabindex="0">
|
||||||
{{view Ember.Select
|
{{view "select"
|
||||||
id="activeTheme"
|
id="activeTheme"
|
||||||
name="general[activeTheme]"
|
name="general[activeTheme]"
|
||||||
content=themes
|
content=themes
|
||||||
|
|
|
@ -39,7 +39,7 @@ CasperTest.begin('Ghost editor functions correctly', 20, function suite(test) {
|
||||||
|
|
||||||
// Part 2: Test saving with data
|
// Part 2: Test saving with data
|
||||||
casper.then(function createTestPost() {
|
casper.then(function createTestPost() {
|
||||||
casper.sendKeys('#entry-title', testPost.title);
|
casper.sendKeys('#entry-title', testPost.title, {reset: true});
|
||||||
casper.writeContentToCodeMirror(testPost.html);
|
casper.writeContentToCodeMirror(testPost.html);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -625,7 +625,7 @@ CasperTest.begin('Title input is set correctly after using the Post-Settings-Men
|
||||||
|
|
||||||
// add a new post
|
// add a new post
|
||||||
casper.then(function fillContent() {
|
casper.then(function fillContent() {
|
||||||
casper.sendKeys('#entry-title', 'post title');
|
casper.sendKeys('#entry-title', 'post title', {reset: true});
|
||||||
casper.writeContentToCodeMirror('Just a bit of test text');
|
casper.writeContentToCodeMirror('Just a bit of test text');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -636,7 +636,7 @@ CasperTest.begin('Title input is set correctly after using the Post-Settings-Men
|
||||||
|
|
||||||
// change the title
|
// change the title
|
||||||
casper.then(function updateTitle() {
|
casper.then(function updateTitle() {
|
||||||
casper.sendKeys('#entry-title', 'changed post title');
|
casper.sendKeys('#entry-title', 'changed post title', {reset: true});
|
||||||
casper.click('#entry-markdown-content');
|
casper.click('#entry-markdown-content');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -277,9 +277,13 @@ CasperTest.begin('User settings screen resets all whitespace slug to original va
|
||||||
test.assertUrlMatch(/ghost\/settings\/users\/test\/$/, 'Ghost doesn\'t require login this time');
|
test.assertUrlMatch(/ghost\/settings\/users\/test\/$/, 'Ghost doesn\'t require login this time');
|
||||||
});
|
});
|
||||||
|
|
||||||
casper.then(function setSlugToAllWhitespace() {
|
casper.then(function getSlugValue() {
|
||||||
slug = casper.getElementInfo('#user-slug').attributes.value;
|
slug = this.evaluate(function () {
|
||||||
|
return document.querySelector('#user-slug').value;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
casper.then(function changeSlugInput() {
|
||||||
casper.fillSelectors('.user-profile', {
|
casper.fillSelectors('.user-profile', {
|
||||||
'#user-slug': ' '
|
'#user-slug': ' '
|
||||||
}, false);
|
}, false);
|
||||||
|
@ -301,9 +305,13 @@ CasperTest.begin('User settings screen change slug handles duplicate slug', 4, f
|
||||||
test.assertUrlMatch(/ghost\/settings\/users\/test\/$/, 'Ghost doesn\'t require login this time');
|
test.assertUrlMatch(/ghost\/settings\/users\/test\/$/, 'Ghost doesn\'t require login this time');
|
||||||
});
|
});
|
||||||
|
|
||||||
casper.then(function changeSlug() {
|
casper.then(function getSlugValue() {
|
||||||
slug = casper.getElementInfo('#user-slug').attributes.value;
|
slug = this.evaluate(function () {
|
||||||
|
return document.querySelector('#user-slug').value;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
casper.then(function changeSlug() {
|
||||||
casper.fillSelectors('.user-profile', {
|
casper.fillSelectors('.user-profile', {
|
||||||
'#user-slug': slug + '!'
|
'#user-slug': slug + '!'
|
||||||
}, false);
|
}, false);
|
||||||
|
@ -321,16 +329,21 @@ CasperTest.begin('User settings screen change slug handles duplicate slug', 4, f
|
||||||
});
|
});
|
||||||
|
|
||||||
CasperTest.begin('User settings screen validates email', 6, function suite(test) {
|
CasperTest.begin('User settings screen validates email', 6, function suite(test) {
|
||||||
var email, brokenEmail;
|
var email;
|
||||||
|
|
||||||
casper.thenOpenAndWaitForPageLoad('settings.users.user', function testTitleAndUrl() {
|
casper.thenOpenAndWaitForPageLoad('settings.users.user', function testTitleAndUrl() {
|
||||||
test.assertTitle('Ghost Admin', 'Ghost admin has no title');
|
test.assertTitle('Ghost Admin', 'Ghost admin has no title');
|
||||||
test.assertUrlMatch(/ghost\/settings\/users\/test\/$/, 'Ghost doesn\'t require login this time');
|
test.assertUrlMatch(/ghost\/settings\/users\/test\/$/, 'Ghost doesn\'t require login this time');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
casper.then(function getEmail() {
|
||||||
|
email = this.evaluate(function () {
|
||||||
|
return document.querySelector('#user-email').value;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
casper.then(function setEmailToInvalid() {
|
casper.then(function setEmailToInvalid() {
|
||||||
email = casper.getElementInfo('#user-email').attributes.value;
|
var brokenEmail = email.replace('.', '-');
|
||||||
brokenEmail = email.replace('.', '-');
|
|
||||||
|
|
||||||
casper.fillSelectors('.user-profile', {
|
casper.fillSelectors('.user-profile', {
|
||||||
'#user-email': brokenEmail
|
'#user-email': brokenEmail
|
||||||
|
|
Loading…
Add table
Reference in a new issue