fix: type safety for operation summary handling (via #5191)
* fix: gracefully handle non-string operation summaries * use lodash for more summary type safety
This commit is contained in:
@@ -2,9 +2,17 @@ describe("#5188: non-string operation summary value", () => {
|
||||
it("should gracefully handle an object value for an operation summary", () => {
|
||||
cy
|
||||
.visit("?url=/documents/bugs/5188.yaml")
|
||||
.get("#operations-pet-addPet")
|
||||
.get("#operations-default-objectSummary")
|
||||
.click()
|
||||
.get(".opblock-summary-description")
|
||||
.contains("[object Object]")
|
||||
})
|
||||
})
|
||||
it("should gracefully handle a missing value for an operation summary", () => {
|
||||
cy
|
||||
.visit("?url=/documents/bugs/5188.yaml")
|
||||
.get("#operations-default-noSummary")
|
||||
.click()
|
||||
// check for response rendering; makes sure the Operation itself rendered
|
||||
.contains("Invalid input")
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user