]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: npm run e2e:dev 25136/head
authorStephan Müller <smueller@suse.com>
Fri, 16 Nov 2018 14:39:53 +0000 (15:39 +0100)
committerStephan Müller <smueller@suse.com>
Fri, 16 Nov 2018 15:55:20 +0000 (16:55 +0100)
The new command introduced will make developing e2e tests faster, as
Protractor will attach to the running development server that was
previously started running 'npm start'.

Fixes: https://tracker.ceph.com/issues/37291
Signed-off-by: Stephan Müller <smueller@suse.com>
src/pybind/mgr/dashboard/HACKING.rst
src/pybind/mgr/dashboard/frontend/package.json

index afc04458256133c941de0b038d15742cd19b74d0..09c2bd0799d3c39cece8f0357725e8f44cbf107a 100644 (file)
@@ -153,6 +153,16 @@ Note:
   When using docker, as your device, you might need to run the script with sudo
   permissions.
 
+Writing End-to-End Tests
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+When writing e2e tests you don't want to recompile every time from scratch to
+try out if your test has succeeded. As usual you have your development server
+open (``npm start``) which already has compiled all files. To attach
+`Protractor <http://www.protractortest.org/>`__ to this process, instead of
+spinning up it's own server, you can use ``npm run e2e -- --dev-server-target``
+or just ``npm run e2e:dev`` which is equivalent.
+
 Further Help
 ~~~~~~~~~~~~
 
index cd12a536e81a17a5ec8fb83eb645200b73624019..d3a3aae28d04bf289442f2577a08f49caccb984f 100644 (file)
@@ -10,6 +10,7 @@
     "test": "jest --watch",
     "test:ci": "JEST_SILENT_REPORTER_DOTS=true jest --coverage --reporters jest-silent-reporter",
     "e2e": "ng e2e",
+    "e2e:dev": "ng e2e --dev-server-target",
     "lint:tslint": "ng lint",
     "lint:prettier": "prettier --list-different \"{src,e2e}/**/*.{ts,scss}\"",
     "lint:html": "html-linter --config html-linter.config.json",