Created
September 13, 2013 22:54
-
-
Save kbingman/6557116 to your computer and use it in GitHub Desktop.
lululemon Webdriver.js tests
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
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