refactor(oas31): concentrate OpenAPI 3.1.0 code to separate plugin (#8475)
Refs #8474
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
describe("Render Info Component", () => {
|
||||
describe("OpenAPI 2.x", () => {
|
||||
describe("OpenAPI 2.0", () => {
|
||||
const baseUrl = "/?url=/documents/features/info-openAPI2.yaml"
|
||||
|
||||
it("should render Info Description", () => {
|
||||
cy.visit(baseUrl)
|
||||
.get(".info .description")
|
||||
.should("contains.text", "This is a sample")
|
||||
})
|
||||
|
||||
it("should render Info Main anchor target xss link with safe `rel` attributes", () => {
|
||||
cy.visit(baseUrl)
|
||||
.get(".info .main > a")
|
||||
@@ -16,19 +18,23 @@ describe("Render Info Component", () => {
|
||||
.should("have.attr", "target")
|
||||
.and("equal", "_blank")
|
||||
})
|
||||
|
||||
it("should not render Info Summary (an OpenAPI 3.1 field)", () => {
|
||||
cy.visit(baseUrl)
|
||||
.get(".info__summary")
|
||||
.should("not.exist")
|
||||
})
|
||||
})
|
||||
|
||||
describe("OpenAPI 3.0.x", () => {
|
||||
const baseUrl = "/?url=/documents/features/info-openAPI30.yaml"
|
||||
|
||||
it("should render Info Description", () => {
|
||||
cy.visit(baseUrl)
|
||||
.get(".info .description")
|
||||
.should("contains.text", "This is a sample")
|
||||
})
|
||||
|
||||
it("should render Info Main anchor target xss link with safe `rel` attributes", () => {
|
||||
cy.visit(baseUrl)
|
||||
.get(".info .main > a")
|
||||
@@ -39,19 +45,23 @@ describe("Render Info Component", () => {
|
||||
.should("have.attr", "target")
|
||||
.and("equal", "_blank")
|
||||
})
|
||||
|
||||
it("should not render Info Summary (an OpenAPI 3.1 field)", () => {
|
||||
cy.visit(baseUrl)
|
||||
.get(".info__summary")
|
||||
.should("not.exist")
|
||||
})
|
||||
})
|
||||
|
||||
describe("OpenAPI 3.1.x", () => {
|
||||
const baseUrl = "/?url=/documents/features/info-openAPI31.yaml"
|
||||
|
||||
it("should render Info Description", () => {
|
||||
cy.visit(baseUrl)
|
||||
.get(".info .description")
|
||||
.should("contains.text", "This is a sample")
|
||||
})
|
||||
|
||||
it("should render Info Main anchor target xss link with safe `rel` attributes", () => {
|
||||
cy.visit(baseUrl)
|
||||
.get(".info .main > a")
|
||||
|
||||
Reference in New Issue
Block a user