fix: models view when object key contains deprecated:true (#6371)
fixes #6369
This commit is contained in:
44
test/e2e-cypress/tests/bugs/6369.js
Normal file
44
test/e2e-cypress/tests/bugs/6369.js
Normal file
@@ -0,0 +1,44 @@
|
||||
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")
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user