End2End Test for the 'filter' Filter

by derkoe

HTML

<script src="http://code.angularjs.org/1.1.4/angular-scenario.js" ng-autotest></script>

JavaScript

describe('"filter" Filter App', function(){

    beforeEach(function() {
        browser().navigateTo('/derkoe/6BLDg/show/');
    });

    it('should filter correctly', function() {
        input('searchString').enter('John');
        expect(repeater('#result tr').count()).toBe(2);
    });

    it('should sort correctly', function() {
        select('sort').option('first');
        expect(repeater('#result tr').row(0)).toContain('Ben Richards');
        expect(repeater('#result tr').row(3)).toContain('Rocky Balboa');
    });
});