Make e2e less verbose + minor fixes

This commit is contained in:
Roman Hotsiy 2016-08-31 21:58:55 +03:00
parent acaf54b28f
commit b2cd855aa8
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
5 changed files with 7 additions and 3 deletions

View File

@ -54,6 +54,7 @@ export class JsonSchema extends BaseComponent implements OnInit {
initDescendants() { initDescendants() {
this.descendants = this.specMgr.findDerivedDefinitions(this.normPointer); this.descendants = this.specMgr.findDerivedDefinitions(this.normPointer);
if (!this.descendants.length) return; if (!this.descendants.length) return;
this.hasDescendants = true;
let discriminator = this.schema.discriminator; let discriminator = this.schema.discriminator;
let discrProperty = this.schema._properties && let discrProperty = this.schema._properties &&
this.schema._properties.filter((prop) => prop.name === discriminator)[0]; this.schema._properties.filter((prop) => prop.name === discriminator)[0];

View File

@ -24,7 +24,8 @@
"e2e-server": "http-server -p 3000 tests/e2e", "e2e-server": "http-server -p 3000 tests/e2e",
"e2e-copy": "cp dist/redoc.min.js tests/e2e/", "e2e-copy": "cp dist/redoc.min.js tests/e2e/",
"webdriver": "webdriver-manager update", "webdriver": "webdriver-manager update",
"serve:prod": "NODE_ENV=production npm start" "serve:prod": "NODE_ENV=production npm start",
"protractor": "protractor"
}, },
"keywords": [ "keywords": [
"OpenAPI", "OpenAPI",

View File

@ -51,7 +51,8 @@ function verifyNoBrowserErrors() {
if (message.match(/^Unknown property.*Declaration dropped/)) return false; if (message.match(/^Unknown property.*Declaration dropped/)) return false;
if (message.match(/^Error in parsing value for.*Declaration dropped/)) return false; if (message.match(/^Error in parsing value for.*Declaration dropped/)) return false;
if (message.indexOf('The character encoding of the HTML document was not declared') > -1) return false; if (message.indexOf('The character encoding of the HTML document was not declared') > -1) return false;
if (message.match(/addons.manager\s+DEBUG/)) return false; if (message.match(/^\d{13}\s+(DeferredSave|addons)/)) return false;
if (message.match(/This site makes use of a SHA-1 Certificate/)) return false;
if (logEntry.level.value >= LogLevel.INFO) { if (logEntry.level.value >= LogLevel.INFO) {

View File

@ -15,7 +15,7 @@
window.redocError = null; window.redocError = null;
/* init redoc */ /* init redoc */
var url = window.location.search.substr(5) || 'http://rebilly.github.io/SwaggerTemplateRepo/swagger.json'; var url = window.location.search.substr(5) || 'http://rebilly.github.io/SwaggerTemplateRepo/swagger.json';
Redoc.init(decodeURIComponent(url), {disableLazySchemas: true}).then(function() {}, function(err) { Redoc.init(decodeURIComponent(url), {disableLazySchemas: true, suppressWarnings: true}).then(function() {}, function(err) {
window.redocError = err; window.redocError = err;
}); });
</script> </script>

View File

@ -91,6 +91,7 @@ if (process.env.JOB === 'e2e-guru') {
delete apisGuruList['googleapis.com:mirror']; // bad urls in images delete apisGuruList['googleapis.com:mirror']; // bad urls in images
delete apisGuruList['googleapis.com:discovery']; // non-string references delete apisGuruList['googleapis.com:discovery']; // non-string references
delete apisGuruList['clarify.io']; // non-string references delete apisGuruList['clarify.io']; // non-string references
delete apisGuruList['clickmeter.com']; // some complex circular reference
//delete apisGuruList['pushpay.com']; // https://github.com/Rebilly/ReDoc/issues/30 //delete apisGuruList['pushpay.com']; // https://github.com/Rebilly/ReDoc/issues/30
delete apisGuruList['bbci.co.uk']; // too big delete apisGuruList['bbci.co.uk']; // too big