Files
swagger-ui/test/e2e-cypress/e2e/features/parameter-schema.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

42 lines
1.3 KiB
JavaScript
Executable File

/**
* @prettier
*/
describe("Operation parameters", () => {
beforeEach(() => {
cy.visit("/?url=/documents/features/parameter-schema.yaml")
})
it("should render example for parameters of type object", () => {
cy.get(".opblock-summary-path span").contains("/object").click()
cy.get(".model-example textarea")
.should("exist")
.and("have.value", '{\n "id": "string",\n "name": "string"\n}')
})
it("should render schema for parameters of type object", () => {
cy.get(".opblock-summary-path span").contains("/object").click()
cy.get(".model-example button").contains("Schema").click()
cy.get(".model-example .model").should("exist")
})
it("should render example for parameters of type array of objects", () => {
cy.visit("/?url=/documents/features/parameter-schema.yaml")
cy.get(".opblock-summary-path span").contains("/arrayOfObjects").click()
cy.get(".model-example textarea")
.should("exist")
.and("have.value", '{\n "id": "string",\n "name": "string"\n}')
})
it("should render schema for parameters of type array of objects", () => {
cy.get(".opblock-summary-path span").contains("/arrayOfObjects").click()
cy.get(".model-example button").contains("Schema").click()
cy.get(".model-example .model").should("exist")
})
})