|
|
|
@ -69,7 +69,7 @@ describe('SchemasState', () => { |
|
|
|
|
|
|
|
expect(schemasState.snapshot.schemas.values).toEqual(oldSchemas.items); |
|
|
|
expect(schemasState.snapshot.isLoaded).toBeTruthy(); |
|
|
|
expect(schemasState.snapshot.categories).toEqual({ 'category1': false, 'category2': false, '': true }); |
|
|
|
expect(schemasState.snapshot.categories).toEqual({ 'category1': false, 'category2': false }); |
|
|
|
|
|
|
|
schemasService.verifyAll(); |
|
|
|
}); |
|
|
|
@ -83,7 +83,7 @@ describe('SchemasState', () => { |
|
|
|
|
|
|
|
expect(schemasState.snapshot.schemas.values).toEqual(oldSchemas.items); |
|
|
|
expect(schemasState.snapshot.isLoaded).toBeTruthy(); |
|
|
|
expect(schemasState.snapshot.categories).toEqual({ 'category1': false, 'category2': false, 'category3': true, '': true }); |
|
|
|
expect(schemasState.snapshot.categories).toEqual({ 'category1': false, 'category2': false, 'category3': true }); |
|
|
|
|
|
|
|
schemasService.verifyAll(); |
|
|
|
}); |
|
|
|
@ -111,13 +111,13 @@ describe('SchemasState', () => { |
|
|
|
it('should add category', () => { |
|
|
|
schemasState.addCategory('category3'); |
|
|
|
|
|
|
|
expect(schemasState.snapshot.categories).toEqual({ 'category1': false, 'category2': false, 'category3': true, '': true }); |
|
|
|
expect(schemasState.snapshot.categories).toEqual({ 'category1': false, 'category2': false, 'category3': true }); |
|
|
|
}); |
|
|
|
|
|
|
|
it('should remove category', () => { |
|
|
|
schemasState.removeCategory('category1'); |
|
|
|
|
|
|
|
expect(schemasState.snapshot.categories).toEqual({ 'category2': false, '': true }); |
|
|
|
expect(schemasState.snapshot.categories).toEqual({ 'category2': false }); |
|
|
|
}); |
|
|
|
|
|
|
|
it('should return schema on select and reload when already loaded', () => { |
|
|
|
|