You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

41 line
1.6 KiB

  1. describe("render pet api container", function () {
  2. let mainPage
  3. let apiWrapper
  4. beforeEach(function (client, done) {
  5. mainPage = client
  6. .url("localhost:3230")
  7. .page.main()
  8. client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
  9. .clearValue(".download-url-input")
  10. .setValue(".download-url-input", "http://localhost:3230/test-specs/callbacks.openapi.yaml")
  11. .click("button.download-url-button")
  12. .pause(1000)
  13. apiWrapper = mainPage.section.apiWrapper
  14. done()
  15. })
  16. afterEach(function (client, done) {
  17. done()
  18. })
  19. describe("POST /pet", () => {
  20. it("should render a callback correctly", function (client) {
  21. apiWrapper.waitForElementVisible("#operations-pet-addPet", 10000)
  22. // Expand the operation
  23. .click("#operations-pet-addPet")
  24. .waitForElementVisible("#operations-pet-addPet > div:nth-child(2) > div", 5000)
  25. // Switch to Callbacks tab
  26. .click("#operations-pet-addPet div.tab-header > div.tab-item.false > h4 > span")
  27. .waitForElementVisible("#operations-pet-addPet div.callbacks-container", 5000)
  28. .assert.containsText("#operations--post_request_body__url > div > span.opblock-summary-path", "$request.body#/url")
  29. .click("#operations--post_request_body__url")
  30. .waitForElementVisible("#operations--post_request_body__url div.response-col_description__inner > div > div > p", 5000)
  31. .assert.containsText("#operations--post_request_body__url div.response-col_description__inner > div > div > p", "webhook successfully processed and no retries will be performed")
  32. client.end()
  33. })
  34. })
  35. })