"modified the function test_utils/set_preference to accommodate user_id."
It will help setting preferences in case user_id is other than 1(depending on the user which has been logged in).
How would that ever happen? When running the tests, we initialise a new settings database, so we're guaranteed that the user ID will be 1. If it isn't, something is wrong.
This is true for pgAdmin but not for PEM.
Currently - feature tests are running as the desktop (runtime) mode.
Tomorrow - if we want to enable the feature tests for the server mode, then - this approach could be useful.