Merge branch 'develop_2.0' into JSONEditor

Conflicts:
	dist/index.html
	dist/swagger-ui.js
	dist/swagger-ui.min.js
	src/main/coffeescript/view/MainView.coffee
	src/main/coffeescript/view/OperationView.coffee
	src/main/coffeescript/view/ParameterView.coffee
	src/main/coffeescript/view/ResourceView.coffee
	src/main/coffeescript/view/SignatureView.coffee
	src/main/html/index.html
This commit is contained in:
laurent lepinay
2015-03-24 07:06:07 -07:00
76 changed files with 34309 additions and 8132 deletions

View File

@@ -1,3 +1,5 @@
'use strict';
var expect = require('chai').expect;
var webdriver = require('selenium-webdriver');
var driver = require('./driver');
@@ -14,7 +16,7 @@ var elements = [
'header'
];
describe('swagger 2.0 spec tests', function (done) {
describe('swagger 2.0 spec tests', function () {
this.timeout(10 * 1000);
before(function (done) {
@@ -28,8 +30,9 @@ describe('swagger 2.0 spec tests', function (done) {
var errors = [];
browserLogs.forEach(function(log){
// 900 and above is "error" level. Console should not have any errors
if (log.level.value > 900)
if (log.level.value > 900) {
console.log('browser error message:', log.message); errors.push(log);
}
});
expect(errors).to.be.empty;
done();
@@ -80,7 +83,7 @@ describe('swagger 2.0 spec tests', function (done) {
});
it('should find the pet link', function(done){
var locator = webdriver.By.xpath("//*[@data-id='pet']");
var locator = webdriver.By.xpath('//*[@data-id="pet"]');
driver.isElementPresent(locator).then(function (isPresent) {
expect(isPresent).to.be.true;
done();
@@ -88,7 +91,7 @@ describe('swagger 2.0 spec tests', function (done) {
});
it('should find the pet resource description', function(done){
var locator = webdriver.By.xpath("//div[contains(., 'Everything about your Pets')]");
var locator = webdriver.By.xpath('//div[contains(., "Everything about your Pets")]');
driver.findElements(locator).then(function (elements) {
expect(elements.length).to.not.equal(0);
done();
@@ -96,7 +99,7 @@ describe('swagger 2.0 spec tests', function (done) {
});
it('should find the user link', function(done){
var locator = webdriver.By.xpath("//*[@data-id='user']");
var locator = webdriver.By.xpath('//*[@data-id="user"]');
driver.isElementPresent(locator).then(function (isPresent) {
expect(isPresent).to.be.true;
done();
@@ -104,7 +107,7 @@ describe('swagger 2.0 spec tests', function (done) {
});
it('should find the store link', function(done){
var locator = webdriver.By.xpath("//*[@data-id='store']");
var locator = webdriver.By.xpath('//*[@data-id="store"]');
driver.isElementPresent(locator).then(function (isPresent) {
expect(isPresent).to.be.true;
done();
@@ -121,6 +124,8 @@ describe('swagger 2.0 spec tests', function (done) {
});
});
// TODO JSonEditor Tests for POST/PUT
after(function() {
servers.close();
});