This project contains the TIM reference implementation of a OrgAdmin Client instance.
- Forked from https://github.com/Awesome-Technologies/synapse-admin, version: 0.8.5
- Original readme: README_ORIGINAL.md
-
Create a
.env-file (do not check into git!) with the following content.REACT_APP_REGSERVICE_TOKEN=REDACTED REACT_APP_VERSION=$npm_package_version REACT_APP_VZD=https://org-admin-client.eu.timref.akquinet.nx2.dev/vzd REGSERVICE_OPENID_TOKEN=REDACTED
You can find the REDACTED values in gitlab: Settings->CI/CD->Variables.
-
Use
./local-server/run-synapse-server.shto start a local synapse server with useradminand passwordadminand port 8008. -
Use
yarn installto install all dependencies -
Use
yarn startto start the UI at http://localhost:3000/To use all features of the orgAdmin, you also need an owner token. How to get this is described in the README-vzdauth.md
-
Use
yarn test --watchAll=falseto run tests (yarn testfor watch mode). -
Use
yarn run fixto autofix code style violations 🤞.
The deployment to stage RU is configured to be triggered manually. Before triggering the deployment, make sure you increased the app version in package.json following these guidelines: https://legacy.reactjs.org/docs/faq-versioning.html For deployment to RU: Select the pipeline of the last commit on develop branch and run the step 'deploy-ru'.
A local Chrome browser is required for a local setup!
-
Create the file
e2e/cypress.env.json(do not check into git!) with the following content:{ "HOME_SERVER_URL": "https://your-homeserver.dev", "ORG_ADMIN_USERNAME": "REDACTED", "ORG_ADMIN_PASSWORD": "REDACTED" }You can find the REDACTED values in gitlab: Settings->CI/CD->Variables.
-
To run cypress tests locally pass in the required environment variables like this
CYPRESS_ORG_ADMIN_PASSWORD=REDACTED REACT_APP_REGSERVICE=https://registrierungs-dienst.eu.timref.akquinet.nx2.dev/backend/regservice REACT_APP_REGSERVICE_TOKEN=REDACTED REACT_APP_VZD=https://org-admin-client.eu.timref.akquinet.nx2.dev/vzd yarn e2e
You can find the REDACTED values in gitlab: Settings->CI/CD->Variables.
Required react app to be running: yarn start
cd e2e
yarn cypress openVideos and Screenshots of your latest testrun are saved in e2e/cypress/videos and e2e/cypress/snapshot.
Sometimes click events fail, because the clickable element is not visible on the screen. You can solve this, by setting a reasonable viewport if the problem is, that the default window is smaller than expected:
beforeEach("before all tests login", () => {
cy.viewport('macbook-16');
});It can also happen, that the dom just does not correctly scroll to the element or even that the click event scrolls away. An example solution would be to scroll the clickable element into view and disable the scroll behaviour of the click:
cy
.contains("Delete")
.scrollIntoView()
.click({scrollBehavior: false});