mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-10-31 00:01:23 +01:00 
			
		
		
		
	Merge pull request #2730 from vector-im/dbkr/fix_test_breakage
Fix broken tests
This commit is contained in:
		
						commit
						8097b150a0
					
				| @ -154,6 +154,9 @@ describe('loading:', function () { | |||||||
|                 }).respond(403, "Guest access is disabled"); |                 }).respond(403, "Guest access is disabled"); | ||||||
| 
 | 
 | ||||||
|                 return httpBackend.flush(); |                 return httpBackend.flush(); | ||||||
|  |             }).then(() => { | ||||||
|  |                 // Wait for another trip around the event loop for the UI to update
 | ||||||
|  |                 return q.delay(1); | ||||||
|             }).then(() => { |             }).then(() => { | ||||||
|                 // we expect a single <Login> component
 |                 // we expect a single <Login> component
 | ||||||
|                 ReactTestUtils.findRenderedComponentWithType( |                 ReactTestUtils.findRenderedComponentWithType( | ||||||
| @ -177,6 +180,9 @@ describe('loading:', function () { | |||||||
|                 }).respond(403, "Guest access is disabled"); |                 }).respond(403, "Guest access is disabled"); | ||||||
| 
 | 
 | ||||||
|                 return httpBackend.flush(); |                 return httpBackend.flush(); | ||||||
|  |             }).then(() => { | ||||||
|  |                 // Wait for another trip around the event loop for the UI to update
 | ||||||
|  |                 return q.delay(1); | ||||||
|             }).then(() => { |             }).then(() => { | ||||||
|                 // we expect a single <Login> component
 |                 // we expect a single <Login> component
 | ||||||
|                 let login = ReactTestUtils.findRenderedComponentWithType( |                 let login = ReactTestUtils.findRenderedComponentWithType( | ||||||
| @ -191,6 +197,9 @@ describe('loading:', function () { | |||||||
|                 }); |                 }); | ||||||
|                 login.onPasswordLogin("user", "pass") |                 login.onPasswordLogin("user", "pass") | ||||||
|                 return httpBackend.flush(); |                 return httpBackend.flush(); | ||||||
|  |             }).then(() => { | ||||||
|  |                 // Wait for another trip around the event loop for the UI to update
 | ||||||
|  |                 return q.delay(1); | ||||||
|             }).then(() => { |             }).then(() => { | ||||||
|                 // we expect a spinner
 |                 // we expect a spinner
 | ||||||
|                 ReactTestUtils.findRenderedComponentWithType( |                 ReactTestUtils.findRenderedComponentWithType( | ||||||
| @ -200,6 +209,9 @@ describe('loading:', function () { | |||||||
|                 httpBackend.when('POST', '/filter').respond(200, { filter_id: 'fid' }); |                 httpBackend.when('POST', '/filter').respond(200, { filter_id: 'fid' }); | ||||||
|                 httpBackend.when('GET', '/sync').respond(200, {}); |                 httpBackend.when('GET', '/sync').respond(200, {}); | ||||||
|                 return httpBackend.flush(); |                 return httpBackend.flush(); | ||||||
|  |             }).then(() => { | ||||||
|  |                 // Wait for another trip around the event loop for the UI to update
 | ||||||
|  |                 return q.delay(1); | ||||||
|             }).then(() => { |             }).then(() => { | ||||||
|                 // once the sync completes, we should have a room view
 |                 // once the sync completes, we should have a room view
 | ||||||
|                 httpBackend.verifyNoOutstandingExpectation(); |                 httpBackend.verifyNoOutstandingExpectation(); | ||||||
| @ -287,6 +299,9 @@ describe('loading:', function () { | |||||||
|                 }); |                 }); | ||||||
| 
 | 
 | ||||||
|                 return httpBackend.flush(); |                 return httpBackend.flush(); | ||||||
|  |             }).then(() => { | ||||||
|  |                 // Wait for another trip around the event loop for the UI to update
 | ||||||
|  |                 return q.delay(1); | ||||||
|             }).then(() => { |             }).then(() => { | ||||||
|                 // now we should have a spinner with a logout link
 |                 // now we should have a spinner with a logout link
 | ||||||
|                 assertAtSyncingSpinner(matrixChat); |                 assertAtSyncingSpinner(matrixChat); | ||||||
| @ -322,6 +337,9 @@ describe('loading:', function () { | |||||||
|                 }); |                 }); | ||||||
| 
 | 
 | ||||||
|                 return httpBackend.flush(); |                 return httpBackend.flush(); | ||||||
|  |             }).then(() => { | ||||||
|  |                 // Wait for another trip around the event loop for the UI to update
 | ||||||
|  |                 return q.delay(1); | ||||||
|             }).then(() => { |             }).then(() => { | ||||||
|                 // now we should have a spinner with a logout link
 |                 // now we should have a spinner with a logout link
 | ||||||
|                 assertAtSyncingSpinner(matrixChat); |                 assertAtSyncingSpinner(matrixChat); | ||||||
| @ -358,12 +376,18 @@ describe('loading:', function () { | |||||||
|                 }); |                 }); | ||||||
| 
 | 
 | ||||||
|                 return httpBackend.flush(); |                 return httpBackend.flush(); | ||||||
|  |             }).then(() => { | ||||||
|  |                 // Wait for another trip around the event loop for the UI to update
 | ||||||
|  |                 return q.delay(1); | ||||||
|             }).then(() => { |             }).then(() => { | ||||||
|                 // now we should have a spinner with a logout link
 |                 // now we should have a spinner with a logout link
 | ||||||
|                 assertAtSyncingSpinner(matrixChat); |                 assertAtSyncingSpinner(matrixChat); | ||||||
| 
 | 
 | ||||||
|                 httpBackend.when('GET', '/sync').respond(200, {}); |                 httpBackend.when('GET', '/sync').respond(200, {}); | ||||||
|                 return httpBackend.flush(); |                 return httpBackend.flush(); | ||||||
|  |             }).then(() => { | ||||||
|  |                 // Wait for another trip around the event loop for the UI to update
 | ||||||
|  |                 return q.delay(1); | ||||||
|             }).then(() => { |             }).then(() => { | ||||||
|                 // once the sync completes, we should have a room view
 |                 // once the sync completes, we should have a room view
 | ||||||
|                 httpBackend.verifyNoOutstandingExpectation(); |                 httpBackend.verifyNoOutstandingExpectation(); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user