Fix more order-dependent jasmine specs

This commit is contained in:
Sage Ross 2022-01-02 19:34:02 -08:00 committed by Benjamin Neff
parent 56ef83fa8a
commit 4e4d332d6e
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
2 changed files with 4 additions and 0 deletions

View file

@ -1,6 +1,7 @@
describe('app.Router', function () {
describe('followed_tags', function() {
beforeEach(function() {
loginAs({name: 'alice'});
factory.preloads({tagFollowings: []});
spec.loadFixture("aspects_index");
});
@ -74,6 +75,7 @@ describe('app.Router', function () {
describe("aspects", function() {
it("calls _initializeStreamView", function() {
new app.models.Stream();
spyOn(app.router, "_initializeStreamView");
app.router.aspects();
expect(app.router._initializeStreamView).toHaveBeenCalled();
@ -123,6 +125,7 @@ describe('app.Router', function () {
describe("stream", function() {
it("calls _initializeStreamView", function() {
app.publisher = new app.views.Publisher({standalone: true});
spyOn(app.router, "_initializeStreamView");
app.router.stream();
expect(app.router._initializeStreamView).toHaveBeenCalled();

View file

@ -1,5 +1,6 @@
describe("Diaspora.MarkdownEditor", function() {
beforeEach(function() {
Diaspora.I18n.load(spec.defaultLocale, "en");
spec.content().html("<textarea id='fake-textarea'></textarea>");
this.$el = $("#fake-textarea");
});