Sort tests by groups

This commit is contained in:
Roman Hotsiy 2015-12-19 19:36:28 +02:00
parent b06ac81937
commit 53f7f3a007
11 changed files with 708 additions and 694 deletions

View File

@ -12,8 +12,8 @@ import {
import {Tabs, Tab} from 'lib/common/components/Tabs/tabs';
describe('Tabs Component', () => {
describe('Common components', () => {
describe('Tabs Component', () => {
let builder;
let component;
let nativeElement;
@ -62,6 +62,7 @@ describe('Tabs Component', () => {
tab1.active.should.be.false;
tab2.active.should.be.true;
});
});
});

View File

@ -12,8 +12,8 @@ import {
import Zippy from 'lib/common/components/Zippy/zippy';
describe('Zippy Component', () => {
describe('Common components', () => {
describe('Zippy Component', () => {
let builder;
let component;
let nativeElement;
@ -89,6 +89,7 @@ describe('Zippy Component', () => {
fixture.detectChanges();
testComponent.clickCount.should.be.equal(0);
});
});
});

View File

@ -15,7 +15,8 @@ import ApiInfo from 'lib/components/ApiInfo/api-info';
import SchemaManager from 'lib/utils/SchemaManager';
describe('ApiInfo Component', () => {
describe('Redoc components', () => {
describe('ApiInfo Component', () => {
let builder;
let component;
let fixture;
@ -47,6 +48,7 @@ describe('ApiInfo Component', () => {
let headerElement = nativeElement.querySelector('h1');
expect(headerElement).toHaveText('Swagger Petstore (1.0.0)');
});
});
});

View File

@ -14,8 +14,8 @@ import {
import Method from 'lib/components/Method/method';
import SchemaManager from 'lib/utils/SchemaManager';
describe('Method Component', () => {
describe('Redoc components', () => {
describe('Method Component', () => {
let builder;
let component;
beforeEachProviders(() => [
@ -48,6 +48,7 @@ describe('Method Component', () => {
it('should main tag', () => {
component.data.methodInfo.tags.should.be.empty;
});
});
});

View File

@ -14,8 +14,8 @@ import {
import MethodsList from 'lib/components/MethodsList/methods-list';
import SchemaManager from 'lib/utils/SchemaManager';
describe('ApiInfo Component', () => {
describe('Redoc components', () => {
describe('ApiInfo Component', () => {
let builder;
let component;
let fixture;
@ -48,9 +48,9 @@ describe('ApiInfo Component', () => {
component.data.tags[1].name.should.be.equal('tag1');
component.data.tags[1].methods.should.have.lengthOf(2);
});
});
});
/** Test component that contains an ApiInfo. */
@Component({selector: 'test-app'})
@View({

View File

@ -14,8 +14,8 @@ import {
import Redoc from 'lib/components/Redoc/redoc';
import SchemaManager from 'lib/utils/SchemaManager';
describe('Redoc Component', () => {
describe('Redoc components', () => {
describe('Redoc Component', () => {
let builder;
beforeEachProviders(() => [
provide(SchemaManager, {useValue: new SchemaManager()})
@ -40,9 +40,9 @@ describe('Redoc Component', () => {
done();
}, err => done.fail(err));
});
});
});
/** Test component that contains a Redoc. */
@Component({selector: 'test-app'})
@View({

View File

@ -3,7 +3,8 @@
import SchemaManager from 'lib/utils/SchemaManager';
import {BaseComponent} from 'lib/components/base';
describe('BaseComponent', () => {
describe('Redoc components', () => {
describe('BaseComponent', () => {
let schemaMgr;
let component;
@ -194,4 +195,5 @@ describe('BaseComponent', () => {
xdescribe('Merge array allOf', () => {
});
});
});
});

View File

@ -2,8 +2,8 @@
import {JsonPointer} from 'lib/utils/JsonPointer';
// test extended JsonPointer
describe('JsonPointer', () => {
describe('Utils', () => {
describe('JsonPointer', () => {
it('should return correct base name', ()=> {
JsonPointer.baseName('/level1/level2/name').should.be.equal('name');
JsonPointer.baseName('/level1/level2/name', 2).should.be.equal('level2');
@ -23,4 +23,5 @@ describe('JsonPointer', () => {
it('should join correctly', ()=> {
JsonPointer.join('#/level1', ['level2', 'name']).should.be.equal('/level1/level2/name');
});
});
});

View File

@ -1,7 +1,8 @@
'use strict';
import SchemaManager from 'lib/utils/SchemaManager';
describe('Schema manager', () => {
describe('Utils', () => {
describe('Schema manager', () => {
let schemaMgr;
beforeEach(() => {
@ -224,4 +225,5 @@ describe('Schema manager', () => {
});
});
});
});

View File

@ -1,7 +1,8 @@
'use strict';
import {statusCodeType} from 'lib/utils/helpers';
describe('statusCodeType', () => {
describe('Utils', () => {
describe('statusCodeType', () => {
it('Should return info for status codes within 100 and 200', ()=> {
statusCodeType(100).should.be.equal('info');
statusCodeType(150).should.be.equal('info');
@ -28,4 +29,5 @@ describe('statusCodeType', () => {
(() => statusCodeType(99)).should.throw('invalid HTTP code');
(() => statusCodeType(600)).should.throw('invalid HTTP code');
});
});
});

View File

@ -2,7 +2,8 @@
import {KeysPipe, ValuesPipe, JsonPointerEscapePipe, MarkedPipe} from 'lib/utils/pipes';
describe('KeysPipe and ValuesPipe', () => {
describe('Pipes', () => {
describe('KeysPipe and ValuesPipe', () => {
let obj;
var keysPipe, valuesPipe;
@ -47,9 +48,9 @@ describe('KeysPipe and ValuesPipe', () => {
(() => keysPipe.transform()).should.not.throw();
});
});
});
});
describe('JsonPointerEscapePipe', () => {
describe('JsonPointerEscapePipe', () => {
let unescaped;
let escaped;
var pipe;
@ -75,9 +76,9 @@ describe('JsonPointerEscapePipe', () => {
(() => pipe.transform()).should.not.throw();
});
});
});
});
describe('MarkedPipe', () => {
describe('MarkedPipe', () => {
let unmarked;
let marked;
var pipe;
@ -103,4 +104,5 @@ describe('MarkedPipe', () => {
(() => pipe.transform()).should.not.throw();
});
});
});
});