https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41247
--- Comment #16 from Pedro Amorim <[email protected]> --- (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" -- 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/
