Skip to content

Commit

Permalink
Fixed: Replace '.click()' with '.trigger('click') (#11482)
Browse files Browse the repository at this point in the history
Co-authored-by: Mary Ojo <maryojolinux@moe>
  • Loading branch information
maryojo and Mary Ojo authored Oct 15, 2022
1 parent 12019d7 commit 9fa50a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/javascripts/like_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("Like Button", function () {

});

$("#like-button-1").click();
$("#like-button-1").trigger("click");

expect(ajaxStub).to.have.been.called;

Expand Down Expand Up @@ -55,7 +55,7 @@ describe("Like Button", function () {
// response = data;
// })

$("#like-button-1").click();
$("#like-button-1").trigger("click");
expect($('#like-count-1').html()).to.eql('0');

});
Expand All @@ -71,7 +71,7 @@ describe("Like Button", function () {

});

$("#like-button-1").click();
$("#like-button-1").trigger("click");
expect($('#like-star-1')[0].className).to.eql('fa fa-star-o');

});
Expand Down

0 comments on commit 9fa50a8

Please sign in to comment.