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
There may be some scenarios where you'd want to snapshot behavior while a certain DOM element is being hovered upon, so in that case, it'd be awesome to triggered a snapshot via the keyboard.
For example, I can't really test a hovered value with plotly via a screenshot:
The text was updated successfully, but these errors were encountered:
@cpsievert is there any public tutorial that you were using for the GIF above? For me, the shinytest recorder is not reacting to hover events over a plotly plot at all. I have come across the hover argument of shiny::plotOutput, but ploty::plotlyOutput does not seem to have that.
I also tried some Shiny.onInputChange('hover_data', ...) in the JavaScript code of my hover tooltip, without success. (Although I am aware that I'd probably need something else for shiny to react to shinytest setting hover_data when the recorded test is played out.)
Edit: I think I should add that from your low-res GIF, I am not sure the shinytest recorder behavior is triggered by the hover itself (which is what I would need) or by the hover changing the state of the Shiny app (which I don't do - at least not visibly). So maybe what I want (snapshot the hover itself) is not possible?
Edit2: With the help of textOutput("myplot_text") and output$myplot_text <- renderText(paste(plotly::event_data("plotly_hover"))), I have been able to get output events in the shinytest recorder at least, so I see the recorder behave in a way compatible with your GIF. But these output events don't translate into the generated script. So I think my question is, can I generate shiny input events from a plotly plot?
There may be some scenarios where you'd want to snapshot behavior while a certain DOM element is being hovered upon, so in that case, it'd be awesome to triggered a snapshot via the keyboard.
For example, I can't really test a hovered value with plotly via a screenshot:
The text was updated successfully, but these errors were encountered: