├── .gitignore ├── .jshintrc ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── circle.yml ├── gulpfile.js ├── jasmine-junit-reports ├── .gitignore ├── README.md ├── conf.js ├── package.json ├── specs │ ├── example1_spec.js │ └── example2_spec.js └── yarn.lock ├── package.json ├── protractor-docker ├── README.md ├── docker-compose.yml ├── docker-selenium-grid-conf.js ├── docker-setup.sh ├── package.json └── specs │ ├── e2e.spec.js │ └── protractor.e2e.spec.js ├── protractor-javascript ├── .gitignore ├── README.md ├── environment.js ├── example-browserlog │ ├── README.md │ ├── conf.js │ └── spec.js ├── example-network │ ├── conf.js │ └── spec.js ├── example-screenshot │ ├── conf.js │ ├── screenshotReporter.js │ └── spec.js ├── example │ ├── conf.js │ └── spec.js ├── package.json └── yarn.lock ├── protractor-typescript-cucumber ├── .gitignore ├── README.md ├── config │ ├── config.ts │ └── environment.ts ├── features │ ├── add-subtract.feature │ ├── modulus.feature │ └── multply-divide.feature ├── package.json ├── pages │ └── calcPage.ts ├── stepdefinitions │ └── calcSteps.ts ├── support │ └── hooks.ts ├── tsconfig.json └── yarn.lock ├── protractor-typescript ├── .gitignore ├── README.md ├── environment.ts ├── example-on-prepare │ └── config.ts ├── example │ └── config.ts ├── package.json ├── spec.ts ├── tsconfig.json └── yarn.lock ├── scripts └── publish.sh ├── testapp ├── index.html ├── index.js ├── ng1 │ └── calculator │ │ ├── calc.js │ │ └── index.html └── package.json ├── tests ├── .gitignore ├── jasmine-junit-reports │ └── jasmineJunitReports_spec.ts ├── protractor-javascript │ └── protractorJavascript_spec.ts ├── protractor-typescript-cucumber │ └── protractorTypeScriptCucumber_spec.ts ├── protractor-typescript │ └── protractorTypeScript_spec.ts ├── spec │ └── support │ │ └── jasmine.json └── testUtils.ts ├── tsconfig.json ├── tslint.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | npm-debug.log* 2 | *.swp 3 | **/node_modules/* 4 | .vscode 5 | 6 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "unused": true, 3 | "node": true, 4 | "bitwise": true, 5 | "immed": true, 6 | "newcap": true, 7 | "noarg": true, 8 | "noempty": true, 9 | "nonew": true, 10 | "trailing": true, 11 | "maxlen": 100, 12 | "boss": true, 13 | "eqnull": true, 14 | "expr": true, 15 | "laxbreak": true, 16 | "loopfunc": true, 17 | "sub": true, 18 | "undef": true, 19 | "quotmark": "single", 20 | "evil": true, 21 | "curly": true, 22 | "esversion": 6, 23 | "predef": ["$", "$$", "angular", "after", "afterAll", "afterEach", 24 | "beforeAll", "beforeEach", "browser", "by", "By", "DartObject", 25 | "describe", "document", "element", "expect", "ExpectedConditions", 26 | "fdescribe", "fit", "it", "jasmine", "protractor", "spyOn", 27 | "xdescribe", "xit"] 28 | } 29 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing to Source Code (Pull Requests) 2 | =========================================== 3 | 4 | Follow the [Angular contribution rules](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md). 5 | 6 | * If your PR changes any behavior or fixes an issue, it should have an associated test. 7 | * New features should be general and as simple as possible. 8 | * All pull requests require review. No PR will be submitted without a comment from a team member stating LGTM (Looks good to me). 9 | 10 | Protractor-cookbook specific rules 11 | ---------------------------------- 12 | 13 | * JavaScript style should generally follow the [Google JS style guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml). 14 | * Wrap code at 100 chars. 15 | * Document public methods with jsdoc. 16 | * Be consistent with the code around you! 17 | 18 | Commit Messages 19 | --------------- 20 | 21 | Please write meaningful commit messages - they are used to generate the changelog, so the commit message should tell a user everything they need to know about a commit. Protractor-cookbook follows AngularJS's [commit message format](https://docs.google.com/a/google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.z8a3t6ehl060). 22 | 23 | In summary, this style is 24 | 25 | (): 26 | 27 | 28 | 29 | Where `` is one of [feat, fix, docs, refactor, test, chore, deps] and 30 | `` is a quick descriptor of the location of the change 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2016-2017 Google, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | protractor-cookbook [![CircleCI Status](https://circleci.com/gh/angular/protractor-cookbook.svg?style=shield)](https://circleci.com/gh/angular/protractor-cookbook) 2 | =================== 3 | 4 | A collection of bite size examples. 5 | 6 | 7 | examples 8 | -------- 9 | -------------------------------------------------------------------------------- /circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | node: 3 | version: 7.5.0 4 | environment: 5 | # Fix issue with selenium-server in containers. 6 | # See http://github.com/SeleniumHQ/docker-selenium/issues/87 7 | DBUS_SESSION_BUS_ADDRESS: /dev/null 8 | 9 | dependencies: 10 | override: 11 | - yarn 12 | post: 13 | # install latest google chrome to avoid chrome driver issues 14 | - curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 15 | - sudo dpkg -i google-chrome.deb 16 | - sleep 3 17 | - yarn run lint 18 | - yarn run tsc 19 | - yarn run webdriver-update 20 | - yarn run webdriver-start: 21 | background: true 22 | - yarn start: 23 | background: true 24 | 25 | test: 26 | override: 27 | - yarn test 28 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | var clangFormat = require('clang-format'); 5 | var gulpFormat = require('gulp-clang-format'); 6 | var runSequence = require('run-sequence'); 7 | var spawn = require('child_process').spawn; 8 | var tslint = require('gulp-tslint'); 9 | 10 | var runSpawn = function(done, task, opt_arg, opt_io) { 11 | opt_arg = typeof opt_arg !== 'undefined' ? opt_arg : []; 12 | var stdio = 'inherit'; 13 | if (opt_io === 'ignore') { 14 | stdio = 'ignore'; 15 | } 16 | var child = spawn(task, opt_arg, {stdio: stdio}); 17 | var running = false; 18 | child.on('close', function() { 19 | if (!running) { 20 | running = true; 21 | done(); 22 | } 23 | }); 24 | child.on('error', function() { 25 | if (!running) { 26 | console.error('gulp encountered a child error'); 27 | running = true; 28 | done(); 29 | } 30 | }); 31 | }; 32 | 33 | gulp.task('tslint', function() { 34 | return gulp.src([ 35 | 'protractor-typescript/**/*.ts', 36 | 'tests/**/*.ts', 37 | '!**/node_modules/**/*.ts']) 38 | .pipe(tslint()).pipe(tslint.report()); 39 | }); 40 | 41 | gulp.task('lint', function(done) { 42 | runSequence('tslint', 'jshint', 'format:enforce', done); 43 | }); 44 | 45 | gulp.task('jshint', function(done) { 46 | runSpawn(done, 'node', ['node_modules/jshint/bin/jshint', '-c', '.jshintrc', 47 | 'jasmine-junit-reports', 48 | 'protractor-javascript', 49 | '--exclude=**/node_modules/**/*.js' 50 | ]); 51 | }); 52 | 53 | gulp.task('format:enforce', function() { 54 | var format = require('gulp-clang-format'); 55 | var clangFormat = require('clang-format'); 56 | return gulp.src(['lib/**/*.ts']).pipe( 57 | format.checkFormat('file', clangFormat, {verbose: true, fail: true})); 58 | }); 59 | 60 | gulp.task('format', function() { 61 | var format = require('gulp-clang-format'); 62 | var clangFormat = require('clang-format'); 63 | return gulp.src(['lib/**/*.ts'], { base: '.' }).pipe( 64 | format.format('file', clangFormat)).pipe(gulp.dest('.')); 65 | }); 66 | -------------------------------------------------------------------------------- /jasmine-junit-reports/.gitignore: -------------------------------------------------------------------------------- 1 | output 2 | node_modules 3 | -------------------------------------------------------------------------------- /jasmine-junit-reports/README.md: -------------------------------------------------------------------------------- 1 | Setup 2 | ===== 3 | 4 | ``` 5 | npm install 6 | ``` 7 | 8 | installs protractor and jasmine-reporters 9 | 10 | Setup for Jasmine JUnit Reports 11 | =============================== 12 | 13 | Creating JUnit reports should be done in the Protractor configuration file 14 | during the `onPrepare` function. 15 | ``` 16 | exports.config = { 17 | directConnect: true, 18 | capabilities: { 19 | browserName: 'chrome' 20 | }, 21 | specs: [ 'specs/*_spec.js' ], 22 | framework: 'jasmine', 23 | onPrepare: function() { 24 | var jasmineReporters = require('jasmine-reporters'); 25 | var junitReporter = new jasmineReporters.JUnitXmlReporter({ 26 | 27 | // setup the output path for the junit reports 28 | savePath: 'output/', 29 | 30 | // conslidate all true: 31 | // output/junitresults.xml 32 | // 33 | // conslidate all set to false: 34 | // output/junitresults-example1.xml 35 | // output/junitresults-example2.xml 36 | consolidateAll: false 37 | 38 | }); 39 | jasmine.getEnv().addReporter(junitReporter); 40 | } 41 | }; 42 | ``` 43 | 44 | To generate the reports, run: 45 | 46 | ``` 47 | npm test 48 | ``` 49 | 50 | There are two specs in this example, each spec has two tests. Of these two tests 51 | one should pass and the other should fail. 52 | 53 | Output 54 | ====== 55 | 56 | The output should appear in the output directory. When consolidating all the 57 | reports, a single JUnit report is created; however, when setting this to false, 58 | each spec file gets its own JUnit report with the first describe string as the 59 | file name. 60 | -------------------------------------------------------------------------------- /jasmine-junit-reports/conf.js: -------------------------------------------------------------------------------- 1 | exports.config = { 2 | seleniumAddress: 'http://127.0.0.1:4444/wd/hub', 3 | capabilities: { 4 | browserName: 'chrome' 5 | }, 6 | specs: [ 'specs/*_spec.js' ], 7 | framework: 'jasmine', 8 | onPrepare: function() { 9 | var jasmineReporters = require('jasmine-reporters'); 10 | var junitReporter = new jasmineReporters.JUnitXmlReporter({ 11 | 12 | // setup the output path for the junit reports 13 | savePath: 'output/', 14 | 15 | // conslidate all true: 16 | // output/junitresults.xml 17 | // 18 | // conslidate all set to false: 19 | // output/junitresults-example1.xml 20 | // output/junitresults-example2.xml 21 | consolidateAll: false 22 | 23 | }); 24 | jasmine.getEnv().addReporter(junitReporter); 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /jasmine-junit-reports/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "junit-reports", 3 | "version": "1.0.0", 4 | "description": "setting up jasmine junit reports with protractor", 5 | "author": "Craig Nishina ", 6 | "scripts": { 7 | "test": "protractor conf.js" 8 | }, 9 | "license": "MIT", 10 | "dependencies": { 11 | "jasmine": "^2.5.3", 12 | "jasmine-reporters": "^2.2.0", 13 | "protractor": "^5.1.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /jasmine-junit-reports/specs/example1_spec.js: -------------------------------------------------------------------------------- 1 | describe('example 1', () => { 2 | beforeEach(() => { 3 | browser.get('http://www.angularjs.org'); 4 | }); 5 | 6 | describe('typing in a name', () => { 7 | it('should type name and should pass', () => { 8 | element(by.model('yourName')).sendKeys('Julie'); 9 | var greeting = element(by.binding('yourName')); 10 | expect(greeting.getText()).toEqual('Hello Julie!'); 11 | }); 12 | 13 | it('should type name and should fail', () => { 14 | element(by.model('yourName')).sendKeys('Julie'); 15 | var greeting = element(by.binding('yourName')); 16 | expect(greeting.getText()).toEqual('Hello Not Julie!'); 17 | }); 18 | }); 19 | 20 | 21 | }); 22 | -------------------------------------------------------------------------------- /jasmine-junit-reports/specs/example2_spec.js: -------------------------------------------------------------------------------- 1 | describe('example 2', () => { 2 | var todoList; 3 | beforeEach(() => { 4 | browser.get('http://www.angularjs.org'); 5 | todoList = element.all(by.repeater('todo in todoList.todos')); 6 | }); 7 | 8 | it('should list todos and should pass', () => { 9 | expect(todoList.count()).toEqual(2); 10 | expect(todoList.get(1).getText()).toEqual('build an AngularJS app'); 11 | }); 12 | 13 | it('should list todos and should fail', () => { 14 | expect(todoList.count()).toEqual(100); 15 | expect(todoList.get(1).getText()).toEqual('something else'); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /jasmine-junit-reports/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/node@^6.0.46": 6 | version "6.0.62" 7 | resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.62.tgz#85222c077b54f25b57417bb708b9f877bda37f89" 8 | 9 | "@types/q@^0.0.32": 10 | version "0.0.32" 11 | resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" 12 | 13 | "@types/selenium-webdriver@^2.53.35", "@types/selenium-webdriver@~2.53.39": 14 | version "2.53.39" 15 | resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-2.53.39.tgz#15ff93392c339abd39d6d3a04e715faa9a263cf3" 16 | 17 | adm-zip@0.4.4: 18 | version "0.4.4" 19 | resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.4.tgz#a61ed5ae6905c3aea58b3a657d25033091052736" 20 | 21 | adm-zip@^0.4.7: 22 | version "0.4.7" 23 | resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.7.tgz#8606c2cbf1c426ce8c8ec00174447fd49b6eafc1" 24 | 25 | agent-base@2: 26 | version "2.0.1" 27 | resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.0.1.tgz#bd8f9e86a8eb221fffa07bd14befd55df142815e" 28 | dependencies: 29 | extend "~3.0.0" 30 | semver "~5.0.1" 31 | 32 | ansi-regex@^2.0.0: 33 | version "2.1.1" 34 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 35 | 36 | ansi-styles@^2.2.1: 37 | version "2.2.1" 38 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 39 | 40 | array-union@^1.0.1: 41 | version "1.0.2" 42 | resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" 43 | dependencies: 44 | array-uniq "^1.0.1" 45 | 46 | array-uniq@^1.0.1: 47 | version "1.0.3" 48 | resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" 49 | 50 | arrify@^1.0.0: 51 | version "1.0.1" 52 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 53 | 54 | asn1@~0.2.3: 55 | version "0.2.3" 56 | resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" 57 | 58 | assert-plus@^0.2.0: 59 | version "0.2.0" 60 | resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" 61 | 62 | assert-plus@^1.0.0: 63 | version "1.0.0" 64 | resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" 65 | 66 | asynckit@^0.4.0: 67 | version "0.4.0" 68 | resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" 69 | 70 | aws-sign2@~0.6.0: 71 | version "0.6.0" 72 | resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" 73 | 74 | aws4@^1.2.1: 75 | version "1.5.0" 76 | resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" 77 | 78 | balanced-match@^0.4.1: 79 | version "0.4.2" 80 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" 81 | 82 | bcrypt-pbkdf@^1.0.0: 83 | version "1.0.0" 84 | resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" 85 | dependencies: 86 | tweetnacl "^0.14.3" 87 | 88 | blocking-proxy@0.0.4: 89 | version "0.0.4" 90 | resolved "https://registry.yarnpkg.com/blocking-proxy/-/blocking-proxy-0.0.4.tgz#49016732ac38e8d53a2c7dcd502520aa0e58e044" 91 | dependencies: 92 | minimist "^1.2.0" 93 | 94 | boom@2.x.x: 95 | version "2.10.1" 96 | resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" 97 | dependencies: 98 | hoek "2.x.x" 99 | 100 | brace-expansion@^1.0.0: 101 | version "1.1.6" 102 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" 103 | dependencies: 104 | balanced-match "^0.4.1" 105 | concat-map "0.0.1" 106 | 107 | caseless@~0.11.0: 108 | version "0.11.0" 109 | resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" 110 | 111 | chalk@^1.1.1, chalk@^1.1.3: 112 | version "1.1.3" 113 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 114 | dependencies: 115 | ansi-styles "^2.2.1" 116 | escape-string-regexp "^1.0.2" 117 | has-ansi "^2.0.0" 118 | strip-ansi "^3.0.0" 119 | supports-color "^2.0.0" 120 | 121 | combined-stream@^1.0.5, combined-stream@~1.0.5: 122 | version "1.0.5" 123 | resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" 124 | dependencies: 125 | delayed-stream "~1.0.0" 126 | 127 | commander@^2.9.0: 128 | version "2.9.0" 129 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" 130 | dependencies: 131 | graceful-readlink ">= 1.0.0" 132 | 133 | concat-map@0.0.1: 134 | version "0.0.1" 135 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 136 | 137 | cryptiles@2.x.x: 138 | version "2.0.5" 139 | resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" 140 | dependencies: 141 | boom "2.x.x" 142 | 143 | dashdash@^1.12.0: 144 | version "1.14.1" 145 | resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" 146 | dependencies: 147 | assert-plus "^1.0.0" 148 | 149 | debug@2: 150 | version "2.6.0" 151 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" 152 | dependencies: 153 | ms "0.7.2" 154 | 155 | del@^2.2.0: 156 | version "2.2.2" 157 | resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" 158 | dependencies: 159 | globby "^5.0.0" 160 | is-path-cwd "^1.0.0" 161 | is-path-in-cwd "^1.0.0" 162 | object-assign "^4.0.1" 163 | pify "^2.0.0" 164 | pinkie-promise "^2.0.0" 165 | rimraf "^2.2.8" 166 | 167 | delayed-stream@~1.0.0: 168 | version "1.0.0" 169 | resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" 170 | 171 | ecc-jsbn@~0.1.1: 172 | version "0.1.1" 173 | resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" 174 | dependencies: 175 | jsbn "~0.1.0" 176 | 177 | escape-string-regexp@^1.0.2: 178 | version "1.0.5" 179 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 180 | 181 | exit@^0.1.2: 182 | version "0.1.2" 183 | resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" 184 | 185 | extend@3, extend@~3.0.0: 186 | version "3.0.0" 187 | resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" 188 | 189 | extsprintf@1.0.2: 190 | version "1.0.2" 191 | resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" 192 | 193 | forever-agent@~0.6.1: 194 | version "0.6.1" 195 | resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" 196 | 197 | form-data@~2.1.1: 198 | version "2.1.2" 199 | resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" 200 | dependencies: 201 | asynckit "^0.4.0" 202 | combined-stream "^1.0.5" 203 | mime-types "^2.1.12" 204 | 205 | fs.realpath@^1.0.0: 206 | version "1.0.0" 207 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 208 | 209 | generate-function@^2.0.0: 210 | version "2.0.0" 211 | resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" 212 | 213 | generate-object-property@^1.1.0: 214 | version "1.2.0" 215 | resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" 216 | dependencies: 217 | is-property "^1.0.0" 218 | 219 | getpass@^0.1.1: 220 | version "0.1.6" 221 | resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" 222 | dependencies: 223 | assert-plus "^1.0.0" 224 | 225 | glob@^7.0.3, glob@^7.0.5, glob@^7.0.6: 226 | version "7.1.1" 227 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" 228 | dependencies: 229 | fs.realpath "^1.0.0" 230 | inflight "^1.0.4" 231 | inherits "2" 232 | minimatch "^3.0.2" 233 | once "^1.3.0" 234 | path-is-absolute "^1.0.0" 235 | 236 | globby@^5.0.0: 237 | version "5.0.0" 238 | resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" 239 | dependencies: 240 | array-union "^1.0.1" 241 | arrify "^1.0.0" 242 | glob "^7.0.3" 243 | object-assign "^4.0.1" 244 | pify "^2.0.0" 245 | pinkie-promise "^2.0.0" 246 | 247 | "graceful-readlink@>= 1.0.0": 248 | version "1.0.1" 249 | resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" 250 | 251 | har-validator@~2.0.6: 252 | version "2.0.6" 253 | resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" 254 | dependencies: 255 | chalk "^1.1.1" 256 | commander "^2.9.0" 257 | is-my-json-valid "^2.12.4" 258 | pinkie-promise "^2.0.0" 259 | 260 | has-ansi@^2.0.0: 261 | version "2.0.0" 262 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 263 | dependencies: 264 | ansi-regex "^2.0.0" 265 | 266 | hawk@~3.1.3: 267 | version "3.1.3" 268 | resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" 269 | dependencies: 270 | boom "2.x.x" 271 | cryptiles "2.x.x" 272 | hoek "2.x.x" 273 | sntp "1.x.x" 274 | 275 | hoek@2.x.x: 276 | version "2.16.3" 277 | resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" 278 | 279 | http-signature@~1.1.0: 280 | version "1.1.1" 281 | resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" 282 | dependencies: 283 | assert-plus "^0.2.0" 284 | jsprim "^1.2.2" 285 | sshpk "^1.7.0" 286 | 287 | https-proxy-agent@^1.0.0: 288 | version "1.0.0" 289 | resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz#35f7da6c48ce4ddbfa264891ac593ee5ff8671e6" 290 | dependencies: 291 | agent-base "2" 292 | debug "2" 293 | extend "3" 294 | 295 | inflight@^1.0.4: 296 | version "1.0.6" 297 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 298 | dependencies: 299 | once "^1.3.0" 300 | wrappy "1" 301 | 302 | inherits@2: 303 | version "2.0.3" 304 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 305 | 306 | ini@^1.3.4: 307 | version "1.3.4" 308 | resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" 309 | 310 | is-my-json-valid@^2.12.4: 311 | version "2.15.0" 312 | resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" 313 | dependencies: 314 | generate-function "^2.0.0" 315 | generate-object-property "^1.1.0" 316 | jsonpointer "^4.0.0" 317 | xtend "^4.0.0" 318 | 319 | is-path-cwd@^1.0.0: 320 | version "1.0.0" 321 | resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" 322 | 323 | is-path-in-cwd@^1.0.0: 324 | version "1.0.0" 325 | resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" 326 | dependencies: 327 | is-path-inside "^1.0.0" 328 | 329 | is-path-inside@^1.0.0: 330 | version "1.0.0" 331 | resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" 332 | dependencies: 333 | path-is-inside "^1.0.1" 334 | 335 | is-property@^1.0.0: 336 | version "1.0.2" 337 | resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" 338 | 339 | is-typedarray@~1.0.0: 340 | version "1.0.0" 341 | resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" 342 | 343 | isstream@~0.1.2: 344 | version "0.1.2" 345 | resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" 346 | 347 | jasmine-core@~2.5.2: 348 | version "2.5.2" 349 | resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.5.2.tgz#6f61bd79061e27f43e6f9355e44b3c6cab6ff297" 350 | 351 | jasmine-reporters@^2.2.0: 352 | version "2.2.0" 353 | resolved "https://registry.yarnpkg.com/jasmine-reporters/-/jasmine-reporters-2.2.0.tgz#e8c7916df3e4283bc8829a3fc21140eb322f8a5b" 354 | dependencies: 355 | jasmine "^2.4.1" 356 | mkdirp "^0.5.1" 357 | xmldom "^0.1.22" 358 | 359 | jasmine@^2.4.1, jasmine@^2.5.3: 360 | version "2.5.3" 361 | resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.5.3.tgz#5441f254e1fc2269deb1dfd93e0e57d565ff4d22" 362 | dependencies: 363 | exit "^0.1.2" 364 | glob "^7.0.6" 365 | jasmine-core "~2.5.2" 366 | 367 | jasminewd2@^2.0.0: 368 | version "2.0.0" 369 | resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.0.0.tgz#10aacd2c588c1ceb6a0b849f1a7f3f959f777c91" 370 | 371 | jodid25519@^1.0.0: 372 | version "1.0.2" 373 | resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" 374 | dependencies: 375 | jsbn "~0.1.0" 376 | 377 | jsbn@~0.1.0: 378 | version "0.1.0" 379 | resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" 380 | 381 | json-schema@0.2.3: 382 | version "0.2.3" 383 | resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" 384 | 385 | json-stringify-safe@~5.0.1: 386 | version "5.0.1" 387 | resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" 388 | 389 | jsonpointer@^4.0.0: 390 | version "4.0.1" 391 | resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" 392 | 393 | jsprim@^1.2.2: 394 | version "1.3.1" 395 | resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" 396 | dependencies: 397 | extsprintf "1.0.2" 398 | json-schema "0.2.3" 399 | verror "1.3.6" 400 | 401 | lodash@^4.0.0: 402 | version "4.17.4" 403 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" 404 | 405 | mime-db@~1.26.0: 406 | version "1.26.0" 407 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff" 408 | 409 | mime-types@^2.1.12, mime-types@~2.1.7: 410 | version "2.1.14" 411 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee" 412 | dependencies: 413 | mime-db "~1.26.0" 414 | 415 | minimatch@^3.0.2: 416 | version "3.0.3" 417 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" 418 | dependencies: 419 | brace-expansion "^1.0.0" 420 | 421 | minimist@0.0.8, minimist@~0.0.1: 422 | version "0.0.8" 423 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 424 | 425 | minimist@^1.2.0: 426 | version "1.2.0" 427 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" 428 | 429 | mkdirp@^0.5.1: 430 | version "0.5.1" 431 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 432 | dependencies: 433 | minimist "0.0.8" 434 | 435 | ms@0.7.2: 436 | version "0.7.2" 437 | resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" 438 | 439 | oauth-sign@~0.8.1: 440 | version "0.8.2" 441 | resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" 442 | 443 | object-assign@^4.0.1: 444 | version "4.1.1" 445 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 446 | 447 | once@^1.3.0: 448 | version "1.4.0" 449 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 450 | dependencies: 451 | wrappy "1" 452 | 453 | optimist@~0.6.0: 454 | version "0.6.1" 455 | resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" 456 | dependencies: 457 | minimist "~0.0.1" 458 | wordwrap "~0.0.2" 459 | 460 | options@>=0.0.5: 461 | version "0.0.6" 462 | resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" 463 | 464 | os-tmpdir@~1.0.1: 465 | version "1.0.2" 466 | resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 467 | 468 | path-is-absolute@^1.0.0: 469 | version "1.0.1" 470 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 471 | 472 | path-is-inside@^1.0.1: 473 | version "1.0.2" 474 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 475 | 476 | pify@^2.0.0: 477 | version "2.3.0" 478 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 479 | 480 | pinkie-promise@^2.0.0: 481 | version "2.0.1" 482 | resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 483 | dependencies: 484 | pinkie "^2.0.0" 485 | 486 | pinkie@^2.0.0: 487 | version "2.0.4" 488 | resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 489 | 490 | protractor@^5.1.0: 491 | version "5.1.0" 492 | resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.1.0.tgz#d2650f2f1fe69031aad35284eec1ef79a50625a1" 493 | dependencies: 494 | "@types/node" "^6.0.46" 495 | "@types/q" "^0.0.32" 496 | "@types/selenium-webdriver" "~2.53.39" 497 | blocking-proxy "0.0.4" 498 | chalk "^1.1.3" 499 | glob "^7.0.3" 500 | jasmine "^2.5.3" 501 | jasminewd2 "^2.0.0" 502 | optimist "~0.6.0" 503 | q "1.4.1" 504 | saucelabs "~1.3.0" 505 | selenium-webdriver "3.0.1" 506 | source-map-support "~0.4.0" 507 | webdriver-js-extender "^1.0.0" 508 | webdriver-manager "^12.0.1" 509 | 510 | punycode@^1.4.1: 511 | version "1.4.1" 512 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" 513 | 514 | q@1.4.1, q@^1.4.1: 515 | version "1.4.1" 516 | resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" 517 | 518 | qs@~6.3.0: 519 | version "6.3.0" 520 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" 521 | 522 | request@^2.78.0: 523 | version "2.79.0" 524 | resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" 525 | dependencies: 526 | aws-sign2 "~0.6.0" 527 | aws4 "^1.2.1" 528 | caseless "~0.11.0" 529 | combined-stream "~1.0.5" 530 | extend "~3.0.0" 531 | forever-agent "~0.6.1" 532 | form-data "~2.1.1" 533 | har-validator "~2.0.6" 534 | hawk "~3.1.3" 535 | http-signature "~1.1.0" 536 | is-typedarray "~1.0.0" 537 | isstream "~0.1.2" 538 | json-stringify-safe "~5.0.1" 539 | mime-types "~2.1.7" 540 | oauth-sign "~0.8.1" 541 | qs "~6.3.0" 542 | stringstream "~0.0.4" 543 | tough-cookie "~2.3.0" 544 | tunnel-agent "~0.4.1" 545 | uuid "^3.0.0" 546 | 547 | rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4: 548 | version "2.5.4" 549 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" 550 | dependencies: 551 | glob "^7.0.5" 552 | 553 | saucelabs@~1.3.0: 554 | version "1.3.0" 555 | resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.3.0.tgz#d240e8009df7fa87306ec4578a69ba3b5c424fee" 556 | dependencies: 557 | https-proxy-agent "^1.0.0" 558 | 559 | sax@0.6.x: 560 | version "0.6.1" 561 | resolved "https://registry.yarnpkg.com/sax/-/sax-0.6.1.tgz#563b19c7c1de892e09bfc4f2fc30e3c27f0952b9" 562 | 563 | sax@>=0.6.0: 564 | version "1.2.1" 565 | resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" 566 | 567 | selenium-webdriver@3.0.1: 568 | version "3.0.1" 569 | resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-3.0.1.tgz#a2dea5da4a97f6672e89e7ca7276cefa365147a7" 570 | dependencies: 571 | adm-zip "^0.4.7" 572 | rimraf "^2.5.4" 573 | tmp "0.0.30" 574 | xml2js "^0.4.17" 575 | 576 | selenium-webdriver@^2.53.2: 577 | version "2.53.3" 578 | resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz#d29ff5a957dff1a1b49dc457756e4e4bfbdce085" 579 | dependencies: 580 | adm-zip "0.4.4" 581 | rimraf "^2.2.8" 582 | tmp "0.0.24" 583 | ws "^1.0.1" 584 | xml2js "0.4.4" 585 | 586 | semver@^5.3.0: 587 | version "5.3.0" 588 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" 589 | 590 | semver@~5.0.1: 591 | version "5.0.3" 592 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a" 593 | 594 | sntp@1.x.x: 595 | version "1.0.9" 596 | resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" 597 | dependencies: 598 | hoek "2.x.x" 599 | 600 | source-map-support@~0.4.0: 601 | version "0.4.11" 602 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.11.tgz#647f939978b38535909530885303daf23279f322" 603 | dependencies: 604 | source-map "^0.5.3" 605 | 606 | source-map@^0.5.3: 607 | version "0.5.6" 608 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" 609 | 610 | sshpk@^1.7.0: 611 | version "1.10.2" 612 | resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.2.tgz#d5a804ce22695515638e798dbe23273de070a5fa" 613 | dependencies: 614 | asn1 "~0.2.3" 615 | assert-plus "^1.0.0" 616 | dashdash "^1.12.0" 617 | getpass "^0.1.1" 618 | optionalDependencies: 619 | bcrypt-pbkdf "^1.0.0" 620 | ecc-jsbn "~0.1.1" 621 | jodid25519 "^1.0.0" 622 | jsbn "~0.1.0" 623 | tweetnacl "~0.14.0" 624 | 625 | stringstream@~0.0.4: 626 | version "0.0.5" 627 | resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" 628 | 629 | strip-ansi@^3.0.0: 630 | version "3.0.1" 631 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 632 | dependencies: 633 | ansi-regex "^2.0.0" 634 | 635 | supports-color@^2.0.0: 636 | version "2.0.0" 637 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 638 | 639 | tmp@0.0.24: 640 | version "0.0.24" 641 | resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.24.tgz#d6a5e198d14a9835cc6f2d7c3d9e302428c8cf12" 642 | 643 | tmp@0.0.30: 644 | version "0.0.30" 645 | resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed" 646 | dependencies: 647 | os-tmpdir "~1.0.1" 648 | 649 | tough-cookie@~2.3.0: 650 | version "2.3.2" 651 | resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" 652 | dependencies: 653 | punycode "^1.4.1" 654 | 655 | tunnel-agent@~0.4.1: 656 | version "0.4.3" 657 | resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" 658 | 659 | tweetnacl@^0.14.3, tweetnacl@~0.14.0: 660 | version "0.14.5" 661 | resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" 662 | 663 | ultron@1.0.x: 664 | version "1.0.2" 665 | resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" 666 | 667 | uuid@^3.0.0: 668 | version "3.0.1" 669 | resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" 670 | 671 | verror@1.3.6: 672 | version "1.3.6" 673 | resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" 674 | dependencies: 675 | extsprintf "1.0.2" 676 | 677 | webdriver-js-extender@^1.0.0: 678 | version "1.0.0" 679 | resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz#81c533a9e33d5bfb597b4e63e2cdb25b54777515" 680 | dependencies: 681 | "@types/selenium-webdriver" "^2.53.35" 682 | selenium-webdriver "^2.53.2" 683 | 684 | webdriver-manager@^12.0.1: 685 | version "12.0.1" 686 | resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.0.1.tgz#878d4b2dc6fd12e5c7df344ac8296c0c26fdeac2" 687 | dependencies: 688 | adm-zip "^0.4.7" 689 | chalk "^1.1.1" 690 | del "^2.2.0" 691 | glob "^7.0.3" 692 | ini "^1.3.4" 693 | minimist "^1.2.0" 694 | q "^1.4.1" 695 | request "^2.78.0" 696 | rimraf "^2.5.2" 697 | semver "^5.3.0" 698 | xml2js "^0.4.17" 699 | 700 | wordwrap@~0.0.2: 701 | version "0.0.3" 702 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" 703 | 704 | wrappy@1: 705 | version "1.0.2" 706 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 707 | 708 | ws@^1.0.1: 709 | version "1.1.1" 710 | resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.1.tgz#082ddb6c641e85d4bb451f03d52f06eabdb1f018" 711 | dependencies: 712 | options ">=0.0.5" 713 | ultron "1.0.x" 714 | 715 | xml2js@0.4.4: 716 | version "0.4.4" 717 | resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.4.tgz#3111010003008ae19240eba17497b57c729c555d" 718 | dependencies: 719 | sax "0.6.x" 720 | xmlbuilder ">=1.0.0" 721 | 722 | xml2js@^0.4.17: 723 | version "0.4.17" 724 | resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.17.tgz#17be93eaae3f3b779359c795b419705a8817e868" 725 | dependencies: 726 | sax ">=0.6.0" 727 | xmlbuilder "^4.1.0" 728 | 729 | xmlbuilder@>=1.0.0, xmlbuilder@^4.1.0: 730 | version "4.2.1" 731 | resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5" 732 | dependencies: 733 | lodash "^4.0.0" 734 | 735 | xmldom@^0.1.22: 736 | version "0.1.27" 737 | resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9" 738 | 739 | xtend@^4.0.0: 740 | version "4.0.1" 741 | resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" 742 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "protractor-cookbook", 3 | "version": "1.0.0", 4 | "description": "Examples for using Protractor in various common scenarios.", 5 | "main": "index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/angular/protractor-cookbook.git" 9 | }, 10 | "scripts": { 11 | "external-exports": "export BASE_URL='http://angular.github.io'", 12 | "jasmine": "jasmine JASMINE_CONFIG_PATH=tests/spec/support/jasmine.json", 13 | "lint": "gulp lint", 14 | "pretest": "npm run tsc", 15 | "start": "cd testapp && npm install && npm start", 16 | "test": "npm run jasmine", 17 | "tsc": "tsc", 18 | "webdriver-update": "webdriver-manager update", 19 | "webdriver-start": "webdriver-manager start" 20 | }, 21 | "keywords": [ 22 | "angular", 23 | "test", 24 | "testing", 25 | "webdriver", 26 | "webdriverjs", 27 | "selenium", 28 | "protractor" 29 | ], 30 | "author": "Craig Nishina ", 31 | "license": "MIT", 32 | "bugs": { 33 | "url": "https://github.com/angular/protractor-cookbook/issues" 34 | }, 35 | "homepage": "https://github.com/angular/protractor-cookbook#readme", 36 | "devDependencies": { 37 | "@types/jasmine": "^2.5.41", 38 | "@types/node": "^6.0.62", 39 | "gulp": "^3.9.1", 40 | "gulp-clang-format": "^1.0.23", 41 | "gulp-tslint": "^7.0.1", 42 | "jasmine": "^2.5.3", 43 | "jshint": "^2.9.4", 44 | "protractor": "^5.1.0", 45 | "run-sequence": "^1.2.2", 46 | "tslint": "^4.4.2", 47 | "tslint-eslint-rules": "^3.2.3", 48 | "typescript": "^2.1.5", 49 | "vrsource-tslint-rules": "^4.0.1" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /protractor-docker/README.md: -------------------------------------------------------------------------------- 1 | Running Protractor Tests on Docker 2 | ======================================== 3 | 4 | This is a simple tutorial that shows how to use docker to run Protractor tests. We would setup a Selenium Grid and run the tests. 5 | 6 | Prerequisites 7 | ------------- 8 | Docker needs to be installed on your machine. One can download it from [Docker's website](https://www.docker.com) and follow the [documentation](https://docs.docker.com/) accordingly. 9 | It is assumed that , one knows the basics of Docker for this tutorial. 10 | 11 | Setup 12 | ----------- 13 | To ensure Docker is installed sucessfully , type : 14 | ``` shell 15 | docker -v 16 | ``` 17 | and one would see a similar output , depending on the version of docker installed : 18 | ``` shell 19 | Docker version 1.12.0-rc4, build e4a0dbc, experimental 20 | ``` 21 | 22 | Step 0 - Download the docker images for Selenium Hub and Selenium Node 23 | ----------------------------------------------------------------------------- 24 | 25 | ``` shell 26 | docker pull selenium/hub:latest 27 | docker pull selenium/node-chrome:latest 28 | ``` 29 | One could pull 'node-firefox' if they want to work with firefox node. 30 | For more information about the different images one can work with , please look at [Docker Selenium Images List](https://github.com/SeleniumHQ/docker-selenium/blob/master/README.md) 31 | 32 | 33 | Step 1 - Starting the Selenium Grid 34 | ----------------------------------------------------------------------------- 35 | ``` shell 36 | docker run -d -p 4444:4444 --name selenium-hub selenium/hub:latest 37 | ``` 38 | 39 | One can change the tag from 'latest' to '2.53.0' or any other version as they see fit. 40 | 41 | Step 2 - Starting the Selenium Nodes 42 | ----------------------------------------------------------------------------- 43 | ``` shell 44 | docker run -d --link selenium-hub:hub selenium/node-chrome:latest 45 | ``` 46 | 47 | The above would create a chrome node and link it to the Selenium hub/grid created earlier. 48 | 49 | Step 3 - Running the tests 50 | ----------------------------------------------------------------------------- 51 | 52 | Update the seleniumAddress to the url of the hub in your protractor config file. 53 | 54 | ``` js 55 | seleniumAddress: 'http://localhost:4444/wd/hub' 56 | ``` 57 | and run your tests. 58 | 59 | ``` shell 60 | ./node_modules/.bin/protractor 61 | ``` 62 | 63 | - Maximising the browser window 64 | 65 | - Depending on the webpage, the element needs to be scrolled to , in order for it to be visible, 66 | by maximising the window , the number of times , one would have to use the util method for it, decreases. 67 | 68 | - Also useful for debugging tests. 69 | 70 | - Specifying implicit wait 71 | 72 | - By specifying the implicit wait , protractor waits before throwing an error for performing an action. Especially useful 73 | when the page load time fluctuates due to network. 74 | 75 | ``` js 76 | browser.manage().window().maximize(); 77 | browser.manage().timeouts().implicitlyWait(5000); 78 | ``` 79 | 80 | Step 4 - Debugging the tests 81 | ----------------------------------------------------------------------------- 82 | At this point you would be able to see the output of the tests and will not be able to visually confirm that the tests are running. 83 | 84 | Install [RealVNC](https://www.realvnc.com) viewer. 85 | 86 | One needs to add a node-chrome-debug ( which has a vnc server set up ) to the selenium grid instead of node-chrome 87 | to be able to view the tests running . This can not be acheived with a node-chrome because the vnc server is 88 | not setup , in the node-chrome docker image. 89 | 90 | One can also use the standalone-chrome-debug for the same. 91 | 92 | ``` shell 93 | docker run -d -p :5900 --link selenium-hub:hub selenium/node-chrome-debug:latest 94 | ``` 95 | 96 | Find the port that VNC server exposes for the container : 97 | 98 | ``` shell 99 | docker port 5900 100 | ``` 101 | 102 | and view it using the vnc viewer using the output of the above command. 103 | 104 | 105 | Using Docker Compose 106 | --------------------------------------------------------------------------- 107 | Till this point , the selenium hub and nodes were created by typing commands in the CLI. This approach would work on one's machine , but is not a scalable solution. 108 | That's where [Docker Compose](https://docs.docker.com/compose/) comes into picture. 109 | We would do the above the steps , by specifying a .yml file and see the results. 110 | 111 | Create a docker-compose.yml 112 | 113 | ``` yaml 114 | seleniumhub: 115 | image: selenium/hub:2.53.0 116 | ports: 117 | - 4444:4444 118 | 119 | # firefoxnode: 120 | # image: selenium/node-firefox 121 | # expose: 122 | # - 5900 123 | # links: 124 | # - seleniumhub:hub 125 | 126 | chromenode: 127 | image: selenium/node-chrome:2.53.0 128 | ports: 129 | - 5900 130 | links: 131 | - seleniumhub:hub 132 | ``` 133 | 134 | Then in the terminal, enter the command 135 | 136 | ``` shell 137 | docker-compose up -d 138 | ``` 139 | In order to scale the number of chrome nodes , one can do : 140 | 141 | ``` shell 142 | docker-compose scale chromenode=5 143 | ``` 144 | 145 | The number of nodes that one can connect to a selenium hub is by default 5.Hence `chromenode=5`. 146 | If one wants to increase the number of nodes, one has to change the settings on Hub to support the additional nodes first. 147 | 148 | The best way to do would be to wrap all of the above in a shell script file . 149 | Ensure the shell script file has execute permissions. 150 | 151 | ``` shell 152 | docker -v 153 | docker-compose -v 154 | 155 | docker-compose up -d --remove-orphans 156 | docker-compose scale chromenode=5 157 | ``` 158 | and then reference it in the package.json 159 | 160 | ``` shell 161 | npm test 162 | ``` 163 | Where to go next 164 | ---------------- 165 | 166 | This should get you started with writing tests using Docker and Protractor . To learn more, see the documentation for [Docker](https://docs.docker.com) and [Protractor](http://www.protractortest.org/#/). -------------------------------------------------------------------------------- /protractor-docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | seleniumhub: 2 | image: selenium/hub:2.53.0 3 | ports: 4 | - 4444:4444 5 | 6 | # chromednode: 7 | # image: selenium/node-chrome-debug:2.53.0 8 | # expose: 9 | # - 5900 10 | # links: 11 | # - seleniumhub:hub 12 | 13 | # firefoxnode: 14 | # image: selenium/node-firefox 15 | # expose: 16 | # - 5900 17 | # links: 18 | # - seleniumhub:hub 19 | 20 | chromenode: 21 | image: selenium/node-chrome:2.53.0 22 | ports: 23 | - 5900 24 | links: 25 | - seleniumhub:hub -------------------------------------------------------------------------------- /protractor-docker/docker-selenium-grid-conf.js: -------------------------------------------------------------------------------- 1 | exports.config = { 2 | framework: 'jasmine2' 3 | , specs: ['specs/*.spec.js'] 4 | , seleniumAddress: 'http://localhost:4444/wd/hub' 5 | , capabilities: { 6 | browserName: 'chrome' 7 | , shardTestFiles: true 8 | , maxInstances: 5 9 | } 10 | , getPageTimeout: 180000 11 | , allScriptsTimeout: 180000 12 | , onPrepare: function () { 13 | browser.manage().window().maximize(); 14 | browser.manage().timeouts().implicitlyWait(5000); 15 | } 16 | , jasmineNodeOpts: { 17 | defaultTimeoutInterval: 300000 18 | } 19 | }; -------------------------------------------------------------------------------- /protractor-docker/docker-setup.sh: -------------------------------------------------------------------------------- 1 | docker -v 2 | docker-compose -v 3 | 4 | docker-compose up -d --remove-orphans 5 | docker-compose scale chromenode=5 6 | 7 | # docker kill $(docker ps -aq) 8 | # docker rm $(docker ps -aq) -------------------------------------------------------------------------------- /protractor-docker/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "protractor-docker-setup", 3 | "dependencies": { 4 | "protractor": "4.0.9" 5 | }, 6 | "scripts": { 7 | "pretest": "npm install && ./docker-setup.sh", 8 | "test": "protractor docker-selenium-grid-conf.js" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /protractor-docker/specs/e2e.spec.js: -------------------------------------------------------------------------------- 1 | describe('On AngularJS page', function () { 2 | 3 | beforeAll(function () { 4 | browser.get('https://angularjs.org') 5 | }); 6 | 7 | it('should have the expected the title', function () { 8 | expect(browser.getTitle()).toBe('AngularJS — Superheroic JavaScript MVW Framework'); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /protractor-docker/specs/protractor.e2e.spec.js: -------------------------------------------------------------------------------- 1 | describe('On Protractor page', function () { 2 | 3 | beforeAll(function () { 4 | browser.get('http://www.protractortest.org/#/') 5 | }); 6 | 7 | it('should have the expected the title', function () { 8 | expect(browser.getTitle()).toBe('Protractor - end to end testing for AngularJS'); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /protractor-javascript/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | output 3 | npm-debug.log 4 | -------------------------------------------------------------------------------- /protractor-javascript/README.md: -------------------------------------------------------------------------------- 1 | Setup 2 | ===== 3 | 4 | ``` 5 | npm install 6 | ``` 7 | 8 | - Installs the Protractor node module 9 | 10 | Testing with JavaScript 11 | ======================= 12 | 13 | ``` 14 | npm test 15 | ``` 16 | 17 | - Runs `webdriver-manager update` to download the ChromeDriver 18 | - Runs the test directly with ChromeDriver 19 | 20 | Files 21 | ===== 22 | 23 | ``` 24 | /protractor-javascript/ 25 | |- example 26 | |- example-browserlog 27 | |- example-network 28 | |- example-screenshot 29 | |- example-firefoxProfile 30 | ``` 31 | -------------------------------------------------------------------------------- /protractor-javascript/environment.js: -------------------------------------------------------------------------------- 1 | var baseUrl = (process.env.BASE_URL || 'http://localhost:8080'); 2 | var url = baseUrl; 3 | if (baseUrl !== 'http://localhost:8080') { 4 | url += '/protractor-cookbook'; 5 | } 6 | exports.url = url; 7 | -------------------------------------------------------------------------------- /protractor-javascript/example-browserlog/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/angular/protractor-cookbook/cf24f48cc365e5b7c94139aeec1d5c827183569a/protractor-javascript/example-browserlog/README.md -------------------------------------------------------------------------------- /protractor-javascript/example-browserlog/conf.js: -------------------------------------------------------------------------------- 1 | exports.config = { 2 | seleniumAddress: 'http://127.0.0.1:4444/wd/hub', 3 | specs: [ 4 | 'spec.js' 5 | ], 6 | capabilities: { 7 | 'browserName': 'chrome' 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /protractor-javascript/example-browserlog/spec.js: -------------------------------------------------------------------------------- 1 | var env = require('../environment'); 2 | 3 | describe('slow calculator', () => { 4 | var firstNum = element(by.model('first')); 5 | var secondNum = element(by.model('second')); 6 | var goButton = element(by.id('gobutton')); 7 | var result = element(by.binding('latest')); 8 | 9 | beforeEach(() => { 10 | browser.get(env.url + '/ng1/calculator'); 11 | }); 12 | 13 | afterEach(() => { 14 | // for TypeScript: 15 | // import {logging} from 'selenium-webdriver'; 16 | // browser.manage.logs().get(logging.Type.BROWSER) 17 | browser.manage().logs().get('browser').then(function(browserLog) { 18 | console.log('log: ' + require('util').inspect(browserLog)); 19 | }); 20 | }); 21 | 22 | it('should pass a normal test', () => { 23 | firstNum.sendKeys('1'); 24 | secondNum.sendKeys('2'); 25 | goButton.click(); 26 | expect(result.getText()).toEqual('3'); 27 | }); 28 | 29 | it('should fail when the console has errors - FAILURE EXPECTED', () => { 30 | browser.executeScript(function() {console.error('error from test'); }); 31 | }); 32 | 33 | it('should pass when the console has non-error logs', () => { 34 | browser.executeScript(function() {console.log('hi!'); }); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /protractor-javascript/example-network/conf.js: -------------------------------------------------------------------------------- 1 | var env = require('../environment'); 2 | 3 | // Tests for the calculator. 4 | exports.config = { 5 | seleniumAddress: 'http://127.0.0.1:4444/wd/hub', 6 | specs: [ 7 | 'spec.js' 8 | ], 9 | 10 | framework: 'jasmine2', 11 | 12 | capabilities: { 13 | 'browserName': 'chrome', 14 | 'chromeOptions': { 15 | 'perfLoggingPrefs': { 16 | 'enableNetwork': true, 17 | 'enablePage': false, 18 | 'enableTimeline': false 19 | } 20 | }, 21 | loggingPrefs: { 22 | performance: 'ALL', 23 | browser: 'ALL' 24 | } 25 | }, 26 | 27 | baseUrl: env.baseUrl 28 | }; 29 | -------------------------------------------------------------------------------- /protractor-javascript/example-network/spec.js: -------------------------------------------------------------------------------- 1 | describe('slow calculator', () => { 2 | var firstNum = element(by.model('first')); 3 | var secondNum = element(by.model('second')); 4 | var goButton = element(by.id('gobutton')); 5 | var result = element(by.binding('latest')); 6 | 7 | beforeEach(() => { 8 | browser.get('/ng1/calculator'); 9 | }); 10 | 11 | afterEach(() => { 12 | browser.manage().logs().get('performance').then((browserLogs) => { 13 | browserLogs.forEach((browserLog) => { 14 | var message = JSON.parse(browserLog.message).message; 15 | if (message.method == 'Network.responseReceived') { 16 | console.log(message); 17 | } 18 | }); 19 | }); 20 | }); 21 | 22 | it('should pass a normal test', () => { 23 | firstNum.sendKeys('1'); 24 | secondNum.sendKeys('2'); 25 | goButton.click(); 26 | expect(result.getText()).toEqual('3'); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /protractor-javascript/example-screenshot/conf.js: -------------------------------------------------------------------------------- 1 | // Tests for the calculator. 2 | var env = require('../environment'); 3 | var ScreenshotReporter = require('./screenshotReporter'); 4 | 5 | exports.config = { 6 | seleniumAddress: 'http://127.0.0.1:4444/wd/hub', 7 | 8 | specs: [ 9 | 'spec.js' 10 | ], 11 | 12 | framework: 'jasmine2', 13 | 14 | capabilities: { 15 | 'browserName': 'chrome' 16 | }, 17 | 18 | baseUrl: env.baseUrl, 19 | 20 | onPrepare: function() { 21 | jasmine.getEnv().addReporter(new ScreenshotReporter('output')); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /protractor-javascript/example-screenshot/screenshotReporter.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('mkdirp'); 2 | var fs = require('fs'); 3 | var path = require('path'); 4 | 5 | var ScreenshotReporter = function(dir_) { 6 | console.log('here'); 7 | var dir = (dir_ ? dir_ : '/tmp/protractorss/'); 8 | dir = path.join(dir, new Date().toISOString()); 9 | var index = 0; 10 | 11 | // base function to take a screenshot -- change path as needed 12 | var screenshot = function(testDescription, id) { 13 | console.log('screenshot'); 14 | var fname = testDescription.replace(/\s/g, '_') + '_' + id + '.png'; 15 | mkdirp(dir); 16 | browser.takeScreenshot().then(function(png) { 17 | var stream = fs.createWriteStream(path.join(dir, fname)); 18 | stream.write(new Buffer(png, 'base64')); 19 | stream.end(); 20 | }); 21 | }; 22 | 23 | // takes screenshot on each failed expect 24 | var originalAddMatcherResult = jasmine.Spec.prototype.addExpectationResult; 25 | jasmine.Spec.prototype.addExpectationResult = function() { 26 | console.log('addmatcher'); 27 | ++index; 28 | console.log(arguments); 29 | if (!arguments[0].passed) { 30 | screenshot(this.description, index); 31 | } 32 | return originalAddMatcherResult.apply(this, arguments); 33 | }; 34 | 35 | // takes screenshot on each failed spec (including timeout) 36 | this.reportSpecResults = function(spec) { 37 | if (!spec.results().passed()) { 38 | screenshot(spec.description, 'end'); 39 | } 40 | index = 0; 41 | }; 42 | }; 43 | 44 | module.exports = ScreenshotReporter; 45 | -------------------------------------------------------------------------------- /protractor-javascript/example-screenshot/spec.js: -------------------------------------------------------------------------------- 1 | // The following example demonstrates adding a reporter to take a screenshot at the following times: 2 | // a) every time an expect fails (screenshot has a suffix corresponding to expect# within spec) 3 | // b) end of a spec when any expect fails (screenshot has the suffix 'end') 4 | // c) end of a spec during timeouts (screenshot has the suffix 'end') 5 | 6 | describe('slow calculator', function() { 7 | var firstNum = element(by.model('first')); 8 | var secondNum = element(by.model('second')); 9 | var goButton = element(by.id('gobutton')); 10 | var result = element(by.binding('latest')); 11 | 12 | beforeEach(function() { 13 | browser.get('/ng1/calculator'); 14 | }); 15 | 16 | // basic case that passes -- no screenshot should be generated. 17 | it('should pass a normal test', function() { 18 | firstNum.sendKeys('1'); 19 | secondNum.sendKeys('2'); 20 | goButton.click(); 21 | expect(result.getText()).toEqual('3'); 22 | }); 23 | 24 | // basic failure case that demonstrates screenshot -- screenshot will be 25 | // generated for the following: 26 | // *for failed expectation @ fail_expectation_-_FAILURE_EXPECTED_1.png 27 | // *for failed spec @ fail_expectation_-_FAILURE_EXPECTED_end.png 28 | it('fail expectation - FAILURE EXPECTED', function() { 29 | firstNum.sendKeys('1'); 30 | secondNum.sendKeys('2'); 31 | goButton.click(); 32 | expect(result.getText()).toEqual('4'); 33 | }); 34 | 35 | // case where spec times out -- screenshot will be generated for the following: 36 | // * for timedout spec @ timeout_-_FAILURE_EXPECTED_end.png 37 | it('timeout - FAILURE EXPECTED', function() { 38 | firstNum.sendKeys('1'); 39 | secondNum.sendKeys('2'); 40 | goButton.click(); 41 | expect(result.getText()).toEqual('3'); 42 | }, 100); 43 | 44 | // case to show there is a screenshot for each failed expect -- screenshot 45 | // will be generated for the following: 46 | // * for failed expectation#2 (i.e. toEqual('4')) 47 | // @ mixture_of_successful_and_failed_expects_-_FAILURE_EXPECTED_2.png 48 | // * for failed expectation#3 (i.e. toEqual('5')) 49 | // @ mixture_of_successful_and_failed_expects_-_FAILURE_EXPECTED_3.png 50 | // * for failed spec 51 | // @ mixture_of_successful_and_failed_expects_-_FAILURE_EXPECTED_end.png 52 | // **note: successful expectations will not generate screenshots 53 | // ** (although you can change this behavior from the reporter) 54 | it('mixture of successful and failed expects - FAILURE EXPECTED', function() { 55 | firstNum.sendKeys('1'); 56 | secondNum.sendKeys('2'); 57 | goButton.click(); 58 | expect(result.getText()).toEqual('3'); 59 | expect(result.getText()).toEqual('4'); 60 | expect(result.getText()).toEqual('5'); 61 | expect(result.getText()).toEqual('3'); 62 | }); 63 | }); 64 | -------------------------------------------------------------------------------- /protractor-javascript/example/conf.js: -------------------------------------------------------------------------------- 1 | // Tests for the calculator. 2 | exports.config = { 3 | seleniumAddress: 'http://127.0.0.1:4444/wd/hub', 4 | capabilities: { 5 | 'browserName': 'chrome' 6 | }, 7 | specs: [ 8 | 'spec.js' 9 | ] 10 | }; 11 | -------------------------------------------------------------------------------- /protractor-javascript/example/spec.js: -------------------------------------------------------------------------------- 1 | var env = require('../environment'); 2 | 3 | describe('slow calculator', () => { 4 | beforeEach(() => { 5 | browser.get(env.url + '/ng1/calculator'); 6 | }); 7 | 8 | it('should add numbers', () => { 9 | element(by.model('first')).sendKeys(4); 10 | element(by.model('second')).sendKeys(5); 11 | element(by.id('gobutton')).click(); 12 | 13 | expect(element(by.binding('latest')).getText()).toEqual('9'); 14 | }); 15 | 16 | describe('memory', () => { 17 | var first, second, goButton; 18 | beforeEach(function() { 19 | first = element(by.model('first')); 20 | second = element(by.model('second')); 21 | goButton = element(by.id('gobutton')); 22 | }); 23 | 24 | it('should start out with an empty memory', () => { 25 | var memory = 26 | element.all(by.repeater('result in memory')); 27 | 28 | expect(memory.count()).toEqual(0); 29 | }); 30 | 31 | it('should fill the memory with past results', () => { 32 | first.sendKeys(1); 33 | second.sendKeys(1); 34 | goButton.click(); 35 | 36 | first.sendKeys(10); 37 | second.sendKeys(20); 38 | goButton.click(); 39 | 40 | var memory = element.all(by.repeater('result in memory'). 41 | column('result.value')); 42 | memory.then((arr) => { 43 | expect(arr.length).toEqual(2); 44 | expect(arr[0].getText()).toEqual('30'); // 10 + 20 = 30 45 | expect(arr[1].getText()).toEqual('2'); // 1 + 1 = 2 46 | }); 47 | }); 48 | }); 49 | }); 50 | -------------------------------------------------------------------------------- /protractor-javascript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "protractor-javascript", 3 | "version": "1.0.0", 4 | "description": "from https://github.com/juliemr/protractor-demo", 5 | "scripts": { 6 | "example": "protractor example/conf.js", 7 | "example-browserlog": "protractor example-browserlog/conf.js", 8 | "example-network": "protractor example-network/conf.js", 9 | "example-screenshot": "protractor example-screenshot/conf.js", 10 | "start": "cd ../testapp && npm install && npm start", 11 | "test": "npm run example-browserlog && npm run example && npm run example-network", 12 | "test-external": "export BASE_URL='http://angular.github.io' && npm test", 13 | "text-local": "unset BASE_URL && npm test" 14 | }, 15 | "author": "", 16 | "license": "MIT", 17 | "dependencies": { 18 | "mkdirp": "^0.5.1", 19 | "protractor": "^5.1.0" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /protractor-javascript/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/node@^6.0.46": 6 | version "6.0.62" 7 | resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.62.tgz#85222c077b54f25b57417bb708b9f877bda37f89" 8 | 9 | "@types/q@^0.0.32": 10 | version "0.0.32" 11 | resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" 12 | 13 | "@types/selenium-webdriver@^2.53.35", "@types/selenium-webdriver@~2.53.39": 14 | version "2.53.39" 15 | resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-2.53.39.tgz#15ff93392c339abd39d6d3a04e715faa9a263cf3" 16 | 17 | adm-zip@0.4.4: 18 | version "0.4.4" 19 | resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.4.tgz#a61ed5ae6905c3aea58b3a657d25033091052736" 20 | 21 | adm-zip@^0.4.7: 22 | version "0.4.7" 23 | resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.7.tgz#8606c2cbf1c426ce8c8ec00174447fd49b6eafc1" 24 | 25 | agent-base@2: 26 | version "2.0.1" 27 | resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.0.1.tgz#bd8f9e86a8eb221fffa07bd14befd55df142815e" 28 | dependencies: 29 | extend "~3.0.0" 30 | semver "~5.0.1" 31 | 32 | ansi-regex@^2.0.0: 33 | version "2.1.1" 34 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 35 | 36 | ansi-styles@^2.2.1: 37 | version "2.2.1" 38 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 39 | 40 | array-union@^1.0.1: 41 | version "1.0.2" 42 | resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" 43 | dependencies: 44 | array-uniq "^1.0.1" 45 | 46 | array-uniq@^1.0.1: 47 | version "1.0.3" 48 | resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" 49 | 50 | arrify@^1.0.0: 51 | version "1.0.1" 52 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 53 | 54 | asn1@~0.2.3: 55 | version "0.2.3" 56 | resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" 57 | 58 | assert-plus@^0.2.0: 59 | version "0.2.0" 60 | resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" 61 | 62 | assert-plus@^1.0.0: 63 | version "1.0.0" 64 | resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" 65 | 66 | asynckit@^0.4.0: 67 | version "0.4.0" 68 | resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" 69 | 70 | aws-sign2@~0.6.0: 71 | version "0.6.0" 72 | resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" 73 | 74 | aws4@^1.2.1: 75 | version "1.5.0" 76 | resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" 77 | 78 | balanced-match@^0.4.1: 79 | version "0.4.2" 80 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" 81 | 82 | bcrypt-pbkdf@^1.0.0: 83 | version "1.0.0" 84 | resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" 85 | dependencies: 86 | tweetnacl "^0.14.3" 87 | 88 | blocking-proxy@0.0.4: 89 | version "0.0.4" 90 | resolved "https://registry.yarnpkg.com/blocking-proxy/-/blocking-proxy-0.0.4.tgz#49016732ac38e8d53a2c7dcd502520aa0e58e044" 91 | dependencies: 92 | minimist "^1.2.0" 93 | 94 | boom@2.x.x: 95 | version "2.10.1" 96 | resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" 97 | dependencies: 98 | hoek "2.x.x" 99 | 100 | brace-expansion@^1.0.0: 101 | version "1.1.6" 102 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" 103 | dependencies: 104 | balanced-match "^0.4.1" 105 | concat-map "0.0.1" 106 | 107 | caseless@~0.11.0: 108 | version "0.11.0" 109 | resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" 110 | 111 | chalk@^1.1.1, chalk@^1.1.3: 112 | version "1.1.3" 113 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 114 | dependencies: 115 | ansi-styles "^2.2.1" 116 | escape-string-regexp "^1.0.2" 117 | has-ansi "^2.0.0" 118 | strip-ansi "^3.0.0" 119 | supports-color "^2.0.0" 120 | 121 | combined-stream@^1.0.5, combined-stream@~1.0.5: 122 | version "1.0.5" 123 | resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" 124 | dependencies: 125 | delayed-stream "~1.0.0" 126 | 127 | commander@^2.9.0: 128 | version "2.9.0" 129 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" 130 | dependencies: 131 | graceful-readlink ">= 1.0.0" 132 | 133 | concat-map@0.0.1: 134 | version "0.0.1" 135 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 136 | 137 | cryptiles@2.x.x: 138 | version "2.0.5" 139 | resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" 140 | dependencies: 141 | boom "2.x.x" 142 | 143 | dashdash@^1.12.0: 144 | version "1.14.1" 145 | resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" 146 | dependencies: 147 | assert-plus "^1.0.0" 148 | 149 | debug@2: 150 | version "2.6.0" 151 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" 152 | dependencies: 153 | ms "0.7.2" 154 | 155 | del@^2.2.0: 156 | version "2.2.2" 157 | resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" 158 | dependencies: 159 | globby "^5.0.0" 160 | is-path-cwd "^1.0.0" 161 | is-path-in-cwd "^1.0.0" 162 | object-assign "^4.0.1" 163 | pify "^2.0.0" 164 | pinkie-promise "^2.0.0" 165 | rimraf "^2.2.8" 166 | 167 | delayed-stream@~1.0.0: 168 | version "1.0.0" 169 | resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" 170 | 171 | ecc-jsbn@~0.1.1: 172 | version "0.1.1" 173 | resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" 174 | dependencies: 175 | jsbn "~0.1.0" 176 | 177 | escape-string-regexp@^1.0.2: 178 | version "1.0.5" 179 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 180 | 181 | exit@^0.1.2: 182 | version "0.1.2" 183 | resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" 184 | 185 | extend@3, extend@~3.0.0: 186 | version "3.0.0" 187 | resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" 188 | 189 | extsprintf@1.0.2: 190 | version "1.0.2" 191 | resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" 192 | 193 | forever-agent@~0.6.1: 194 | version "0.6.1" 195 | resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" 196 | 197 | form-data@~2.1.1: 198 | version "2.1.2" 199 | resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" 200 | dependencies: 201 | asynckit "^0.4.0" 202 | combined-stream "^1.0.5" 203 | mime-types "^2.1.12" 204 | 205 | fs.realpath@^1.0.0: 206 | version "1.0.0" 207 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 208 | 209 | generate-function@^2.0.0: 210 | version "2.0.0" 211 | resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" 212 | 213 | generate-object-property@^1.1.0: 214 | version "1.2.0" 215 | resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" 216 | dependencies: 217 | is-property "^1.0.0" 218 | 219 | getpass@^0.1.1: 220 | version "0.1.6" 221 | resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" 222 | dependencies: 223 | assert-plus "^1.0.0" 224 | 225 | glob@^7.0.3, glob@^7.0.5, glob@^7.0.6: 226 | version "7.1.1" 227 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" 228 | dependencies: 229 | fs.realpath "^1.0.0" 230 | inflight "^1.0.4" 231 | inherits "2" 232 | minimatch "^3.0.2" 233 | once "^1.3.0" 234 | path-is-absolute "^1.0.0" 235 | 236 | globby@^5.0.0: 237 | version "5.0.0" 238 | resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" 239 | dependencies: 240 | array-union "^1.0.1" 241 | arrify "^1.0.0" 242 | glob "^7.0.3" 243 | object-assign "^4.0.1" 244 | pify "^2.0.0" 245 | pinkie-promise "^2.0.0" 246 | 247 | "graceful-readlink@>= 1.0.0": 248 | version "1.0.1" 249 | resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" 250 | 251 | har-validator@~2.0.6: 252 | version "2.0.6" 253 | resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" 254 | dependencies: 255 | chalk "^1.1.1" 256 | commander "^2.9.0" 257 | is-my-json-valid "^2.12.4" 258 | pinkie-promise "^2.0.0" 259 | 260 | has-ansi@^2.0.0: 261 | version "2.0.0" 262 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 263 | dependencies: 264 | ansi-regex "^2.0.0" 265 | 266 | hawk@~3.1.3: 267 | version "3.1.3" 268 | resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" 269 | dependencies: 270 | boom "2.x.x" 271 | cryptiles "2.x.x" 272 | hoek "2.x.x" 273 | sntp "1.x.x" 274 | 275 | hoek@2.x.x: 276 | version "2.16.3" 277 | resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" 278 | 279 | http-signature@~1.1.0: 280 | version "1.1.1" 281 | resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" 282 | dependencies: 283 | assert-plus "^0.2.0" 284 | jsprim "^1.2.2" 285 | sshpk "^1.7.0" 286 | 287 | https-proxy-agent@^1.0.0: 288 | version "1.0.0" 289 | resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz#35f7da6c48ce4ddbfa264891ac593ee5ff8671e6" 290 | dependencies: 291 | agent-base "2" 292 | debug "2" 293 | extend "3" 294 | 295 | inflight@^1.0.4: 296 | version "1.0.6" 297 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 298 | dependencies: 299 | once "^1.3.0" 300 | wrappy "1" 301 | 302 | inherits@2: 303 | version "2.0.3" 304 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 305 | 306 | ini@^1.3.4: 307 | version "1.3.4" 308 | resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" 309 | 310 | is-my-json-valid@^2.12.4: 311 | version "2.15.0" 312 | resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" 313 | dependencies: 314 | generate-function "^2.0.0" 315 | generate-object-property "^1.1.0" 316 | jsonpointer "^4.0.0" 317 | xtend "^4.0.0" 318 | 319 | is-path-cwd@^1.0.0: 320 | version "1.0.0" 321 | resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" 322 | 323 | is-path-in-cwd@^1.0.0: 324 | version "1.0.0" 325 | resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" 326 | dependencies: 327 | is-path-inside "^1.0.0" 328 | 329 | is-path-inside@^1.0.0: 330 | version "1.0.0" 331 | resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" 332 | dependencies: 333 | path-is-inside "^1.0.1" 334 | 335 | is-property@^1.0.0: 336 | version "1.0.2" 337 | resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" 338 | 339 | is-typedarray@~1.0.0: 340 | version "1.0.0" 341 | resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" 342 | 343 | isstream@~0.1.2: 344 | version "0.1.2" 345 | resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" 346 | 347 | jasmine-core@~2.5.2: 348 | version "2.5.2" 349 | resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.5.2.tgz#6f61bd79061e27f43e6f9355e44b3c6cab6ff297" 350 | 351 | jasmine@^2.5.3: 352 | version "2.5.3" 353 | resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.5.3.tgz#5441f254e1fc2269deb1dfd93e0e57d565ff4d22" 354 | dependencies: 355 | exit "^0.1.2" 356 | glob "^7.0.6" 357 | jasmine-core "~2.5.2" 358 | 359 | jasminewd2@^2.0.0: 360 | version "2.0.0" 361 | resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.0.0.tgz#10aacd2c588c1ceb6a0b849f1a7f3f959f777c91" 362 | 363 | jodid25519@^1.0.0: 364 | version "1.0.2" 365 | resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" 366 | dependencies: 367 | jsbn "~0.1.0" 368 | 369 | jsbn@~0.1.0: 370 | version "0.1.0" 371 | resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" 372 | 373 | json-schema@0.2.3: 374 | version "0.2.3" 375 | resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" 376 | 377 | json-stringify-safe@~5.0.1: 378 | version "5.0.1" 379 | resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" 380 | 381 | jsonpointer@^4.0.0: 382 | version "4.0.1" 383 | resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" 384 | 385 | jsprim@^1.2.2: 386 | version "1.3.1" 387 | resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" 388 | dependencies: 389 | extsprintf "1.0.2" 390 | json-schema "0.2.3" 391 | verror "1.3.6" 392 | 393 | lodash@^4.0.0: 394 | version "4.17.4" 395 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" 396 | 397 | mime-db@~1.26.0: 398 | version "1.26.0" 399 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff" 400 | 401 | mime-types@^2.1.12, mime-types@~2.1.7: 402 | version "2.1.14" 403 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee" 404 | dependencies: 405 | mime-db "~1.26.0" 406 | 407 | minimatch@^3.0.2: 408 | version "3.0.3" 409 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" 410 | dependencies: 411 | brace-expansion "^1.0.0" 412 | 413 | minimist@0.0.8, minimist@~0.0.1: 414 | version "0.0.8" 415 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 416 | 417 | minimist@^1.2.0: 418 | version "1.2.0" 419 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" 420 | 421 | mkdirp@^0.5.1: 422 | version "0.5.1" 423 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 424 | dependencies: 425 | minimist "0.0.8" 426 | 427 | ms@0.7.2: 428 | version "0.7.2" 429 | resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" 430 | 431 | oauth-sign@~0.8.1: 432 | version "0.8.2" 433 | resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" 434 | 435 | object-assign@^4.0.1: 436 | version "4.1.1" 437 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 438 | 439 | once@^1.3.0: 440 | version "1.4.0" 441 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 442 | dependencies: 443 | wrappy "1" 444 | 445 | optimist@~0.6.0: 446 | version "0.6.1" 447 | resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" 448 | dependencies: 449 | minimist "~0.0.1" 450 | wordwrap "~0.0.2" 451 | 452 | options@>=0.0.5: 453 | version "0.0.6" 454 | resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" 455 | 456 | os-tmpdir@~1.0.1: 457 | version "1.0.2" 458 | resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 459 | 460 | path-is-absolute@^1.0.0: 461 | version "1.0.1" 462 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 463 | 464 | path-is-inside@^1.0.1: 465 | version "1.0.2" 466 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 467 | 468 | pify@^2.0.0: 469 | version "2.3.0" 470 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 471 | 472 | pinkie-promise@^2.0.0: 473 | version "2.0.1" 474 | resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 475 | dependencies: 476 | pinkie "^2.0.0" 477 | 478 | pinkie@^2.0.0: 479 | version "2.0.4" 480 | resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 481 | 482 | protractor@^5.1.0: 483 | version "5.1.0" 484 | resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.1.0.tgz#d2650f2f1fe69031aad35284eec1ef79a50625a1" 485 | dependencies: 486 | "@types/node" "^6.0.46" 487 | "@types/q" "^0.0.32" 488 | "@types/selenium-webdriver" "~2.53.39" 489 | blocking-proxy "0.0.4" 490 | chalk "^1.1.3" 491 | glob "^7.0.3" 492 | jasmine "^2.5.3" 493 | jasminewd2 "^2.0.0" 494 | optimist "~0.6.0" 495 | q "1.4.1" 496 | saucelabs "~1.3.0" 497 | selenium-webdriver "3.0.1" 498 | source-map-support "~0.4.0" 499 | webdriver-js-extender "^1.0.0" 500 | webdriver-manager "^12.0.1" 501 | 502 | punycode@^1.4.1: 503 | version "1.4.1" 504 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" 505 | 506 | q@1.4.1, q@^1.4.1: 507 | version "1.4.1" 508 | resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" 509 | 510 | qs@~6.3.0: 511 | version "6.3.0" 512 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" 513 | 514 | request@^2.78.0: 515 | version "2.79.0" 516 | resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" 517 | dependencies: 518 | aws-sign2 "~0.6.0" 519 | aws4 "^1.2.1" 520 | caseless "~0.11.0" 521 | combined-stream "~1.0.5" 522 | extend "~3.0.0" 523 | forever-agent "~0.6.1" 524 | form-data "~2.1.1" 525 | har-validator "~2.0.6" 526 | hawk "~3.1.3" 527 | http-signature "~1.1.0" 528 | is-typedarray "~1.0.0" 529 | isstream "~0.1.2" 530 | json-stringify-safe "~5.0.1" 531 | mime-types "~2.1.7" 532 | oauth-sign "~0.8.1" 533 | qs "~6.3.0" 534 | stringstream "~0.0.4" 535 | tough-cookie "~2.3.0" 536 | tunnel-agent "~0.4.1" 537 | uuid "^3.0.0" 538 | 539 | rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4: 540 | version "2.5.4" 541 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" 542 | dependencies: 543 | glob "^7.0.5" 544 | 545 | saucelabs@~1.3.0: 546 | version "1.3.0" 547 | resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.3.0.tgz#d240e8009df7fa87306ec4578a69ba3b5c424fee" 548 | dependencies: 549 | https-proxy-agent "^1.0.0" 550 | 551 | sax@0.6.x: 552 | version "0.6.1" 553 | resolved "https://registry.yarnpkg.com/sax/-/sax-0.6.1.tgz#563b19c7c1de892e09bfc4f2fc30e3c27f0952b9" 554 | 555 | sax@>=0.6.0: 556 | version "1.2.1" 557 | resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" 558 | 559 | selenium-webdriver@3.0.1: 560 | version "3.0.1" 561 | resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-3.0.1.tgz#a2dea5da4a97f6672e89e7ca7276cefa365147a7" 562 | dependencies: 563 | adm-zip "^0.4.7" 564 | rimraf "^2.5.4" 565 | tmp "0.0.30" 566 | xml2js "^0.4.17" 567 | 568 | selenium-webdriver@^2.53.2: 569 | version "2.53.3" 570 | resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz#d29ff5a957dff1a1b49dc457756e4e4bfbdce085" 571 | dependencies: 572 | adm-zip "0.4.4" 573 | rimraf "^2.2.8" 574 | tmp "0.0.24" 575 | ws "^1.0.1" 576 | xml2js "0.4.4" 577 | 578 | semver@^5.3.0: 579 | version "5.3.0" 580 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" 581 | 582 | semver@~5.0.1: 583 | version "5.0.3" 584 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a" 585 | 586 | sntp@1.x.x: 587 | version "1.0.9" 588 | resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" 589 | dependencies: 590 | hoek "2.x.x" 591 | 592 | source-map-support@~0.4.0: 593 | version "0.4.11" 594 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.11.tgz#647f939978b38535909530885303daf23279f322" 595 | dependencies: 596 | source-map "^0.5.3" 597 | 598 | source-map@^0.5.3: 599 | version "0.5.6" 600 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" 601 | 602 | sshpk@^1.7.0: 603 | version "1.10.2" 604 | resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.2.tgz#d5a804ce22695515638e798dbe23273de070a5fa" 605 | dependencies: 606 | asn1 "~0.2.3" 607 | assert-plus "^1.0.0" 608 | dashdash "^1.12.0" 609 | getpass "^0.1.1" 610 | optionalDependencies: 611 | bcrypt-pbkdf "^1.0.0" 612 | ecc-jsbn "~0.1.1" 613 | jodid25519 "^1.0.0" 614 | jsbn "~0.1.0" 615 | tweetnacl "~0.14.0" 616 | 617 | stringstream@~0.0.4: 618 | version "0.0.5" 619 | resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" 620 | 621 | strip-ansi@^3.0.0: 622 | version "3.0.1" 623 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 624 | dependencies: 625 | ansi-regex "^2.0.0" 626 | 627 | supports-color@^2.0.0: 628 | version "2.0.0" 629 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 630 | 631 | tmp@0.0.24: 632 | version "0.0.24" 633 | resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.24.tgz#d6a5e198d14a9835cc6f2d7c3d9e302428c8cf12" 634 | 635 | tmp@0.0.30: 636 | version "0.0.30" 637 | resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed" 638 | dependencies: 639 | os-tmpdir "~1.0.1" 640 | 641 | tough-cookie@~2.3.0: 642 | version "2.3.2" 643 | resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" 644 | dependencies: 645 | punycode "^1.4.1" 646 | 647 | tunnel-agent@~0.4.1: 648 | version "0.4.3" 649 | resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" 650 | 651 | tweetnacl@^0.14.3, tweetnacl@~0.14.0: 652 | version "0.14.5" 653 | resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" 654 | 655 | ultron@1.0.x: 656 | version "1.0.2" 657 | resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" 658 | 659 | uuid@^3.0.0: 660 | version "3.0.1" 661 | resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" 662 | 663 | verror@1.3.6: 664 | version "1.3.6" 665 | resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" 666 | dependencies: 667 | extsprintf "1.0.2" 668 | 669 | webdriver-js-extender@^1.0.0: 670 | version "1.0.0" 671 | resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz#81c533a9e33d5bfb597b4e63e2cdb25b54777515" 672 | dependencies: 673 | "@types/selenium-webdriver" "^2.53.35" 674 | selenium-webdriver "^2.53.2" 675 | 676 | webdriver-manager@^12.0.1: 677 | version "12.0.1" 678 | resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.0.1.tgz#878d4b2dc6fd12e5c7df344ac8296c0c26fdeac2" 679 | dependencies: 680 | adm-zip "^0.4.7" 681 | chalk "^1.1.1" 682 | del "^2.2.0" 683 | glob "^7.0.3" 684 | ini "^1.3.4" 685 | minimist "^1.2.0" 686 | q "^1.4.1" 687 | request "^2.78.0" 688 | rimraf "^2.5.2" 689 | semver "^5.3.0" 690 | xml2js "^0.4.17" 691 | 692 | wordwrap@~0.0.2: 693 | version "0.0.3" 694 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" 695 | 696 | wrappy@1: 697 | version "1.0.2" 698 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 699 | 700 | ws@^1.0.1: 701 | version "1.1.1" 702 | resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.1.tgz#082ddb6c641e85d4bb451f03d52f06eabdb1f018" 703 | dependencies: 704 | options ">=0.0.5" 705 | ultron "1.0.x" 706 | 707 | xml2js@0.4.4: 708 | version "0.4.4" 709 | resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.4.tgz#3111010003008ae19240eba17497b57c729c555d" 710 | dependencies: 711 | sax "0.6.x" 712 | xmlbuilder ">=1.0.0" 713 | 714 | xml2js@^0.4.17: 715 | version "0.4.17" 716 | resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.17.tgz#17be93eaae3f3b779359c795b419705a8817e868" 717 | dependencies: 718 | sax ">=0.6.0" 719 | xmlbuilder "^4.1.0" 720 | 721 | xmlbuilder@>=1.0.0, xmlbuilder@^4.1.0: 722 | version "4.2.1" 723 | resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5" 724 | dependencies: 725 | lodash "^4.0.0" 726 | 727 | xtend@^4.0.0: 728 | version "4.0.1" 729 | resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" 730 | -------------------------------------------------------------------------------- /protractor-typescript-cucumber/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | node_modules/ 3 | tmp/ 4 | -------------------------------------------------------------------------------- /protractor-typescript-cucumber/README.md: -------------------------------------------------------------------------------- 1 | ###Protractor-Cucumber-TypeScript Setup Guide 2 | 3 | This project demonstrates the basic protractor-cucumber-typescript framework project setup. 4 | 5 | ###Features 6 | * No typings.json or typings folder, they have been replaced by better **'@types'** modules in package.json 7 | * ts-node(typescript execution environment for node) in cucumberOpts. 8 | * All scripts written with Typescript2.0 & Cucumber2.0 9 | * Neat folder structures with transpiled js files in separate output folder. 10 | * Page Object design pattern implementation 11 | * Extensive hooks implemented for BeforeFeature, AfterScenarios etc. 12 | * Screenshots on failure feature scenarios 13 | 14 | 15 | ###To Get Started 16 | 17 | ####Pre-requisites 18 | 1.NodeJS installed globally in the system. 19 | https://nodejs.org/en/download/ 20 | 21 | 2.Chrome or Firefox browsers installed. 22 | 23 | 3.Text Editor(Optional) installed-->Sublime/Visual Studio Code/Brackets. 24 | 25 | ####Setup Scripts 26 | * run following command from terminal/command prompt 27 | ``` 28 | npm install 29 | ``` 30 | * All the dependencies from package.json and ambient typings would be installed in node_modules folder. 31 | 32 | ####Setup & Run TestApp 33 | ``` 34 | cd .. 35 | cd testapp/ 36 | 37 | npm install 38 | 39 | npm start 40 | ``` 41 | 42 | ####Run Scripts 43 | ``` 44 | npm test 45 | ``` 46 | * The above command should create an output folder named 'tmp' and transpile the .ts files. 47 | * It launches the Firefox Browser and run the scripts 48 | 49 | ##Contributions 50 | For contributors who want to improve this repo by contributing some code, reporting bugs, issues or improving documentation - PR's are highly welcome, please maintain the coding style , folder structure , detailed description of documentation and bugs/issues with examples if possible. -------------------------------------------------------------------------------- /protractor-typescript-cucumber/config/config.ts: -------------------------------------------------------------------------------- 1 | import { environment } from './environment'; 2 | import { browser, Config } from 'protractor'; 3 | 4 | /* 5 | The config folder includes all the configuration files 6 | This example config file displays the basic protractor-cucumber framework configuration 7 | ts-node compiler is needed for cucumberjs 8 | tags option for specific scenarios added 9 | **/ 10 | export let config: Config = { 11 | seleniumAddress: 'http://127.0.0.1:4444/wd/hub', 12 | baseUrl: environment.baseUrl, 13 | capabilities: environment.capabilities, 14 | framework: 'custom', 15 | frameworkPath: require.resolve('protractor-cucumber-framework'), 16 | 17 | specs: [ 18 | '../../features/*.feature' 19 | ], 20 | // This utility function helps prepare our scripts with required actions like browser maximize 21 | onPrepare: () => { 22 | browser.driver.manage().window().maximize(); 23 | }, 24 | // These are various cucumber compiler options 25 | cucumberOpts: { 26 | compiler: "ts:ts-node/register", 27 | format: ["pretty"], 28 | require: ['../../stepdefinitions/*.ts', '../../support/*.ts'], 29 | //tags help us execute specific scenarios of feature files 30 | tags: '@AddScenario or @SubtractScenario or @MultiplyScenario or @DivideScenario or @ModulusScenario' 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /protractor-typescript-cucumber/config/environment.ts: -------------------------------------------------------------------------------- 1 | let webServerDefaultPort = 8080; 2 | 3 | export let environment = { 4 | // Capabilities to be passed to the webdriver instance. 5 | capabilities: { 6 | 'browserName': 7 | (process.env.TEST_BROWSER_NAME || 'chrome'), 8 | 'version': 9 | (process.env.TEST_BROWSER_VERSION || 'ANY') 10 | }, 11 | 12 | // Default http port to host the web server 13 | webServerDefaultPort: webServerDefaultPort, 14 | 15 | // Protractor interactive tests 16 | interactiveTestPort: 6969, 17 | 18 | // A base URL for your application under test. 19 | baseUrl: 20 | 'http://' + (process.env.HTTP_HOST || 'localhost') + 21 | ':' + (process.env.HTTP_PORT || webServerDefaultPort) 22 | 23 | }; 24 | -------------------------------------------------------------------------------- /protractor-typescript-cucumber/features/add-subtract.feature: -------------------------------------------------------------------------------- 1 | Feature: To test the add & subtract feature of ng1 calculator 2 | 3 | @AddScenario 4 | Scenario: Add two numbers 5 | Given I am on ng1 calculator page 6 | When I calculate "3" "+" "5" 7 | Then the result "8" should be displayed 8 | 9 | @SubtractScenario 10 | Scenario: Subtract two numbers 11 | Given I am on ng1 calculator page 12 | When I calculate "7" "-" "5" 13 | Then the result "2" should be displayed -------------------------------------------------------------------------------- /protractor-typescript-cucumber/features/modulus.feature: -------------------------------------------------------------------------------- 1 | Feature: To test the modulus feature of ng1 calculator 2 | 3 | @ModulusScenario 4 | Scenario: Modulus of two numbers 5 | Given I am on ng1 calculator page 6 | When I calculate "6" "%" "4" 7 | Then the result "2" should be displayed -------------------------------------------------------------------------------- /protractor-typescript-cucumber/features/multply-divide.feature: -------------------------------------------------------------------------------- 1 | Feature: To test the multiply & divide feature of ng1 calculator 2 | 3 | @MultiplyScenario 4 | Scenario: Multiply two numbers 5 | Given I am on ng1 calculator page 6 | When I calculate "3" "*" "5" 7 | Then the result "15" should be displayed 8 | 9 | @DivideScenario 10 | Scenario: Divide two numbers 11 | Given I am on ng1 calculator page 12 | When I calculate "10" "/" "5" 13 | Then the result "2" should be displayed -------------------------------------------------------------------------------- /protractor-typescript-cucumber/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "protractor-typescript-cucumber", 3 | "version": "2.0.0", 4 | "license": "MIT", 5 | "description": "To demostrate protractor cucumber tests with typescript", 6 | "keywords": [ 7 | "protractor", 8 | "cucumber", 9 | "typescript", 10 | "angular", 11 | "angularjs", 12 | "testing", 13 | "behaviour driven development", 14 | "bdd", 15 | "selenium", 16 | "webdriverJS", 17 | "gherkin", 18 | "automation testing" 19 | ], 20 | "scripts": { 21 | "example": "protractor tmp/config/config.js", 22 | "pretest": "npm run tsc", 23 | "test": "npm run example", 24 | "tsc": "tsc" 25 | }, 26 | "author": "Ram Pasala ", 27 | "dependencies": { 28 | "protractor": "^5.1.1", 29 | "ts-node": "^2.1.0", 30 | "typescript": "^2.2.1" 31 | }, 32 | "devDependencies": { 33 | "@types/cucumber": "^0.0.38", 34 | "@types/node": "^7.0.8", 35 | "@types/selenium-webdriver": "~2.53.39", 36 | "chai": "^3.5.0", 37 | "chai-as-promised": "^6.0.0", 38 | "cucumber": "^2.0.0-rc.8", 39 | "protractor-cucumber-framework": "^1.0.1" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /protractor-typescript-cucumber/pages/calcPage.ts: -------------------------------------------------------------------------------- 1 | import { $, by, element, ElementFinder } from 'protractor'; 2 | /* 3 | Page Objects help in better re-usablitity and maintenance of element locators 4 | This file exports CalculatorPageObject class 5 | **/ 6 | export class CalculatorPageObject { 7 | public first_operand:ElementFinder; 8 | public second_operand:ElementFinder; 9 | public operator: any; 10 | public go_button: ElementFinder; 11 | public result: ElementFinder; 12 | 13 | constructor() { 14 | this.first_operand = element(by.model('first')); 15 | this.second_operand = element(by.model('second')); 16 | this.operator = (optor:string) => { 17 | return element(by.cssContainingText('option',optor)); 18 | } 19 | this.go_button = element(by.id('gobutton')); 20 | this.result = element(by.binding('latest')); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /protractor-typescript-cucumber/stepdefinitions/calcSteps.ts: -------------------------------------------------------------------------------- 1 | import { browser } from 'protractor'; 2 | import { CalculatorPageObject } from '../pages/calcPage'; 3 | import { defineSupportCode } from 'cucumber'; 4 | let chai = require('chai').use(require('chai-as-promised')); 5 | let expect = chai.expect; 6 | /* 7 | StepDefinition files act as the glue code between config and feature files 8 | They drive the feature files from the background 9 | **/ 10 | defineSupportCode(({Given, When, Then}) => { 11 | let calc: CalculatorPageObject = new CalculatorPageObject(); 12 | 13 | Given(/^I am on ng1 calculator page$/, () => { 14 | return expect(browser.getTitle()).to.eventually.equal('Super Calculator'); 15 | }); 16 | 17 | When(/^I calculate "(.*?)" "(.*?)" "(.*?)"$/, (num1: string, optor: string, num2: string) => { 18 | calc.first_operand.sendKeys(num1); 19 | calc.operator(optor).click(); 20 | calc.second_operand.sendKeys(num2); 21 | return calc.go_button.click(); 22 | }); 23 | 24 | Then(/^the result "(.*?)" should be displayed$/, (result: string) => { 25 | return expect(calc.result.getText()).to.eventually.equal(result); 26 | }); 27 | }) 28 | 29 | -------------------------------------------------------------------------------- /protractor-typescript-cucumber/support/hooks.ts: -------------------------------------------------------------------------------- 1 | /*jslint node: true*/ 2 | import { browser } from 'protractor'; 3 | import { defineSupportCode } from "cucumber"; 4 | import * as fs from 'fs'; 5 | /* 6 | Hooks help us follow DRY principle, all the utility functions go here 7 | BeforeScenario, Features and screenshot hooks example provided here 8 | **/ 9 | defineSupportCode(function ({registerHandler, After}) { 10 | 11 | registerHandler('BeforeFeature', (event) => { 12 | return browser.get('/ng1/calculator'); 13 | }); 14 | 15 | After((scenario, done) => { 16 | if (scenario.isFailed()) { 17 | return browser.takeScreenshot().then(function (base64png) { 18 | let decodedImage = new Buffer(base64png, 'base64').toString('binary'); 19 | scenario.attach(decodedImage, 'image/png'); 20 | }, (err) => { 21 | done(err); 22 | }); 23 | } else { 24 | done(); 25 | } 26 | }); 27 | }) 28 | -------------------------------------------------------------------------------- /protractor-typescript-cucumber/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "moduleResolution": "node", 6 | "sourceMap": false, 7 | "declaration": false, 8 | "removeComments": false, 9 | "noImplicitAny": false, 10 | "outDir": "tmp", 11 | "typeRoots": [ 12 | "./node_modules/@types" 13 | ], 14 | "types": [ 15 | "node", 16 | "cucumber" 17 | ] 18 | }, 19 | "exclude": [ 20 | "node_modules", 21 | "tmp" 22 | ] 23 | } -------------------------------------------------------------------------------- /protractor-typescript-cucumber/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/cucumber@^0.0.38": 6 | version "0.0.38" 7 | resolved "https://registry.yarnpkg.com/@types/cucumber/-/cucumber-0.0.38.tgz#36c3988922de47119c2cd461b922fc24af36a1e7" 8 | 9 | "@types/node@^6.0.46": 10 | version "6.0.65" 11 | resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.65.tgz#c00faa7ffcfc9842b5dd7bf650872562504d5670" 12 | 13 | "@types/node@^7.0.8": 14 | version "7.0.8" 15 | resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.8.tgz#25e4dd804b630c916ae671233e6d71f6ce18124a" 16 | 17 | "@types/q@^0.0.32": 18 | version "0.0.32" 19 | resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" 20 | 21 | "@types/selenium-webdriver@^2.53.35", "@types/selenium-webdriver@~2.53.39": 22 | version "2.53.42" 23 | resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-2.53.42.tgz#74cb77fb6052edaff2a8984ddafd88d419f25cac" 24 | 25 | adm-zip@0.4.4: 26 | version "0.4.4" 27 | resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.4.tgz#a61ed5ae6905c3aea58b3a657d25033091052736" 28 | 29 | adm-zip@^0.4.7: 30 | version "0.4.7" 31 | resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.7.tgz#8606c2cbf1c426ce8c8ec00174447fd49b6eafc1" 32 | 33 | agent-base@2: 34 | version "2.0.1" 35 | resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.0.1.tgz#bd8f9e86a8eb221fffa07bd14befd55df142815e" 36 | dependencies: 37 | extend "~3.0.0" 38 | semver "~5.0.1" 39 | 40 | ajv@^4.9.1: 41 | version "4.11.4" 42 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.4.tgz#ebf3a55d4b132ea60ff5847ae85d2ef069960b45" 43 | dependencies: 44 | co "^4.6.0" 45 | json-stable-stringify "^1.0.1" 46 | 47 | ansi-regex@^2.0.0: 48 | version "2.1.1" 49 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 50 | 51 | ansi-styles@^2.2.1: 52 | version "2.2.1" 53 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 54 | 55 | any-promise@^1.0.0, any-promise@^1.3.0: 56 | version "1.3.0" 57 | resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" 58 | 59 | array-union@^1.0.1: 60 | version "1.0.2" 61 | resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" 62 | dependencies: 63 | array-uniq "^1.0.1" 64 | 65 | array-uniq@^1.0.1: 66 | version "1.0.3" 67 | resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" 68 | 69 | arrify@^1.0.0: 70 | version "1.0.1" 71 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 72 | 73 | asn1@~0.2.3: 74 | version "0.2.3" 75 | resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" 76 | 77 | assert-plus@^0.2.0: 78 | version "0.2.0" 79 | resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" 80 | 81 | assert-plus@^1.0.0: 82 | version "1.0.0" 83 | resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" 84 | 85 | assertion-error-formatter@^2.0.0: 86 | version "2.0.0" 87 | resolved "https://registry.yarnpkg.com/assertion-error-formatter/-/assertion-error-formatter-2.0.0.tgz#17a24289cc8440889b54318e6d1187ebee2d5494" 88 | dependencies: 89 | diff "^3.0.0" 90 | pad-right "^0.2.2" 91 | repeat-string "^1.6.1" 92 | 93 | assertion-error@^1.0.1: 94 | version "1.0.2" 95 | resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c" 96 | 97 | asynckit@^0.4.0: 98 | version "0.4.0" 99 | resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" 100 | 101 | aws-sign2@~0.6.0: 102 | version "0.6.0" 103 | resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" 104 | 105 | aws4@^1.2.1: 106 | version "1.6.0" 107 | resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" 108 | 109 | babel-runtime@^6.11.6: 110 | version "6.23.0" 111 | resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" 112 | dependencies: 113 | core-js "^2.4.0" 114 | regenerator-runtime "^0.10.0" 115 | 116 | balanced-match@^0.4.1: 117 | version "0.4.2" 118 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" 119 | 120 | bcrypt-pbkdf@^1.0.0: 121 | version "1.0.1" 122 | resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" 123 | dependencies: 124 | tweetnacl "^0.14.3" 125 | 126 | blocking-proxy@0.0.5: 127 | version "0.0.5" 128 | resolved "https://registry.yarnpkg.com/blocking-proxy/-/blocking-proxy-0.0.5.tgz#462905e0dcfbea970f41aa37223dda9c07b1912b" 129 | dependencies: 130 | minimist "^1.2.0" 131 | 132 | bluebird@^3.4.1: 133 | version "3.5.0" 134 | resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" 135 | 136 | boom@2.x.x: 137 | version "2.10.1" 138 | resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" 139 | dependencies: 140 | hoek "2.x.x" 141 | 142 | brace-expansion@^1.0.0: 143 | version "1.1.6" 144 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" 145 | dependencies: 146 | balanced-match "^0.4.1" 147 | concat-map "0.0.1" 148 | 149 | caseless@~0.12.0: 150 | version "0.12.0" 151 | resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" 152 | 153 | chai-as-promised@^6.0.0: 154 | version "6.0.0" 155 | resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-6.0.0.tgz#1a02a433a6f24dafac63b9c96fa1684db1aa8da6" 156 | dependencies: 157 | check-error "^1.0.2" 158 | 159 | chai@^3.5.0: 160 | version "3.5.0" 161 | resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247" 162 | dependencies: 163 | assertion-error "^1.0.1" 164 | deep-eql "^0.1.3" 165 | type-detect "^1.0.0" 166 | 167 | chalk@^1.1.1, chalk@^1.1.3: 168 | version "1.1.3" 169 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 170 | dependencies: 171 | ansi-styles "^2.2.1" 172 | escape-string-regexp "^1.0.2" 173 | has-ansi "^2.0.0" 174 | strip-ansi "^3.0.0" 175 | supports-color "^2.0.0" 176 | 177 | check-error@^1.0.2: 178 | version "1.0.2" 179 | resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" 180 | 181 | cli-table@^0.3.1: 182 | version "0.3.1" 183 | resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" 184 | dependencies: 185 | colors "1.0.3" 186 | 187 | co@^4.6.0: 188 | version "4.6.0" 189 | resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" 190 | 191 | colors@1.0.3: 192 | version "1.0.3" 193 | resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" 194 | 195 | colors@^1.1.2: 196 | version "1.1.2" 197 | resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" 198 | 199 | combined-stream@^1.0.5, combined-stream@~1.0.5: 200 | version "1.0.5" 201 | resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" 202 | dependencies: 203 | delayed-stream "~1.0.0" 204 | 205 | commander@^2.9.0: 206 | version "2.9.0" 207 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" 208 | dependencies: 209 | graceful-readlink ">= 1.0.0" 210 | 211 | concat-map@0.0.1: 212 | version "0.0.1" 213 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 214 | 215 | core-js@^2.4.0: 216 | version "2.4.1" 217 | resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" 218 | 219 | core-util-is@1.0.2: 220 | version "1.0.2" 221 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" 222 | 223 | cryptiles@2.x.x: 224 | version "2.0.5" 225 | resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" 226 | dependencies: 227 | boom "2.x.x" 228 | 229 | cucumber-expressions@^3.0.0: 230 | version "3.0.0" 231 | resolved "https://registry.yarnpkg.com/cucumber-expressions/-/cucumber-expressions-3.0.0.tgz#4cf424813dae396cc9dab714b8104b459befc32c" 232 | 233 | cucumber-tag-expressions@^1.0.0: 234 | version "1.0.0" 235 | resolved "https://registry.yarnpkg.com/cucumber-tag-expressions/-/cucumber-tag-expressions-1.0.0.tgz#5dc27ae3073acde1db3aa7cf4d9609a42f15ee5d" 236 | 237 | cucumber@^2.0.0-rc.8: 238 | version "2.0.0-rc.8" 239 | resolved "https://registry.yarnpkg.com/cucumber/-/cucumber-2.0.0-rc.8.tgz#6da26dbccfb2e766826d8c09f1486b35b93b5d58" 240 | dependencies: 241 | assertion-error-formatter "^2.0.0" 242 | babel-runtime "^6.11.6" 243 | bluebird "^3.4.1" 244 | cli-table "^0.3.1" 245 | colors "^1.1.2" 246 | commander "^2.9.0" 247 | cucumber-expressions "^3.0.0" 248 | cucumber-tag-expressions "^1.0.0" 249 | duration "^0.2.0" 250 | figures "2.0.0" 251 | gherkin "^4.0.0" 252 | glob "^7.0.0" 253 | indent-string "^3.1.0" 254 | is-generator "^1.0.2" 255 | is-stream "^1.1.0" 256 | lodash "^4.0.0" 257 | mz "^2.4.0" 258 | stack-chain "^1.3.5" 259 | stacktrace-js "^1.3.0" 260 | string-argv "0.0.2" 261 | upper-case-first "^1.1.2" 262 | util-arity "^1.0.2" 263 | verror "^1.9.0" 264 | 265 | d@^0.1.1, d@~0.1.1: 266 | version "0.1.1" 267 | resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" 268 | dependencies: 269 | es5-ext "~0.10.2" 270 | 271 | dashdash@^1.12.0: 272 | version "1.14.1" 273 | resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" 274 | dependencies: 275 | assert-plus "^1.0.0" 276 | 277 | debug@2, debug@^2.2.0: 278 | version "2.6.1" 279 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351" 280 | dependencies: 281 | ms "0.7.2" 282 | 283 | deep-eql@^0.1.3: 284 | version "0.1.3" 285 | resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2" 286 | dependencies: 287 | type-detect "0.1.1" 288 | 289 | del@^2.2.0: 290 | version "2.2.2" 291 | resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" 292 | dependencies: 293 | globby "^5.0.0" 294 | is-path-cwd "^1.0.0" 295 | is-path-in-cwd "^1.0.0" 296 | object-assign "^4.0.1" 297 | pify "^2.0.0" 298 | pinkie-promise "^2.0.0" 299 | rimraf "^2.2.8" 300 | 301 | delayed-stream@~1.0.0: 302 | version "1.0.0" 303 | resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" 304 | 305 | diff@^3.0.0, diff@^3.1.0: 306 | version "3.2.0" 307 | resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" 308 | 309 | duration@^0.2.0: 310 | version "0.2.0" 311 | resolved "https://registry.yarnpkg.com/duration/-/duration-0.2.0.tgz#5f9c4dfaafff655de986112efe25c5978dd85146" 312 | dependencies: 313 | d "~0.1.1" 314 | es5-ext "~0.10.2" 315 | 316 | ecc-jsbn@~0.1.1: 317 | version "0.1.1" 318 | resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" 319 | dependencies: 320 | jsbn "~0.1.0" 321 | 322 | error-ex@^1.2.0: 323 | version "1.3.1" 324 | resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" 325 | dependencies: 326 | is-arrayish "^0.2.1" 327 | 328 | error-stack-parser@^1.3.6: 329 | version "1.3.6" 330 | resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-1.3.6.tgz#e0e73b93e417138d1cd7c0b746b1a4a14854c292" 331 | dependencies: 332 | stackframe "^0.3.1" 333 | 334 | es5-ext@^0.10.7, es5-ext@~0.10.11, es5-ext@~0.10.2: 335 | version "0.10.12" 336 | resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" 337 | dependencies: 338 | es6-iterator "2" 339 | es6-symbol "~3.1" 340 | 341 | es6-iterator@2: 342 | version "2.0.0" 343 | resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" 344 | dependencies: 345 | d "^0.1.1" 346 | es5-ext "^0.10.7" 347 | es6-symbol "3" 348 | 349 | es6-symbol@3, es6-symbol@~3.1: 350 | version "3.1.0" 351 | resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" 352 | dependencies: 353 | d "~0.1.1" 354 | es5-ext "~0.10.11" 355 | 356 | escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: 357 | version "1.0.5" 358 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 359 | 360 | exit@^0.1.2: 361 | version "0.1.2" 362 | resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" 363 | 364 | extend@3, extend@~3.0.0: 365 | version "3.0.0" 366 | resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" 367 | 368 | extsprintf@1.0.2: 369 | version "1.0.2" 370 | resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" 371 | 372 | extsprintf@^1.2.0: 373 | version "1.3.0" 374 | resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" 375 | 376 | figures@2.0.0: 377 | version "2.0.0" 378 | resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" 379 | dependencies: 380 | escape-string-regexp "^1.0.5" 381 | 382 | forever-agent@~0.6.1: 383 | version "0.6.1" 384 | resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" 385 | 386 | form-data@~2.1.1: 387 | version "2.1.2" 388 | resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" 389 | dependencies: 390 | asynckit "^0.4.0" 391 | combined-stream "^1.0.5" 392 | mime-types "^2.1.12" 393 | 394 | fs.realpath@^1.0.0: 395 | version "1.0.0" 396 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 397 | 398 | getpass@^0.1.1: 399 | version "0.1.6" 400 | resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" 401 | dependencies: 402 | assert-plus "^1.0.0" 403 | 404 | gherkin@^4.0.0: 405 | version "4.0.0" 406 | resolved "https://registry.yarnpkg.com/gherkin/-/gherkin-4.0.0.tgz#79dce04d1223ea43b4862a76be5ce8f89c12c32c" 407 | 408 | glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6: 409 | version "7.1.1" 410 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" 411 | dependencies: 412 | fs.realpath "^1.0.0" 413 | inflight "^1.0.4" 414 | inherits "2" 415 | minimatch "^3.0.2" 416 | once "^1.3.0" 417 | path-is-absolute "^1.0.0" 418 | 419 | globby@^5.0.0: 420 | version "5.0.0" 421 | resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" 422 | dependencies: 423 | array-union "^1.0.1" 424 | arrify "^1.0.0" 425 | glob "^7.0.3" 426 | object-assign "^4.0.1" 427 | pify "^2.0.0" 428 | pinkie-promise "^2.0.0" 429 | 430 | "graceful-readlink@>= 1.0.0": 431 | version "1.0.1" 432 | resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" 433 | 434 | har-schema@^1.0.5: 435 | version "1.0.5" 436 | resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" 437 | 438 | har-validator@~4.2.1: 439 | version "4.2.1" 440 | resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" 441 | dependencies: 442 | ajv "^4.9.1" 443 | har-schema "^1.0.5" 444 | 445 | has-ansi@^2.0.0: 446 | version "2.0.0" 447 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 448 | dependencies: 449 | ansi-regex "^2.0.0" 450 | 451 | hawk@~3.1.3: 452 | version "3.1.3" 453 | resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" 454 | dependencies: 455 | boom "2.x.x" 456 | cryptiles "2.x.x" 457 | hoek "2.x.x" 458 | sntp "1.x.x" 459 | 460 | hoek@2.x.x: 461 | version "2.16.3" 462 | resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" 463 | 464 | http-signature@~1.1.0: 465 | version "1.1.1" 466 | resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" 467 | dependencies: 468 | assert-plus "^0.2.0" 469 | jsprim "^1.2.2" 470 | sshpk "^1.7.0" 471 | 472 | https-proxy-agent@^1.0.0: 473 | version "1.0.0" 474 | resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz#35f7da6c48ce4ddbfa264891ac593ee5ff8671e6" 475 | dependencies: 476 | agent-base "2" 477 | debug "2" 478 | extend "3" 479 | 480 | indent-string@^3.1.0: 481 | version "3.1.0" 482 | resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.1.0.tgz#08ff4334603388399b329e6b9538dc7a3cf5de7d" 483 | 484 | inflight@^1.0.4: 485 | version "1.0.6" 486 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 487 | dependencies: 488 | once "^1.3.0" 489 | wrappy "1" 490 | 491 | inherits@2: 492 | version "2.0.3" 493 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 494 | 495 | ini@^1.3.4: 496 | version "1.3.4" 497 | resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" 498 | 499 | is-arrayish@^0.2.1: 500 | version "0.2.1" 501 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" 502 | 503 | is-generator@^1.0.2: 504 | version "1.0.3" 505 | resolved "https://registry.yarnpkg.com/is-generator/-/is-generator-1.0.3.tgz#c14c21057ed36e328db80347966c693f886389f3" 506 | 507 | is-path-cwd@^1.0.0: 508 | version "1.0.0" 509 | resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" 510 | 511 | is-path-in-cwd@^1.0.0: 512 | version "1.0.0" 513 | resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" 514 | dependencies: 515 | is-path-inside "^1.0.0" 516 | 517 | is-path-inside@^1.0.0: 518 | version "1.0.0" 519 | resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" 520 | dependencies: 521 | path-is-inside "^1.0.1" 522 | 523 | is-stream@^1.1.0: 524 | version "1.1.0" 525 | resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" 526 | 527 | is-typedarray@~1.0.0: 528 | version "1.0.0" 529 | resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" 530 | 531 | is-utf8@^0.2.0: 532 | version "0.2.1" 533 | resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" 534 | 535 | isstream@~0.1.2: 536 | version "0.1.2" 537 | resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" 538 | 539 | jasmine-core@~2.5.2: 540 | version "2.5.2" 541 | resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.5.2.tgz#6f61bd79061e27f43e6f9355e44b3c6cab6ff297" 542 | 543 | jasmine@^2.5.3: 544 | version "2.5.3" 545 | resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.5.3.tgz#5441f254e1fc2269deb1dfd93e0e57d565ff4d22" 546 | dependencies: 547 | exit "^0.1.2" 548 | glob "^7.0.6" 549 | jasmine-core "~2.5.2" 550 | 551 | jasminewd2@^2.0.0: 552 | version "2.0.0" 553 | resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.0.0.tgz#10aacd2c588c1ceb6a0b849f1a7f3f959f777c91" 554 | 555 | jodid25519@^1.0.0: 556 | version "1.0.2" 557 | resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" 558 | dependencies: 559 | jsbn "~0.1.0" 560 | 561 | jsbn@~0.1.0: 562 | version "0.1.1" 563 | resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" 564 | 565 | json-schema@0.2.3: 566 | version "0.2.3" 567 | resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" 568 | 569 | json-stable-stringify@^1.0.1: 570 | version "1.0.1" 571 | resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" 572 | dependencies: 573 | jsonify "~0.0.0" 574 | 575 | json-stringify-safe@~5.0.1: 576 | version "5.0.1" 577 | resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" 578 | 579 | jsonify@~0.0.0: 580 | version "0.0.0" 581 | resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" 582 | 583 | jsprim@^1.2.2: 584 | version "1.3.1" 585 | resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" 586 | dependencies: 587 | extsprintf "1.0.2" 588 | json-schema "0.2.3" 589 | verror "1.3.6" 590 | 591 | lodash@^4.0.0: 592 | version "4.17.4" 593 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" 594 | 595 | make-error@^1.1.1: 596 | version "1.2.3" 597 | resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.2.3.tgz#6c4402df732e0977ac6faf754a5074b3d2b1d19d" 598 | 599 | mime-db@~1.26.0: 600 | version "1.26.0" 601 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff" 602 | 603 | mime-types@^2.1.12, mime-types@~2.1.7: 604 | version "2.1.14" 605 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee" 606 | dependencies: 607 | mime-db "~1.26.0" 608 | 609 | minimatch@^3.0.2: 610 | version "3.0.3" 611 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" 612 | dependencies: 613 | brace-expansion "^1.0.0" 614 | 615 | minimist@0.0.8, minimist@~0.0.1: 616 | version "0.0.8" 617 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 618 | 619 | minimist@^1.2.0: 620 | version "1.2.0" 621 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" 622 | 623 | mkdirp@^0.5.1: 624 | version "0.5.1" 625 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 626 | dependencies: 627 | minimist "0.0.8" 628 | 629 | ms@0.7.2: 630 | version "0.7.2" 631 | resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" 632 | 633 | mz@^2.4.0: 634 | version "2.6.0" 635 | resolved "https://registry.yarnpkg.com/mz/-/mz-2.6.0.tgz#c8b8521d958df0a4f2768025db69c719ee4ef1ce" 636 | dependencies: 637 | any-promise "^1.0.0" 638 | object-assign "^4.0.1" 639 | thenify-all "^1.0.0" 640 | 641 | oauth-sign@~0.8.1: 642 | version "0.8.2" 643 | resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" 644 | 645 | object-assign@^4.0.1: 646 | version "4.1.1" 647 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 648 | 649 | once@^1.3.0: 650 | version "1.4.0" 651 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 652 | dependencies: 653 | wrappy "1" 654 | 655 | optimist@~0.6.0: 656 | version "0.6.1" 657 | resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" 658 | dependencies: 659 | minimist "~0.0.1" 660 | wordwrap "~0.0.2" 661 | 662 | options@>=0.0.5: 663 | version "0.0.6" 664 | resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" 665 | 666 | os-tmpdir@~1.0.1: 667 | version "1.0.2" 668 | resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 669 | 670 | pad-right@^0.2.2: 671 | version "0.2.2" 672 | resolved "https://registry.yarnpkg.com/pad-right/-/pad-right-0.2.2.tgz#6fbc924045d244f2a2a244503060d3bfc6009774" 673 | dependencies: 674 | repeat-string "^1.5.2" 675 | 676 | parse-json@^2.2.0: 677 | version "2.2.0" 678 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" 679 | dependencies: 680 | error-ex "^1.2.0" 681 | 682 | path-is-absolute@^1.0.0: 683 | version "1.0.1" 684 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 685 | 686 | path-is-inside@^1.0.1: 687 | version "1.0.2" 688 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 689 | 690 | performance-now@^0.2.0: 691 | version "0.2.0" 692 | resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" 693 | 694 | pify@^2.0.0: 695 | version "2.3.0" 696 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 697 | 698 | pinkie-promise@^2.0.0: 699 | version "2.0.1" 700 | resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 701 | dependencies: 702 | pinkie "^2.0.0" 703 | 704 | pinkie@^2.0.0, pinkie@^2.0.4: 705 | version "2.0.4" 706 | resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 707 | 708 | protractor-cucumber-framework@^1.0.1: 709 | version "1.0.1" 710 | resolved "https://registry.yarnpkg.com/protractor-cucumber-framework/-/protractor-cucumber-framework-1.0.1.tgz#2f82edacd1856879981f8255322a18b78d90cbf3" 711 | dependencies: 712 | debug "^2.2.0" 713 | glob "^7.0.3" 714 | object-assign "^4.0.1" 715 | q "^1.4.1" 716 | 717 | protractor@^5.1.1: 718 | version "5.1.1" 719 | resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.1.1.tgz#10c4e336571b28875b8acc3ae3e4e1e40ef7e986" 720 | dependencies: 721 | "@types/node" "^6.0.46" 722 | "@types/q" "^0.0.32" 723 | "@types/selenium-webdriver" "~2.53.39" 724 | blocking-proxy "0.0.5" 725 | chalk "^1.1.3" 726 | glob "^7.0.3" 727 | jasmine "^2.5.3" 728 | jasminewd2 "^2.0.0" 729 | optimist "~0.6.0" 730 | q "1.4.1" 731 | saucelabs "~1.3.0" 732 | selenium-webdriver "3.0.1" 733 | source-map-support "~0.4.0" 734 | webdriver-js-extender "^1.0.0" 735 | webdriver-manager "^12.0.1" 736 | 737 | punycode@^1.4.1: 738 | version "1.4.1" 739 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" 740 | 741 | q@1.4.1, q@^1.4.1: 742 | version "1.4.1" 743 | resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" 744 | 745 | qs@~6.4.0: 746 | version "6.4.0" 747 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" 748 | 749 | regenerator-runtime@^0.10.0: 750 | version "0.10.3" 751 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.3.tgz#8c4367a904b51ea62a908ac310bf99ff90a82a3e" 752 | 753 | repeat-string@^1.5.2, repeat-string@^1.6.1: 754 | version "1.6.1" 755 | resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" 756 | 757 | request@^2.78.0: 758 | version "2.81.0" 759 | resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" 760 | dependencies: 761 | aws-sign2 "~0.6.0" 762 | aws4 "^1.2.1" 763 | caseless "~0.12.0" 764 | combined-stream "~1.0.5" 765 | extend "~3.0.0" 766 | forever-agent "~0.6.1" 767 | form-data "~2.1.1" 768 | har-validator "~4.2.1" 769 | hawk "~3.1.3" 770 | http-signature "~1.1.0" 771 | is-typedarray "~1.0.0" 772 | isstream "~0.1.2" 773 | json-stringify-safe "~5.0.1" 774 | mime-types "~2.1.7" 775 | oauth-sign "~0.8.1" 776 | performance-now "^0.2.0" 777 | qs "~6.4.0" 778 | safe-buffer "^5.0.1" 779 | stringstream "~0.0.4" 780 | tough-cookie "~2.3.0" 781 | tunnel-agent "^0.6.0" 782 | uuid "^3.0.0" 783 | 784 | rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4: 785 | version "2.6.1" 786 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" 787 | dependencies: 788 | glob "^7.0.5" 789 | 790 | safe-buffer@^5.0.1: 791 | version "5.0.1" 792 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" 793 | 794 | saucelabs@~1.3.0: 795 | version "1.3.0" 796 | resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.3.0.tgz#d240e8009df7fa87306ec4578a69ba3b5c424fee" 797 | dependencies: 798 | https-proxy-agent "^1.0.0" 799 | 800 | sax@0.6.x: 801 | version "0.6.1" 802 | resolved "https://registry.yarnpkg.com/sax/-/sax-0.6.1.tgz#563b19c7c1de892e09bfc4f2fc30e3c27f0952b9" 803 | 804 | sax@>=0.6.0: 805 | version "1.2.2" 806 | resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828" 807 | 808 | selenium-webdriver@3.0.1: 809 | version "3.0.1" 810 | resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-3.0.1.tgz#a2dea5da4a97f6672e89e7ca7276cefa365147a7" 811 | dependencies: 812 | adm-zip "^0.4.7" 813 | rimraf "^2.5.4" 814 | tmp "0.0.30" 815 | xml2js "^0.4.17" 816 | 817 | selenium-webdriver@^2.53.2: 818 | version "2.53.3" 819 | resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz#d29ff5a957dff1a1b49dc457756e4e4bfbdce085" 820 | dependencies: 821 | adm-zip "0.4.4" 822 | rimraf "^2.2.8" 823 | tmp "0.0.24" 824 | ws "^1.0.1" 825 | xml2js "0.4.4" 826 | 827 | semver@^5.3.0: 828 | version "5.3.0" 829 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" 830 | 831 | semver@~5.0.1: 832 | version "5.0.3" 833 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a" 834 | 835 | sntp@1.x.x: 836 | version "1.0.9" 837 | resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" 838 | dependencies: 839 | hoek "2.x.x" 840 | 841 | source-map-support@^0.4.0, source-map-support@~0.4.0: 842 | version "0.4.11" 843 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.11.tgz#647f939978b38535909530885303daf23279f322" 844 | dependencies: 845 | source-map "^0.5.3" 846 | 847 | source-map@0.5.6, source-map@^0.5.3: 848 | version "0.5.6" 849 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" 850 | 851 | sshpk@^1.7.0: 852 | version "1.11.0" 853 | resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.11.0.tgz#2d8d5ebb4a6fab28ffba37fa62a90f4a3ea59d77" 854 | dependencies: 855 | asn1 "~0.2.3" 856 | assert-plus "^1.0.0" 857 | dashdash "^1.12.0" 858 | getpass "^0.1.1" 859 | optionalDependencies: 860 | bcrypt-pbkdf "^1.0.0" 861 | ecc-jsbn "~0.1.1" 862 | jodid25519 "^1.0.0" 863 | jsbn "~0.1.0" 864 | tweetnacl "~0.14.0" 865 | 866 | stack-chain@^1.3.5: 867 | version "1.3.7" 868 | resolved "https://registry.yarnpkg.com/stack-chain/-/stack-chain-1.3.7.tgz#d192c9ff4ea6a22c94c4dd459171e3f00cea1285" 869 | 870 | stack-generator@^1.0.7: 871 | version "1.1.0" 872 | resolved "https://registry.yarnpkg.com/stack-generator/-/stack-generator-1.1.0.tgz#36f6a920751a6c10f499a13c32cbb5f51a0b8b25" 873 | dependencies: 874 | stackframe "^1.0.2" 875 | 876 | stackframe@^0.3.1, stackframe@~0.3: 877 | version "0.3.1" 878 | resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-0.3.1.tgz#33aa84f1177a5548c8935533cbfeb3420975f5a4" 879 | 880 | stackframe@^1.0.2: 881 | version "1.0.2" 882 | resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.0.2.tgz#162245509c687d328b14f671dab8fdb755b1e1e8" 883 | 884 | stacktrace-gps@^2.4.3: 885 | version "2.4.4" 886 | resolved "https://registry.yarnpkg.com/stacktrace-gps/-/stacktrace-gps-2.4.4.tgz#69c827e9d6d6f41cf438d7f195e2e3cbfcf28c44" 887 | dependencies: 888 | source-map "0.5.6" 889 | stackframe "~0.3" 890 | 891 | stacktrace-js@^1.3.0: 892 | version "1.3.1" 893 | resolved "https://registry.yarnpkg.com/stacktrace-js/-/stacktrace-js-1.3.1.tgz#67cab2589af5c417b962f7369940277bb3b6a18b" 894 | dependencies: 895 | error-stack-parser "^1.3.6" 896 | stack-generator "^1.0.7" 897 | stacktrace-gps "^2.4.3" 898 | 899 | string-argv@0.0.2: 900 | version "0.0.2" 901 | resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.0.2.tgz#dac30408690c21f3c3630a3ff3a05877bdcbd736" 902 | 903 | stringstream@~0.0.4: 904 | version "0.0.5" 905 | resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" 906 | 907 | strip-ansi@^3.0.0: 908 | version "3.0.1" 909 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 910 | dependencies: 911 | ansi-regex "^2.0.0" 912 | 913 | strip-bom@^2.0.0: 914 | version "2.0.0" 915 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" 916 | dependencies: 917 | is-utf8 "^0.2.0" 918 | 919 | strip-json-comments@^2.0.0: 920 | version "2.0.1" 921 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" 922 | 923 | supports-color@^2.0.0: 924 | version "2.0.0" 925 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 926 | 927 | thenify-all@^1.0.0: 928 | version "1.6.0" 929 | resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" 930 | dependencies: 931 | thenify ">= 3.1.0 < 4" 932 | 933 | "thenify@>= 3.1.0 < 4": 934 | version "3.2.1" 935 | resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.2.1.tgz#251fd1c80aff6e5cf57cb179ab1fcb724269bd11" 936 | dependencies: 937 | any-promise "^1.0.0" 938 | 939 | tmp@0.0.24: 940 | version "0.0.24" 941 | resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.24.tgz#d6a5e198d14a9835cc6f2d7c3d9e302428c8cf12" 942 | 943 | tmp@0.0.30: 944 | version "0.0.30" 945 | resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed" 946 | dependencies: 947 | os-tmpdir "~1.0.1" 948 | 949 | tough-cookie@~2.3.0: 950 | version "2.3.2" 951 | resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" 952 | dependencies: 953 | punycode "^1.4.1" 954 | 955 | ts-node@^2.1.0: 956 | version "2.1.0" 957 | resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-2.1.0.tgz#aa2bf4b2e25c5fb6a7c54701edc3666d3a9db25d" 958 | dependencies: 959 | arrify "^1.0.0" 960 | chalk "^1.1.1" 961 | diff "^3.1.0" 962 | make-error "^1.1.1" 963 | minimist "^1.2.0" 964 | mkdirp "^0.5.1" 965 | pinkie "^2.0.4" 966 | source-map-support "^0.4.0" 967 | tsconfig "^5.0.2" 968 | v8flags "^2.0.11" 969 | xtend "^4.0.0" 970 | yn "^1.2.0" 971 | 972 | tsconfig@^5.0.2: 973 | version "5.0.3" 974 | resolved "https://registry.yarnpkg.com/tsconfig/-/tsconfig-5.0.3.tgz#5f4278e701800967a8fc383fd19648878f2a6e3a" 975 | dependencies: 976 | any-promise "^1.3.0" 977 | parse-json "^2.2.0" 978 | strip-bom "^2.0.0" 979 | strip-json-comments "^2.0.0" 980 | 981 | tunnel-agent@^0.6.0: 982 | version "0.6.0" 983 | resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" 984 | dependencies: 985 | safe-buffer "^5.0.1" 986 | 987 | tweetnacl@^0.14.3, tweetnacl@~0.14.0: 988 | version "0.14.5" 989 | resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" 990 | 991 | type-detect@0.1.1: 992 | version "0.1.1" 993 | resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" 994 | 995 | type-detect@^1.0.0: 996 | version "1.0.0" 997 | resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2" 998 | 999 | typescript@^2.2.1: 1000 | version "2.2.1" 1001 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.2.1.tgz#4862b662b988a4c8ff691cc7969622d24db76ae9" 1002 | 1003 | ultron@1.0.x: 1004 | version "1.0.2" 1005 | resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" 1006 | 1007 | upper-case-first@^1.1.2: 1008 | version "1.1.2" 1009 | resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" 1010 | dependencies: 1011 | upper-case "^1.1.1" 1012 | 1013 | upper-case@^1.1.1: 1014 | version "1.1.3" 1015 | resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" 1016 | 1017 | user-home@^1.1.1: 1018 | version "1.1.1" 1019 | resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" 1020 | 1021 | util-arity@^1.0.2: 1022 | version "1.1.0" 1023 | resolved "https://registry.yarnpkg.com/util-arity/-/util-arity-1.1.0.tgz#59d01af1fdb3fede0ac4e632b0ab5f6ce97c9330" 1024 | 1025 | uuid@^3.0.0: 1026 | version "3.0.1" 1027 | resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" 1028 | 1029 | v8flags@^2.0.11: 1030 | version "2.0.11" 1031 | resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.0.11.tgz#bca8f30f0d6d60612cc2c00641e6962d42ae6881" 1032 | dependencies: 1033 | user-home "^1.1.1" 1034 | 1035 | verror@1.3.6: 1036 | version "1.3.6" 1037 | resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" 1038 | dependencies: 1039 | extsprintf "1.0.2" 1040 | 1041 | verror@^1.9.0: 1042 | version "1.9.0" 1043 | resolved "https://registry.yarnpkg.com/verror/-/verror-1.9.0.tgz#107a8a2d14c33586fc4bb830057cd2d19ae2a6ee" 1044 | dependencies: 1045 | assert-plus "^1.0.0" 1046 | core-util-is "1.0.2" 1047 | extsprintf "^1.2.0" 1048 | 1049 | webdriver-js-extender@^1.0.0: 1050 | version "1.0.0" 1051 | resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz#81c533a9e33d5bfb597b4e63e2cdb25b54777515" 1052 | dependencies: 1053 | "@types/selenium-webdriver" "^2.53.35" 1054 | selenium-webdriver "^2.53.2" 1055 | 1056 | webdriver-manager@^12.0.1: 1057 | version "12.0.3" 1058 | resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.0.3.tgz#b4a0a1391ceb7e147ea035a393bc1c61143fc656" 1059 | dependencies: 1060 | adm-zip "^0.4.7" 1061 | chalk "^1.1.1" 1062 | del "^2.2.0" 1063 | glob "^7.0.3" 1064 | ini "^1.3.4" 1065 | minimist "^1.2.0" 1066 | q "^1.4.1" 1067 | request "^2.78.0" 1068 | rimraf "^2.5.2" 1069 | semver "^5.3.0" 1070 | xml2js "^0.4.17" 1071 | 1072 | wordwrap@~0.0.2: 1073 | version "0.0.3" 1074 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" 1075 | 1076 | wrappy@1: 1077 | version "1.0.2" 1078 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 1079 | 1080 | ws@^1.0.1: 1081 | version "1.1.2" 1082 | resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.2.tgz#8a244fa052401e08c9886cf44a85189e1fd4067f" 1083 | dependencies: 1084 | options ">=0.0.5" 1085 | ultron "1.0.x" 1086 | 1087 | xml2js@0.4.4: 1088 | version "0.4.4" 1089 | resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.4.tgz#3111010003008ae19240eba17497b57c729c555d" 1090 | dependencies: 1091 | sax "0.6.x" 1092 | xmlbuilder ">=1.0.0" 1093 | 1094 | xml2js@^0.4.17: 1095 | version "0.4.17" 1096 | resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.17.tgz#17be93eaae3f3b779359c795b419705a8817e868" 1097 | dependencies: 1098 | sax ">=0.6.0" 1099 | xmlbuilder "^4.1.0" 1100 | 1101 | xmlbuilder@>=1.0.0, xmlbuilder@^4.1.0: 1102 | version "4.2.1" 1103 | resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5" 1104 | dependencies: 1105 | lodash "^4.0.0" 1106 | 1107 | xtend@^4.0.0: 1108 | version "4.0.1" 1109 | resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" 1110 | 1111 | yn@^1.2.0: 1112 | version "1.2.0" 1113 | resolved "https://registry.yarnpkg.com/yn/-/yn-1.2.0.tgz#d237a4c533f279b2b89d3acac2db4b8c795e4a63" 1114 | -------------------------------------------------------------------------------- /protractor-typescript/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | tmp 3 | *.js 4 | npm-debug.log* 5 | -------------------------------------------------------------------------------- /protractor-typescript/README.md: -------------------------------------------------------------------------------- 1 | Setup 2 | ===== 3 | 4 | ``` 5 | npm install 6 | ``` 7 | 8 | - Installs node modules 9 | - Protractor node module with TypeScript support 10 | - Installs ambient typing dependencies. 11 | 12 | Testing with TypeScript 13 | ======================= 14 | 15 | ``` 16 | npm test 17 | ``` 18 | 19 | - Transpiles TypeScript 20 | - Runs `webdriver-manager update` to download the ChromeDriver 21 | - Runs the test directly with ChromeDriver 22 | 23 | Note 24 | ---- 25 | 26 | Currently, Protractor typings do not include selenium-webdriver ambient 27 | typings. There is also an ambient typings file for Protractor on Definitely 28 | Typed. Although this does not match up with the current API, this ambient 29 | typings file can still be used to write Protractor with TypeScript. 30 | -------------------------------------------------------------------------------- /protractor-typescript/environment.ts: -------------------------------------------------------------------------------- 1 | export let baseUrl = (process.env.BASE_URL || 'http://localhost:8080'); 2 | export let url = baseUrl; 3 | 4 | url = baseUrl; 5 | if (url !== 'http://localhost:8080') { 6 | url += '/protractor-cookbook'; 7 | } 8 | -------------------------------------------------------------------------------- /protractor-typescript/example-on-prepare/config.ts: -------------------------------------------------------------------------------- 1 | import { browser, Config } from 'protractor'; 2 | 3 | export let config: Config = { 4 | seleniumAddress: 'http://127.0.0.1:4444/wd/hub', 5 | specs: [ '../spec.js' ], 6 | onPrepare: () => { 7 | browser.manage().window().maximize(); 8 | browser.manage().timeouts().implicitlyWait(5000); 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /protractor-typescript/example/config.ts: -------------------------------------------------------------------------------- 1 | import {Config} from 'protractor'; 2 | 3 | export let config: Config = { 4 | seleniumAddress: 'http://127.0.0.1:4444/wd/hub', 5 | specs: [ '../spec.js' ] 6 | }; 7 | -------------------------------------------------------------------------------- /protractor-typescript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "protractor-typescript", 3 | "version": "1.0.0", 4 | "description": "a protractor with typescript example", 5 | "scripts": { 6 | "example": "protractor tmp/example/config.js", 7 | "example-on-prepare": "protractor tmp/example-on-prepare/config.js", 8 | "pretest": "tsc", 9 | "start": "cd ../testapp && npm install && npm start", 10 | "test": "npm run example && npm run example-on-prepare", 11 | "test-external": "export BASE_URL='http://angular.github.io' && npm test", 12 | "test-local": "unset BASE_URL && npm test" 13 | }, 14 | "author": "Craig Nishina ", 15 | "license": "MIT", 16 | "dependencies": { 17 | "protractor": "^5.1.0", 18 | "typescript": "^2.1.5" 19 | }, 20 | "devDependencies": { 21 | "@types/jasmine": "^2.5.41", 22 | "@types/node": "^6.0.62" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /protractor-typescript/spec.ts: -------------------------------------------------------------------------------- 1 | import { ElementFinder, browser, by, element } from 'protractor'; 2 | import * as env from './environment'; 3 | 4 | describe('slow calculator', () => { 5 | beforeEach(() => { 6 | browser.get(env.url + '/ng1/calculator/'); 7 | }); 8 | 9 | it('should add numbers', () => { 10 | element(by.model('first')).sendKeys('4'); 11 | element(by.model('second')).sendKeys('5'); 12 | element(by.id('gobutton')).click(); 13 | 14 | expect(element(by.binding('latest')).getText()).toEqual('9'); 15 | }); 16 | 17 | describe('memory', () => { 18 | let first: ElementFinder; 19 | let second: ElementFinder; 20 | let goButton: ElementFinder; 21 | 22 | beforeEach(() => { 23 | first = element(by.model('first')); 24 | second = element(by.model('second')); 25 | goButton = element(by.id('gobutton')); 26 | }); 27 | 28 | it('should start out with an empty memory', () => { 29 | let memory = element.all(by.repeater('result in memory')); 30 | 31 | expect(memory.count()).toEqual(0); 32 | }); 33 | 34 | it('should fill the memory with past results', () => { 35 | first.sendKeys('1'); 36 | second.sendKeys('1'); 37 | goButton.click(); 38 | 39 | first.sendKeys('10'); 40 | second.sendKeys('20'); 41 | goButton.click(); 42 | 43 | let memory = element.all(by.repeater('result in memory'). 44 | column('result.value')); 45 | memory.then((arr) => { 46 | expect(arr.length).toEqual(2); 47 | expect(arr[0].getText()).toEqual('30'); // 10 + 20 = 30 48 | expect(arr[1].getText()).toEqual('2'); // 1 + 1 = 2 49 | }, 50 | // TODO: remove optional error fn 51 | () => {}); 52 | }); 53 | }); 54 | }); 55 | -------------------------------------------------------------------------------- /protractor-typescript/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "sourceMap": false, 7 | "declaration": false, 8 | "removeComments": false, 9 | "noImplicitAny": false, 10 | "outDir": "tmp", 11 | "types": ["jasmine", "node"] 12 | }, 13 | "exclude": [ 14 | "node_modules" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /protractor-typescript/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/jasmine@^2.5.41": 6 | version "2.5.41" 7 | resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.5.41.tgz#d5e86161a0af80d52062b310a33ed65b051a0713" 8 | 9 | "@types/node@^6.0.46", "@types/node@^6.0.62": 10 | version "6.0.62" 11 | resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.62.tgz#85222c077b54f25b57417bb708b9f877bda37f89" 12 | 13 | "@types/q@^0.0.32": 14 | version "0.0.32" 15 | resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" 16 | 17 | "@types/selenium-webdriver@^2.53.35", "@types/selenium-webdriver@~2.53.39": 18 | version "2.53.39" 19 | resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-2.53.39.tgz#15ff93392c339abd39d6d3a04e715faa9a263cf3" 20 | 21 | adm-zip@0.4.4: 22 | version "0.4.4" 23 | resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.4.tgz#a61ed5ae6905c3aea58b3a657d25033091052736" 24 | 25 | adm-zip@^0.4.7: 26 | version "0.4.7" 27 | resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.7.tgz#8606c2cbf1c426ce8c8ec00174447fd49b6eafc1" 28 | 29 | agent-base@2: 30 | version "2.0.1" 31 | resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.0.1.tgz#bd8f9e86a8eb221fffa07bd14befd55df142815e" 32 | dependencies: 33 | extend "~3.0.0" 34 | semver "~5.0.1" 35 | 36 | ansi-regex@^2.0.0: 37 | version "2.1.1" 38 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 39 | 40 | ansi-styles@^2.2.1: 41 | version "2.2.1" 42 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 43 | 44 | array-union@^1.0.1: 45 | version "1.0.2" 46 | resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" 47 | dependencies: 48 | array-uniq "^1.0.1" 49 | 50 | array-uniq@^1.0.1: 51 | version "1.0.3" 52 | resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" 53 | 54 | arrify@^1.0.0: 55 | version "1.0.1" 56 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 57 | 58 | asn1@~0.2.3: 59 | version "0.2.3" 60 | resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" 61 | 62 | assert-plus@^0.2.0: 63 | version "0.2.0" 64 | resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" 65 | 66 | assert-plus@^1.0.0: 67 | version "1.0.0" 68 | resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" 69 | 70 | asynckit@^0.4.0: 71 | version "0.4.0" 72 | resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" 73 | 74 | aws-sign2@~0.6.0: 75 | version "0.6.0" 76 | resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" 77 | 78 | aws4@^1.2.1: 79 | version "1.5.0" 80 | resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" 81 | 82 | balanced-match@^0.4.1: 83 | version "0.4.2" 84 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" 85 | 86 | bcrypt-pbkdf@^1.0.0: 87 | version "1.0.0" 88 | resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" 89 | dependencies: 90 | tweetnacl "^0.14.3" 91 | 92 | blocking-proxy@0.0.4: 93 | version "0.0.4" 94 | resolved "https://registry.yarnpkg.com/blocking-proxy/-/blocking-proxy-0.0.4.tgz#49016732ac38e8d53a2c7dcd502520aa0e58e044" 95 | dependencies: 96 | minimist "^1.2.0" 97 | 98 | boom@2.x.x: 99 | version "2.10.1" 100 | resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" 101 | dependencies: 102 | hoek "2.x.x" 103 | 104 | brace-expansion@^1.0.0: 105 | version "1.1.6" 106 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" 107 | dependencies: 108 | balanced-match "^0.4.1" 109 | concat-map "0.0.1" 110 | 111 | caseless@~0.11.0: 112 | version "0.11.0" 113 | resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" 114 | 115 | chalk@^1.1.1, chalk@^1.1.3: 116 | version "1.1.3" 117 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 118 | dependencies: 119 | ansi-styles "^2.2.1" 120 | escape-string-regexp "^1.0.2" 121 | has-ansi "^2.0.0" 122 | strip-ansi "^3.0.0" 123 | supports-color "^2.0.0" 124 | 125 | combined-stream@^1.0.5, combined-stream@~1.0.5: 126 | version "1.0.5" 127 | resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" 128 | dependencies: 129 | delayed-stream "~1.0.0" 130 | 131 | commander@^2.9.0: 132 | version "2.9.0" 133 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" 134 | dependencies: 135 | graceful-readlink ">= 1.0.0" 136 | 137 | concat-map@0.0.1: 138 | version "0.0.1" 139 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 140 | 141 | cryptiles@2.x.x: 142 | version "2.0.5" 143 | resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" 144 | dependencies: 145 | boom "2.x.x" 146 | 147 | dashdash@^1.12.0: 148 | version "1.14.1" 149 | resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" 150 | dependencies: 151 | assert-plus "^1.0.0" 152 | 153 | debug@2: 154 | version "2.6.0" 155 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" 156 | dependencies: 157 | ms "0.7.2" 158 | 159 | del@^2.2.0: 160 | version "2.2.2" 161 | resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" 162 | dependencies: 163 | globby "^5.0.0" 164 | is-path-cwd "^1.0.0" 165 | is-path-in-cwd "^1.0.0" 166 | object-assign "^4.0.1" 167 | pify "^2.0.0" 168 | pinkie-promise "^2.0.0" 169 | rimraf "^2.2.8" 170 | 171 | delayed-stream@~1.0.0: 172 | version "1.0.0" 173 | resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" 174 | 175 | ecc-jsbn@~0.1.1: 176 | version "0.1.1" 177 | resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" 178 | dependencies: 179 | jsbn "~0.1.0" 180 | 181 | escape-string-regexp@^1.0.2: 182 | version "1.0.5" 183 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 184 | 185 | exit@^0.1.2: 186 | version "0.1.2" 187 | resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" 188 | 189 | extend@3, extend@~3.0.0: 190 | version "3.0.0" 191 | resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" 192 | 193 | extsprintf@1.0.2: 194 | version "1.0.2" 195 | resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" 196 | 197 | forever-agent@~0.6.1: 198 | version "0.6.1" 199 | resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" 200 | 201 | form-data@~2.1.1: 202 | version "2.1.2" 203 | resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" 204 | dependencies: 205 | asynckit "^0.4.0" 206 | combined-stream "^1.0.5" 207 | mime-types "^2.1.12" 208 | 209 | fs.realpath@^1.0.0: 210 | version "1.0.0" 211 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 212 | 213 | generate-function@^2.0.0: 214 | version "2.0.0" 215 | resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" 216 | 217 | generate-object-property@^1.1.0: 218 | version "1.2.0" 219 | resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" 220 | dependencies: 221 | is-property "^1.0.0" 222 | 223 | getpass@^0.1.1: 224 | version "0.1.6" 225 | resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" 226 | dependencies: 227 | assert-plus "^1.0.0" 228 | 229 | glob@^7.0.3, glob@^7.0.5, glob@^7.0.6: 230 | version "7.1.1" 231 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" 232 | dependencies: 233 | fs.realpath "^1.0.0" 234 | inflight "^1.0.4" 235 | inherits "2" 236 | minimatch "^3.0.2" 237 | once "^1.3.0" 238 | path-is-absolute "^1.0.0" 239 | 240 | globby@^5.0.0: 241 | version "5.0.0" 242 | resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" 243 | dependencies: 244 | array-union "^1.0.1" 245 | arrify "^1.0.0" 246 | glob "^7.0.3" 247 | object-assign "^4.0.1" 248 | pify "^2.0.0" 249 | pinkie-promise "^2.0.0" 250 | 251 | "graceful-readlink@>= 1.0.0": 252 | version "1.0.1" 253 | resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" 254 | 255 | har-validator@~2.0.6: 256 | version "2.0.6" 257 | resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" 258 | dependencies: 259 | chalk "^1.1.1" 260 | commander "^2.9.0" 261 | is-my-json-valid "^2.12.4" 262 | pinkie-promise "^2.0.0" 263 | 264 | has-ansi@^2.0.0: 265 | version "2.0.0" 266 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 267 | dependencies: 268 | ansi-regex "^2.0.0" 269 | 270 | hawk@~3.1.3: 271 | version "3.1.3" 272 | resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" 273 | dependencies: 274 | boom "2.x.x" 275 | cryptiles "2.x.x" 276 | hoek "2.x.x" 277 | sntp "1.x.x" 278 | 279 | hoek@2.x.x: 280 | version "2.16.3" 281 | resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" 282 | 283 | http-signature@~1.1.0: 284 | version "1.1.1" 285 | resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" 286 | dependencies: 287 | assert-plus "^0.2.0" 288 | jsprim "^1.2.2" 289 | sshpk "^1.7.0" 290 | 291 | https-proxy-agent@^1.0.0: 292 | version "1.0.0" 293 | resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz#35f7da6c48ce4ddbfa264891ac593ee5ff8671e6" 294 | dependencies: 295 | agent-base "2" 296 | debug "2" 297 | extend "3" 298 | 299 | inflight@^1.0.4: 300 | version "1.0.6" 301 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 302 | dependencies: 303 | once "^1.3.0" 304 | wrappy "1" 305 | 306 | inherits@2: 307 | version "2.0.3" 308 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 309 | 310 | ini@^1.3.4: 311 | version "1.3.4" 312 | resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" 313 | 314 | is-my-json-valid@^2.12.4: 315 | version "2.15.0" 316 | resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" 317 | dependencies: 318 | generate-function "^2.0.0" 319 | generate-object-property "^1.1.0" 320 | jsonpointer "^4.0.0" 321 | xtend "^4.0.0" 322 | 323 | is-path-cwd@^1.0.0: 324 | version "1.0.0" 325 | resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" 326 | 327 | is-path-in-cwd@^1.0.0: 328 | version "1.0.0" 329 | resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" 330 | dependencies: 331 | is-path-inside "^1.0.0" 332 | 333 | is-path-inside@^1.0.0: 334 | version "1.0.0" 335 | resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" 336 | dependencies: 337 | path-is-inside "^1.0.1" 338 | 339 | is-property@^1.0.0: 340 | version "1.0.2" 341 | resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" 342 | 343 | is-typedarray@~1.0.0: 344 | version "1.0.0" 345 | resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" 346 | 347 | isstream@~0.1.2: 348 | version "0.1.2" 349 | resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" 350 | 351 | jasmine-core@~2.5.2: 352 | version "2.5.2" 353 | resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.5.2.tgz#6f61bd79061e27f43e6f9355e44b3c6cab6ff297" 354 | 355 | jasmine@^2.5.3: 356 | version "2.5.3" 357 | resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.5.3.tgz#5441f254e1fc2269deb1dfd93e0e57d565ff4d22" 358 | dependencies: 359 | exit "^0.1.2" 360 | glob "^7.0.6" 361 | jasmine-core "~2.5.2" 362 | 363 | jasminewd2@^2.0.0: 364 | version "2.0.0" 365 | resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.0.0.tgz#10aacd2c588c1ceb6a0b849f1a7f3f959f777c91" 366 | 367 | jodid25519@^1.0.0: 368 | version "1.0.2" 369 | resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" 370 | dependencies: 371 | jsbn "~0.1.0" 372 | 373 | jsbn@~0.1.0: 374 | version "0.1.0" 375 | resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" 376 | 377 | json-schema@0.2.3: 378 | version "0.2.3" 379 | resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" 380 | 381 | json-stringify-safe@~5.0.1: 382 | version "5.0.1" 383 | resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" 384 | 385 | jsonpointer@^4.0.0: 386 | version "4.0.1" 387 | resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" 388 | 389 | jsprim@^1.2.2: 390 | version "1.3.1" 391 | resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" 392 | dependencies: 393 | extsprintf "1.0.2" 394 | json-schema "0.2.3" 395 | verror "1.3.6" 396 | 397 | lodash@^4.0.0: 398 | version "4.17.4" 399 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" 400 | 401 | mime-db@~1.26.0: 402 | version "1.26.0" 403 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff" 404 | 405 | mime-types@^2.1.12, mime-types@~2.1.7: 406 | version "2.1.14" 407 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee" 408 | dependencies: 409 | mime-db "~1.26.0" 410 | 411 | minimatch@^3.0.2: 412 | version "3.0.3" 413 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" 414 | dependencies: 415 | brace-expansion "^1.0.0" 416 | 417 | minimist@^1.2.0: 418 | version "1.2.0" 419 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" 420 | 421 | minimist@~0.0.1: 422 | version "0.0.10" 423 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" 424 | 425 | ms@0.7.2: 426 | version "0.7.2" 427 | resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" 428 | 429 | oauth-sign@~0.8.1: 430 | version "0.8.2" 431 | resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" 432 | 433 | object-assign@^4.0.1: 434 | version "4.1.1" 435 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 436 | 437 | once@^1.3.0: 438 | version "1.4.0" 439 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 440 | dependencies: 441 | wrappy "1" 442 | 443 | optimist@~0.6.0: 444 | version "0.6.1" 445 | resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" 446 | dependencies: 447 | minimist "~0.0.1" 448 | wordwrap "~0.0.2" 449 | 450 | options@>=0.0.5: 451 | version "0.0.6" 452 | resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" 453 | 454 | os-tmpdir@~1.0.1: 455 | version "1.0.2" 456 | resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 457 | 458 | path-is-absolute@^1.0.0: 459 | version "1.0.1" 460 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 461 | 462 | path-is-inside@^1.0.1: 463 | version "1.0.2" 464 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 465 | 466 | pify@^2.0.0: 467 | version "2.3.0" 468 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 469 | 470 | pinkie-promise@^2.0.0: 471 | version "2.0.1" 472 | resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 473 | dependencies: 474 | pinkie "^2.0.0" 475 | 476 | pinkie@^2.0.0: 477 | version "2.0.4" 478 | resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 479 | 480 | protractor@^5.1.0: 481 | version "5.1.0" 482 | resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.1.0.tgz#d2650f2f1fe69031aad35284eec1ef79a50625a1" 483 | dependencies: 484 | "@types/node" "^6.0.46" 485 | "@types/q" "^0.0.32" 486 | "@types/selenium-webdriver" "~2.53.39" 487 | blocking-proxy "0.0.4" 488 | chalk "^1.1.3" 489 | glob "^7.0.3" 490 | jasmine "^2.5.3" 491 | jasminewd2 "^2.0.0" 492 | optimist "~0.6.0" 493 | q "1.4.1" 494 | saucelabs "~1.3.0" 495 | selenium-webdriver "3.0.1" 496 | source-map-support "~0.4.0" 497 | webdriver-js-extender "^1.0.0" 498 | webdriver-manager "^12.0.1" 499 | 500 | punycode@^1.4.1: 501 | version "1.4.1" 502 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" 503 | 504 | q@1.4.1, q@^1.4.1: 505 | version "1.4.1" 506 | resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" 507 | 508 | qs@~6.3.0: 509 | version "6.3.0" 510 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" 511 | 512 | request@^2.78.0: 513 | version "2.79.0" 514 | resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" 515 | dependencies: 516 | aws-sign2 "~0.6.0" 517 | aws4 "^1.2.1" 518 | caseless "~0.11.0" 519 | combined-stream "~1.0.5" 520 | extend "~3.0.0" 521 | forever-agent "~0.6.1" 522 | form-data "~2.1.1" 523 | har-validator "~2.0.6" 524 | hawk "~3.1.3" 525 | http-signature "~1.1.0" 526 | is-typedarray "~1.0.0" 527 | isstream "~0.1.2" 528 | json-stringify-safe "~5.0.1" 529 | mime-types "~2.1.7" 530 | oauth-sign "~0.8.1" 531 | qs "~6.3.0" 532 | stringstream "~0.0.4" 533 | tough-cookie "~2.3.0" 534 | tunnel-agent "~0.4.1" 535 | uuid "^3.0.0" 536 | 537 | rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4: 538 | version "2.5.4" 539 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" 540 | dependencies: 541 | glob "^7.0.5" 542 | 543 | saucelabs@~1.3.0: 544 | version "1.3.0" 545 | resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.3.0.tgz#d240e8009df7fa87306ec4578a69ba3b5c424fee" 546 | dependencies: 547 | https-proxy-agent "^1.0.0" 548 | 549 | sax@0.6.x: 550 | version "0.6.1" 551 | resolved "https://registry.yarnpkg.com/sax/-/sax-0.6.1.tgz#563b19c7c1de892e09bfc4f2fc30e3c27f0952b9" 552 | 553 | sax@>=0.6.0: 554 | version "1.2.1" 555 | resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" 556 | 557 | selenium-webdriver@3.0.1: 558 | version "3.0.1" 559 | resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-3.0.1.tgz#a2dea5da4a97f6672e89e7ca7276cefa365147a7" 560 | dependencies: 561 | adm-zip "^0.4.7" 562 | rimraf "^2.5.4" 563 | tmp "0.0.30" 564 | xml2js "^0.4.17" 565 | 566 | selenium-webdriver@^2.53.2: 567 | version "2.53.3" 568 | resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz#d29ff5a957dff1a1b49dc457756e4e4bfbdce085" 569 | dependencies: 570 | adm-zip "0.4.4" 571 | rimraf "^2.2.8" 572 | tmp "0.0.24" 573 | ws "^1.0.1" 574 | xml2js "0.4.4" 575 | 576 | semver@^5.3.0: 577 | version "5.3.0" 578 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" 579 | 580 | semver@~5.0.1: 581 | version "5.0.3" 582 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a" 583 | 584 | sntp@1.x.x: 585 | version "1.0.9" 586 | resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" 587 | dependencies: 588 | hoek "2.x.x" 589 | 590 | source-map-support@~0.4.0: 591 | version "0.4.11" 592 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.11.tgz#647f939978b38535909530885303daf23279f322" 593 | dependencies: 594 | source-map "^0.5.3" 595 | 596 | source-map@^0.5.3: 597 | version "0.5.6" 598 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" 599 | 600 | sshpk@^1.7.0: 601 | version "1.10.2" 602 | resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.2.tgz#d5a804ce22695515638e798dbe23273de070a5fa" 603 | dependencies: 604 | asn1 "~0.2.3" 605 | assert-plus "^1.0.0" 606 | dashdash "^1.12.0" 607 | getpass "^0.1.1" 608 | optionalDependencies: 609 | bcrypt-pbkdf "^1.0.0" 610 | ecc-jsbn "~0.1.1" 611 | jodid25519 "^1.0.0" 612 | jsbn "~0.1.0" 613 | tweetnacl "~0.14.0" 614 | 615 | stringstream@~0.0.4: 616 | version "0.0.5" 617 | resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" 618 | 619 | strip-ansi@^3.0.0: 620 | version "3.0.1" 621 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 622 | dependencies: 623 | ansi-regex "^2.0.0" 624 | 625 | supports-color@^2.0.0: 626 | version "2.0.0" 627 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 628 | 629 | tmp@0.0.24: 630 | version "0.0.24" 631 | resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.24.tgz#d6a5e198d14a9835cc6f2d7c3d9e302428c8cf12" 632 | 633 | tmp@0.0.30: 634 | version "0.0.30" 635 | resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed" 636 | dependencies: 637 | os-tmpdir "~1.0.1" 638 | 639 | tough-cookie@~2.3.0: 640 | version "2.3.2" 641 | resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" 642 | dependencies: 643 | punycode "^1.4.1" 644 | 645 | tunnel-agent@~0.4.1: 646 | version "0.4.3" 647 | resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" 648 | 649 | tweetnacl@^0.14.3, tweetnacl@~0.14.0: 650 | version "0.14.5" 651 | resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" 652 | 653 | typescript@^2.1.5: 654 | version "2.1.5" 655 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.1.5.tgz#6fe9479e00e01855247cea216e7561bafcdbcd4a" 656 | 657 | ultron@1.0.x: 658 | version "1.0.2" 659 | resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" 660 | 661 | uuid@^3.0.0: 662 | version "3.0.1" 663 | resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" 664 | 665 | verror@1.3.6: 666 | version "1.3.6" 667 | resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" 668 | dependencies: 669 | extsprintf "1.0.2" 670 | 671 | webdriver-js-extender@^1.0.0: 672 | version "1.0.0" 673 | resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz#81c533a9e33d5bfb597b4e63e2cdb25b54777515" 674 | dependencies: 675 | "@types/selenium-webdriver" "^2.53.35" 676 | selenium-webdriver "^2.53.2" 677 | 678 | webdriver-manager@^12.0.1: 679 | version "12.0.1" 680 | resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.0.1.tgz#878d4b2dc6fd12e5c7df344ac8296c0c26fdeac2" 681 | dependencies: 682 | adm-zip "^0.4.7" 683 | chalk "^1.1.1" 684 | del "^2.2.0" 685 | glob "^7.0.3" 686 | ini "^1.3.4" 687 | minimist "^1.2.0" 688 | q "^1.4.1" 689 | request "^2.78.0" 690 | rimraf "^2.5.2" 691 | semver "^5.3.0" 692 | xml2js "^0.4.17" 693 | 694 | wordwrap@~0.0.2: 695 | version "0.0.3" 696 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" 697 | 698 | wrappy@1: 699 | version "1.0.2" 700 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 701 | 702 | ws@^1.0.1: 703 | version "1.1.1" 704 | resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.1.tgz#082ddb6c641e85d4bb451f03d52f06eabdb1f018" 705 | dependencies: 706 | options ">=0.0.5" 707 | ultron "1.0.x" 708 | 709 | xml2js@0.4.4: 710 | version "0.4.4" 711 | resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.4.tgz#3111010003008ae19240eba17497b57c729c555d" 712 | dependencies: 713 | sax "0.6.x" 714 | xmlbuilder ">=1.0.0" 715 | 716 | xml2js@^0.4.17: 717 | version "0.4.17" 718 | resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.17.tgz#17be93eaae3f3b779359c795b419705a8817e868" 719 | dependencies: 720 | sax ">=0.6.0" 721 | xmlbuilder "^4.1.0" 722 | 723 | xmlbuilder@>=1.0.0, xmlbuilder@^4.1.0: 724 | version "4.2.1" 725 | resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5" 726 | dependencies: 727 | lodash "^4.0.0" 728 | 729 | xtend@^4.0.0: 730 | version "4.0.1" 731 | resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" 732 | -------------------------------------------------------------------------------- /scripts/publish.sh: -------------------------------------------------------------------------------- 1 | EXEC_BRANCH=$(git rev-parse --abbrev-ref HEAD) 2 | 3 | git branch -D gh-pages 4 | git checkout -b gh-pages 5 | 6 | git reset --hard 7 | for file in $(ls .); do 8 | if [ "$file" != "testapp" ]; then 9 | rm -rf $file 10 | fi 11 | done 12 | 13 | cp -r testapp/* . 14 | rm -rf testapp 15 | rm -rf node_modules 16 | rm package.json 17 | rm index.js 18 | git add -A 19 | git commit -m "chore(website): update testapp" 20 | 21 | git checkout "${EXEC_BRANCH}" 22 | -------------------------------------------------------------------------------- /testapp/index.html: -------------------------------------------------------------------------------- 1 | hello world 2 | -------------------------------------------------------------------------------- /testapp/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var app = express(); 3 | var port = 8080; 4 | 5 | app.use(express.static(__dirname)); 6 | app.listen(port, console.log('listening on ' + port)); 7 | -------------------------------------------------------------------------------- /testapp/ng1/calculator/calc.js: -------------------------------------------------------------------------------- 1 | var CalcCtrl = function($timeout, $scope) { 2 | $scope.memory = []; 3 | $scope.latest = 0; 4 | $scope.operators = { 5 | ADDITION: '+', 6 | SUBTRACTION: '-', 7 | MULTIPLICATION: '*', 8 | DIVISION: '/', 9 | MODULO: '%' 10 | }; 11 | $scope.operator = $scope.operators.ADDITION; 12 | 13 | $scope.doAddition = function() { 14 | var times = 5; 15 | $scope.latest = '. '; 16 | $timeout(function tickslowly() { 17 | if (times == 0) { 18 | var latestResult; 19 | var first = parseInt($scope.first); 20 | var second = parseInt($scope.second); 21 | switch ($scope.operator) { 22 | case '+': 23 | latestResult = first + second; 24 | break; 25 | case '-': 26 | latestResult = first - second; 27 | break; 28 | case '*': 29 | latestResult = first * second; 30 | break; 31 | case '/': 32 | latestResult = first / second; 33 | break; 34 | case '%': 35 | latestResult = first % second; 36 | break; 37 | } 38 | $scope.memory.unshift({ 39 | timestamp: new Date(), 40 | first: $scope.first, 41 | operator: $scope.operator, 42 | second: $scope.second, 43 | value: latestResult 44 | }); 45 | $scope.first = $scope.second = ''; 46 | $scope.latest = latestResult; 47 | } else { 48 | $scope.latest += '. '; 49 | times--; 50 | $timeout(tickslowly, 300); 51 | } 52 | }, 300) 53 | }; 54 | }; 55 | 56 | var calculator = angular.module('calculator', []). 57 | controller('CalcCtrl', CalcCtrl); 58 | -------------------------------------------------------------------------------- /testapp/ng1/calculator/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Super Calculator 8 | 9 | 10 |
11 |
12 |

Super Calculator

13 |
14 | 15 | 18 | 19 | 20 |

{{latest}}

21 |
22 |
23 |

History

24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 39 | 40 | 41 |
TimeExpressionResult
32 | {{result.timestamp | date:'mediumTime'}} 33 | 35 | {{result.first}} 36 | {{result.operator}} 37 | {{result.second}} 38 | {{result.value}}
42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /testapp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "testapp", 3 | "version": "1.0.0", 4 | "description": "", 5 | "scripts": { 6 | "start": "node index.js" 7 | }, 8 | "author": "Craig Nishina ", 9 | "license": "MIT", 10 | "dependencies": { 11 | "express": "^4.14.0" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | -------------------------------------------------------------------------------- /tests/jasmine-junit-reports/jasmineJunitReports_spec.ts: -------------------------------------------------------------------------------- 1 | import {TestUtils} from '../testUtils'; 2 | import * as path from 'path'; 3 | 4 | describe('jasmine junit reports', () => { 5 | let output = []; 6 | let lines: string[] = null; 7 | 8 | beforeAll(() => { 9 | let options = { 10 | cwd: 'jasmine-junit-reports', 11 | stdio: 'pipe' 12 | }; 13 | TestUtils.runCommand('npm', ['install'], options); 14 | output = TestUtils.runCommand('npm', ['test'], options); 15 | if (output[1]) { 16 | let contents = output[1].toString(); 17 | lines = contents.split('\n'); 18 | } 19 | }); 20 | 21 | describe('console output', () => { 22 | it('should have console logs', () => { 23 | let findLines = [ 24 | '1) example 1 typing in a name should type name and should fail', 25 | '2) example 2 should list todos and should fail', 26 | '4 specs, 2 failures' 27 | ]; 28 | expect(lines).not.toBeNull(); 29 | expect(TestUtils.checkContents(lines, findLines)).toBeTruthy(); 30 | }); 31 | }); 32 | 33 | describe('junit report', () => { 34 | it('should have output/junitresults-example1.xml', () => { 35 | let filePath = path.resolve('jasmine-junit-reports', 36 | 'output/junitresults-example1.xml'); 37 | let fileLines = TestUtils.getFileLines(filePath); 38 | let findLines = [ 39 | '', 40 | 'errors="0" tests="2" skipped="0" disabled="0" failures="1"']; 41 | expect(fileLines).not.toBeNull(); 42 | expect(TestUtils.checkContents(fileLines, findLines)).toBeTruthy(); 43 | }); 44 | 45 | it('should have output/junitresults-example2.xml', () => { 46 | let filePath = path.resolve('jasmine-junit-reports', 47 | 'output/junitresults-example2.xml'); 48 | let fileLines = TestUtils.getFileLines(filePath); 49 | let findLines = [ 50 | ' { 4 | let output = []; 5 | let lines: string[] = null; 6 | let options = { 7 | cwd: 'protractor-javascript', 8 | stdio: 'pipe' 9 | }; 10 | 11 | beforeAll(() => { 12 | TestUtils.runCommand('npm', ['install'], options); 13 | }); 14 | 15 | describe('example', () => { 16 | beforeAll(() => { 17 | output = TestUtils.runCommand('npm', ['run', 'example'], options); 18 | if (output[1]) { 19 | let contents = output[1].toString(); 20 | lines = contents.split('\n'); 21 | } 22 | }); 23 | 24 | it('console output', () => { 25 | let findLines = [ 26 | '3 specs, 0 failures' 27 | ]; 28 | expect(lines).not.toBeNull(); 29 | expect(TestUtils.checkContents(lines, findLines)).toBeTruthy(); 30 | }); 31 | }); 32 | 33 | describe('example-browserlog', () => { 34 | beforeAll(() => { 35 | output = TestUtils.runCommand('npm', ['run', 'example-browserlog'], options); 36 | if (output[1]) { 37 | let contents = output[1].toString(); 38 | lines = contents.split('\n'); 39 | } 40 | }); 41 | 42 | it('console output', () => { 43 | let findLines = [ 44 | 'log: [ Entry {', 45 | 'level: Level { name_: \'SEVERE\', value_: 1000 },', 46 | 'type: \'\' } ]', 47 | 'log: []', 48 | '3 specs, 0 failures' 49 | ]; 50 | 51 | expect(lines).not.toBeNull(); 52 | expect(TestUtils.checkContents(lines, findLines)).toBeTruthy(); 53 | }); 54 | }); 55 | 56 | describe('example-network', () => { 57 | beforeAll(() => { 58 | output = TestUtils.runCommand('npm', ['run', 'example-network'], options); 59 | if (output[1]) { 60 | let contents = output[1].toString(); 61 | lines = contents.split('\n'); 62 | } 63 | }); 64 | 65 | it('console output', () => { 66 | let findLines = [ 67 | '{ method: \'Network.responseReceived\',', 68 | 'params:', 69 | 'url: \'data:text/html,\' },', 70 | 'type: \'Document\' } }' 71 | ]; 72 | 73 | expect(lines).not.toBeNull(); 74 | expect(TestUtils.checkContents(lines, findLines)).toBeTruthy(); 75 | }); 76 | }); 77 | 78 | describe('example-screenshot', () => { 79 | beforeAll(() => { 80 | output = TestUtils.runCommand('npm', ['run', 'example-screenshot'], options); 81 | if (output[1]) { 82 | let contents = output[1].toString(); 83 | lines = contents.split('\n'); 84 | } 85 | }); 86 | 87 | it('console output', () => { 88 | // still needs to test the screenshots 89 | }); 90 | }); 91 | }); 92 | -------------------------------------------------------------------------------- /tests/protractor-typescript-cucumber/protractorTypeScriptCucumber_spec.ts: -------------------------------------------------------------------------------- 1 | import {TestUtils} from '../testUtils'; 2 | 3 | describe('protractor typescript cucumber', () => { 4 | let output = []; 5 | let lines: string[] = null; 6 | let options = { 7 | cwd: 'protractor-typescript-cucumber', 8 | stdio: 'pipe' 9 | }; 10 | 11 | beforeAll(() => { 12 | TestUtils.runCommand('npm', ['install'], options); 13 | TestUtils.runCommand('npm', ['run', 'pretest'], options); 14 | }); 15 | 16 | describe('test', () => { 17 | beforeAll(() => { 18 | output = TestUtils.runCommand('npm', ['run', 'example'], options); 19 | if (output[1]) { 20 | let contents = output[1].toString(); 21 | lines = contents.split('\n'); 22 | } 23 | }); 24 | 25 | it('console output', () => { 26 | let findLines = [ 27 | '@AddScenario', 28 | 'Scenario: Add two numbers', 29 | '✔ Given I am on ng1 calculator page', 30 | '✔ When I calculate "3" "+" "5"', 31 | '✔ Then the result "8" should be displayed', 32 | 33 | '@SubtractScenario', 34 | 'Scenario: Subtract two numbers', 35 | '✔ Given I am on ng1 calculator page', 36 | '✔ When I calculate "7" "-" "5"', 37 | '✔ Then the result "2" should be displayed', 38 | 'Feature: To test the modulus feature of ng1 calculator', 39 | 40 | '@ModulusScenario', 41 | 'Scenario: Modulus of two numbers', 42 | '✔ Given I am on ng1 calculator page', 43 | '✔ When I calculate "6" "%" "4"', 44 | '✔ Then the result "2" should be displayed', 45 | 46 | 'Feature: To test the multiply & divide feature of ng1 calculator', 47 | '@MultiplyScenario', 48 | 'Scenario: Multiply two numbers', 49 | '✔ Given I am on ng1 calculator page', 50 | '✔ When I calculate "3" "*" "5"', 51 | '✔ Then the result "15" should be displayed', 52 | 53 | '@DivideScenario', 54 | 'Scenario: Divide two numbers', 55 | '✔ Given I am on ng1 calculator page', 56 | '✔ When I calculate "10" "/" "5"', 57 | '✔ Then the result "2" should be displayed', 58 | 59 | '5 passed', 60 | '15 passed' 61 | ]; 62 | expect(lines).not.toBeNull(); 63 | expect(TestUtils.checkContents(lines, findLines)).toBeTruthy(); 64 | }); 65 | }); 66 | }); 67 | -------------------------------------------------------------------------------- /tests/protractor-typescript/protractorTypeScript_spec.ts: -------------------------------------------------------------------------------- 1 | import {TestUtils} from '../testUtils'; 2 | 3 | describe('protractor typescript tests', () => { 4 | let output = []; 5 | let lines: string[] = null; 6 | let options = { 7 | cwd: 'protractor-typescript', 8 | stdio: 'pipe' 9 | }; 10 | 11 | beforeAll(() => { 12 | TestUtils.runCommand('npm', ['install'], options); 13 | TestUtils.runCommand('npm', ['run', 'pretest'], options); 14 | }); 15 | 16 | describe('example', () => { 17 | beforeAll(() => { 18 | output = TestUtils.runCommand('npm', ['run', 'example'], options); 19 | if (output[1]) { 20 | let contents = output[1].toString(); 21 | lines = contents.split('\n'); 22 | } 23 | }); 24 | 25 | it('console output', () => { 26 | let findLines = [ 27 | '3 specs, 0 failures' 28 | ]; 29 | expect(lines).not.toBeNull(); 30 | expect(TestUtils.checkContents(lines, findLines)).toBeTruthy(); 31 | }); 32 | }); 33 | 34 | describe('example on prepare', () => { 35 | beforeAll(() => { 36 | output = TestUtils.runCommand('npm', ['run', 'example-on-prepare'], options); 37 | if (output[1]) { 38 | let contents = output[1].toString(); 39 | lines = contents.split('\n'); 40 | } 41 | }); 42 | 43 | it('console output', () => { 44 | let findLines = [ 45 | '3 specs, 0 failures' 46 | ]; 47 | expect(lines).not.toBeNull(); 48 | expect(TestUtils.checkContents(lines, findLines)).toBeTruthy(); 49 | }); 50 | }); 51 | }); 52 | -------------------------------------------------------------------------------- /tests/spec/support/jasmine.json: -------------------------------------------------------------------------------- 1 | { 2 | "spec_dir": "", 3 | "spec_files": [ 4 | "tests/**/*_spec.js" 5 | ], 6 | "stopSpecOnExpectationFailure": false, 7 | "random": false 8 | } 9 | -------------------------------------------------------------------------------- /tests/testUtils.ts: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs'; 2 | import * as path from 'path'; 3 | import * as child_process from 'child_process'; 4 | let spawnSync = child_process.spawnSync; 5 | 6 | export class TestUtils { 7 | /** 8 | * Run a terminal command. 9 | * @param {string} task 10 | * @param {string[]} taskArgs arguments to the task 11 | * @param {Object} options 12 | */ 13 | static runCommand(task: string, args: string[], options: any): string[] { 14 | let child = spawnSync(task, args, options); 15 | return child.output; 16 | } 17 | 18 | /** 19 | * Read the file contents and return a list of lines. 20 | * @param {string} file the file path 21 | * @returns {string[]} lines of a file 22 | */ 23 | static getFileLines(filePath: string): string[] { 24 | let contents = fs.readFileSync(filePath).toString(); 25 | let lines = contents.split('\n'); 26 | return lines; 27 | } 28 | 29 | /** 30 | * Check if contents contains a line. 31 | * @param {string} check 32 | * @param {string[]} file contents 33 | * @returns {boolean} if the line exists, return true 34 | */ 35 | static checkContent(content: string, fileLines: string[]): boolean { 36 | for (let pos = 0; pos < fileLines.length; pos++) { 37 | let line = fileLines[pos]; 38 | if (line.indexOf(content) >= 0) { 39 | return true; 40 | } 41 | } 42 | return false; 43 | } 44 | 45 | static checkContents(lines: string[], findLines: string[]): boolean { 46 | let found = true; 47 | findLines.forEach(line => { 48 | found = found && TestUtils.checkContent(line, lines); 49 | }); 50 | if (!found) { 51 | console.log(lines.join('\n')); 52 | } 53 | return found; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "sourceMap": false, 7 | "declaration": false, 8 | "removeComments": false, 9 | "noImplicitAny": false, 10 | "types": ["jasmine", "node"] 11 | }, 12 | "include": [ 13 | "tests/**/*" 14 | ], 15 | "exclude": [ 16 | "jasmine-junit-reports", 17 | "node_modules", 18 | "protractor-docker", 19 | "protractor-javascript", 20 | "protractor-typescript", 21 | "protractor-typescript-cucumber", 22 | "scripts", 23 | "testapp" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": [ 3 | "node_modules/vrsource-tslint-rules/rules", 4 | "node_modules/tslint-eslint-rules/dist/rules" 5 | ], 6 | "rules": { 7 | "no-duplicate-imports": true, 8 | "no-duplicate-variable": true, 9 | "no-jasmine-focus": true, 10 | "no-var-keyword": true, 11 | "semicolon": [true], 12 | "variable-name": [true, "ban-keywords"], 13 | "no-inner-declarations": [true, "function"] 14 | } 15 | } 16 | --------------------------------------------------------------------------------