ArnoldSmith86 / virtualtabletop

a virtual surface in the browser on which you can play board, dice and card games
https://virtualtabletop.io
GNU General Public License v3.0
172 stars 31 forks source link

Change ; separator for INPUT fields #1517

Open rogerl50 opened 1 year ago

rogerl50 commented 1 year ago

Currently an input dialog generated input elements with an id of INPUT_<invoking widget id>;<result variable>. The semicolon is causing problems in testCafe when trying to modify the testCafe tests for #1506, since putting a spinner into a room is now mediated by a dialog that asks the user to select the number of values for the spinner.

The issue with the ; is that ; requires a backslash escape when it's being used. But it seems that testCafe rejects INPUT_\;values as an invalid selector (it accepts INPUT_\\;values). I think we should change that ; to _.

robartsd commented 1 year ago

There probably is some way to write the correct selector for testcafe, but I agree that choosing a separator that does not require an escape sequence would be better.

robartsd commented 1 year ago

We might also want to also consider escaping the variable name in the id (using the same escape code used for the widget id).