Files
swagger-ui/test/e2e-cypress/e2e/features/plugins/topbar/linking-to-configured-urls.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

24 lines
849 B
JavaScript

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")
})
})
})