Files
swagger-ui/test/e2e-cypress/e2e/bugs/swos-63.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

36 lines
1.1 KiB
JavaScript

describe("SWOS-63: Schema/Model labeling", () => {
describe("SchemaS/Models section", () => {
it("should render `Schemas` for OpenAPI 3", () => {
cy
.visit("/?url=/documents/petstore-expanded.openapi.yaml")
.get("section.models > h4")
.contains("Schemas")
})
it("should render `Models` for OpenAPI 2", () => {
cy
.visit("/?url=/documents/petstore.swagger.yaml")
.get("section.models > h4")
.contains("Models")
})
})
describe("ModelExample within Operation", () => {
it("should render `Schemas` for OpenAPI 3", () => {
cy
.visit("/?url=/documents/petstore-expanded.openapi.yaml")
.get("#operations-default-findPets")
.click()
.get("button.tablinks[data-name=model]")
.contains("Schema")
})
it("should render `Models` for OpenAPI 2", () => {
cy
.visit("/?url=/documents/petstore.swagger.yaml")
.get("section.models > h4")
.get("#operations-pet-addPet")
.click()
.get("button.tablinks[data-name=model]")
.contains("Model")
})
})
})