#1247 #1248 Feat: Cypress UI testing + Postgres Arg for installer

This commit is contained in:
Varun 2023-10-26 13:38:02 +11:00
parent 9eb4ae7f5a
commit 0352ef5574
4 changed files with 9 additions and 8 deletions

View file

@ -46,6 +46,7 @@ Wait for 5 minutes for ERPNext site to be created or check `create-site` contain
- [Development using containers](docs/development.md)
- [Bench Console and VSCode Debugger](docs/bench-console-and-vscode-debugger.md)
- [Connect to localhost services](docs/connect-to-localhost-services-from-containers-for-local-app-development.md)
### [Troubleshoot](docs/troubleshoot.md)
# Contributing

View file

@ -12,7 +12,7 @@ services:
volumes:
- mariadb-data:/var/lib/mysql
# # Enable PostgreSQL only if you use it, see development/README.md for more information.
# Enable PostgreSQL only if you use it, see development/README.md for more information.
# postgresql:
# image: postgres:11.8
# environment:

View file

@ -136,7 +136,6 @@ def init_bench_if_not_exist(args):
init_command += f"--frappe-branch={args.frappe_branch} "
init_command += f"--apps_path={args.apps_json} "
init_command += args.bench_name
print(init_command)
command = [
"/bin/bash",
"-i",
@ -229,7 +228,6 @@ def create_site_in_bench(args):
f"--db-root-password=123", # Replace with your PostgreSQL password
f"--admin-password={args.admin_password}",
]
print(new_site_cmd)
apps = os.listdir(f"{os.getcwd()}/{args.bench_name}/apps")
apps.remove("frappe")
for app in apps:

View file

@ -248,7 +248,8 @@ For command help
```shell
python installer.py --help
usage: installer.py [-h] [-j APPS_JSON] [-b BENCH_NAME] [-s SITE_NAME] [-r FRAPPE_REPO] [-t FRAPPE_BRANCH] [-p PY_VERSION] [-n NODE_VERSION] [-v] [-a ADMIN_PASSWORD] [--db-type DB_TYPE]
usage: installer.py [-h] [-j APPS_JSON] [-b BENCH_NAME] [-s SITE_NAME] [-r FRAPPE_REPO] [-t FRAPPE_BRANCH] [-p PY_VERSION] [-n NODE_VERSION] [-v] [-a ADMIN_PASSWORD] [-d DB_TYPE]
options:
-h, --help show this help message and exit
-j APPS_JSON, --apps-json APPS_JSON
@ -260,7 +261,7 @@ options:
-r FRAPPE_REPO, --frappe-repo FRAPPE_REPO
frappe repo to use, default: https://github.com/frappe/frappe
-t FRAPPE_BRANCH, --frappe-branch FRAPPE_BRANCH
frappe repo to use, default: version-14
frappe repo to use, default: version-15
-p PY_VERSION, --py-version PY_VERSION
python version, default: Not Set
-n NODE_VERSION, --node-version NODE_VERSION
@ -268,7 +269,8 @@ options:
-v, --verbose verbose output
-a ADMIN_PASSWORD, --admin-password ADMIN_PASSWORD
admin password for site, default: admin
--db-type DB_TYPE Database type to use (e.g., mariadb or postgres)
-d DB_TYPE, --db-type DB_TYPE
Database type to use (e.g., mariadb or postgres)
```
A new bench and / or site is created for the client with following defaults.
@ -390,7 +392,7 @@ To run cypress based UI tests in a docker environment, follow the below steps:
1. Install and setup X11 tooling on VM using the script `install_x11_deps.sh`
```shell
sudo ./install_x11_deps.sh
sudo bash ./install_x11_deps.sh
```
This script will install required deps, enable X11Forwarding and restart SSH daemon and export `DISPLAY` variable.