You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AppDriver$wait_for_js() does not quote script input #236
This leads to e.g. the input script 'test'==='test'; throwing a Javascript error: SyntaxError: Unexpected token ';'. Expected ')' to end an argument list. as the code to be executed looks like this: eval('test'==='test';) which is obviously invalid syntax.
To fix this, the condition_js needs to be quoted properly.
Hi @schloerke,
opening this back up because I found a bug where an object of class glue, character passed as the condition_js argument to wait_for_js will produce an error.
Activity
yogat3ch commentedon Nov 29, 2022
Hi @schloerke,
opening this back up because I found a bug where an object of class
glue, characterpassed as thecondition_jsargument towait_for_jswill produce an error.app$wait_for_js(UU::glue_js("$('#*{ns('highlighted')}* table.dataTable > tbody > tr').length == 1;"))produces an error:

I think this can be resolved by simply wrapping
condition_json the line mentioned above inas.characteras the following works:app$wait_for_js(as.character(UU::glue_js("$('#*{ns('highlighted')}* table.dataTable > tbody > tr').length == 1;")))schloerke commentedon Nov 29, 2022
{glue}is so weird. lol.Thank you for the fix!
Force js code to be a character
schloerke commentedon Nov 29, 2022
@yogat3ch Hopefully fixed in #288
yogat3ch commentedon Nov 29, 2022
@schloerke Very much appreciated!!! 🙏