From 9a47ff833d465b1cf264ab2a931cf40ed248f981 Mon Sep 17 00:00:00 2001 From: Dmytro Shpakovskyi Date: Tue, 31 Jan 2017 23:13:08 +0200 Subject: [PATCH] docs(developers): add fixes and links to DEVELOPER.md (#4043) --- DEVELOPER.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/DEVELOPER.md b/DEVELOPER.md index cd3a8e9d4..fa7e9ffdb 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -1,6 +1,6 @@ # Building and Testing Protractor -This document describes building, testing, and releasing Protractor, and provides an overview of +This document describes building, testing, releasing Protractor and provides an overview of the repository layout. ## Prerequisite software @@ -10,13 +10,13 @@ https://github.com/angular/angular/blob/master/DEVELOPER.md#prerequisite-softwar ## Getting the sources -Fork Protractor from github, then clone your fork with +Fork Protractor from github, then clone your fork with: -``` +```shell git clone git@github.com:/protractor.git # Go to the Protractor directory: -cd protractor +cd protractor/ # Add the main protractor repository as an upstream remote to your repository: git remote add upstream https://github.com/angular/protractor.git @@ -24,17 +24,17 @@ git remote add upstream https://github.com/angular/protractor.git ## Installing and Building -All Protractor dependencies come from npm. Install with +All Protractor dependencies come from npm. Install with: -``` -npm Install +```shell +npm install ``` This will also trigger our build step. The build step runs the TypeScript compiler and copies necessary files into the output `built` directory. To run the build step independently, run: -``` +```shell npm run prepublish ``` @@ -48,16 +48,16 @@ the CI will fail and the PR can not be merged. You can automatically format your code by running: -``` +```shell npm run format ``` You can check that you will pass lint tests with: -``` +```shell gulp lint -# or if you don't have gulp installed globally +# or if you don't have gulp installed globally: ./node_modules/.bin/gulp lint ``` @@ -68,13 +68,13 @@ gulp lint `scripts/` contains scripts used for CI setup and running tests. `spec/` contains e2e and unit tests and configuration files for tests. `testapp/` contains the code for the Angular applications that e2e tests run against. -`website/` contains code for generating Protractor API documentation and the website at protractortest.org +`website/` contains code for generating Protractor API documentation and the website at protractortest.org. Most of the code is written in TypeScript, with the exception of a few js files. -`lib/debugger` is for element explorer, `browser.pause`, and `browser.explore` -`lib/driverProviders` controls how WebDriver instances are created -`lib/frameworks` contains adapters for test frameworks such as Jasmine and Mocha +`lib/debugger` is for element explorer, `browser.pause` and `browser.explore`. +`lib/driverProviders` controls how WebDriver instances are created. +`lib/frameworks` contains adapters for test frameworks such as Jasmine and Mocha. `lib/selenium-webdriver` and `lib/webdriver-js-extender` are used ONLY for API documentation generation. ## Lightning Code Walkthrough @@ -86,14 +86,14 @@ TBD. Run `npm test` to run the full test suite. This assumes that you have the testapp and a selenium server running. Start these as separate processes with: -``` +```shell webdriver-manager update webdriver-manager start ``` and -``` +```shell npm start ``` @@ -105,7 +105,7 @@ The suite contains unit tests, end to end tests using the built binary, and inte Interactive tests are for testing `browser.pause` and element explorer. End to end tests all have configuration files which live in `spec/`. Many tests do not need -an actual Selenium server backing them, and use the `mockSelenium` configuration, which saves +an actual Selenium server backing them and use the `mockSelenium` configuration, which saves time by not connecting to a real selenium server. ## Important dependencies @@ -113,20 +113,20 @@ time by not connecting to a real selenium server. Protractor has very close dependencies with several other projects under the Angular umbrella: `jasminewd2` is an extension of the Jasmine test framework that adds utilities for -working with selenium-webdriver. github.com/angular/jasminewd +working with selenium-webdriver. [jasminewd](https://github.com/angular/jasminewd) `blocking-proxy` is a separate binary, which handles traffic between a test script and webdriver. It can be turned on via a protractor configuration file, and in the future all logic to wait for Angular will be handled through the blocking proxy. -github.com/angular/blocking-proxy +[blocking-proxy](https://github.com/angular/blocking-proxy) `webdriver-manager` is a separate binary which manages installing and starting up the various binaries necessary for running webdriver tests. These binaries include specific drivers for various browsers (e.g. chromedriver) and the selenium standalone -server. +server. [webdriver-manager](https://github.com/angular/webdriver-manager) `webdriver-js-extender` extends selenium-webdriver to add Appium commands. -github.com/angular/webdriver-js-extender +[webdriver-js-extender](https://github.com/angular/webdriver-js-extender) ## Continuous Integration