Skip to content

Instantly share code, notes, and snippets.

@julienXX
Created June 26, 2013 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julienXX/5867859 to your computer and use it in GitHub Desktop.
Save julienXX/5867859 to your computer and use it in GitHub Desktop.
describe('Testing Login', function() {
beforeEach(function(){
browser().navigateTo('/');
input('login.login').enter('user');
input('login.password').enter('secure_password');
});
it('should login', function() {
element('#login').click();
expect(browser().location().url()).toBe("/");
expect(element('#welcome_user:visible').count()).toBe(1);
expect(element('#welcome_user').text()).toEqual('Welcome, Julien!');
});
it('should disconnect', function() {
element('#login').click();
element('#disconnect').click();
expect(element('#welcome_user:visible').count()).toBe(0);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment