Created
May 27, 2014 17:55
-
-
Save crised/3a948984161d944b64a4 to your computer and use it in GitHub Desktop.
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
'use strict'; | |
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */ | |
describe('PhoneCat App', function () { | |
describe('Phone list view', function () { | |
beforeEach(function () { | |
browser.get('app/index.html'); | |
}); | |
it('should filter the phone list as user types into the search box', function () { | |
var phoneList = element.all(by.repeater('phone in phones')); | |
var query = element(by.model('query')); | |
expect(phoneList.count()).toBe(3); | |
query.sendKeys('nexus'); | |
expect(phoneList.count()).toBe(1); | |
query.clear(); | |
query.sendKeys('motorola'); | |
expect(phoneList.count()).toBe(2); | |
}); | |
it('should display the current filter value in title bar', function() { | |
expect(browser.getTitle()).toMatch(/Google Phone Gallery: \s*$/); | |
element(by.model('query')).sendKeys('nexus'); | |
expect(browser.getTitle()).toMatch(/Google Phone Gallery: nexus$/); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment