您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

38 行
1.1 KiB

  1. /**
  2. * @prettier
  3. */
  4. describe("UI #4442: Parameter.content display and execution", function() {
  5. it("should display textareas as static documentation according to the `example`", () => {
  6. cy.visit("/?url=/documents/bugs/4442.yaml")
  7. .get(`#operations-default-get_`)
  8. .click()
  9. .get(".btn.try-out__btn")
  10. .click()
  11. .get(
  12. `div.json-schema-array > div:nth-child(1) > div > textarea`
  13. )
  14. .should("have.value", `{\n "userId": 1,\n "currency": "USD"\n}`)
  15. .get(
  16. `div.json-schema-array > div:nth-child(2) > div > textarea`
  17. )
  18. .should("have.value", `{\n "userId": 2,\n "currency": "CAD"\n}`)
  19. })
  20. it("should serialize JSON into a query correctly", () => {
  21. cy.visit("/?url=/documents/bugs/4442.yaml")
  22. .get(`#operations-default-get_`)
  23. .click()
  24. .get(".btn.try-out__btn")
  25. .click()
  26. .get(".btn.execute")
  27. .click()
  28. .get(".request-url pre")
  29. .should(
  30. "have.text",
  31. `http://localhost:3230/?users=${encodeURIComponent(
  32. `[{"userId":1,"currency":"USD"},{"userId":2,"currency":"CAD"}]`
  33. )}`
  34. )
  35. })
  36. })