4587.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. describe("bug #4587: clearing header param 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/4587.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-sql-execSql")
  20. .waitForElementVisible(".opblock.is-open", 5000)
  21. .click("button.btn.try-out__btn")
  22. .setValue(`tr[data-param-name="x-irest-conn"] input`, "hi")
  23. .click("button.btn.execute")
  24. .waitForElementVisible(".request-url", 2000)
  25. .setValue(`tr[data-param-name="x-irest-conn"] input`, `\u0008\u0008\u0008`) // backspaces
  26. .pause(900)
  27. .click("button.btn.execute")
  28. .expect.element("textarea.curl").text
  29. .to.not.contain(`x-irest-conn`)
  30. })
  31. })