Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

59 рядки
2.2 KiB

  1. describe("parameter enum rendering", function () {
  2. describe("swagger 2.0", () => {
  3. beforeEach(function (client, done) {
  4. client
  5. .url("localhost:3230")
  6. .waitForElementVisible(".download-url-input", 10000)
  7. .pause(1000)
  8. .clearValue(".download-url-input")
  9. .setValue(".download-url-input", "http://localhost:3230/test-specs/features/parameter-enum-rendering.swagger.yaml")
  10. .click("button.download-url-button")
  11. .pause(1000)
  12. done()
  13. })
  14. afterEach(function (client, done) {
  15. done()
  16. })
  17. it("reveals a string parameter's enums and defaults when viewing that parameter", function (client) {
  18. client.waitForElementVisible(".opblock-tag-section", 10000)
  19. .assert.containsText(".opblock-summary-path span", "/report")
  20. .click(".opblock")
  21. .waitForElementVisible(".opblock.is-open", 5000)
  22. .pause(500)
  23. .assert.containsText("div.parameter__enum", "today, yesterday, lastweek")
  24. .assert.containsText("div.parameter__default", "today")
  25. client.end()
  26. })
  27. })
  28. describe("openapi 3.0", () => {
  29. beforeEach(function (client, done) {
  30. client
  31. .url("localhost:3230")
  32. .waitForElementVisible(".download-url-input", 10000)
  33. .pause(1000)
  34. .clearValue(".download-url-input")
  35. .setValue(".download-url-input", "http://localhost:3230/test-specs/features/parameter-enum-rendering.openapi.yaml")
  36. .click("button.download-url-button")
  37. .pause(1000)
  38. done()
  39. })
  40. afterEach(function (client, done) {
  41. done()
  42. })
  43. it("reveals a string parameter's enums and defaults when viewing that parameter", function (client) {
  44. client.waitForElementVisible(".opblock-tag-section", 10000)
  45. .assert.containsText(".opblock-summary-path span", "/report")
  46. .click(".opblock")
  47. .waitForElementVisible(".opblock.is-open", 5000)
  48. .pause(500)
  49. .assert.containsText("div.parameter__enum", "today, yesterday, lastweek")
  50. .assert.containsText("div.parameter__default", "today")
  51. client.end()
  52. })
  53. })
  54. })