feat(info): indicate OpenAPI 2.0 definition version (#9167)
This commit is contained in:
committed by
GitHub
parent
6fd6e339cc
commit
4b48e36c09
@@ -1,7 +1,16 @@
|
||||
describe("OpenAPI 3.x.y Badge", () => {
|
||||
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")
|
||||
})
|
||||
@@ -9,6 +18,7 @@ describe("OpenAPI 3.x.y Badge", () => {
|
||||
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")
|
||||
})
|
||||
@@ -18,7 +18,7 @@ describe("configuration options: `urls` and `urls.primaryName`", () => {
|
||||
it("should render the first URL in the list", () => {
|
||||
cy.visit("/?configUrl=/configs/urls.yaml")
|
||||
.get("h2.title")
|
||||
.should("have.text", "One")
|
||||
.should("have.text", "OneOAS 2.0")
|
||||
.window()
|
||||
.then(win => win.ui.specSelectors.url())
|
||||
.should("equal", "/documents/features/urls/1.yaml")
|
||||
@@ -30,7 +30,7 @@ describe("configuration options: `urls` and `urls.primaryName`", () => {
|
||||
.get("select")
|
||||
.should("have.value", "/documents/features/urls/2.yaml")
|
||||
.get("h2.title")
|
||||
.should("have.text", "Two")
|
||||
.should("have.text", "TwoOAS 3.0")
|
||||
.window()
|
||||
.then(win => win.ui.specSelectors.url())
|
||||
.should("equal", "/documents/features/urls/2.yaml")
|
||||
|
||||
Reference in New Issue
Block a user