feat(info): indicate OpenAPI 2.0 definition version (#9167)

This commit is contained in:
Krzysztof Kowalczyk
2023-08-31 13:09:48 +02:00
committed by GitHub
parent 6fd6e339cc
commit 4b48e36c09
11 changed files with 45 additions and 47 deletions

View File

@@ -0,0 +1,25 @@
describe("OpenAPI Badge", () => {
it("should display light green badge with version indicator for Swagger 2.0", () => {
cy.visit("/?url=/documents/features/info-openAPI2.yaml")
.get("#swagger-ui")
.get('*[class^="version-stamp"]')
.get("pre.version")
.contains("OAS 2.0")
})
it("should display light green badge with version indicator for OpenAPI 3.0.x", () => {
cy.visit("/?url=/documents/petstore-expanded.openapi.yaml")
.get("#swagger-ui")
.get('*[class^="version-stamp"]')
.get("pre.version")
.contains("OAS 3.0")
})
it("should display light green badge with version indicator for OpenAPI 3.1.0", () => {
cy.visit("/?url=/documents/features/info-openAPI31.yaml")
.get("#swagger-ui")
.get('*[class^="version-stamp"]')
.get("pre.version")
.contains("OAS 3.1")
})
})