-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6aff011
commit c620d9c
Showing
17 changed files
with
100 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
AppPage = require('../pages/app-page') | ||
|
||
|
||
###* | ||
Protractor e2e Tests | ||
### | ||
App = new AppPage() | ||
describe "Angular-CMS App", -> | ||
beforeEach -> | ||
App.get() | ||
|
||
#Welome Story: the initial page | ||
describe 'Index:', -> | ||
it "should display the main index view as default", -> | ||
expect(browser.getLocationAbsUrl()).toEqual '/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
LoginPage = require('../pages/login-page') | ||
loginPage = new LoginPage() | ||
###* | ||
Login - The user login implementation | ||
### | ||
describe 'Login:', -> | ||
|
||
#Click the login button each time | ||
beforeEach -> | ||
$('a[href="#/login"]').click() | ||
|
||
#Make sure we end up at the login page to enter our credentials | ||
#Make sure there is a username and password input with button | ||
it 'should have Username and password inputs with a button to submit the form', -> | ||
expect(browser.getLocationAbsUrl()).toEqual '/login' | ||
|
||
#Login to the page | ||
loginPage.login('[email protected]', 'test') | ||
|
||
#Wait for the api call to go thru | ||
sleep 1 | ||
|
||
#We should end up at the dashboard page. | ||
expect(browser.getLocationAbsUrl()).toEqual '/dashboard' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
RegisterPage = require('../pages/register-page') | ||
j$ = require('../j$') | ||
|
||
###* | ||
Register - The user registration implementation | ||
### | ||
describe 'Register: ', -> | ||
it 'should have email and password inputs with a button to submit the form', -> | ||
registerPage = new RegisterPage() | ||
registerPage.get() | ||
expect(browser.getCurrentUrl()).toContain 'register' | ||
expect(j$.element('form', 'Login form').count()).toEqual 1 | ||
expect(j$.element('input[name="email"]', 'Email input').count()).toEqual 1 | ||
expect(j$.element('input[name="username"]', 'Username input').count()).toEqual 1 | ||
expect(j$.element('input[name="password"]', 'Password input').count()).toEqual 2 | ||
expect(j$.element('button[type="submit"]', 'Submit button').count()).toEqual 1 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters