Last active
August 29, 2015 14:04
-
-
Save megurock/b76ffd1549746dec8f7e to your computer and use it in GitHub Desktop.
testing site title and description using nightwatch.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
setUp: function() { | |
}, | |
tearDown: function() { | |
}, | |
myTest: function(browser) { | |
var title = 'Site Title', | |
description = 'Site Description'; | |
browser | |
.resizeWindow(400, 400) | |
.url("http://localhost:8000/") | |
.waitForElementVisible("body", 3000) | |
.verify.title(title) | |
.verify.attributeEquals("meta[property='og:title']", "content", title) | |
.verify.attributeEquals("meta[property='og:site_name']", "content", title) | |
.verify.attributeEquals("meta[name=description]", "content", description) | |
.verify.attributeEquals("meta[property='og:description']", "content", description) | |
// more assertions go here | |
.end(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment