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

45 lines
1.9 KiB
JavaScript

describe("#6369: Object model render of field: deprecated", () => {
describe("OAS3", () => {
it("should display row with td:deprecated when set to true", () => {
cy.visit("/?url=/documents/bugs/6369-oas3-display.yaml")
.get("#model-IdentificationProfile > .model-box")
.click()
.get("#model-IdentificationProfile .model-box .model .inner-object table")
.find("tr")
.should("have.length", 3)
.contains("td", "deprecated")
})
it("should not display row with td:deprecated when set to false", () => {
cy.visit("/?url=/documents/bugs/6369-oas3-no-display.yaml")
.get("#model-IdentificationProfile > .model-box")
.click()
.get("#model-IdentificationProfile .model-box .model .inner-object table")
.find("tr")
.should("have.length", 2)
.get("#model-IdentificationProfile .model-box .model .inner-object table")
.find(("td:contains(\"deprecated\")"))
.should("not.exist")
})
})
describe ("OAS2", () => {
it("should display row with td:deprecated when set to true", () => {
cy.visit("/?url=/documents/bugs/6369-oas2-display.yaml")
.get("#model-IdentificationProfile > .model-box")
.click()
.get("#model-IdentificationProfile .model-box .model .inner-object")
.contains("td", "deprecated")
})
it("should not display row with td:deprecated when set to false", () => {
cy.visit("/?url=/documents/bugs/6369-oas2-no-display.yaml")
.get("#model-IdentificationProfile > .model-box")
.click()
.get("#model-IdentificationProfile .model-box .model .inner-object table")
.find("tr")
.should("have.length", 2)
.get("#model-IdentificationProfile .model-box .model .inner-object table")
.find(("td:contains(\"deprecated\")"))
.should("not.exist")
})
})
})