Commit fb06d03f authored by Steffen van Bergerem's avatar Steffen van Bergerem Committed by Benjamin Neff

Close modals at the end of each jasmine spec

closes #7246
parent 95ddae86
......@@ -6,6 +6,7 @@
## Bug fixes
* Fix background color of year on notifications page with dark theme [#7263](https://github.com/diaspora/diaspora/pull/7263)
* Fix jasmine tests in firefox [#7246](https://github.com/diaspora/diaspora/pull/7246)
## Features
* Add links to the aspects and followed tags pages on mobile [#7265](https://github.com/diaspora/diaspora/pull/7265)
......
......@@ -61,7 +61,7 @@ describe("app.views.ProfileHeader", function() {
describe("showMessageModal", function() {
beforeEach(function() {
spec.content().append("<div id='conversationModal'/>");
spec.content().append("<div id='conversationModal' class='modal fade'><div class='modal-body'></div></div>");
});
it("calls app.helpers.showModal", function() {
......@@ -78,8 +78,8 @@ describe("app.views.ProfileHeader", function() {
];
spyOn(app.views.ConversationsForm.prototype, "initialize");
spyOn($.fn, "load").and.callFake(function(url, callback) { callback(); });
this.view.showMessageModal();
$("#conversationModal").trigger("modal:loaded");
expect(app.views.ConversationsForm.prototype.initialize)
.toHaveBeenCalledWith({prefill: gon.conversationPrefill});
});
......
......@@ -78,8 +78,11 @@ afterEach(function() {
jasmine.clock().uninstall();
jasmine.Ajax.uninstall();
$(".modal").removeClass("fade").modal("hide");
$("#jasmine_content").empty();
expect(spec.loadFixtureCount).toBeLessThan(2);
expect($(".modal-backdrop").length).toBe(0);
$(".modal-backdrop").remove();
spec.loadFixtureCount = 0;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment