leptos/examples/todo_app_sqlite_csr/e2e
2024-08-10 20:01:41 -04:00
..
features examples: add CSR with server functions example (closes #1975) (#2031) 2023-11-18 08:24:15 -05:00
tests examples: add CSR with server functions example (closes #1975) (#2031) 2023-11-18 08:24:15 -05:00
Cargo.toml chore: upgrade dependencies (#2765) 2024-08-10 20:01:41 -04:00
Makefile.toml ci(leptos): run ci on change instead of check (#2061) 2023-11-24 14:59:13 -05:00
README.md examples: add CSR with server functions example (closes #1975) (#2031) 2023-11-18 08:24:15 -05:00

E2E Testing

This example demonstrates e2e testing with Rust using executable requirements.

Testing Stack

Role Description
Cucumber Test Runner Run Gherkin specifications as Rust tests
Fantoccini Browser Client Interact with web pages through WebDriver
Cargo Leptos Build Tool Compile example and start the server and end-2-end tests
chromedriver WebDriver Provide WebDriver for Chrome

Testing Organization

Testing is organized around what a user can do and see/not see. Test scenarios are grouped by the user action and the object of that action. This makes it easier to locate and reason about requirements.

Here is a brief overview of how things fit together.

features
└── {action}_{object}.feature   # Specify test scenarios
tests
├── fixtures
│   ├── action.rs               # Perform a user action (click, type, etc.)
│   ├── check.rs                # Assert what a user can see/not see
│   ├── find.rs                 # Query page elements
│   ├── mod.rs
│   └── world
│       ├── action_steps.rs     # Map Gherkin steps to user actions
│       ├── check_steps.rs      # Map Gherkin steps to user expectations
│       └── mod.rs
└── app_suite.rs                # Test main