Files
swagger-ui/test/e2e/scenarios/on-complete.js
kyle 624a81201f feat: onComplete config option (#4322)
* feat: `onComplete` config option

* tests(e2e): add case for onComplete option
2018-03-16 00:08:39 -07:00

23 lines
534 B
JavaScript

const expect = require("expect")
describe("onComplete option", function () {
let mainPage
beforeEach(function (client, done) {
mainPage = client
.url("localhost:3200")
.page.main()
client.waitForElementVisible(".opblock-tag-section", 5000)
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()
})
})
})