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 - Copy/Paste/Rename
.env.example->.envand fill any needed values - 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 interpreterandPackage managerare pointing to thenvmversion (ex/home/user/.nvm/versions/node/v14.16.1/bin/node)- Click on the
...button - Click on the
+button - Click on
Add WSLif you are using WSL,Add localotherwise - From the
Node.js interpreterdropdown, choose the one that is inside the.nvmfodler - Click
OK->OK->Apply
- Click on the
- Validate that the
Package managerhas also been updated to the.nvmpath
- 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:openrunsbin/start_cypress.sh. This also fixes the problem withDISPLAYenv variable not being set when thisnpmaction 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.shchmod +x ./bin/start_cypress.sh
- Copy/Paste/Rename
cypress.env.json.exampletocypress.env.jsonand 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