Files
swagger-ui/test/e2e-cypress/e2e/bugs/4865.cy.js
Vladimír Gorej 3e81a4f897 chore(deps-dev): update cypress to v12 (#8889)
This update required changing the configuration
and test directory structure. Some tests needed
to be amended as well to compensate for new
Cypress APIs.
2023-06-07 10:25:32 +02:00

20 lines
722 B
JavaScript

describe("#4865: multiple invocations + OAS3 plugin", () => {
it("control: should render the OAS3 badge correctly", () => {
// This is a sanity check to make sure the badge is present.
// If this is failing, it's probably not related to #4865.
cy.visit("/?url=/documents/petstore-expanded.openapi.yaml")
.get("#swagger-ui")
.get("pre.version")
.contains("OAS 3.0")
})
it("test: should render the OAS3 badge correctly after re-initializing the UI", () => {
cy.visit("/?url=/documents/petstore-expanded.openapi.yaml")
.window()
.then(win => win.onload()) // re-initializes Swagger UI
.get("#swagger-ui")
.get("pre.version")
.contains("OAS 3.0")
})
})