mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-22 10:01:45 +00:00
This is the first functional test which tests the permissions of a non-administrator user in a group. Some changes had to be made in the form shown in users module for this to work. The id of each checkbox in the "Permissions" section is now predictable based on the name of the group. For example, the id of the checkbox for the group "vpn" is `id_group_vpn`. Changes are also made in `CheckboxSelectMultipleReadOnly` form class for consistency, though it is not being used by this functional test. Some utility functions for functional tests have been moved out of users module to be usable by other app modules for testing group permissions. One additional utility function to skip creating user if it already exists has been added. Not using this function wouldn't break the test but using it saves some time. Changed password format string to use `S` instead of `w` to support special characters in password. Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>