Skip to content

Commit

Permalink
added e2e tests for logout
Browse files Browse the repository at this point in the history
  • Loading branch information
abarnhard committed Jan 10, 2015
1 parent 035cec3 commit 6de3fb9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/e2e/authentication/logout.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict';

describe('logout', function(){
it('should logout user', function(){
browser.get('/#/login');
element(by.model('user.email')).sendKeys('bob@aol.com');
element(by.model('user.password')).sendKeys('1234');
element(by.css('button[ng-click]')).click();
expect(element(by.css('a[ui-sref="schedule"]')).isDisplayed()).toBeTruthy();
element(by.css('li.has-dropdown > a')).click();
expect(element(by.css('ul.dropdown')).isDisplayed()).toBeTruthy();
element(by.css('a[ng-click="logout()"]')).click();
expect(element(by.css('a[ui-sref="schedule"]')).isDisplayed()).toBeFalsy();
expect(element(by.css('div[ui-view] h3')).getText()).toMatch(/Working out/);
});
});

0 comments on commit 6de3fb9

Please sign in to comment.