So I have a pretty strange issue right now. I want to test my project with shinytest, but I have a datatable in my app that has random values (data-tabsetid). Because of these values, the tests always fail after the first run.
Writing the JS script in the source code is not an option, so that's why I tried to put the script in the test.
I use the function correctly, tried it with other JS functions and they worked fine. For example:
This does something, obviously it won't change the text in this case because it's a table, but it does something (also it changes the text on the child elements if I apply it on them). On the other hand, if I change the textContent to setAttribute() function, and try to change the "data-tabsetid" attribute to "4321" it doesn't do anything.
Am I doing something wrong or is this an issue with the package (or any other package actually)?
So I have a pretty strange issue right now. I want to test my project with shinytest, but I have a datatable in my app that has random values (data-tabsetid). Because of these values, the tests always fail after the first run. Writing the JS script in the source code is not an option, so that's why I tried to put the script in the test. I use the function correctly, tried it with other JS functions and they worked fine. For example:
This does something, obviously it won't change the text in this case because it's a table, but it does something (also it changes the text on the child elements if I apply it on them). On the other hand, if I change the textContent to setAttribute() function, and try to change the "data-tabsetid" attribute to "4321" it doesn't do anything. Am I doing something wrong or is this an issue with the package (or any other package actually)?