Merge pull request #1472 from ether/plugin-test-dcs

docs for plugin-defined specs
pull/728/merge
Marcel Klehr 2013-02-09 07:57:33 -08:00
commit ab04a4e511
1 changed files with 13 additions and 1 deletions

View File

@ -105,3 +105,15 @@ Your plugin must also contain a [package definition file](http://npmjs.org/doc/j
## Templates
If your plugin adds or modifies the front end HTML (e.g. adding buttons or changing their functions), you should put the necessary HTML code for such operations in `templates/`, in files of type ".ejs", since Etherpad-Lite uses EJS for HTML templating. See the following link for more information about EJS: <https://github.com/visionmedia/ejs>.
## Writing and running front-end tests for your plugin
Etherpad allows you to easily create front-end tests for plugins.
1. Create a new folder
```
%your_plugin%/static/tests/frontend
```
2. Put your spec file in here (Example spec files are visible in %etherpad_root_folder%/frontend/tests)
3. Visit http://yourserver.com/frontend/tests your front-end tests will run.