mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-26 10:33:44 +03:00
Updated angular to beta.6 + fix test
This commit is contained in:
parent
a7913dec59
commit
503cbab2f0
|
@ -2,6 +2,8 @@
|
|||
|
||||
import { getChildDebugElement } from 'tests/helpers';
|
||||
import {Component, View, provide} from 'angular2/core';
|
||||
import OptionsManager from 'lib/options';
|
||||
import {BrowserDomAdapter} from 'angular2/platform/browser';
|
||||
|
||||
import {
|
||||
TestComponentBuilder,
|
||||
|
@ -15,12 +17,14 @@ import MethodsList from 'lib/components/MethodsList/methods-list';
|
|||
import SchemaManager from 'lib/utils/SchemaManager';
|
||||
|
||||
describe('Redoc components', () => {
|
||||
describe('ApiInfo Component', () => {
|
||||
describe('MethodsList Component', () => {
|
||||
let builder;
|
||||
let component;
|
||||
let fixture;
|
||||
beforeEachProviders(() => [
|
||||
provide(SchemaManager, {useValue: new SchemaManager()})
|
||||
provide(SchemaManager, {useValue: new SchemaManager()}),
|
||||
provide(OptionsManager, {useClass: OptionsManager}),
|
||||
provide(BrowserDomAdapter, {useClass: BrowserDomAdapter})
|
||||
]);
|
||||
beforeEach(injectAsync([TestComponentBuilder, SchemaManager], (tcb, schemaMgr) => {
|
||||
builder = tcb;
|
||||
|
@ -32,7 +36,7 @@ describe('Redoc components', () => {
|
|||
component = getChildDebugElement(fixture.debugElement, 'methods-list').componentInstance;
|
||||
fixture.detectChanges();
|
||||
done();
|
||||
}, err => { throw err; });
|
||||
}, err => done.fail(err) );
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<header>
|
||||
Response schema
|
||||
</header>
|
||||
<json-schema *ngIf="response.schema && !enabledLazy" class="schema type" pointer="{{response.pointer}}/schema">
|
||||
<json-schema *ngIf="response.schema && options.disableLazySchemas" class="schema type" pointer="{{response.pointer}}/schema">
|
||||
</json-schema>
|
||||
<json-schema-lazy #lazySchema pointer="{{response.schema ? response.pointer + '/schema' : null}}">
|
||||
</json-schema-lazy>
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
import {RedocComponent, BaseComponent} from '../base';
|
||||
import {RedocComponent, BaseComponent, SchemaManager} from '../base';
|
||||
import JsonPointer from '../../utils/JsonPointer';
|
||||
import JsonSchema from '../JsonSchema/json-schema';
|
||||
import JsonSchemaLazy from '../JsonSchema/json-schema-lazy';
|
||||
import Zippy from '../../common/components/Zippy/zippy';
|
||||
import {statusCodeType} from '../../utils/helpers';
|
||||
import OptionsManager from '../../options';
|
||||
|
||||
function isNumeric(n) {
|
||||
return (!isNaN(parseFloat(n)) && isFinite(n));
|
||||
|
@ -17,9 +18,11 @@ function isNumeric(n) {
|
|||
styleUrls: ['./lib/components/ResponsesList/responses-list.css'],
|
||||
directives: [JsonSchema, Zippy, JsonSchemaLazy]
|
||||
})
|
||||
@Reflect.metadata('parameters', [[SchemaManager], [OptionsManager]])
|
||||
export default class ResponsesList extends BaseComponent {
|
||||
constructor(schemaMgr) {
|
||||
constructor(schemaMgr, optionsMgr) {
|
||||
super(schemaMgr);
|
||||
this.options = optionsMgr.options;
|
||||
}
|
||||
|
||||
prepareModel() {
|
||||
|
|
|
@ -29,8 +29,9 @@
|
|||
"jspm": {
|
||||
"configFile": "system.config.js",
|
||||
"dependencies": {
|
||||
"angular2": "npm:angular2@2.0.0-beta.3",
|
||||
"angular2": "npm:angular2@2.0.0-beta.6",
|
||||
"es6-shim": "github:es-shims/es6-shim@^0.33.6",
|
||||
"json": "github:systemjs/plugin-json@^0.1.0",
|
||||
"json-formatter-js": "npm:json-formatter-js@^0.2.0",
|
||||
"json-pointer": "npm:json-pointer@^0.3.0",
|
||||
"json-schema-instantiator": "npm:json-schema-instantiator@^0.3.0",
|
||||
|
|
|
@ -37,7 +37,7 @@ System.config({
|
|||
},
|
||||
|
||||
map: {
|
||||
"angular2": "npm:angular2@2.0.0-beta.3",
|
||||
"angular2": "npm:angular2@2.0.0-beta.6",
|
||||
"babel": "npm:babel-core@5.8.34",
|
||||
"babel-runtime": "npm:babel-runtime@5.8.34",
|
||||
"clean-css": "npm:clean-css@3.4.6",
|
||||
|
@ -135,14 +135,14 @@ System.config({
|
|||
"path": "github:jspm/nodelibs-path@0.1.0",
|
||||
"process": "github:jspm/nodelibs-process@0.1.2"
|
||||
},
|
||||
"npm:angular2@2.0.0-beta.3": {
|
||||
"npm:angular2@2.0.0-beta.6": {
|
||||
"crypto": "github:jspm/nodelibs-crypto@0.1.0",
|
||||
"es6-promise": "npm:es6-promise@3.0.2",
|
||||
"es6-shim": "npm:es6-shim@0.33.13",
|
||||
"process": "github:jspm/nodelibs-process@0.1.2",
|
||||
"reflect-metadata": "npm:reflect-metadata@0.1.2",
|
||||
"rxjs": "npm:rxjs@5.0.0-beta.0",
|
||||
"zone.js": "npm:zone.js@0.5.11"
|
||||
"zone.js": "npm:zone.js@0.5.14"
|
||||
},
|
||||
"npm:argparse@1.0.3": {
|
||||
"assert": "github:jspm/nodelibs-assert@0.1.0",
|
||||
|
@ -866,7 +866,7 @@ System.config({
|
|||
"systemjs-json": "github:systemjs/plugin-json@0.1.0",
|
||||
"validator": "npm:validator@4.5.0"
|
||||
},
|
||||
"npm:zone.js@0.5.11": {
|
||||
"npm:zone.js@0.5.14": {
|
||||
"es6-promise": "npm:es6-promise@3.0.2",
|
||||
"process": "github:jspm/nodelibs-process@0.1.2"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user