Fix adding the first comment in the mobile view
This commit is contained in:
parent
441656b480
commit
953b03d086
2 changed files with 6 additions and 4 deletions
|
|
@ -146,9 +146,11 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
addNewComments: function(bottomBar, data) {
|
addNewComments: function(bottomBar, data) {
|
||||||
var commentsContainer = bottomBar.find(".comment_container").first();
|
if ($(".comment_container", bottomBar).length === 0) {
|
||||||
var comments = commentsContainer.find(".comments").first();
|
$(".show_comments", bottomBar).after($("<div/>", {"class": "comment_container"}));
|
||||||
comments.append(data);
|
$(".comment_container", bottomBar).append($("<ul/>", {"class": "comments"}));
|
||||||
|
}
|
||||||
|
$(".comment_container .comments", bottomBar).append(data);
|
||||||
},
|
},
|
||||||
|
|
||||||
// Fix for no comments
|
// Fix for no comments
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ Feature: reactions mobile post
|
||||||
And I fill in the following:
|
And I fill in the following:
|
||||||
| text | is that a poodle? |
|
| text | is that a poodle? |
|
||||||
And I press "Comment"
|
And I press "Comment"
|
||||||
Then I should see "is that a poodle?"
|
Then I should see "is that a poodle?" within ".comment_container"
|
||||||
When I go to the stream page
|
When I go to the stream page
|
||||||
And I should see "1 reaction" within ".show_comments"
|
And I should see "1 reaction" within ".show_comments"
|
||||||
And I click on selector "a.show_comments"
|
And I click on selector "a.show_comments"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue