Created
September 17, 2013 22:45
-
-
Save sjungling/6601730 to your computer and use it in GitHub Desktop.
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
casper = require('casper').create() | |
casper.test.begin "Check for dataLayer on product page", 1, (test) -> | |
casper.start 'http://local.build.com/k-690/p173354', -> | |
test.assertEval -> | |
typeof window.dataLayer.productId != "undefined" | |
, 'Does dataLayer.productId exist?' | |
test.assertEvalEquals -> | |
window.dataLayer.productId | |
, "K-690", 'Is the value of dataLayer.productId "K-690"?' | |
casper.run -> | |
test.done() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment