@@ -222,8 +222,7 @@ describe('loading:', function() {
222
222
} ) . done ( done , done ) ;
223
223
} ) ;
224
224
225
- // TODO: Repair this test in https://github.com/vector-im/riot-web/issues/8468
226
- /* it('should follow the original link after successful login', function(done) {
225
+ it ( 'should follow the original link after successful login' , function ( done ) {
227
226
loadApp ( {
228
227
uriFragment : "#/room/!room:id" ,
229
228
} ) ;
@@ -258,10 +257,9 @@ describe('loading:', function() {
258
257
expect ( localStorage . getItem ( 'mx_hs_url' ) ) . toEqual ( DEFAULT_HS_URL ) ;
259
258
expect ( localStorage . getItem ( 'mx_is_url' ) ) . toEqual ( DEFAULT_IS_URL ) ;
260
259
} ) . done ( done , done ) ;
261
- }); */
260
+ } ) ;
262
261
263
- // TODO: Repair this test in https://github.com/vector-im/riot-web/issues/8468
264
- /* it('should not register as a guest when using a #/login link', function() {
262
+ it ( 'should not register as a guest when using a #/login link' , function ( ) {
265
263
loadApp ( {
266
264
uriFragment : "#/login" ,
267
265
} ) ;
@@ -288,7 +286,7 @@ describe('loading:', function() {
288
286
matrixChat , sdk . getComponent ( 'structures.EmbeddedPage' ) ) ;
289
287
expect ( windowLocation . hash ) . toEqual ( "#/home" ) ;
290
288
} ) ;
291
- }); */
289
+ } ) ;
292
290
} ) ;
293
291
294
292
describe ( "MatrixClient rehydrated from stored credentials:" , function ( ) {
@@ -300,8 +298,7 @@ describe('loading:', function() {
300
298
localStorage . setItem ( "mx_last_room_id" , "!last_room:id" ) ;
301
299
} ) ;
302
300
303
- // TODO: Repair this test in https://github.com/vector-im/riot-web/issues/8468
304
- /* it('shows the last known room by default', function() {
301
+ it ( 'shows the last known room by default' , function ( ) {
305
302
httpBackend . when ( 'GET' , '/pushrules' ) . respond ( 200 , { } ) ;
306
303
httpBackend . when ( 'POST' , '/filter' ) . respond ( 200 , { filter_id : 'fid' } ) ;
307
304
@@ -357,7 +354,7 @@ describe('loading:', function() {
357
354
httpBackend . verifyNoOutstandingExpectation ( ) ;
358
355
expect ( windowLocation . hash ) . toEqual ( "#/room/!room:id" ) ;
359
356
} ) . done ( done , done ) ;
360
- }); */
357
+ } ) ;
361
358
362
359
describe ( '/#/login link:' , function ( ) {
363
360
beforeEach ( function ( ) {
@@ -387,22 +384,20 @@ describe('loading:', function() {
387
384
}
388
385
} ) ;
389
386
390
- // TODO: Repair this test in https://github.com/vector-im/riot-web/issues/8468
391
- /* it('shows the homepage after login', function() {
387
+ it ( 'shows the homepage after login' , function ( ) {
392
388
return completeLogin ( matrixChat ) . then ( ( ) => {
393
389
// we should see a home page, even though we previously had
394
390
// a stored mx_last_room_id
395
391
ReactTestUtils . findRenderedComponentWithType (
396
392
matrixChat , sdk . getComponent ( 'structures.EmbeddedPage' ) ) ;
397
393
expect ( windowLocation . hash ) . toEqual ( "#/home" ) ;
398
394
} ) ;
399
- }); */
395
+ } ) ;
400
396
} ) ;
401
397
} ) ;
402
398
403
399
describe ( 'Guest auto-registration:' , function ( ) {
404
- // TODO: Repair this test in https://github.com/vector-im/riot-web/issues/8468
405
- /* it('shows a welcome page by default', function(done) {
400
+ it ( 'shows a welcome page by default' , function ( done ) {
406
401
loadApp ( ) ;
407
402
408
403
Promise . delay ( 1 ) . then ( ( ) => {
@@ -430,10 +425,9 @@ describe('loading:', function() {
430
425
matrixChat , sdk . getComponent ( 'auth.Welcome' ) ) ;
431
426
expect ( windowLocation . hash ) . toEqual ( "#/welcome" ) ;
432
427
} ) . done ( done , done ) ;
433
- }); */
428
+ } ) ;
434
429
435
- // TODO: Repair this test in https://github.com/vector-im/riot-web/issues/8468
436
- /* it('uses the default homeserver to register with', function(done) {
430
+ it ( 'uses the default homeserver to register with' , function ( done ) {
437
431
loadApp ( ) ;
438
432
439
433
Promise . delay ( 1 ) . then ( ( ) => {
@@ -457,15 +451,15 @@ describe('loading:', function() {
457
451
} ) . then ( ( req ) => {
458
452
expect ( req . path ) . toStartWith ( DEFAULT_HS_URL ) ;
459
453
460
- // once the sync completes, we should have a home page
454
+ // once the sync completes, we should have a welcome page
461
455
httpBackend . verifyNoOutstandingExpectation ( ) ;
462
456
ReactTestUtils . findRenderedComponentWithType (
463
- matrixChat, sdk.getComponent('structures.EmbeddedPage '));
464
- expect(windowLocation.hash).toEqual("#/home ");
457
+ matrixChat , sdk . getComponent ( 'auth.Welcome ' ) ) ;
458
+ expect ( windowLocation . hash ) . toEqual ( "#/welcome " ) ;
465
459
expect ( MatrixClientPeg . get ( ) . baseUrl ) . toEqual ( DEFAULT_HS_URL ) ;
466
460
expect ( MatrixClientPeg . get ( ) . idBaseUrl ) . toEqual ( DEFAULT_IS_URL ) ;
467
461
} ) . done ( done , done ) ;
468
- }); */
462
+ } ) ;
469
463
470
464
it ( 'shows a room view if we followed a room link' , function ( done ) {
471
465
loadApp ( {
@@ -534,15 +528,14 @@ describe('loading:', function() {
534
528
} ) ;
535
529
} ) ;
536
530
537
- // TODO: Repair this test in https://github.com/vector-im/riot-web/issues/8468
538
- /* it('should give us a login page', function() {
531
+ it ( 'should give us a login page' , function ( ) {
539
532
expect ( windowLocation . hash ) . toEqual ( "#/login" ) ;
540
533
541
534
// we expect a single <Login> component
542
535
ReactTestUtils . findRenderedComponentWithType (
543
536
matrixChat , sdk . getComponent ( 'structures.auth.Login' ) ,
544
537
) ;
545
- }); */
538
+ } ) ;
546
539
547
540
/*
548
541
// ILAG renders this obsolete. I think.
@@ -684,8 +677,6 @@ function awaitSyncingSpinner(matrixChat, retryLimit, retryCount) {
684
677
685
678
console . log ( Date . now ( ) + " Awaiting sync spinner: load complete." ) ;
686
679
687
- // state looks good, check the rendered output
688
- assertAtSyncingSpinner ( matrixChat ) ;
689
680
return Promise . resolve ( ) ;
690
681
}
691
682
0 commit comments