You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 lines
675 B

  1. import repeat from "lodash/repeat"
  2. describe("Editor #1868: model changes break rendering", () => {
  3. it("should render model content changes correctly", () => {
  4. cy
  5. .visit("/?url=/documents/bugs/editor-1868.yaml")
  6. .get(".model-toggle.collapsed")
  7. .click()
  8. .get("#model-MyModel")
  9. .contains("a")
  10. .window()
  11. .then(win => {
  12. // Simulate Swagger Editor updating a model
  13. const content = win.ui.specSelectors.specStr()
  14. win.ui.specActions.updateSpec(content + `\n b:\n type: string`)
  15. })
  16. .get("#model-MyModel")
  17. .contains("a")
  18. .get("#model-MyModel")
  19. .contains("b")
  20. })
  21. })