Created
February 11, 2015 17:18
-
-
Save RabeaWahab/5b568b75298cf22135ef 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
module.exports = { | |
'EXAMPLE.com HomePage': function (test) { | |
// Just a random number | |
var now = Math.floor(Date.now() / 1000); | |
test | |
// Open EXAMPLE.com | |
.open('http://www.EXAMPLE.com') | |
// This is a chain of assertions | |
.assert.chain() | |
.numberOfElements('#hero-carousel-main .carousel-inner .item').is.between([1, 15], 'Testing if More than one slide exists on the homepage.') | |
.numberOfElements('#menu-default .vnav .menu-item-link').is.between([5, 15], 'Testing if Menu exists.') | |
.exists('.fluid-width-video-wrapper iframe', 'Testing if Video Exists.') | |
.exists('.sec-shopper', 'Testing if (Need a product we don\'t have?) Block Exists.') | |
.exists('#abottom', 'Testing if Footer Exists.') | |
.end() | |
.screenshot('/path/to/whatever/directory/home_'+now+'.png') | |
.done() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment