Commit 67d63df2 authored by Evren Kutar's avatar Evren Kutar

sample protractor tests and config

parent 2dd72a40
......@@ -2,23 +2,23 @@
/* https://github.com/angular/protractor/blob/master/docs/toc.md */
describe('my app', function() {
describe('my app', function () {
browser.get('index.html');
it('should automatically redirect to /dashboard when location hash/fragment is empty', function() {
it('should automatically redirect to /dashboard when location hash/fragment is empty', function () {
expect(browser.getLocationAbsUrl()).toMatch("/login");
});
describe('dashboard', function() {
describe('dashboard', function () {
beforeEach(function() {
beforeEach(function () {
browser.get('index.html#/dashboard');
});
it('should redirect to login page if not logged in', function() {
it('should redirect to login page if not logged in', function () {
expect(element.all(by.css('[ng-view] h1')).first().getText()).
toMatch(/Zaerp Login Form/);
});
......@@ -26,14 +26,14 @@ describe('my app', function() {
});
describe('login', function() {
describe('login', function () {
beforeEach(function() {
beforeEach(function () {
browser.get('index.html#/login');
});
it('should render view2 when user navigates to /view2', function() {
it('should render view2 when user navigates to /view2', function () {
expect(element.all(by.css('[ng-view] h1')).first().getText()).
toMatch(/Zaerp Login Form/);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment