Files
swagger-ui/test/e2e-cypress/e2e/features/try-it-out-enabled.cy.js
Vladimír Gorej 3e81a4f897 chore(deps-dev): update cypress to v12 (#8889)
This update required changing the configuration
and test directory structure. Some tests needed
to be amended as well to compensate for new
Cypress APIs.
2023-06-07 10:25:32 +02:00

22 lines
675 B
JavaScript

describe("Try it out enabled configuration", () => {
it("should enable the try it out section when true", () => {
cy
.visit("?tryItOutEnabled=true&url=/documents/features/try-it-out-enabled.yaml")
.get("#operations-default-get_")
.click()
.get(".try-out__btn")
.should("have.text","Cancel")
})
it("should disable the try it out section when false", () => {
cy
.visit("?tryItOutEnabled=false&url=/documents/features/try-it-out-enabled.yaml")
.get("#operations-default-get_")
.click()
.get(".try-out__btn")
.should("have.text","Try it out ")
})
})