Files
swagger-ui/test/e2e-cypress/e2e/features/oas31-auth-mutual-tls.cy.js
Patryk Rosiak 89cdd7b022 feat: add mutualTLS auth option (#9193)
Refs #8020 

Co-authored-by: Vladimír Gorej <vladimir.gorej@smartbear.com>
2023-09-13 15:32:35 +02:00

31 lines
799 B
JavaScript

describe("MutualTLS Authorization", () => {
it("should open authorization popup", () => {
cy.visit(
"/?url=/documents/security/mutual-tls.yaml"
)
.get("button.authorize")
.click()
.get(".auth-container h4")
.contains("mutual (mutualTLS)")
})
it("should have description given by user", () => {
cy.visit(
"/?url=/documents/security/mutual-tls.yaml"
)
.get("button.authorize")
.click()
.get(".auth-container p:nth-of-type(2)")
.contains("Mutual TLS description")
})
it("should not display Authorize or Logout buttons", () => {
cy.visit(
"/?url=/documents/security/mutual-tls.yaml"
)
.get("button.authorize")
.click()
.get(".auth-button-wrapper")
.should("not.exist")
})
})