Bläddra i källkod

added tags to test

bubble
Tony Tam 9 år sedan
förälder
incheckning
75bb7e2521
2 ändrade filer med 30 tillägg och 0 borttagningar
  1. +8
    -0
      test/e2e/v2.js
  2. +22
    -0
      test/specs/v2/petstore.json

+ 8
- 0
test/e2e/v2.js Visa fil

@@ -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){
var locator = webdriver.By.xpath("//*[@data-id='user']");
driver.isElementPresent(locator).then(function (isPresent) {


+ 22
- 0
test/specs/v2/petstore.json Visa fil

@@ -20,6 +20,28 @@
"schemes": [
"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": {
"/pet": {
"post": {


Laddar…
Avbryt
Spara