Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(examples): add example protractor project
closes #72
- Loading branch information
1 parent
eaca084
commit 7547614
Showing
5 changed files
with
62 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Jasmine Matchers Protractor Example | ||
|
||
## System Dependencies | ||
|
||
Protractor requires you to have the [Java SDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) manually installed beforehand. | ||
|
||
## Running Tests | ||
|
||
1. Run `npm start` to start the Selenium Server which Protractor will send requests to. | ||
1. Leave the Server running then open another Terminal Session in another window. | ||
1. In the new Terminal window, run `npm test`. | ||
1. Return to the Server Terminal and hit Ctrl+C to stop the Server. | ||
|
||
## Configuration | ||
|
||
Jasmine Matchers is loaded by adding `node_modules/jasmine-expect/index.js` as the first item in the | ||
`specs` array in `./conf.js`. | ||
|
||
## Further Reading | ||
|
||
For more information, please see the [Protractor Tutorial](http://www.protractortest.org/#/tutorial) and [Protractor Gitter Chat](https://gitter.im/angular/protractor). |
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,8 @@ | ||
exports.config = { | ||
framework: 'jasmine', | ||
seleniumAddress: 'http://localhost:4444/wd/hub', | ||
specs: [ | ||
'node_modules/jasmine-expect/index.js', | ||
'src/**/*.e2e.spec.js' | ||
] | ||
}; |
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,12 @@ | ||
{ | ||
"devDependencies": { | ||
"jasmine-expect": "*", | ||
"protractor": "5.1.0" | ||
}, | ||
"private": true, | ||
"scripts": { | ||
"postinstall": "webdriver-manager update", | ||
"start": "webdriver-manager start", | ||
"test": "protractor conf.js" | ||
} | ||
} |
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,14 @@ | ||
describe('Protractor Example', function () { | ||
describe('Protractor', function () { | ||
it('should be configured correctly', function () { | ||
browser.get('http://juliemr.github.io/protractor-demo/'); | ||
expect(browser.getTitle()).toEqual('Super Calculator'); | ||
}); | ||
}); | ||
describe('Jasmine Matchers', function () { | ||
it('should be configured correctly', function () { | ||
expect(function () {}).toBeFunction(); | ||
expect(666).toBeNumber(); | ||
}); | ||
}); | ||
}); |
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