Bug 40447

Summary: Add documentation for cypress plugins
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: Test SuiteAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: Pushed to stable --- QA Contact: Lucas Gass (lukeg) <lucas>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, lucas
Version: MainKeywords: release-notes-needed
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Medium patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.11.00,25.05.03
Circulation function:
Bug Depends on: 40318    
Bug Blocks:    
Attachments: Bug 40447: Add comprehensive JSDoc documentation to Cypress plugins
Bug 40447: Add comprehensive JSDoc documentation to Cypress plugins

Description Martin Renvoize (ashimema) 2025-07-18 10:55:16 UTC
We didn't add JSDoc to the new testbuilding tools.. this should help devs get up to speed quicker and aid development environments too.
Comment 1 Martin Renvoize (ashimema) 2025-07-18 10:55:52 UTC
Created attachment 184320 [details] [review]
Bug 40447: Add comprehensive JSDoc documentation to Cypress plugins

This patch adds detailed JSDoc documentation to all Cypress testing
plugin files.

Documentation added to:
- insertData.js: Data insertion utilities with examples
- api-client.js: API wrapper functions with usage patterns
- mockData.js: Schema-based mock data generation
- auth.js: Authentication helper functions
- db.js: Database query utilities
- readYamlFile.js: YAML file reading utilities
- index.js: Main plugin configuration

Each function now includes:
- Complete parameter descriptions with types
- Return value documentation
- Practical usage examples
- Error conditions and handling
- Module-level overviews

This addresses the documentation gap identified during QA review,
hopefully making it easier for future devs to adopt the new framework of
tools.
Comment 2 Lucas Gass (lukeg) 2025-07-21 20:09:07 UTC
Created attachment 184457 [details] [review]
Bug 40447: Add comprehensive JSDoc documentation to Cypress plugins

This patch adds detailed JSDoc documentation to all Cypress testing
plugin files.

Documentation added to:
- insertData.js: Data insertion utilities with examples
- api-client.js: API wrapper functions with usage patterns
- mockData.js: Schema-based mock data generation
- auth.js: Authentication helper functions
- db.js: Database query utilities
- readYamlFile.js: YAML file reading utilities
- index.js: Main plugin configuration

Each function now includes:
- Complete parameter descriptions with types
- Return value documentation
- Practical usage examples
- Error conditions and handling
- Module-level overviews

This addresses the documentation gap identified during QA review,
hopefully making it easier for future devs to adopt the new framework of
tools.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Lucas Gass (lukeg) 2025-07-21 20:10:23 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 4 Martin Renvoize (ashimema) 2025-07-23 21:22:43 UTC
Ho.. that one went quick.. it was more of a placeholder with an ai submission that Joubu and I were going to follow-up on.. suppose I'll still follow-up but in a new bug now.  Haha, rate for things to go in quite that quick.. nice to see
Comment 5 Paul Derscheid 2025-08-22 08:29:59 UTC
Nice work everyone!

Pushed to 25.05.x