3 /* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
5 describe('my app', function() {
7 beforeEach(function() {
8 browser().navigateTo('../../app/index.html');
12 it('should automatically redirect to /view1 when location hash/fragment is empty', function() {
13 expect(browser().location().url()).toBe("/view1");
17 describe('view1', function() {
19 beforeEach(function() {
20 browser().navigateTo('#/view1');
24 it('should render view1 when user navigates to /view1', function() {
25 expect(element('[ng-view] p:first').text()).
26 toMatch(/partial for view 1/);
32 describe('view2', function() {
34 beforeEach(function() {
35 browser().navigateTo('#/view2');
39 it('should render view2 when user navigates to /view2', function() {
40 expect(element('[ng-view] p:first').text()).
41 toMatch(/partial for view 2/);