Open DivadNojnarg opened 3 years ago
I made a simple test with {webdriver}
:
library(webdriver)
pjs <- run_phantomjs()
ses <- Session$new(port = pjs$port)
ses$go(<bs4Dash-app-url>)
ses$takeScreenshot()
Actually it's just because the page does not load properly, but I don't really know why.
I did further checks on AdminLTE 2 (shinydashboard):
and AdminLTE3 (bs4Dash):
It seems that Bootstrap 4 is not well handled (grid, ...) by phantomjs but this is not the only problem.
I've been trying for a while to make
{shinytest}
work with other templates than classic{shiny}
elements. I am missing something and can't figure out what. For instance, when you do:You get the "shiny-bound-input" class, telling the action button is bound ... After this you can do whatever you want with that button.
In
{bs4Dash}
, the left sidebar has a binding telling whether it is opened or closed. If we follow the same approach:We don't get any "shiny-bound-input" class, which it is not in line with the below screenshot where the input is clearly bound. This also prevents from doing anything else like
app$setInputs(sidebar = FALSE)
, which yieldsUnable to find input binding for element with id ...
raised by theflushItem
function ofshinytest.inputQueue.flush
on the JS side.How to explain that the "shiny-bound-input" is not correctly added?
Additionally, I explored a bit
{shinytest}
,{webdriver}
and according to the shiny-mapping.R file, there is a predefined list of mappings:which lists all (or almost all) vanilla shiny input bindings by their name. I imagine I'll also have to insert bs4Dash binding following the same convention (
bs4Dash.bindingName
), am I right?Regarding my first issue (missing "shiny bound input" class), I am wondering what I am missing and appreciate any insights.