Skip to content

Instantly share code, notes, and snippets.

@pimterry
Last active January 23, 2016 13:30
Show Gist options
  • Save pimterry/297a8a32f9b30d9a9958 to your computer and use it in GitHub Desktop.
Save pimterry/297a8a32f9b30d9a9958 to your computer and use it in GitHub Desktop.
it("Can open main page", function () {
return driver.get(extensionPage("main.html")).then(function () {
return driver.wait(sw.until.elementLocated({
css: ".city > canvas"
}), 1000);
}).then(function (cityCanvas) {
return sw.promise.delayed(200).then(function () {
return cityCanvas;
});
}).then(function (cityCanvas) {
return canvasContainsDrawnPixels(cityCanvas);
}).then(function (canvasContainsDrawnPixels) {
expect(canvasContainsDrawnPixels).to.equal(true,
"City canvas should have an image drawn on it");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment