Files
swagger-ui/test/e2e-cypress/e2e/bugs/editor-1868.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

26 lines
675 B
JavaScript

import repeat from "lodash/repeat"
describe("Editor #1868: model changes break rendering", () => {
it("should render model content changes correctly", () => {
cy
.visit("/?url=/documents/bugs/editor-1868.yaml")
.get(".model-toggle.collapsed")
.click()
.get("#model-MyModel")
.contains("a")
.window()
.then(win => {
// Simulate Swagger Editor updating a model
const content = win.ui.specSelectors.specStr()
win.ui.specActions.updateSpec(content + `\n b:\n type: string`)
})
.get("#model-MyModel")
.contains("a")
.get("#model-MyModel")
.contains("b")
})
})