Online Prod http://worklog.odds.team/
Online Dev http://worklog-dev.odds.team:32835/
This project was generated with Angular CLI version 6.2.3.
Build docker build -t odds-worklog:prod .
Run docker run --name web-odds-worklog -p 80:80 odds-workslog:prod
Navigate to http://localhost
Login docker login registry.odds.team
Run docker run --name web-odds-worklog -p 80:80 --rm registry.odds.team/worklog/web.odds-worklog:prod
Node version v18.16.0
refs:
FROM trion/ng-cli-e2e:15.2.7inDockerfile.ngular-cli=15.2.7 node=18.16.0in trion/ng-cli-e2e:15.2.7enginesinpackage.json
Since our Angular is very old, we need to install with --legacy-peer-deps
npm i --legacy-peer-deps
Run ng serve for a dev server that connects the app to the API on https://worklog-dev.odds.team/.
If you want to connect the app to the API on http://localhost:8080, use the following command:
ng serve --configuration localNavigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Alternatively, you can run the command below as well. This will run the ng in the node_modules/.bin folder.
npm run ng serve -- --configuration localNote: The -- separator means we want to pass the params to the script via the npm command.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.
To execute the unit tests via Karma,
make test
If you get an error and want to use your Chrome instead of puppeteer's Chrome
CHROME_BIN="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" npm t
E2E tests use Cucumber.js with Playwright.
- Docker services running (MongoDB, Keycloak, Backend API) via
docker compose -f api.odds-worklog/deployment/local/docker-compose.yaml up -d - Frontend dev server running on
http://localhost:4200(make run) - Playwright browsers installed:
cd e2e/cucumber && npx playwright install
make e2eTo run a specific scenario by tag:
make e2e ARGS="--tags @admin-login"Users are defined in api.odds-worklog/realm-export.json (Keycloak).
| Username | Password | Purpose |
|---|---|---|
e2e |
s3cr3t |
Individual user tests (registration, add/edit/get income) |
e2e-admin |
s3cr3t |
Admin tests (export income) |
The admin role is set directly in MongoDB during the test, not through Keycloak or the registration UI.
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.