rstudio / shinytest

Automated testing for shiny apps
https://rstudio.github.io/shinytest/
Other
225 stars 55 forks source link

Error in Recording Test #389

Open denironyx opened 3 years ago

denironyx commented 3 years ago

Hi,

I'm currently performing snapshot testing using the shinytest package on an app that we built. This app is a little bit unique, as my team and I implemented an authentication scheme for Shiny using AUTH0 package.

The issue is that the server runs on port:8080. This means that I need to always set the port to 8080 before running the shiny app and auth0 doesn't run on the shiny browser. It only works on a web browser.

Whenever I tried performing a snapshot test on the app it gives me this error. Could it be that shinytest doesn't recognize the new port set for the shiny app?

Screenshot_5

trafficonese commented 4 months ago

I have a similar problem..

In my ui I have this.. Could this be a problem?

tags$head(
      tags$title("blas"),
      bslib::bs_theme_dependencies(theme = bslib::bs_theme(4)),
      tags$link(href = "./dist/main.css", rel = "stylesheet"),
      tags$script(src = "./jquery-ui-1.12.1.custom/jquery-ui.min.js"),
      tags$script(src = "./dist/contextMenu.min.js"),
      tags$script(src = "./dist/plugins.js"),
      tags$script(src = "./dist/scripts.js"),
      tags$script(src = "./dist/main.js"),
      useShinyjs()
    )

My log looks something like this:

! Shiny app did not load in 10000ms. B/W 15:06:09.35 TypeError: Type error toString (http://127.0.0.1:5385/shiny-javascript-1.8.1.1/shiny.min.js:2) call (:0) call (:0) call (:0) inspectSource (http://127.0.0.1:5385/shiny-javascript-1.8.1.1/shiny.min.js:2) (anonymous function) (http://127.0.0.1:5385/shiny-javascript-1.8.1.1/shiny.min.js:2) UK (http://127.0.0.1:5385/shiny-javascript-1.8.1.1/shiny.min.js:2) Sv (http://127.0.0.1:5385/shiny-javascript-1.8.1.1/shiny.min.js:2) Sv (http://127.0.0.1:5385/shiny-javascript-1.8.1.1/shiny.min.js:2) (anonymous function) (http://127.0.0.1:5385/shiny-javascript-1.8.1.1/shiny.min.js:2) B/W 15:06:09.38 ReferenceError: Can't find variable: Shiny global code (http://127.0.0.1:5385/shinyWidgets/shinyWidgets-bindings.min.js:1) B/W 15:06:09.39 ReferenceError: Can't find variable: Shiny global code (http://127.0.0.1:5385/shinyWidgets/dropdown/dropdown-click.js:2) B/W 15:06:09.39 ReferenceError: Can't find variable: Selectize