Files
swagger-ui/test/e2e-cypress/tests/bugs/5043.js
kyle 971c6f7536 fix: path-item $ref produces/consumes inheritance (via #5049)
* implement a selector for consumes options

* fix incorrect comment, test names

* add `consumesOptionsFor` selector

* use `consumesOptionsFor` and drop `operationConsumes`
2018-11-23 23:24:11 +01:00

32 lines
1012 B
JavaScript

import repeat from "lodash/repeat"
describe("#5043: path-level $ref path items should inherit global consumes/produces", () => {
it("should render consumes options correctly", () => {
cy
.visit("/?url=/documents/bugs/5043/swagger.yaml")
.get("#operations-pet-findPetsByStatus")
.click()
.get(".try-out__btn")
.click()
.get(".content-type")
.contains("application/json")
.get(".content-type")
.contains("application/xml")
.get(".content-type")
.contains("text/csv")
})
it("should render produces options correctly", () => {
cy
.visit("/?url=/documents/bugs/5043/swagger.yaml")
.get("#operations-pet-findPetsByStatus")
.click()
.get(".try-out__btn")
.click()
.get(".body-param-content-type select")
.contains("application/json")
.get(".body-param-content-type select")
.contains("application/xml")
.get(".body-param-content-type select")
.contains("text/csv")
})
})