mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-26 09:05:10 +00:00
Add website theme test
This commit is contained in:
parent
6012c91815
commit
886146c108
2 changed files with 32 additions and 0 deletions
17
tests/_check_website_theme.py
Normal file
17
tests/_check_website_theme.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import frappe
|
||||
|
||||
|
||||
def check_website_theme():
|
||||
doc = frappe.new_doc("Website Theme")
|
||||
doc.theme = "test theme"
|
||||
doc.insert()
|
||||
|
||||
|
||||
def main() -> int:
|
||||
frappe.connect(site="tests")
|
||||
check_website_theme()
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
|
|
@ -339,6 +339,16 @@ def stop_s3_container():
|
|||
run("docker", "rm", "minio", "-f")
|
||||
|
||||
|
||||
@log("Check Website Theme creation")
|
||||
def check_website_theme_creation():
|
||||
docker_compose("cp", "tests/_check_website_theme.py", "backend:/tmp")
|
||||
docker_compose_exec(
|
||||
"backend",
|
||||
"/home/frappe/frappe-bench/env/bin/python",
|
||||
"tests/_check_website_theme.py",
|
||||
)
|
||||
|
||||
|
||||
@log("Recreate with HTTPS override")
|
||||
def recreate_with_https_override():
|
||||
docker_compose("-f", "overrides/compose.https.yaml", "up", "-d")
|
||||
|
|
@ -456,6 +466,10 @@ def check_s3():
|
|||
stop_s3_container()
|
||||
|
||||
|
||||
def check_website_theme():
|
||||
check_website_theme_creation()
|
||||
|
||||
|
||||
def check_https():
|
||||
print_compose_configuration()
|
||||
recreate_with_https_override()
|
||||
|
|
@ -485,6 +499,7 @@ def main() -> int:
|
|||
start()
|
||||
create_frappe_site_and_check_availability()
|
||||
check_s3()
|
||||
check_website_theme()
|
||||
check_https()
|
||||
check_erpnext()
|
||||
check_postgres()
|
||||
|
|
|
|||
Loading…
Reference in a new issue