search pattern for default context hard coded
Given an App Suite installation without a context matching the search pattern defaultcontext
, running this would result in a strange error message:
Cannot read property 'return' of null
TypeError: Cannot read property 'return' of null
at node_modules/@open-xchange/codecept-helper/src/contexts.js:11:26
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Array.createCtxt [as create] (node_modules/@open-xchange/codecept-helper/src/contexts.js:82:24)
at async Array.createUser [as create] (node_modules/@open-xchange/codecept-helper/src/users.js:144:20)
Not sure how the solution should look like. We could just improve the error message, but it would be better to at least also allow to customize the search pattern or provide an id to fetch the default context. Needs a little thinking.
The default context is used as some kind of template to lookup specific settings which are not explicitly provided by the user of the API. (For instance this would be the filestorageId when creating new contexts)