Files
swagger-ui/test/e2e-cypress/e2e/features/oas-badge.cy.js
kyy f464ba2d31
Some checks failed
Node.js CI / build (push) Failing after 2s
Node.js CI / e2e-tests (+(a11y|security|bugs)/**/*cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/!(o|d|m)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/+(o|d)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/m*.cy.js) (push) Failing after 2s
CodeQL / Analyze (javascript) (push) Failing after 2m49s
Security scan for docker image / build (push) Failing after 42s
Update swagger-ui
2025-06-24 13:40:26 +09:00

26 lines
866 B
JavaScript
Executable File

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")
})
})