From bb1d4626126ace07c02b8bc935df45b401439539 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 9 Feb 2013 15:45:00 +0000 Subject: [PATCH] plugin test docs --- doc/plugins.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/plugins.md b/doc/plugins.md index afa01316b..4b09eb424 100644 --- a/doc/plugins.md +++ b/doc/plugins.md @@ -104,4 +104,16 @@ 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: . \ No newline at end of file +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: . + +## 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.