Revert "Revert Ember 2.10+ for a short while"

This reverts commit 21682fd60b.
This commit is contained in:
Robin Ward
2016-12-16 09:52:29 -05:00
parent 2600aca80b
commit 76bbc481cb
101 changed files with 1867 additions and 1274 deletions

View File

@@ -170,7 +170,7 @@ test("toggleParticipant", function() {
equal(postStream.get('userFilters.length'), 0, "by default no participants are toggled");
postStream.toggleParticipant(participant.username);
ok(postStream.get('userFilters').contains('eviltrout'), 'eviltrout is in the filters');
ok(postStream.get('userFilters').includes('eviltrout'), 'eviltrout is in the filters');
postStream.toggleParticipant(participant.username);
blank(postStream.get('userFilters'), "toggling the participant again removes them");
@@ -283,7 +283,7 @@ test("identity map", function() {
});
test("loadIntoIdentityMap with no data", () => {
buildStream(1234).loadIntoIdentityMap([]).then(result => {
return buildStream(1234).loadIntoIdentityMap([]).then(result => {
equal(result.length, 0, 'requesting no posts produces no posts');
});
});
@@ -291,7 +291,7 @@ test("loadIntoIdentityMap with no data", () => {
test("loadIntoIdentityMap with post ids", function() {
const postStream = buildStream(1234);
postStream.loadIntoIdentityMap([10]).then(function() {
return postStream.loadIntoIdentityMap([10]).then(function() {
present(postStream.findLoadedPost(10), "it adds the returned post to the store");
});
});
@@ -327,7 +327,7 @@ test("staging and undoing a new post", function() {
equal(stagedPost.get('topic'), topic, "it assigns the topic reference");
equal(stagedPost.get('post_number'), 2, "it is assigned the probable post_number");
present(stagedPost.get('created_at'), "it is assigned a created date");
ok(postStream.get('posts').contains(stagedPost), "the post is added to the stream");
ok(postStream.get('posts').includes(stagedPost), "the post is added to the stream");
equal(stagedPost.get('id'), -1, "the post has a magical -1 id");
// Undoing a created post (there was an error)
@@ -337,7 +337,7 @@ test("staging and undoing a new post", function() {
equal(topic.get('highest_post_number'), 1, "it reverts the highest_post_number");
equal(topic.get('posts_count'), 1, "it reverts the post count");
equal(postStream.get('filteredPostsCount'), 1, "it retains the filteredPostsCount");
ok(!postStream.get('posts').contains(stagedPost), "the post is removed from the stream");
ok(!postStream.get('posts').includes(stagedPost), "the post is removed from the stream");
ok(postStream.get('lastAppended'), original, "it doesn't consider undid post lastAppended");
});
@@ -367,7 +367,7 @@ test("staging and committing a post", function() {
ok(postStream.get('lastAppended'), original, "staging a post doesn't change the lastAppended");
postStream.commitPost(stagedPost);
ok(postStream.get('posts').contains(stagedPost), "the post is still in the stream");
ok(postStream.get('posts').includes(stagedPost), "the post is still in the stream");
ok(!postStream.get('loading'), "it is no longer loading");
equal(postStream.get('filteredPostsCount'), 2, "it increases the filteredPostsCount");

View File

@@ -15,7 +15,7 @@ test('defaults', function() {
test('pagination support', function() {
const store = createStore();
store.findAll('widget').then(function(rs) {
return store.findAll('widget').then(function(rs) {
equal(rs.get('length'), 2);
equal(rs.get('totalRows'), 4);
ok(rs.get('loadMoreUrl'), 'has a url to load more');
@@ -36,7 +36,7 @@ test('pagination support', function() {
test('refresh support', function() {
const store = createStore();
store.findAll('widget').then(function(rs) {
return store.findAll('widget').then(function(rs) {
equal(rs.get('refreshUrl'), '/widgets?refresh=true', 'it has the refresh url');
const promise = rs.refresh();