Moved to https://developers.parley.nu/docs/introduction-2
(the pages are unlisted at the moment until the official release of version 2)
To help develop this library you will need to set-up you environment. Follow the steps below to get started.
Due to some limitations we require you to install your project on your WSL host (if you are on windows). You can find more info on how to enable WSL on windows 10 here: https://docs.microsoft.com/en-us/windows/wsl/install-win10
- Make sure your (wsl) hosts file contains the following
127.0.0.1 chat-dev.parley.nu
- Copy chat-dev.parley.nu cert into
ssl/ssl.cert
- Copy chat-dev.parley.nu key into
ssl/ssl.key
- Set/Install the node version we use (install nvm first if you do not have it)
nvm use nvm install-latest-npm
- When using PHPStorm as your IDE:
- Open settings page
File -> Settings
(orCTRL+ALT+S
)
- Navigate to
Languages & Frameworks
->Node.js and NPM
- Make sure your
Node interpreter
andPackage manager
are pointing to thenvm
version (ex/home/user/.nvm/versions/node/v14.16.1/bin/node
)- Click on the
...
button - Click on the
+
button - Click on
Add WSL
if you are using WSL,Add local
otherwise - From the
Node.js interpreter
dropdown, choose the one that is inside the.nvm
fodler - Click
OK
->OK
->Apply
- Click on the
- Validate that the
Package manager
has also been updated to the.nvm
path
- Open settings page
- Install dependencies
npm install
- Run the npm start-up command
npm start
- Install the following: https://docs.cypress.io/guides/getting-started/installing-cypress#UbuntuDebian
- Next install Cypress with NPM: https://docs.cypress.io/guides/getting-started/installing-cypress#npm-install
WSL can't (yet) open GUI applications on its own, that's why we need additional setup: https://nickymeuleman.netlify.app/blog/gui-on-wsl2-cypressThis is not necessary anymore due tonpm run cy:open
runsbin/start_cypress.sh
. This also fixes the problem withDISPLAY
env variable not being set when thisnpm
action is run through PhpStorm.- (optional) For every browser you want to test you'll need to install it in your WSL environment
Here is how to install chromewget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo apt -y install ./google-chrome-stable_current_amd64.deb rm google-chrome-stable_current_amd64.deb
- Give execute access to
/bin/start_cypress.sh
chmod +x ./bin/start_cypress.sh
- Copy/Paste/Rename
cypress.env.json.example
tocypress.env.json
and fill in the variablesauthorizationHeader
: The authorization header used for tests where the client needs to log in. Can be acquired from https://admin.parley.nu/account/0cce5bfcdbf07978b269/settings/authorization
npm run cy:open