Skip to content

feat(frontend): add /form-test route to drive form components from the URL#10202

Open
BacLuc wants to merge 1 commit into
ecamp:develfrom
BacLuc:add-component-e2e-tests
Open

feat(frontend): add /form-test route to drive form components from the URL#10202
BacLuc wants to merge 1 commit into
ecamp:develfrom
BacLuc:add-component-e2e-tests

Conversation

@BacLuc

@BacLuc BacLuc commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Add a dev-only route that renders a single ecamp form component selected via the URL, so the form components can be driven and asserted on with Playwright (or by hand) in isolation - without needing a camp, login or API data.

/form-test/:component e.g. /form-test/ETextField
?props= props passed to the component
?value= initial v-model value

The view auto-discovers all form base components (E*.vue) via import.meta.glob, renders the chosen one wrapped in EForm, and exposes the live v-model value in [data-testid="form-test-model"] (the component itself is under [data-testid="form-test-subject"]). Visiting /form-test without a component lists the available ones. The route is gated behind FEATURE_DEVELOPER like /controls but needs no auth, since the base components work standalone.

Includes an example Playwright spec (e2e) showing how to assert on a component's v-model after interacting with it (ETextField, ECheckbox).

…e URL

Add a dev-only route that renders a single ecamp form component selected
via the URL, so the form components can be driven and asserted on with
Playwright (or by hand) in isolation - without needing a camp, login or
API data.

  /form-test/:component        e.g. /form-test/ETextField
    ?props=<json>              props passed to the component
    ?value=<json>             initial v-model value

The view auto-discovers all form base components (E*.vue) via
import.meta.glob, renders the chosen one wrapped in EForm, and exposes
the live v-model value in [data-testid="form-test-model"] (the component
itself is under [data-testid="form-test-subject"]). Visiting /form-test
without a component lists the available ones. The route is gated behind
FEATURE_DEVELOPER like /controls but needs no auth, since the base
components work standalone.

Includes an example Playwright spec (e2e) showing how to assert on a
component's v-model after interacting with it (ETextField, ECheckbox).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: BacLuc <lucius.bachmann@clubpage.ch>
@BacLuc BacLuc requested a review from a team June 30, 2026 20:59
@BacLuc

BacLuc commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

The same for api components is also in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant