fix: inconsistent behavior with multiple invocations of SwaggerUI (via #4923)

* add narrow e2e tests
* add failing system unit test
* break plugin object inheritance in combinePlugins
* style: add braces to if block
* drop unused `lodash.repeat` import
* remove deep-freeze from lockfile
This commit is contained in:
kyle
2018-10-04 18:00:38 -05:00
committed by GitHub
parent c949483dac
commit ecfc23972a
6 changed files with 302 additions and 70 deletions

View File

@@ -0,0 +1,19 @@
describe("#4865: multiple invocations + OAS3 plugin", () => {
it("control: should render the OAS3 badge correctly", () => {
// This is a sanity check to make sure the badge is present.
// If this is failing, it's probably not related to #4865.
cy.visit("/?url=/documents/petstore-expanded.openapi.yaml")
.get("#swagger-ui")
.get("pre.version")
.contains("OAS3")
})
it("test: should render the OAS3 badge correctly after re-initializing the UI", () => {
cy.visit("/?url=/documents/petstore-expanded.openapi.yaml")
.window()
.then(win => win.onload()) // re-initializes Swagger UI
.get("#swagger-ui")
.get("pre.version")
.contains("OAS3")
})
})