Add more closing tags to fix specs

closes #8159
This commit is contained in:
Akshay S Dinesh 2021-06-25 22:41:56 +05:30 committed by Benjamin Neff
parent 77edc5105e
commit b375bfa630
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
8 changed files with 17 additions and 15 deletions

View file

@ -130,7 +130,7 @@ app.views.Hovercard = app.views.Base.extend({
// set hashtags
this.hashtags.empty();
this.hashtags.html($(_.map(person.profile.tags, function(tag) {
return $("<a/>", {href: Routes.tag(tag)}).text("#" + tag)[0];
return $("<a></a>", {href: Routes.tag(tag)}).text("#" + tag)[0];
})));
}
},

View file

@ -19,7 +19,7 @@ app.views.Location = Backbone.View.extend({
var locator = new OSM.Locator();
locator.getAddress(function(address, latlng){
$(element).empty();
$("<input/>",
$("<input></input>",
{ id: "location_address",
value: address,
type: "text",

View file

@ -351,7 +351,7 @@ app.views.Publisher = Backbone.View.extend({
};
var previewPost = new app.views.PreviewPost({model: new app.models.Post(previewMessage)}).render().el;
return $("<div/>").append(previewPost).html();
return $("<div></div>").append(previewPost).html();
},
keyDown : function(evt) {

View file

@ -185,8 +185,8 @@
addNewComments: function(bottomBar, data) {
if ($(".comment-container", bottomBar).length === 0) {
$(".show-comments", bottomBar).after($("<div/>", {"class": "comment-container"}));
$(".comment-container", bottomBar).append($("<ul/>", {"class": "comments"}));
$(".show-comments", bottomBar).after($("<div></div>", {"class": "comment-container"}));
$(".comment-container", bottomBar).append($("<ul></ul>", {"class": "comments"}));
}
$(".comment-container .comments", bottomBar).append(data);
},
@ -212,8 +212,10 @@
var postGuid = bottomBar.parents(".stream-element").data("guid");
toggleReactionsLink.remove();
toggleReactionsLink = $("<a/>", {"class": "show-comments", "href": Routes.postComments(postGuid) + ".mobile"})
.html(text + "<i class='entypo-chevron-up'/>");
toggleReactionsLink = $("<a></a>", {
"class": "show-comments",
"href": Routes.postComments(postGuid) + ".mobile"
}).html(text + "<i class='entypo-chevron-up'/>");
parent.prepend(toggleReactionsLink);
bottomBar.removeClass("inactive").addClass("active");
}

View file

@ -33,7 +33,7 @@ $(document).ready(function(){
if(hiddenField.length > 0) { hiddenField.remove(); }
else {
$("#new_status_message").append(
$("<input/>", {
$("<input></input>", {
name: "services[]",
type: "hidden",
value: provider

View file

@ -47,7 +47,7 @@ describe("app", function() {
describe("setupForms", function() {
beforeEach(function() {
spec.content().append("<textarea/> <input/>");
spec.content().append("<textarea></textarea> <input></input>");
});
it("calls jQuery.placeholder() for inputs", function() {

View file

@ -62,8 +62,8 @@ describe("app.views.Base", function(){
},
postRenderTemplate : function(){
$(this.el).append("<div class=subview1/>");
$(this.el).append("<div class=subview2/>");
$(this.el).append("<div class=subview1></div>");
$(this.el).append("<div class=subview2></div>");
},
createSubview2 : function(){
@ -121,7 +121,7 @@ describe("app.views.Base", function(){
it("replaces .time with relative time ago in words", function() {
this.view.templateName = false;
spyOn($.fn, "timeago");
this.view.$el.append("<time/>");
this.view.$el.append("<time></time>");
this.view.render();
expect($.fn.timeago).toHaveBeenCalled();
expect($.fn.timeago.calls.mostRecent().object.first().is("time")).toBe(true);
@ -145,7 +145,7 @@ describe("app.views.Base", function(){
beforeEach(function() {
this.view.$el.htmlOriginal = this.view.$el.html;
spyOn(this.view.$el, "html").and.callFake(function() {
this.htmlOriginal("<input><textarea/></input>");
this.htmlOriginal("<input><textarea></textarea></input>");
return this;
});
});

View file

@ -148,7 +148,7 @@ describe("Diaspora.Mobile.Comments", function(){
var parent = this.toggleReactionsLink.parent();
var postGuid = this.bottomBar.parents(".stream-element").data("guid");
this.toggleReactionsLink.remove();
parent.prepend($("<span/>", {"class": "show-comments"}).text("0 comments"));
parent.prepend($("<span></span>", {"class": "show-comments"}).text("0 comments"));
Diaspora.Mobile.Comments.increaseReactionCount(this.bottomBar);
this.toggleReactionsLink = this.bottomBar.find(".show-comments").first();
@ -160,7 +160,7 @@ describe("Diaspora.Mobile.Comments", function(){
var parent = this.toggleReactionsLink.parent();
var postGuid = this.bottomBar.parents(".stream-element").data("guid");
this.toggleReactionsLink.remove();
parent.prepend($("<span/>", {"class": "show-comments"}).text("Aucun commentaire"));
parent.prepend($("<span></span>", {"class": "show-comments"}).text("Aucun commentaire"));
Diaspora.Mobile.Comments.increaseReactionCount(this.bottomBar);
this.toggleReactionsLink = this.bottomBar.find(".show-comments").first();