From 7ef57345cae4d1b2ac0d855295aaf147b83f3e3b Mon Sep 17 00:00:00 2001 From: Joseph Cruz Date: Sun, 17 Sep 2023 20:38:03 -0400 Subject: [PATCH] fix(examples/error_boundary): ci error (#1739) * fix(examples/build): maybe spawn client process * docs(examples/error_boundary): add testing note --- examples/cargo-make/client-process.toml | 6 +++++- examples/cargo-make/playwright-trunk-test.toml | 9 +++------ examples/error_boundary/README.md | 4 ++++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/examples/cargo-make/client-process.toml b/examples/cargo-make/client-process.toml index f098dc29c..3eb8554a4 100644 --- a/examples/cargo-make/client-process.toml +++ b/examples/cargo-make/client-process.toml @@ -23,7 +23,11 @@ condition = { env_set = ["CLIENT_PROCESS_NAME"] } script = ''' if [ -z $(pidof ${CLIENT_PROCESS_NAME}) ]; then echo " Starting ${CLIENT_PROCESS_NAME}" - cargo make start-client ${@} + if [ -z ${SPAWN_CLIENT_PROCESS} ];then + cargo make start-client ${@} & + else + cargo make start-client ${@} + fi else echo " ${CLIENT_PROCESS_NAME} is already started" fi diff --git a/examples/cargo-make/playwright-trunk-test.toml b/examples/cargo-make/playwright-trunk-test.toml index 36c3dfa7d..6896f9443 100644 --- a/examples/cargo-make/playwright-trunk-test.toml +++ b/examples/cargo-make/playwright-trunk-test.toml @@ -4,12 +4,9 @@ extend = [ ] [tasks.integration-test] -dependencies = [ - "maybe-start-client", - "wait-one", - "test-playwright", - "stop-client", -] +description = "Run integration test with automated start and stop of processes" +env = { SPAWN_CLIENT_PROCESS = "1" } +dependencies = ["start", "wait-one", "test-playwright", "stop"] [tasks.wait-one] script = ''' diff --git a/examples/error_boundary/README.md b/examples/error_boundary/README.md index 7ee85e77b..10e62be95 100644 --- a/examples/error_boundary/README.md +++ b/examples/error_boundary/README.md @@ -5,3 +5,7 @@ This example shows how to handle basic errors using Leptos. ## Getting Started See the [Examples README](../README.md) for setup and run instructions. + +## Testing + +This project is configured to run start and stop of processes for integration tests wihtout the use of Cargo Leptos or Node.