diff --git a/e2e/kane/.gitignore b/e2e/kane/.gitignore new file mode 100644 index 0000000..38c4d2b --- /dev/null +++ b/e2e/kane/.gitignore @@ -0,0 +1,2 @@ +.testmuai/ +output-*/ diff --git a/e2e/kane/README.md b/e2e/kane/README.md new file mode 100644 index 0000000..f83476c --- /dev/null +++ b/e2e/kane/README.md @@ -0,0 +1,22 @@ +# End-to-end (e2e) tests for web + +Browser tests written in plain English for [Kane CLI](https://www.testmuai.com/kane-cli/). + +| Test | What it covers | +|---|---| +| `vault_test.md` | Registering and creating a vault | +| `note_test.md` | Registering, creating a vault and a note, and checking the note is saved after a reload | + +## Run + +Start a fresh instance on port 4880: + +```bash +docker run -d --name many-notes-e2e -p 4880:8080 -e APP_URL=http://localhost:4880 brufdev/many-notes:latest +npm install -g @testmuai/kane-cli +kane-cli login +kane-cli testmd run e2e/kane/vault_test.md +kane-cli testmd run e2e/kane/note_test.md +``` + +Both tests register a new user, so recreate the container before each run. diff --git a/e2e/kane/note_test.md b/e2e/kane/note_test.md new file mode 100644 index 0000000..7593338 --- /dev/null +++ b/e2e/kane/note_test.md @@ -0,0 +1,21 @@ +--- +mode: testing +url: http://localhost:4880/register +max_steps: 50 +--- + +# Write a note + +## Register and create a vault +Type "Sam Rivera" as the Name, "sam@example.com" as the Email and "Notes-Test-2026" as both the Password and Confirm password, then click "Register". +Click the "Create vault" button, type "Journal" as the Name and click "Save". +Verify the vault page opens with the title "Journal". + +## Create a note +Click the "New note" button, type "Standup" as the Name and click "Save". +Click into the empty editor area below the toolbar and type "Ship the release on Friday". +Wait 3 seconds for the note to save. + +## Check the note is saved +Reload the page. +Verify the note "Standup" is open and shows "Ship the release on Friday". diff --git a/e2e/kane/vault_test.md b/e2e/kane/vault_test.md new file mode 100644 index 0000000..8af173a --- /dev/null +++ b/e2e/kane/vault_test.md @@ -0,0 +1,15 @@ +--- +mode: testing +url: http://localhost:4880/register +max_steps: 40 +--- + +# Sign up and create a vault + +## Register +Type "Alex Morgan" as the Name, "alex@example.com" as the Email and "Notes-Test-2026" as both the Password and Confirm password, then click "Register". +Verify the "My vaults" page lists "Starter Vault". + +## Create a vault +Click the "Create vault" button, type "Work" as the Name and click "Save". +Verify the vault page opens with the title "Work".