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
29 lines
759 B
JavaScript
Executable File
29 lines
759 B
JavaScript
Executable File
const expect = require("expect")
|
|
|
|
describe("onComplete option", function () {
|
|
let mainPage
|
|
beforeEach(function (client, done) {
|
|
mainPage = client
|
|
.url("localhost:3230")
|
|
.page.main()
|
|
|
|
client.waitForElementVisible(".download-url-input:not([disabled])", 5000)
|
|
.pause(80)
|
|
.clearValue(".download-url-input")
|
|
.setValue(".download-url-input", "http://localhost:3230/test-specs/petstore.json")
|
|
.click("button.download-url-button")
|
|
.pause(1000)
|
|
|
|
done()
|
|
})
|
|
|
|
it("triggers the page-provided onComplete exactly 1 times", function (client, done) {
|
|
client.execute(function() {
|
|
return window.completeCount
|
|
}, [], (result) => {
|
|
expect(result.value).toEqual(1)
|
|
client.end()
|
|
})
|
|
})
|
|
})
|