fix(xml): example generation if an array has an example (#6634)

ref: #6627
This commit is contained in:
Tim Lai
2020-11-18 15:19:52 -08:00
committed by GitHub
parent d7c97404c1
commit 24225e47bf
3 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
describe("#6627: XML example when defined as array", () => {
it("should render xml like json", () => {
const expected = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Users>\n\t<User id=\"123\" name=\"bob\">\n\t</User>\n\t<User id=\"456\" name=\"jane\">\n\t</User>\n</Users>"
cy
.visit("/?url=/documents/bugs/6627.yaml")
.get("#operations-default-get_users")
.click()
.get(".microlight")
.contains(expected)
})
})