Some checks failed
Node.js CI / build (push) Failing after 2s
Node.js CI / e2e-tests (+(a11y|security|bugs)/**/*cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/!(o|d|m)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/+(o|d)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/m*.cy.js) (push) Failing after 2s
CodeQL / Analyze (javascript) (push) Failing after 2m49s
Security scan for docker image / build (push) Failing after 51s
24 lines
849 B
JavaScript
Executable File
24 lines
849 B
JavaScript
Executable File
describe("Loading specs by url.primaryName param", () => {
|
|
describe("with no param", () => {
|
|
it("should load the default spec", () => {
|
|
cy.visit("/pages/multiple-urls/index.html")
|
|
.get("span.url")
|
|
.contains("/documents/petstore-expanded.openapi.yaml")
|
|
})
|
|
})
|
|
describe("with an invalid param", () => {
|
|
it("should fall back to the default spec", () => {
|
|
cy.visit("/pages/multiple-urls/index.html?urls.primaryName=undefinedUrlName")
|
|
.get("span.url")
|
|
.contains("/documents/petstore-expanded.openapi.yaml")
|
|
})
|
|
})
|
|
describe("with a valid url.primaryName param", () => {
|
|
it("should render the requested spec", () => {
|
|
cy.visit("/pages/multiple-urls/index.html?urls.primaryName=Petstore Swagger")
|
|
.get("span.url")
|
|
.contains("/documents/petstore.swagger.yaml")
|
|
})
|
|
})
|
|
})
|