Is there a way to trigger action button inside test server .
If you see below, the default value is 5 and when the user clicks on button, the value 10 displays.
I need to test above scenario where test server triggers the action automatically when we run the test and should check expect_equal(myreactive(), 10) so it passes. Can we achieve this?
you did trigger the action with press=1 but the value for numericInput seems undefined (even though I see that value = 5 is in the ui)
The following works
The issue is line session$setInputs(press = 1) is of no use here in your code above
My thought is, even if I run below code (not setting input as 5), the test should pass. Because the default value is 5, and when the button is presses, the output is 10.... so my plan is not set any inputs here.... will the below code work?
FYI just check your code once... even if you run below it still passes . Because the value is 5 but still there is no output since button is not triggered
eitherway, for this form of testing in the current version of testServer, even though you set a default value in the ui of 5, this is not used by the testServer, so thats why x=5 setInput is done there. I'm sure thats not ideal, but theres also nothing I can do to improve that given the toolset; you could perhaps raise a feature request and see what comes back.