More fixes for order-dependent Jasmine spec failures

These ones would fail if `app.page` was in the wrong state from a previous test.
This commit is contained in:
Sage Ross 2022-01-15 12:33:06 -08:00 committed by Benjamin Neff
parent b2ee986815
commit 1c577fb5b2
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
4 changed files with 11 additions and 0 deletions

View file

@ -1,4 +1,9 @@
describe('app.Router', function () { describe('app.Router', function () {
beforeEach(function () {
delete app.page;
new app.Router().stream();
});
describe('followed_tags', function() { describe('followed_tags', function() {
beforeEach(function() { beforeEach(function() {
loginAs({name: 'alice'}); loginAs({name: 'alice'});

View file

@ -2,6 +2,7 @@ describe("app.views.StreamShortcuts", function () {
beforeEach(function() { beforeEach(function() {
// This puts `app.page` into the proper state. // This puts `app.page` into the proper state.
delete app.page;
new app.Router().stream(); new app.Router().stream();
this.post1 = factory.post({author : factory.author({name : "Rebecca Black", id : 1492})}); this.post1 = factory.post({author : factory.author({name : "Rebecca Black", id : 1492})});

View file

@ -1,5 +1,9 @@
describe("app.views.StreamPost", function(){ describe("app.views.StreamPost", function(){
beforeEach(function(){ beforeEach(function(){
// This puts `app.page` into the proper state.
delete app.page;
new app.Router().stream();
this.PostViewClass = app.views.StreamPost; this.PostViewClass = app.views.StreamPost;
var posts = $.parseJSON(spec.readFixture("stream_json")); var posts = $.parseJSON(spec.readFixture("stream_json"));

View file

@ -1,6 +1,7 @@
describe("app.views.Stream", function() { describe("app.views.Stream", function() {
beforeEach(function() { beforeEach(function() {
// This puts `app.page` into the proper state. // This puts `app.page` into the proper state.
delete app.page;
new app.Router().stream(); new app.Router().stream();
loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}}); loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}});