Files
swagger-ui/test/e2e-cypress/e2e/features/try-it-out-non-200-response-body.cy.js
kyy f464ba2d31
Some checks failed
Node.js CI / build (push) Failing after 2s
Node.js CI / e2e-tests (+(a11y|security|bugs)/**/*cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/!(o|d|m)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/+(o|d)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/m*.cy.js) (push) Failing after 2s
CodeQL / Analyze (javascript) (push) Failing after 2m49s
Security scan for docker image / build (push) Failing after 42s
Update swagger-ui
2025-06-24 13:40:26 +09:00

27 lines
795 B
JavaScript
Executable File

/**
* @prettier
*/
describe("#9556: SwaggerUI doesn't render response bodies for non-200 responses", () => {
beforeEach(() => {
const staticResponse = {
statusCode: 400,
headers: { "content-type": "plain/text" },
body: "This should render",
}
cy.intercept("GET", "/400-any", staticResponse).as("request")
})
it("should render response body for a response with 400 status code", () => {
cy.visit("?url=/documents/features/try-it-out-non-200-response-body.yaml")
.get("#operations-default-get_400_any")
.click()
.get(".try-out__btn")
.click()
.get(".execute")
.click()
.wait("@request")
.get(".response-col_description .highlight-code .microlight")
.should("have.text", "This should render")
})
})