Zombie.js は、Node.js 向けの軽量でフルスタックなヘッドレスブラウザテストソリューションです。
ブラウザの自動化
ワークフローの例
browser
.visit("http://localhost:3000/", () => {})
.fill("email", "[email protected]")
.fill("password", "eat-the-living")
.select("Born", "1985")
.uncheck("Send newsletter")
.clickLink("Link name")
.pressButton("Sign", () => { ... })
.text("H1")
期待値とアサーション
expect(browser.query("#brains"))
expect(browser.body.queryAll(".hand")).length(2)
console.log(browser.html())
console.log(browser.html("table.parts"))
expect(Browser.text(".card-nopad small"), "移動のためのより良い方法!")