Zombie.js è una soluzione leggera e completa per test headless in ambiente Node.js.
Automazione del browser
Esempio di flusso di lavoro
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")
Aspettative e asserzioni
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"), "Un modo migliore per spostarsi!")