fix(components): add support for oneOf/anyOf JSON Schema keywords in parameter-row rendering (#9934)
Refs #7912
This commit is contained in:
49
test/e2e-cypress/e2e/features/parameters-one-of-any-of.cy.js
Normal file
49
test/e2e-cypress/e2e/features/parameters-one-of-any-of.cy.js
Normal file
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* @prettier
|
||||
*/
|
||||
|
||||
describe("Parameter with oneOf and anyOf keywords in OpenAPI 3.0.x", () => {
|
||||
it("should render correct form fields", () => {
|
||||
cy.visit("/?url=/documents/features/parameters-one-of-any-of-oas3.yaml")
|
||||
.get("#operations-default-get_")
|
||||
.click()
|
||||
cy.get(".parameters-col_description")
|
||||
.eq(1)
|
||||
.find("select")
|
||||
.should("exist")
|
||||
.and("have.value", "ascending")
|
||||
cy.get(".parameters-col_description")
|
||||
.eq(2)
|
||||
.find("input")
|
||||
.should("exist")
|
||||
.and("have.value", "test")
|
||||
cy.get(".parameters-col_description")
|
||||
.eq(3)
|
||||
.find("textarea")
|
||||
.should("exist")
|
||||
.and("contain", "\"eq\": \"active\"")
|
||||
})
|
||||
})
|
||||
|
||||
describe("Parameter with oneOf and anyOf keywords in OpenAPI 3.1.0.", () => {
|
||||
it("should render correct form fields", () => {
|
||||
cy.visit("/?url=/documents/features/parameters-one-of-any-of-oas31.yaml")
|
||||
.get("#operations-default-get_")
|
||||
.click()
|
||||
cy.get(".parameters-col_description")
|
||||
.eq(1)
|
||||
.find("select")
|
||||
.should("exist")
|
||||
.and("have.value", "ascending")
|
||||
cy.get(".parameters-col_description")
|
||||
.eq(2)
|
||||
.find("input")
|
||||
.should("exist")
|
||||
.and("have.value", "test")
|
||||
cy.get(".parameters-col_description")
|
||||
.eq(3)
|
||||
.find("textarea")
|
||||
.should("exist")
|
||||
.and("contain", "\"eq\": \"active\"")
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user