added tags to test

This commit is contained in:
Tony Tam
2015-02-19 22:00:17 -08:00
committed by Mohsen Azimi
parent bcfa028f53
commit d70af2f3a5
2 changed files with 30 additions and 0 deletions

View File

@@ -105,6 +105,14 @@ 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')]");
driver.findElements(locator).then(function (elements) {
expect(elements.length).to.not.equal(0);
done();
});
});
it('should find the user link', 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) { driver.isElementPresent(locator).then(function (isPresent) {

View File

@@ -20,6 +20,28 @@
"schemes": [ "schemes": [
"http" "http"
], ],
"tags": [
{
"name": "user",
"description": "Operations about user"
},
{
"name": "store",
"description": "Access to Petstore orders",
"externalDocs": {
"description": "Find out more",
"url": "http://swagger.io"
}
},
{
"name": "pet",
"description": "Everything about your Pets",
"externalDocs": {
"description": "Find out more",
"url": "http://swagger.io"
}
}
],
"paths": { "paths": {
"/pet": { "/pet": {
"post": { "post": {