From 641aa57677a6b25ad43567240982b6e1f81c4ad5 Mon Sep 17 00:00:00 2001 From: Jeff Thompson <160783290+jthompson-arcus@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:31:40 -0500 Subject: [PATCH 1/7] Grab row number instead of index --- R/fct_utils.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/R/fct_utils.R b/R/fct_utils.R index ab7d8488..2985cecb 100644 --- a/R/fct_utils.R +++ b/R/fct_utils.R @@ -711,9 +711,10 @@ dblclick_to_form <- function(bttn_ns) { DT::JS( "table.on('dblclick', 'tbody tr', function(t) {", "t.currentTarget.classList.add('selected');", - "var tblID = $(t.target).closest('.datatables').attr('id')", - "var inputName = tblID + '_rows_selected'", - "Shiny.setInputValue(inputName, t.currentTarget.rowIndex)", + "var tblID = $(t.target).closest('.datatables').attr('id');", + "var inputName = tblID + '_rows_selected';", + "var rowIdx = table.row(this).data()[0];", + "Shiny.setInputValue(inputName, rowIdx);", "document.getElementById(", deparse(NS(bttn_ns, "go_to_form")), ").click();", "})" )} From d0e097757d80496275b5cc2ee45ea18445a61b4b Mon Sep 17 00:00:00 2001 From: Jeff Thompson <160783290+jthompson-arcus@users.noreply.github.com> Date: Wed, 15 Jan 2025 12:24:15 -0500 Subject: [PATCH 2/7] Better solution --- R/fct_utils.R | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/R/fct_utils.R b/R/fct_utils.R index 2985cecb..50d5c4f8 100644 --- a/R/fct_utils.R +++ b/R/fct_utils.R @@ -710,11 +710,9 @@ custom_config_path <- function( dblclick_to_form <- function(bttn_ns) { DT::JS( "table.on('dblclick', 'tbody tr', function(t) {", - "t.currentTarget.classList.add('selected');", - "var tblID = $(t.target).closest('.datatables').attr('id');", - "var inputName = tblID + '_rows_selected';", - "var rowIdx = table.row(this).data()[0];", - "Shiny.setInputValue(inputName, rowIdx);", + "var current_index = table.row(this).index();", + "var current_rows = table.ajax.json().DT_rows_current;", + "table.shinyMethods.selectRows(current_rows[current_index]);", "document.getElementById(", deparse(NS(bttn_ns, "go_to_form")), ").click();", "})" )} From 2fbbec92cd021eca26b71bdbe341c43fff60c72b Mon Sep 17 00:00:00 2001 From: Jeff Thompson <160783290+jthompson-arcus@users.noreply.github.com> Date: Wed, 15 Jan 2025 12:38:45 -0500 Subject: [PATCH 3/7] Repair tests --- tests/testthat/_snaps/app_feature_01/app-feature-1-001.json | 2 +- tests/testthat/_snaps/app_feature_01/app-feature-1-002.json | 2 +- tests/testthat/_snaps/app_feature_01/app-feature-1-003.json | 2 +- tests/testthat/_snaps/app_feature_01/app-feature-1-004.json | 2 +- tests/testthat/_snaps/app_feature_01/app-feature-1-005.json | 2 +- tests/testthat/_snaps/app_feature_02/app-feature-2-001.json | 2 +- tests/testthat/_snaps/app_feature_03/app-feature-3-001.json | 2 +- tests/testthat/_snaps/app_feature_03/app-feature-3-002.json | 2 +- tests/testthat/_snaps/app_feature_03/app-feature-3-003.json | 2 +- tests/testthat/_snaps/app_feature_03/app-feature-3-004.json | 2 +- tests/testthat/_snaps/app_feature_03/app-feature-3-005.json | 2 +- .../mod_navigate_review/test-mod_navigate_review-001.json | 2 +- .../mod_navigate_review/test-mod_navigate_review-002.json | 2 +- .../mod_navigate_review/test-mod_navigate_review-003.json | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/testthat/_snaps/app_feature_01/app-feature-1-001.json b/tests/testthat/_snaps/app_feature_01/app-feature-1-001.json index 7068b035..a4badd0c 100644 --- a/tests/testthat/_snaps/app_feature_01/app-feature-1-001.json +++ b/tests/testthat/_snaps/app_feature_01/app-feature-1-001.json @@ -236,7 +236,7 @@ "serverSide": true, "processing": true }, - "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nt.currentTarget.classList.add('selected');\nvar tblID = $(t.target).closest('.datatables').attr('id')\nvar inputName = tblID + '_rows_selected'\nShiny.setInputValue(inputName, t.currentTarget.rowIndex)\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", + "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nvar current_index = table.row(this).index();\nvar current_rows = table.ajax.json().DT_rows_current;\ntable.shinyMethods.selectRows(current_rows[current_index]);\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", "selection": { "mode": "single", "selected": null, diff --git a/tests/testthat/_snaps/app_feature_01/app-feature-1-002.json b/tests/testthat/_snaps/app_feature_01/app-feature-1-002.json index 383ae75c..b9368ae5 100644 --- a/tests/testthat/_snaps/app_feature_01/app-feature-1-002.json +++ b/tests/testthat/_snaps/app_feature_01/app-feature-1-002.json @@ -1002,7 +1002,7 @@ "serverSide": true, "processing": true }, - "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nt.currentTarget.classList.add('selected');\nvar tblID = $(t.target).closest('.datatables').attr('id')\nvar inputName = tblID + '_rows_selected'\nShiny.setInputValue(inputName, t.currentTarget.rowIndex)\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", + "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nvar current_index = table.row(this).index();\nvar current_rows = table.ajax.json().DT_rows_current;\ntable.shinyMethods.selectRows(current_rows[current_index]);\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", "selection": { "mode": "single", "selected": null, diff --git a/tests/testthat/_snaps/app_feature_01/app-feature-1-003.json b/tests/testthat/_snaps/app_feature_01/app-feature-1-003.json index 468c251c..e05a78e2 100644 --- a/tests/testthat/_snaps/app_feature_01/app-feature-1-003.json +++ b/tests/testthat/_snaps/app_feature_01/app-feature-1-003.json @@ -8398,7 +8398,7 @@ "serverSide": true, "processing": true }, - "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nt.currentTarget.classList.add('selected');\nvar tblID = $(t.target).closest('.datatables').attr('id')\nvar inputName = tblID + '_rows_selected'\nShiny.setInputValue(inputName, t.currentTarget.rowIndex)\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", + "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nvar current_index = table.row(this).index();\nvar current_rows = table.ajax.json().DT_rows_current;\ntable.shinyMethods.selectRows(current_rows[current_index]);\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", "selection": { "mode": "single", "selected": null, diff --git a/tests/testthat/_snaps/app_feature_01/app-feature-1-004.json b/tests/testthat/_snaps/app_feature_01/app-feature-1-004.json index 22d16294..5377b5d6 100644 --- a/tests/testthat/_snaps/app_feature_01/app-feature-1-004.json +++ b/tests/testthat/_snaps/app_feature_01/app-feature-1-004.json @@ -8663,7 +8663,7 @@ "serverSide": true, "processing": true }, - "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nt.currentTarget.classList.add('selected');\nvar tblID = $(t.target).closest('.datatables').attr('id')\nvar inputName = tblID + '_rows_selected'\nShiny.setInputValue(inputName, t.currentTarget.rowIndex)\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", + "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nvar current_index = table.row(this).index();\nvar current_rows = table.ajax.json().DT_rows_current;\ntable.shinyMethods.selectRows(current_rows[current_index]);\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", "selection": { "mode": "single", "selected": null, diff --git a/tests/testthat/_snaps/app_feature_01/app-feature-1-005.json b/tests/testthat/_snaps/app_feature_01/app-feature-1-005.json index 913bc43f..bfc8d3ea 100644 --- a/tests/testthat/_snaps/app_feature_01/app-feature-1-005.json +++ b/tests/testthat/_snaps/app_feature_01/app-feature-1-005.json @@ -8664,7 +8664,7 @@ "serverSide": true, "processing": true }, - "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nt.currentTarget.classList.add('selected');\nvar tblID = $(t.target).closest('.datatables').attr('id')\nvar inputName = tblID + '_rows_selected'\nShiny.setInputValue(inputName, t.currentTarget.rowIndex)\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", + "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nvar current_index = table.row(this).index();\nvar current_rows = table.ajax.json().DT_rows_current;\ntable.shinyMethods.selectRows(current_rows[current_index]);\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", "selection": { "mode": "single", "selected": null, diff --git a/tests/testthat/_snaps/app_feature_02/app-feature-2-001.json b/tests/testthat/_snaps/app_feature_02/app-feature-2-001.json index f097ebba..68af8682 100644 --- a/tests/testthat/_snaps/app_feature_02/app-feature-2-001.json +++ b/tests/testthat/_snaps/app_feature_02/app-feature-2-001.json @@ -7349,7 +7349,7 @@ "serverSide": true, "processing": true }, - "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nt.currentTarget.classList.add('selected');\nvar tblID = $(t.target).closest('.datatables').attr('id')\nvar inputName = tblID + '_rows_selected'\nShiny.setInputValue(inputName, t.currentTarget.rowIndex)\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", + "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nvar current_index = table.row(this).index();\nvar current_rows = table.ajax.json().DT_rows_current;\ntable.shinyMethods.selectRows(current_rows[current_index]);\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", "selection": { "mode": "single", "selected": null, diff --git a/tests/testthat/_snaps/app_feature_03/app-feature-3-001.json b/tests/testthat/_snaps/app_feature_03/app-feature-3-001.json index b90791ba..7e214401 100644 --- a/tests/testthat/_snaps/app_feature_03/app-feature-3-001.json +++ b/tests/testthat/_snaps/app_feature_03/app-feature-3-001.json @@ -7463,7 +7463,7 @@ "serverSide": true, "processing": true }, - "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nt.currentTarget.classList.add('selected');\nvar tblID = $(t.target).closest('.datatables').attr('id')\nvar inputName = tblID + '_rows_selected'\nShiny.setInputValue(inputName, t.currentTarget.rowIndex)\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", + "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nvar current_index = table.row(this).index();\nvar current_rows = table.ajax.json().DT_rows_current;\ntable.shinyMethods.selectRows(current_rows[current_index]);\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", "selection": { "mode": "single", "selected": null, diff --git a/tests/testthat/_snaps/app_feature_03/app-feature-3-002.json b/tests/testthat/_snaps/app_feature_03/app-feature-3-002.json index 1cbb51d7..3aec00fa 100644 --- a/tests/testthat/_snaps/app_feature_03/app-feature-3-002.json +++ b/tests/testthat/_snaps/app_feature_03/app-feature-3-002.json @@ -8607,7 +8607,7 @@ "serverSide": true, "processing": true }, - "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nt.currentTarget.classList.add('selected');\nvar tblID = $(t.target).closest('.datatables').attr('id')\nvar inputName = tblID + '_rows_selected'\nShiny.setInputValue(inputName, t.currentTarget.rowIndex)\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", + "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nvar current_index = table.row(this).index();\nvar current_rows = table.ajax.json().DT_rows_current;\ntable.shinyMethods.selectRows(current_rows[current_index]);\ndocument.getElementById(\n\"start_page_1-go_to_patient-go_to_form\"\n).click();\n})\n}", "selection": { "mode": "single", "selected": null, diff --git a/tests/testthat/_snaps/app_feature_03/app-feature-3-003.json b/tests/testthat/_snaps/app_feature_03/app-feature-3-003.json index 667ed777..77e09f61 100644 --- a/tests/testthat/_snaps/app_feature_03/app-feature-3-003.json +++ b/tests/testthat/_snaps/app_feature_03/app-feature-3-003.json @@ -78,7 +78,7 @@ "serverSide": true, "processing": true }, - "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nt.currentTarget.classList.add('selected');\nvar tblID = $(t.target).closest('.datatables').attr('id')\nvar inputName = tblID + '_rows_selected'\nShiny.setInputValue(inputName, t.currentTarget.rowIndex)\ndocument.getElementById(\n\"queries_1-go_to_form-go_to_form\"\n).click();\n})\n}", + "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nvar current_index = table.row(this).index();\nvar current_rows = table.ajax.json().DT_rows_current;\ntable.shinyMethods.selectRows(current_rows[current_index]);\ndocument.getElementById(\n\"queries_1-go_to_form-go_to_form\"\n).click();\n})\n}", "selection": { "mode": "single", "selected": null, diff --git a/tests/testthat/_snaps/app_feature_03/app-feature-3-004.json b/tests/testthat/_snaps/app_feature_03/app-feature-3-004.json index 10546ddf..2b080c02 100644 --- a/tests/testthat/_snaps/app_feature_03/app-feature-3-004.json +++ b/tests/testthat/_snaps/app_feature_03/app-feature-3-004.json @@ -78,7 +78,7 @@ "serverSide": true, "processing": true }, - "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nt.currentTarget.classList.add('selected');\nvar tblID = $(t.target).closest('.datatables').attr('id')\nvar inputName = tblID + '_rows_selected'\nShiny.setInputValue(inputName, t.currentTarget.rowIndex)\ndocument.getElementById(\n\"queries_1-go_to_form-go_to_form\"\n).click();\n})\n}", + "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nvar current_index = table.row(this).index();\nvar current_rows = table.ajax.json().DT_rows_current;\ntable.shinyMethods.selectRows(current_rows[current_index]);\ndocument.getElementById(\n\"queries_1-go_to_form-go_to_form\"\n).click();\n})\n}", "selection": { "mode": "single", "selected": null, diff --git a/tests/testthat/_snaps/app_feature_03/app-feature-3-005.json b/tests/testthat/_snaps/app_feature_03/app-feature-3-005.json index 076da132..390e1ce3 100644 --- a/tests/testthat/_snaps/app_feature_03/app-feature-3-005.json +++ b/tests/testthat/_snaps/app_feature_03/app-feature-3-005.json @@ -82,7 +82,7 @@ "serverSide": true, "processing": true }, - "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nt.currentTarget.classList.add('selected');\nvar tblID = $(t.target).closest('.datatables').attr('id')\nvar inputName = tblID + '_rows_selected'\nShiny.setInputValue(inputName, t.currentTarget.rowIndex)\ndocument.getElementById(\n\"queries_1-go_to_form-go_to_form\"\n).click();\n})\n}", + "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nvar current_index = table.row(this).index();\nvar current_rows = table.ajax.json().DT_rows_current;\ntable.shinyMethods.selectRows(current_rows[current_index]);\ndocument.getElementById(\n\"queries_1-go_to_form-go_to_form\"\n).click();\n})\n}", "selection": { "mode": "single", "selected": null, diff --git a/tests/testthat/_snaps/mod_navigate_review/test-mod_navigate_review-001.json b/tests/testthat/_snaps/mod_navigate_review/test-mod_navigate_review-001.json index b732b543..531eb14d 100644 --- a/tests/testthat/_snaps/mod_navigate_review/test-mod_navigate_review-001.json +++ b/tests/testthat/_snaps/mod_navigate_review/test-mod_navigate_review-001.json @@ -55,7 +55,7 @@ "serverSide": true, "processing": true }, - "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nt.currentTarget.classList.add('selected');\nvar tblID = $(t.target).closest('.datatables').attr('id')\nvar inputName = tblID + '_rows_selected'\nShiny.setInputValue(inputName, t.currentTarget.rowIndex)\ndocument.getElementById(\n\"test-go_to_form-go_to_form\"\n).click();\n})\n}", + "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nvar current_index = table.row(this).index();\nvar current_rows = table.ajax.json().DT_rows_current;\ntable.shinyMethods.selectRows(current_rows[current_index]);\ndocument.getElementById(\n\"test-go_to_form-go_to_form\"\n).click();\n})\n}", "selection": { "mode": "single", "selected": null, diff --git a/tests/testthat/_snaps/mod_navigate_review/test-mod_navigate_review-002.json b/tests/testthat/_snaps/mod_navigate_review/test-mod_navigate_review-002.json index 39d21c49..bd68a5a9 100644 --- a/tests/testthat/_snaps/mod_navigate_review/test-mod_navigate_review-002.json +++ b/tests/testthat/_snaps/mod_navigate_review/test-mod_navigate_review-002.json @@ -59,7 +59,7 @@ "serverSide": true, "processing": true }, - "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nt.currentTarget.classList.add('selected');\nvar tblID = $(t.target).closest('.datatables').attr('id')\nvar inputName = tblID + '_rows_selected'\nShiny.setInputValue(inputName, t.currentTarget.rowIndex)\ndocument.getElementById(\n\"test-go_to_form-go_to_form\"\n).click();\n})\n}", + "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nvar current_index = table.row(this).index();\nvar current_rows = table.ajax.json().DT_rows_current;\ntable.shinyMethods.selectRows(current_rows[current_index]);\ndocument.getElementById(\n\"test-go_to_form-go_to_form\"\n).click();\n})\n}", "selection": { "mode": "single", "selected": null, diff --git a/tests/testthat/_snaps/mod_navigate_review/test-mod_navigate_review-003.json b/tests/testthat/_snaps/mod_navigate_review/test-mod_navigate_review-003.json index 34b25245..5d4c6b6e 100644 --- a/tests/testthat/_snaps/mod_navigate_review/test-mod_navigate_review-003.json +++ b/tests/testthat/_snaps/mod_navigate_review/test-mod_navigate_review-003.json @@ -243,7 +243,7 @@ "serverSide": true, "processing": true }, - "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nt.currentTarget.classList.add('selected');\nvar tblID = $(t.target).closest('.datatables').attr('id')\nvar inputName = tblID + '_rows_selected'\nShiny.setInputValue(inputName, t.currentTarget.rowIndex)\ndocument.getElementById(\n\"test-go_to_form-go_to_form\"\n).click();\n})\n}", + "callback": "function(table) {\ntable.on('dblclick', 'tbody tr', function(t) {\nvar current_index = table.row(this).index();\nvar current_rows = table.ajax.json().DT_rows_current;\ntable.shinyMethods.selectRows(current_rows[current_index]);\ndocument.getElementById(\n\"test-go_to_form-go_to_form\"\n).click();\n})\n}", "selection": { "mode": "single", "selected": null, From 6954ed42907e082629d9e8ac5c6789ca00c1ad7c Mon Sep 17 00:00:00 2001 From: Jeff Thompson <160783290+jthompson-arcus@users.noreply.github.com> Date: Wed, 15 Jan 2025 12:47:57 -0500 Subject: [PATCH 4/7] Update version number --- DESCRIPTION | 2 +- inst/golem-config.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 15fc4e91..1d3ef77c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: clinsight Title: ClinSight -Version: 0.1.1.9016 +Version: 0.1.1.9017 Authors@R: c( person("Leonard Daniël", "Samson", , "lsamson@gcp-service.com", role = c("cre", "aut"), comment = c(ORCID = "0000-0002-6252-7639")), diff --git a/inst/golem-config.yml b/inst/golem-config.yml index 7dbef609..340a5209 100644 --- a/inst/golem-config.yml +++ b/inst/golem-config.yml @@ -1,6 +1,6 @@ default: golem_name: clinsight - golem_version: 0.1.1.9016 + golem_version: 0.1.1.9017 app_prod: no user_identification: test_user study_data: !expr clinsight::clinsightful_data From 5482d8613066f82298dced299c8f64a417696d3c Mon Sep 17 00:00:00 2001 From: Jeff Thompson <160783290+jthompson-arcus@users.noreply.github.com> Date: Wed, 29 Jan 2025 09:57:05 -0500 Subject: [PATCH 5/7] Add comment on `dblclick_to_form()` --- R/fct_utils.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/fct_utils.R b/R/fct_utils.R index 50d5c4f8..d67d99af 100644 --- a/R/fct_utils.R +++ b/R/fct_utils.R @@ -710,6 +710,7 @@ custom_config_path <- function( dblclick_to_form <- function(bttn_ns) { DT::JS( "table.on('dblclick', 'tbody tr', function(t) {", + # This processing assumes `server = TRUE` "var current_index = table.row(this).index();", "var current_rows = table.ajax.json().DT_rows_current;", "table.shinyMethods.selectRows(current_rows[current_index]);", From ee9bfbd7d9e237671aec8521178d9203dd69a73b Mon Sep 17 00:00:00 2001 From: Jeff Thompson <160783290+jthompson-arcus@users.noreply.github.com> Date: Wed, 29 Jan 2025 10:27:48 -0500 Subject: [PATCH 6/7] Add check for sorting on overview table --- tests/testthat/test-app_feature_01.R | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-app_feature_01.R b/tests/testthat/test-app_feature_01.R index 09e4c69e..78d6ab24 100644 --- a/tests/testthat/test-app_feature_01.R +++ b/tests/testthat/test-app_feature_01.R @@ -11,7 +11,7 @@ describe( and being logged in as test user, I expect that I can see the start page, and that, by double clicking on clicking on 'BEL_04_772' within - the start page table, + the start page table, with and without sorting, I can see the adverse event page of the selected patient with all data shown in bold (indicating the need for review), and that, by clicking on [Study data], @@ -48,6 +48,13 @@ describe( output_names <- names(app$get_values(output = TRUE)$output) app$expect_values(output = vector_select(output_names, exclude = "visit_figure")) + app$set_inputs(main_tabs = "Start") + app$run_js('$("#start_page_1-overview_table th").filter(function() {return $(this).text() == "Status"}).closest("th").trigger("click")') + app$run_js('$("#start_page_1-overview_table td").filter(function() {return $(this).text() == "BEL_04_772"}).closest("tr").trigger("dblclick")') + app$wait_for_idle() + expect_equal(app$get_value(input = "main_tabs"), "Common events") + expect_equal(app$get_text("#navigate_participants_1-subject_info .value-box-title"), "BEL_04_772") + app$set_inputs(main_tabs = "Study data") app$wait_for_idle() output_names <- names(app$get_values(output = TRUE)$output) From 93de14dea19c7c482297626ecd2e34fd953db75d Mon Sep 17 00:00:00 2001 From: Jeff Thompson <160783290+jthompson-arcus@users.noreply.github.com> Date: Wed, 29 Jan 2025 10:28:44 -0500 Subject: [PATCH 7/7] Update version number --- DESCRIPTION | 2 +- inst/golem-config.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1d3ef77c..1d5ed047 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: clinsight Title: ClinSight -Version: 0.1.1.9017 +Version: 0.1.1.9018 Authors@R: c( person("Leonard Daniël", "Samson", , "lsamson@gcp-service.com", role = c("cre", "aut"), comment = c(ORCID = "0000-0002-6252-7639")), diff --git a/inst/golem-config.yml b/inst/golem-config.yml index 340a5209..82180efa 100644 --- a/inst/golem-config.yml +++ b/inst/golem-config.yml @@ -1,6 +1,6 @@ default: golem_name: clinsight - golem_version: 0.1.1.9017 + golem_version: 0.1.1.9018 app_prod: no user_identification: test_user study_data: !expr clinsight::clinsightful_data