mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03: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
@ -4,8 +4,8 @@
|
||||
"codemirror": "4.0.1",
|
||||
"Countable": "2.0.2",
|
||||
"device": "git://github.com/matthewhudson/device.js#5347a275b66020a0d4dfe9aad81a488f8cce448d",
|
||||
"ember": "1.7.0",
|
||||
"ember-data": "~1.0.0-beta.8",
|
||||
"ember": "1.8.0",
|
||||
"ember-data": "1.0.0-beta.11",
|
||||
"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-simple-auth": "0.6.6",
|
||||
|
@ -266,7 +266,7 @@ textarea {
|
||||
// Select Component
|
||||
// ---
|
||||
// <span class="gh-select">
|
||||
// {{view Ember.Select
|
||||
// {{view "select"
|
||||
// id="activeTheme"
|
||||
// name="general[activeTheme]"
|
||||
// content=themes
|
||||
|
@ -7,6 +7,12 @@ var ApplicationController = Ember.Controller.extend({
|
||||
showGlobalMobileNav: false,
|
||||
showSettingsMenu: false,
|
||||
|
||||
userImageAlt: Ember.computed('session.user.name', function () {
|
||||
var name = this.get('session.user.name');
|
||||
|
||||
return name + '\'s profile picture';
|
||||
}),
|
||||
|
||||
actions: {
|
||||
topNotificationChange: function (count) {
|
||||
this.set('topNotificationCount', count);
|
||||
|
@ -32,7 +32,7 @@
|
||||
<div class="nav-item user-menu" data-href="#">
|
||||
{{#gh-dropdown-button dropdownName="user-menu" tagName="div" classNames="nav-label clearfix"}}
|
||||
{{#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}}
|
||||
<div class="image"><img src="{{gh-path "blog" "shared/img/user-image.png"}}" alt="Profile picture" /></div>
|
||||
{{/if}}
|
||||
|
@ -28,7 +28,7 @@
|
||||
<label for="author-list">Author</label>
|
||||
<span class="input-icon icon-user">
|
||||
<span class="gh-select" tabindex="0">
|
||||
{{view Ember.Select
|
||||
{{view "select"
|
||||
name="post-setting-author"
|
||||
id="author-list"
|
||||
content=authors
|
||||
|
@ -72,7 +72,7 @@
|
||||
<div class="form-group for-select">
|
||||
<label for="activeTheme">Theme</label>
|
||||
<span class="gh-select" {{bind-attr data-select-text=selectedTheme.label}} tabindex="0">
|
||||
{{view Ember.Select
|
||||
{{view "select"
|
||||
id="activeTheme"
|
||||
name="general[activeTheme]"
|
||||
content=themes
|
||||
|
@ -39,7 +39,7 @@ CasperTest.begin('Ghost editor functions correctly', 20, function suite(test) {
|
||||
|
||||
// Part 2: Test saving with data
|
||||
casper.then(function createTestPost() {
|
||||
casper.sendKeys('#entry-title', testPost.title);
|
||||
casper.sendKeys('#entry-title', testPost.title, {reset: true});
|
||||
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
|
||||
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');
|
||||
});
|
||||
|
||||
@ -636,7 +636,7 @@ CasperTest.begin('Title input is set correctly after using the Post-Settings-Men
|
||||
|
||||
// change the title
|
||||
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');
|
||||
});
|
||||
|
||||
|
@ -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');
|
||||
});
|
||||
|
||||
casper.then(function setSlugToAllWhitespace() {
|
||||
slug = casper.getElementInfo('#user-slug').attributes.value;
|
||||
casper.then(function getSlugValue() {
|
||||
slug = this.evaluate(function () {
|
||||
return document.querySelector('#user-slug').value;
|
||||
});
|
||||
});
|
||||
|
||||
casper.then(function changeSlugInput() {
|
||||
casper.fillSelectors('.user-profile', {
|
||||
'#user-slug': ' '
|
||||
}, 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');
|
||||
});
|
||||
|
||||
casper.then(function changeSlug() {
|
||||
slug = casper.getElementInfo('#user-slug').attributes.value;
|
||||
casper.then(function getSlugValue() {
|
||||
slug = this.evaluate(function () {
|
||||
return document.querySelector('#user-slug').value;
|
||||
});
|
||||
});
|
||||
|
||||
casper.then(function changeSlug() {
|
||||
casper.fillSelectors('.user-profile', {
|
||||
'#user-slug': slug + '!'
|
||||
}, 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) {
|
||||
var email, brokenEmail;
|
||||
var email;
|
||||
|
||||
casper.thenOpenAndWaitForPageLoad('settings.users.user', function testTitleAndUrl() {
|
||||
test.assertTitle('Ghost Admin', 'Ghost admin has no title');
|
||||
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() {
|
||||
email = casper.getElementInfo('#user-email').attributes.value;
|
||||
brokenEmail = email.replace('.', '-');
|
||||
var brokenEmail = email.replace('.', '-');
|
||||
|
||||
casper.fillSelectors('.user-profile', {
|
||||
'#user-email': brokenEmail
|
||||
|
Loading…
Reference in New Issue
Block a user