mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-29 03:53:43 +03:00
Fix e2e
This commit is contained in:
parent
9389d7dc15
commit
0a2bede7a9
|
@ -84,7 +84,7 @@
|
||||||
"karma-webpack": "^1.8.0",
|
"karma-webpack": "^1.8.0",
|
||||||
"node-sass": "^3.8.0",
|
"node-sass": "^3.8.0",
|
||||||
"phantomjs-prebuilt": "^2.1.7",
|
"phantomjs-prebuilt": "^2.1.7",
|
||||||
"protractor": "^4.0.4",
|
"protractor": "^4.0.10",
|
||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^0.5.1",
|
||||||
"rxjs": "5.0.0-beta.12",
|
"rxjs": "5.0.0-beta.12",
|
||||||
"shelljs": "^0.7.0",
|
"shelljs": "^0.7.0",
|
||||||
|
|
|
@ -16,17 +16,24 @@ function basicTests(swaggerUrl, title) {
|
||||||
beforeEach((done) => {
|
beforeEach((done) => {
|
||||||
browser.get(specUrl);
|
browser.get(specUrl);
|
||||||
fixFFTest(done);
|
fixFFTest(done);
|
||||||
|
var EC = protractor.ExpectedConditions;
|
||||||
|
var $apiInfo = $('api-info');
|
||||||
|
var $errorMessage = $('.redoc-error')
|
||||||
|
browser.wait(EC.or(EC.visibilityOf($apiInfo), EC.visibilityOf($errorMessage)), 60000);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
verifyNoBrowserErrors();
|
verifyNoBrowserErrors();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should init redoc without errors', () => {
|
it('should init redoc without errors', (done) => {
|
||||||
let $redoc = $('redoc');
|
let $redoc = $('redoc');
|
||||||
expect($redoc.isPresent()).toBe(true);
|
expect($redoc.isPresent()).toBe(true);
|
||||||
|
setTimeout(() => {
|
||||||
let $methods = $$('method');
|
let $methods = $$('method');
|
||||||
expect($methods.count()).toBeGreaterThan(0);
|
expect($methods.count()).toBeGreaterThan(0);
|
||||||
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user