https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41247
--- Comment #17 from Marcel de Rooy <[email protected]> --- (In reply to Pedro Amorim from comment #16) > (In reply to Marcel de Rooy from comment #15) > > Isnt there a more elegant way in cypress tests to mock koha-conf settings, > > preferences, etc just like we do in the regular perl tests? > > There may be, I'm just not seeing it, not without baking it into Koha > beforehand. Sys prefs are different as they come from the database, I > believe cy.task("query") is changing the database directly and then > reverting it back to what it was (setup+teardown). I've attempted to > implement a similar mechanism here for koha-conf.xml. > > > Just an idea about koha-conf > > + let kohaconf = "/etc/koha/sites/kohadev/koha-conf.xml"; > > Why not pass a temporary modified koha-conf here? > > But still hoping that we could even find something better.. > > Could do, the problems: > 1) Koha server side (perl) reads that file (kohadev/koha-conf.xml). > 2) plugins_restricted (default) is 1 > 3) Installation of the plugin through the UI is not possible with > plugins_restricted = 1 > 4) Tests will fail as they require a particular type of plugin to be > installed in order for UI things e.g. buttons to appear. > > As always, I'm open to discuss further, the issue here I believe boils down > to: "How to mock C4:Context->config from a cypress test" Well, we could be pragmatic here. And pass this further. And open at least a new report to record that we would like to find a more elegant way. See bug 41961 -- 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/
