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..628e9b9 --- /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 | +|---|---| +| `setup_test.md` | Creating the first user and logging in | +| `files_test.md` | First user and login, then creating a folder and a file | + +## Run + +Start a fresh instance on port 4900: + +```bash +docker run -d --name filerise-e2e -p 4900:80 -e PERSISTENT_TOKENS_KEY=e2e-tokens-key error311/filerise-docker:latest +npm install -g @testmuai/kane-cli +kane-cli login +kane-cli testmd run e2e/kane/setup_test.md +kane-cli testmd run e2e/kane/files_test.md +``` + +Both tests start from the first-user form, so recreate the container before each run. diff --git a/e2e/kane/files_test.md b/e2e/kane/files_test.md new file mode 100644 index 0000000..2d91e4f --- /dev/null +++ b/e2e/kane/files_test.md @@ -0,0 +1,22 @@ +--- +mode: testing +url: http://localhost:4900/ +max_steps: 50 +--- + +# Create a folder and a file + +## Create the first user and log in +Type "samrivera" as the Username and "FileRise-Test-2026" as the Password, then click "Save User". +Type "samrivera" as the User and "FileRise-Test-2026" as the Password, then click "Login". +Verify the file list shows "Files in (root)". + +## Create a folder +Click the "New" button above the file list, then click "Create Folder". +Type "Projects" as the folder name and click "Create". +Verify "Projects" appears under "Folder Navigation & Management". + +## Create a file +Click the "New" button above the file list, then click "Create File". +Type "notes.txt" as the file name and click "Create". +Verify "notes.txt" is listed in the file list. diff --git a/e2e/kane/setup_test.md b/e2e/kane/setup_test.md new file mode 100644 index 0000000..1cb5e29 --- /dev/null +++ b/e2e/kane/setup_test.md @@ -0,0 +1,16 @@ +--- +mode: testing +url: http://localhost:4900/ +max_steps: 30 +--- + +# First user and login + +## Create the first user +Verify the "Create New User" form is shown. +Type "alexmorgan" as the Username and "FileRise-Test-2026" as the Password, check "Grant Admin Access", then click "Save User". +Verify the "Please log in to continue" form is shown. + +## Log in +Type "alexmorgan" as the User and "FileRise-Test-2026" as the Password, then click "Login". +Verify the header shows "alexmorgan" and the file list shows "Files in (root)" with "No files found.".