Rhandsontable dropdown functionality breaks in Shinytest2 browser (JS permissions policy violation)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, r
- Domain
- testing-qa
Research direction
Start with the minimal example in app.r and reproduce it with use_shinytest2() and record_test(). Inspect the Shinytest2 browser console alongside the dropdown interaction, focusing on the unload permissions warning and DataCloneError from postMessage. Done means dropdown options can be selected and closed during recording without these errors.
Written by the indexing model from the issue text.
Description
Hi, thanks as ever for the great package. I don't know how I managed without it.
I'm now trying to use Rhandsontable with dropdown options in a Shiny app (R 4.5.1, Shiny 1.11.0, Rhandsontable 0.3.8, Shinytest2 0.4.1). The table works fine in Chrome and Firefox, but when I try to record a test in the Shinytest2 browser session the dropdown cell fills stop working: specifically, I can open them, but not select an option or close them. I see there have been issues in Shinytest (not 2) about Rhandsontable cell validation failing, but nothing about dropdowns (though perhaps it's the same issue at root)?
I put together a minimal reprex:
library(shiny)
library(rhandsontable)
ui <- fluidPage(rHandsontableOutput("hot_table"))
server <- function(input, output, session) {
output$hot_table <- renderRHandsontable({
df <- data.frame(Status = "Active")
rhandsontable(df, height = 300) %>%
hot_col("Status", type = "dropdown", source = c("Active", "Inactive"))
})
}
shinyApp(ui, server)
When I run use_shinytest2(); record_test() and then check the console in the Shinytest2 browser, I get the following error messages:
content.js:212 [Violation] Permissions policy violation: unload is not allowed in this document.
(anonymous) @ content.js:212Understand this error
VM98:130 Uncaught DataCloneError: Failed to execute 'postMessage' on 'Window': function customRenderer(instance, TD, row, col, prop, value, cellProperties) {
if (['date', 'handsontable'...<omitted>...
} could not be cloned.
at sendMessageToParent (eval at <anonymous> (shiny-testmode.ts:9:21), <anonymous>:130:21)
at sendInputEventToParent (eval at <anonymous> (shiny-testmode.ts:9:21), <anonymous>:134:9)
at HTMLDocument.eval (eval at <anonymous> (shiny-testmode.ts:9:21), <anonymous>:57:9)
at HTMLDocument.dispatch (jquery.js:5145:27)
at v.handle (jquery.js:4949:28)
at Object.trigger (jquery.js:8629:12)
at HTMLDocument.<anonymous> (jquery.js:8707:17)
at ce.each (jquery.js:383:19)
at ce.fn.init.each (jquery.js:205:17)
at ce.fn.init.trigger (jquery.js:8706:15)
Any insight into workarounds? It's by no means essential, but shinytest2 is so useful that I'd love to be able to get it to work with Rhandsontable.
- Dominant language
- R
- Stars
- 123
- Forks
- 23
- Avg merge
- 3h 13m
- Merged PRs (30d)
- 12
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rstudio/shinytest2
-
ai-generated-issue bug
Difficulty 4/5 3-5 days Newbie friendliness 53/100
rstudio/shinytest2#463 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
rstudio/shinytest2#432 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
rstudio/shinytest2#390 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
rstudio/shinytest2#379 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
rstudio/shinytest2#376 ·
Maintainers usually reply within 1 day
All issues in rstudio/shinytest2
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
cran-task-views/Spatial#127 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Add two cautions to the `simulate_dyad_responses()` helpPossibly taken A pull request linked to this issue is open or already merged. Opendocumentation priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Pascal-Kueng/dyadMLM#179 ·
Maintainers usually reply within 1 day