Skip to content

Instantly share code, notes, and snippets.

@kbingman
Created September 13, 2013 22:54
Show Gist options
  • Save kbingman/6557116 to your computer and use it in GitHub Desktop.
Save kbingman/6557116 to your computer and use it in GitHub Desktop.
lululemon Webdriver.js tests
describe('lululemon', function(){
this.timeout(99999999);
before(function(){
client.init();
});
it('should login', function(done){
client
.loginAndPreview()
.waitFor('#x-root')
.call(done);
});
it('should mobify the home page', function(done) {
client
.openMobifiedURL(baseURL)
.url(function(err, url) {
console.log('url: ', url.value.split('#')[0]);
assert.strictEqual(err, null);
assert.strictEqual(url.value.split('#')[0], baseURL);
})
.call(done);
});
it('should still be mobified', function(done){
client
.openMobifiedURL(baseURL)
.saveScreenshot('lululemon.png')
.click('#x-slideshow-items-women li:first-child > a:first-child', function(err, el){
// example of error logging
if(err){
console.log('err: ', err);
}
assert.strictEqual(err, null);
})
.call(done);
});
after(function(done) {
client.end(done);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment