From 386eb73c5a3935125c7d611f5dc851c779015c18 Mon Sep 17 00:00:00 2001 From: Mark <mark@openappstack.net> Date: Tue, 5 Nov 2019 17:25:59 +0100 Subject: [PATCH] Add Readme for testing --- frontend/README.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/frontend/README.md b/frontend/README.md index 2b91ffa..5140968 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -3,7 +3,7 @@ After installing `npm` run ``` -npm install +npm install --production ``` Start the application in debug mode with @@ -19,11 +19,16 @@ npm run build npm run start ``` +or + +``` +npm build-start +``` ### Configuration Configuration has to be specified in `nuxt.config.js`. Setting the OpenID Connect paramaters -correctly is essential for the login process to work +correctly is essential for the login process to work. For details on how to configure authentication for external providers like GitHub or Facebook please refer to [the nuxt-oauth documentation](https://auth.nuxtjs.org/schemes/oauth2.html) @@ -41,3 +46,20 @@ your browser to the URL. Note that you need to manually provide a cookie containing the Baerer token in case you don't access the api with a browser that automatically includes your cookie in the request. Passing the token as a GET or POST variable is not supported. + + +### Run the tests + +Install the development dependencies with + +``` +npm install # without --production +``` +Configure the application as described above. +After creating a regular user and an admin user by assigning the role `admin` to the admin +user and granting both users access to the `user-panel` application, configure the default +values in `test/nightwatch_globals.js`. After that, run `npm test`. + +Note: E2E tests are executed with chromedriver. Make sure that you have a supported version +of chromium installed. To downgrade the chromium version that is used in the tests, change +the version number in `package.json` [accordingly](https://www.npmjs.com/package/chromedriver). -- GitLab