Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit ac1e21e

Browse files
committedNov 16, 2015
chore(plugins): Split first party plugins into seperate repos
1 parent 7015010 commit ac1e21e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+34
-4450
lines changed
 

Diff for: ‎docs/plugins.md

+33-133
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ The `plugins` folder contains default plugins for Protractor.
1212
##In this document:
1313
* [Using Plugins](/docs/plugins.md#using-plugins)
1414
* [Writing Plugins](/docs/plugins.md#writing-plugins)
15-
* Default Plugins
16-
* [Accessibility Plugin](/docs/plugins.md#accessibility-plugin)
17-
* [ngHint Plugin](/docs/plugins.md#nghint-plugin)
18-
* [Timeline Plugin](/docs/plugins.md#timeline-plugin)
19-
* [Console Plugin](/docs/plugins.md#console-plugin-chrome-only)
15+
* [First Party Plugins](/docs/plugins.md#first-party-plugins)
2016
* [Community Plugins](/docs/plugins.md#community-plugins)
2117

2218
Using Plugins
@@ -290,145 +286,49 @@ exports.addWarning(message, options);
290286
If you specify any of these properties in your plugin file, they will be
291287
overwritten.
292288

293-
Accessibility Plugin
294-
--------------------
295-
Protractor comes with support for two accessibility testing options:
296-
* Accessibility Developer Tools
297-
* Tenon.io
298-
299-
Protractor will run each set of audits (depending on your configuration) on your existing end-to-end
300-
tests to ensure your site is free of obvious errors. In this kind of testing, there is no concept of
301-
"warnings"–only pass or fail. In your configuration, you can decide whether warnings should
302-
pass or fail your build.
303-
304-
To understand how each of these tools can be used, see this support matrix:
305-
306-
| Testing Library | Pricing | API Key | External Request | No. of Tests | Info |
307-
|--------------------------------------|-------------------------------------------|---------|------------------|--------------|-------------------------------------------------------------------------|
308-
| Chrome Accessibility Developer Tools | Free | No | No | 14 | [Github](https://github.com/GoogleChrome/accessibility-developer-tools) |
309-
| Tenon.io | Free limited accounts, paid subscriptions | Yes | Yes | 63 | [Tenon.io](http://tenon.io/) |
310-
311-
Protractor now supports the [Accessibility Developer Tools](https://github.com/GoogleChrome/accessibility-developer-tools), the same audit library used by the [Chrome browser extension](https://chrome.google.com/webstore/detail/accessibility-developer-t/fpkknkljclfencbdbgkenhalefipecmb?hl=en). Protractor
312-
[runs an audit](https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules)
313-
locally by injecting the Dev Tools script into WebDriver pages, and it can diagnose issues including
314-
missing labels, incorrect ARIA attributes and color contrast. This is a great starting point if
315-
you can't send source code over the wire through an API.
316-
317-
[Tenon.io](http://www.tenon.io) has a more robust set of tests to help you find
318-
accessibility issues, but it requires [registering](http://tenon.io/register.php) for an API key
319-
and making an external request for each test, which may not work for everyone. Some people use
320-
Tenon with introspection services like ngrok or localtunnel to securely
321-
test local web servers. Protractor takes the [options you provide](http://tenon.io/documentation/understanding-request-parameters.php) in the plugin configuration and sends them
322-
with the page source to the Tenon API. One limitation of this approach is that all scripts must be reachable from the page source as a string, for example, by using a CDN.
323-
For projects with an MIT license, Tenon is free but with a limited
324-
daily API limit. Paid subscriptions are available for enterprise and commercial projects.
325-
326-
Enable this plugin in your config file:
327-
```js
328-
// Chrome Accessibility Dev Tools only:
329-
exports.config = {
330-
...
331-
plugins: [{
332-
chromeA11YDevTools: {
333-
treatWarningsAsFailures: true
334-
},
335-
path: 'node_modules/protractor/plugins/accessibility'
336-
}]
337-
}
338-
```
339-
```js
340-
// Tenon.io only:
341-
exports.config = {
342-
...
343-
plugins: [{
344-
tenonIO: {
345-
options: {
346-
// See http://tenon.io/documentation/understanding-request-parameters.php
347-
// options.src will be added by the test.
348-
},
349-
printAll: false, // whether the plugin should log API response
350-
},
351-
chromeA11YDevTools: true,
352-
path: 'node_modules/protractor/plugins/accessibility'
353-
}]
354-
}
355-
```
356-
357-
ngHint Plugin
358-
-------------
359-
ngHint adds run-time hinting to AngularJS projects. This plugin bubbles those hints up to the
360-
command line so they can be used in automated testing.
361-
362-
You enable this plugin in your config file:
363-
```js
364-
exports.config = {
365-
plugins: [{
366-
path: 'node_modules/protractor/plugins/ngHint',
367-
368-
asTests: {Boolean},
369-
excludeURLs: {(String|RegExp)[]}
370-
}]
371-
};
372-
```
373-
`asTests` specifies if the plugin should generate passed/failed test results
374-
based on the ngHint output or instead log the results to the console.
375-
Defaults to true.
376-
377-
`excludeURLs` specifies a list of URLs for which ngHint results should be
378-
ignored. Defaults to []
379-
380-
Timeline Plugin
381-
---------------
382-
This plugin gathers test timeline information from the protractor test process, the selenium
383-
client logs (if available), and sauce labs (if available), and presents the output visually.
384-
This improves understanding of where latency issues are in tests.
289+
First Party Plugins
290+
-------------------
385291

386-
To enable the Timeline plugin, set it up in your config file:
387-
```js
388-
exports.config = {
389-
plugins: [{
390-
path: 'node_modules/protractor/plugins/timeline/index.js',
292+
* Accessibility Plugin
391293

392-
// Output json and html will go in this folder.
393-
outdir: 'timelines',
294+
The accessibility plugin runs a set of accessibility audits on your webapp.
295+
It is published at the npm module [`protractor-accessibility-plugin`]
296+
(https://www.npmjs.com/package/protractor-accessibility-plugin) and stored at
297+
the github repo [angular/protractor-accessibility-plugin]
298+
(https://github.com/angular/protractor-accessibility-plugin).
394299

395-
// Optional - if sauceUser and sauceKey are specified, logs from
396-
// SauceLabs will also be parsed after test invocation.
397-
sauceUser: 'Jane',
398-
sauceKey: 'abcdefg'
399-
}],
400-
// other configuration settings
401-
};
402-
```
300+
* Timeline Plugin
403301

302+
The timeline plugin gathers test timeline information from various sources and
303+
presents the output visually. This improves understanding of where latency
304+
issues are in tests. It is published at the npm module
305+
[`protractor-timeline-plugin`]
306+
(https://www.npmjs.com/package/protractor-timeline-plugin) and stored at the
307+
github repo [angular/protractor-timeline-plugin]
308+
(https://github.com/angular/protractor-timeline-plugin).
404309

405-
Console Plugin (Chrome only)
406-
----------------------------
310+
* ngHint Plugin
407311

408-
This plugin checks the browser log after each test for warnings and errors. It
409-
can be configured to fail a test if either is detected. There is also an
410-
optional exclude parameter which accepts both regex and strings. Any log
411-
matching the exclude parameter will not fail the test or be logged to the
412-
console. A false setting to logWarnings also overrides the failOnWarning setting.
312+
The ngHint plugin uses [Angular Hint](https://github.com/angular/angular-hint)
313+
to generate run-time hinting and then turns these hints into Protractor tests.
314+
It is published at the npm module [`protractor-ng-hint-plugin`]
315+
(https://www.npmjs.com/package/protractor-ng-hint-plugin) and stored at the
316+
github repo [angular/protractor-ng-hint-plugin]
317+
(https://github.com/angular/protractor-ng-hint-plugin).
413318

414-
```js
415-
exports.config = {
416-
plugins: [{
417-
path: 'node_modules/protractor/plugins/console',
418-
failOnWarning: {Boolean} (Default - false),
419-
failOnError: {Boolean} (Default - true),
420-
logWarnings: {Boolean} (Default - true),
421-
exclude: {Array of strings and regex} (Default - [])
422-
}]
423-
};
424-
```
319+
* Console Plugin (Chrome Only)
425320

426-
Note that this plugin's behavior is undefined on browsers other than Chrome.
427-
Firefox users have reported flaky results.
321+
The console plugin checks the browser log after each test for warnings and
322+
errors. It is published at the npm module [`protractor-console-plugin`]
323+
(https://www.npmjs.com/package/protractor-console-plugin) and stored at the
324+
github repo [angular/protractor-console-plugin]
325+
(https://github.com/angular/protractor-console-plugin).
428326

429327
Community Plugins
430328
-----------------
431329

432-
This list is here for reference and the plugins included are not developed or mantained by protractor's team by any means. If you find any issues with this plugins please report them to the corresponding plugin developer.
330+
This list is here for reference and the plugins included are not developed or
331+
mantained by protractor's team by any means. If you find any issues with this
332+
plugins please report them to the corresponding plugin developer.
433333

434334
* [Protractor testability plugin](https://github.com/alfonso-presa/protractor-testability-plugin): this plugins enables synchronous testing with protractor for features that are not developed using the services provided by AngularJS, preventing the need of additional waits coded in the tests. This happens for example if you have WebSockets communication with the server or for web applications built with frameworks different than AngularJS.

Diff for: ‎plugins/README.md

-1
This file was deleted.

0 commit comments

Comments
 (0)
This repository has been archived.