fix(components): fix rendering for empty examples in responses (#9926)

Refs #9499
This commit is contained in:
Oliwia Rogala
2024-05-10 13:42:33 +02:00
committed by GitHub
parent a99be53a84
commit 94f2d8298a
3 changed files with 43 additions and 2 deletions

View File

@@ -0,0 +1,16 @@
/**
* @prettier
*/
describe("Response examples", () => {
it("should render a generated example when an empty examples object is provided", () => {
cy.visit("/?url=/documents/features/response-empty-examples-object.yaml")
.get("#operations-TEST-test")
.click()
.get(".example.microlight")
.should("exist")
.contains("{}")
.get(".examples-select-element")
.should("not.exist")
})
})