|
| 1 | +describe("#6475: 'Examples' keyword definitions can not be rendered as xml", () => { |
| 2 | + it("should render requestBody examples preview accourdingly to content-type xml", () => { |
| 3 | + const xmlIndicator = "<x>should be xml</x>" |
| 4 | + |
| 5 | + cy |
| 6 | + .visit("?url=/documents/bugs/6475.yaml") |
| 7 | + .get("#operations-default-xmlTest_examples") |
| 8 | + .click() |
| 9 | + .get(".opblock-section-request-body") |
| 10 | + .within(() => { |
| 11 | + cy |
| 12 | + .get(".microlight") |
| 13 | + .should("include.text", xmlIndicator) |
| 14 | + }) |
| 15 | + }) |
| 16 | + it("should requestBody examples input accourdingly to content-type xml", () => { |
| 17 | + const xmlIndicator = "<x>should be xml</x>" |
| 18 | + |
| 19 | + cy |
| 20 | + .visit("?url=/documents/bugs/6475.yaml") |
| 21 | + .get("#operations-default-xmlTest_examples") |
| 22 | + .click() |
| 23 | + .get(".btn.try-out__btn") |
| 24 | + .click() |
| 25 | + .get(".opblock-section-request-body") |
| 26 | + .within(() => { |
| 27 | + cy |
| 28 | + .get("textarea") |
| 29 | + .contains(xmlIndicator) |
| 30 | + }) |
| 31 | + }) |
| 32 | +}) |
| 33 | + |
| 34 | +describe("#6475: 'Example' keyword definitions can not be rendered as xml", () => { |
| 35 | + it("should render requestBody examples preview accourdingly to content-type xml", () => { |
| 36 | + const xmlIndicator = "<x>should be xml</x>" |
| 37 | + |
| 38 | + cy |
| 39 | + .visit("?url=/documents/bugs/6475.yaml") |
| 40 | + .get("#operations-default-xmlTest_example") |
| 41 | + .click() |
| 42 | + .get(".opblock-section-request-body") |
| 43 | + .within(() => { |
| 44 | + cy |
| 45 | + .get(".microlight") |
| 46 | + .should("include.text", xmlIndicator) |
| 47 | + }) |
| 48 | + }) |
| 49 | + it("should requestBody examples input accourdingly to content-type xml", () => { |
| 50 | + const xmlIndicator = "<x>should be xml</x>" |
| 51 | + |
| 52 | + cy |
| 53 | + .visit("?url=/documents/bugs/6475.yaml") |
| 54 | + .get("#operations-default-xmlTest_example") |
| 55 | + .click() |
| 56 | + .get(".btn.try-out__btn") |
| 57 | + .click() |
| 58 | + .get(".opblock-section-request-body") |
| 59 | + .within(() => { |
| 60 | + cy |
| 61 | + .get("textarea") |
| 62 | + .contains(xmlIndicator) |
| 63 | + }) |
| 64 | + }) |
| 65 | +}) |
0 commit comments