https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #36 from Jonathan Druart <[email protected]> ---
(In reply to Tomás Cohen Arazi (tcohen) from comment #34)
> We didn't we just add a TestBuilder wrapper endpoint?

It’s not as straightforward as it might seem.

First we already have code to build mocked objects based on the REST API spec,
without actually creating them in the database. This works well for simple,
non-end-to-end tests.

Secondly t::lib::TestBuilder returns objects with attributes named after DB
columns, but the Vue app expects REST API field names. We could have added a
conversion layer (as we did here), but it would have required additional effort
anyway.

Finally this approach would have required a GET request for every object, which
would have significantly slowed down the tests.

Also it seems more consistent to have a JS solution for JS tests.

-- 
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/

Reply via email to