4756.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. describe("bug #4756: enum initial values", function () {
  2. let mainPage
  3. beforeEach(function (client, done) {
  4. mainPage = client
  5. .url("localhost:3230")
  6. .page.main()
  7. client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
  8. .clearValue(".download-url-input")
  9. .setValue(".download-url-input", "http://localhost:3230/test-specs/bugs/4756.yaml")
  10. .click("button.download-url-button")
  11. .pause(1000)
  12. done()
  13. })
  14. afterEach(function (client, done) {
  15. done()
  16. })
  17. it("sets a required initial value based the first enum value", function (client) {
  18. client.waitForElementVisible(".opblock-tag-section", 10000)
  19. .click("#operations-default-post_zero")
  20. .waitForElementVisible(".opblock.is-open", 5000)
  21. .click("button.btn.try-out__btn")
  22. .click("button.btn.execute")
  23. .waitForElementVisible(".request-url", 2000)
  24. .assert.containsText(".request-url > pre", "http://www.example.com/test/API/zero?one=0")
  25. client.end()
  26. })
  27. it("sets a required initial value based on a default value", function (client) {
  28. client.waitForElementVisible(".opblock-tag-section", 10000)
  29. .click("#operations-default-post_one")
  30. .waitForElementVisible(".opblock.is-open", 5000)
  31. .click("button.btn.try-out__btn")
  32. .click("button.btn.execute")
  33. .waitForElementVisible(".request-url", 2000)
  34. .assert.containsText(".request-url > pre", "http://www.example.com/test/API/one?one=1")
  35. client.end()
  36. })
  37. })