mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
Revert Ember 2.10+ for a short while
This commit is contained in:
@ -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').includes('eviltrout'), 'eviltrout is in the filters');
|
||||
ok(postStream.get('userFilters').contains('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", () => {
|
||||
return buildStream(1234).loadIntoIdentityMap([]).then(result => {
|
||||
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);
|
||||
|
||||
return postStream.loadIntoIdentityMap([10]).then(function() {
|
||||
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').includes(stagedPost), "the post is added to the stream");
|
||||
ok(postStream.get('posts').contains(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').includes(stagedPost), "the post is removed from the stream");
|
||||
ok(!postStream.get('posts').contains(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').includes(stagedPost), "the post is still in the stream");
|
||||
ok(postStream.get('posts').contains(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");
|
||||
|
Reference in New Issue
Block a user