6369.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. describe("#6369: Object model render of field: deprecated", () => {
  2. describe("OAS3", () => {
  3. it("should display row with td:deprecated when set to true", () => {
  4. cy.visit("/?url=/documents/bugs/6369-oas3-display.yaml")
  5. .get("#model-IdentificationProfile > .model-box")
  6. .click()
  7. .get("#model-IdentificationProfile .model-box .model .inner-object table")
  8. .find("tr")
  9. .should("have.length", 3)
  10. .contains("td", "deprecated")
  11. })
  12. it("should not display row with td:deprecated when set to false", () => {
  13. cy.visit("/?url=/documents/bugs/6369-oas3-no-display.yaml")
  14. .get("#model-IdentificationProfile > .model-box")
  15. .click()
  16. .get("#model-IdentificationProfile .model-box .model .inner-object table")
  17. .find("tr")
  18. .should("have.length", 2)
  19. .get("#model-IdentificationProfile .model-box .model .inner-object table")
  20. .find(("td:contains(\"deprecated\")"))
  21. .should("not.exist")
  22. })
  23. })
  24. describe ("OAS2", () => {
  25. it("should display row with td:deprecated when set to true", () => {
  26. cy.visit("/?url=/documents/bugs/6369-oas2-display.yaml")
  27. .get("#model-IdentificationProfile > .model-box")
  28. .click()
  29. .get("#model-IdentificationProfile .model-box .model .inner-object")
  30. .contains("td", "deprecated")
  31. })
  32. it("should not display row with td:deprecated when set to false", () => {
  33. cy.visit("/?url=/documents/bugs/6369-oas2-no-display.yaml")
  34. .get("#model-IdentificationProfile > .model-box")
  35. .click()
  36. .get("#model-IdentificationProfile .model-box .model .inner-object table")
  37. .find("tr")
  38. .should("have.length", 2)
  39. .get("#model-IdentificationProfile .model-box .model .inner-object table")
  40. .find(("td:contains(\"deprecated\")"))
  41. .should("not.exist")
  42. })
  43. })
  44. })