You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
867 B
JavaScript
42 lines
867 B
JavaScript
describe('my app', function() {
|
|
|
|
beforeEach(function() {
|
|
browser().navigateTo('../../app/index.html');
|
|
});
|
|
|
|
|
|
it('should automatically redirect to /view1 when location hash/fragment is empty', function() {
|
|
expect(browser().location().hash()).toBe("/view1");
|
|
});
|
|
|
|
|
|
describe('view1', function() {
|
|
|
|
beforeEach(function() {
|
|
browser().navigateTo('#/view1');
|
|
});
|
|
|
|
|
|
it('should render view1 when user navigates to /view1', function() {
|
|
expect(element('ng\\:include p:first').text()).
|
|
toMatch(/partial for view 1/)
|
|
});
|
|
|
|
});
|
|
|
|
|
|
describe('view2', function() {
|
|
|
|
beforeEach(function() {
|
|
browser().navigateTo('#/view2');
|
|
});
|
|
|
|
|
|
it('should render view1 when user navigates to /view2', function() {
|
|
expect(element('ng\\:include p:first').text()).
|
|
toMatch(/partial for view 2/)
|
|
});
|
|
|
|
});
|
|
});
|