Files
kyy f464ba2d31
Some checks failed
Node.js CI / build (push) Failing after 2s
Node.js CI / e2e-tests (+(a11y|security|bugs)/**/*cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/!(o|d|m)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/+(o|d)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/m*.cy.js) (push) Failing after 2s
CodeQL / Analyze (javascript) (push) Failing after 2m49s
Security scan for docker image / build (push) Failing after 51s
Update swagger-ui
2025-06-24 13:40:26 +09:00

41 lines
1.6 KiB
JavaScript
Executable File

describe("render pet api container", function () {
let mainPage
let apiWrapper
beforeEach(function (client, done) {
mainPage = client
.url("localhost:3230")
.page.main()
client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
.clearValue(".download-url-input")
.setValue(".download-url-input", "http://localhost:3230/test-specs/callbacks.openapi.yaml")
.click("button.download-url-button")
.pause(1000)
apiWrapper = mainPage.section.apiWrapper
done()
})
afterEach(function (client, done) {
done()
})
describe("POST /pet", () => {
it("should render a callback correctly", function (client) {
apiWrapper.waitForElementVisible("#operations-pet-addPet", 10000)
// Expand the operation
.click("#operations-pet-addPet")
.waitForElementVisible("#operations-pet-addPet > div:nth-child(2) > div", 5000)
// Switch to Callbacks tab
.click("#operations-pet-addPet div.tab-header > div.tab-item.false > h4 > span")
.waitForElementVisible("#operations-pet-addPet div.callbacks-container", 5000)
.assert.containsText("#operations--post_request_body__url > div > span.opblock-summary-path", "$request.body#/url")
.click("#operations--post_request_body__url")
.waitForElementVisible("#operations--post_request_body__url div.response-col_description__inner > div > div > p", 5000)
.assert.containsText("#operations--post_request_body__url div.response-col_description__inner > div > div > p", "webhook successfully processed and no retries will be performed")
client.end()
})
})
})