refactor(tabs): preventDefault when anchor is clicked

This commit is contained in:
Andy Joslin
2014-02-25 12:27:04 -05:00
parent 3419e40e52
commit bdcd6bb15f
2 changed files with 5 additions and 7 deletions

View File

@@ -1,8 +1,6 @@
describe('tabs test page', function() {
var P;
describe('viewState', function() {
beforeEach(function() {
browser.get('http://localhost:8080/test/e2e/viewState/test.html');
P = protractor.getInstance();
});
function navTitle() {
@@ -15,7 +13,6 @@ describe('tabs test page', function() {
}
it('navbar with multiple histories', function() {
browser.sleep(1000);
expect(navTitle().getText()).toBe('Sign-In');
expect(navButtons('back').getAttribute('class')).toContain('hide');
expect(navButtons('left').getText()).toEqual('Home');
@@ -40,7 +37,7 @@ describe('tabs test page', function() {
expect(navButtons('left').isPresent()).toBe(false);
expect(navButtons('right').isPresent()).toBe(false);
element(by.css('.tabs a.tab-item:nth-child(2)')).click();
element(by.css('.tabs a:nth-child(2)')).click();
expect(navTitle().getText()).toBe('Add Auto');
expect(navButtons('back').getAttribute('class')).toContain('hide');