https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29016
--- Comment #49 from Kyle M Hall (khall) <[email protected]> --- Created attachment 198850 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198850&action=edit Bug 29016 [25.11.x]: (QA follow-up) Expand action_logs API and test coverage Build on the new ActionLog DBIC relations to expose them as opt-in embeds, and shore up gaps in the test coverage that QA flagged. Swagger * paths/action_logs.yaml declares an x-koha-embed header parameter constrained to the supported relations (librarian, patron). * definitions/action_log.yaml adds the corresponding optional `librarian` and `patron` object fields. Tests * Convert the single 24-test subtest into focused subtests: - authorization (403 vs 200) - simple typed filters - q-DSL: multi-value module, info LIKE, combined filter - embeds: librarian and patron, with and without x-koha-embed - pagination + X-Total-Count and order_by * Mock AuthSuccessLog/AuthFailureLog/BorrowersLog to 0 to remove the flakiness where the API GET itself appended an AUTH log row between delete and assertion. * Build the test librarian with both `tools` and `borrowers` flags so embedded patron fields are not redacted by Koha::Patron->is_accessible. * Use a small build_fixtures() helper to avoid copy-pasting setup across subtests. Test plan: 1. yarn build && restart_all (refresh swagger bundle) 2. prove t/db_dependent/api/v1/action_logs.t (all subtests green) 3. curl -H 'x-koha-embed: librarian,patron' \ /api/v1/action_logs?module=MEMBERS -- patron and librarian objects appear in the response. Signed-off-by: Lucas Gass <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
