1 describe('my app', function() {
3 beforeEach(function() {
4 browser().navigateTo('../../app/index.html');
8 it('should automatically redirect to /view1 when location hash/fragment is empty', function() {
9 expect(browser().location().hash()).toBe("/view1");
13 describe('view1', function() {
15 beforeEach(function() {
16 browser().navigateTo('#/view1');
20 it('should render view1 when user navigates to /view1', function() {
21 expect(element('ng\\:view p:first').text()).
22 toMatch(/partial for view 1/)
28 describe('view2', function() {
30 beforeEach(function() {
31 browser().navigateTo('#/view2');
35 it('should render view1 when user navigates to /view2', function() {
36 expect(element('ng\\:view p:first').text()).
37 toMatch(/partial for view 2/)