mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 18:10:06 -05:00
test-menu.sh mirrors the docs/Features menu structure and runs the actual WeKan code for each feature: a dedicated runner for Login (a real REST username/password round trip) and ImportExport/PDF (create a board, export it, check the PDF header), and a generic fallback that matches a feature against this repo's own automated tests by filename. Every feature run writes output.txt/result.txt/run.log under .tools/test-menu/<timestamp>/, mirroring the docs/Features path, and never leaves an empty or missing result. The example INPUT for a feature is checked into the repository next to its documentation instead: docs/Features/<path>/example-input.txt, hand-written for Login and ImportExport/PDF and extracted from the feature's own .md elsewhere. test-menu.sh only reads these; it never writes into docs/Features. An earlier version of the matcher also grep'd test file CONTENTS for a keyword once the filename search failed, which pulled in noise (a word like "webhook" mentioned in passing in a dozen unrelated tests); it is filename-only now. Thanks to xet7.
12 lines
566 B
Plaintext
12 lines
566 B
Plaintext
# Example input for docs/Features/ImportExport/PDF: create a board, then
|
|
# export it to PDF. This is what test-menu.sh's ImportExport/PDF runner
|
|
# actually sends, against models/exportPDF.js - see docs/API/Boards.md.
|
|
|
|
curl -H "Authorization: Bearer <token>" -H "Content-type:application/json" \
|
|
-X POST http://localhost:3000/api/boards \
|
|
-d '{"title":"Board title here","permission":"private","color":"nephritis"}'
|
|
|
|
curl -H "Authorization: Bearer <token>" \
|
|
"http://localhost:3000/api/boards/<boardId>/exportPDF?authToken=<token>" \
|
|
-o board.pdf
|