feat: onComplete config option (#4322)

* feat: `onComplete` config option

* tests(e2e): add case for onComplete option
This commit is contained in:
kyle
2018-03-16 00:08:39 -07:00
committed by GitHub
parent b0be261ef8
commit 624a81201f
7 changed files with 167 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
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()
})
})
})