Skip to content

Conversation

@averissimo
Copy link
Contributor

@averissimo averissimo commented Dec 19, 2025

Pull Request

Changes description

  • Fixes integration test stability by implementing same mechanism as teal.widgets and teal

@averissimo averissimo enabled auto-merge (squash) December 19, 2025 16:03
@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2025

Unit Tests Summary

  1 files   31 suites   41s ⏱️
409 tests 394 ✅ 15 💤 0 ❌
871 runs  856 ✅ 15 💤 0 ❌

Results for commit 5b70d59.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2025

badge

Code Coverage Summary

Filename                        Stmts    Miss  Cover    Missing
----------------------------  -------  ------  -------  -------------------------------------------------------------------------------------------------------------------------
R/calls_combine_by.R                7       0  100.00%
R/choices_labeled.R                23       1  95.65%   34
R/count_labels.R                  126       0  100.00%
R/filter_panel_api.R               27       1  96.30%   132
R/FilteredData-utils.R             58      17  70.69%   38-43, 139, 161-170
R/FilteredData.R                  522     118  77.39%   109, 138, 186, 325, 397, 484-493, 514, 532-590, 610-613, 657, 712-728, 873, 885-905
R/FilteredDataset-utils.R          23       1  95.65%   125
R/FilteredDataset.R               264       5  98.11%   49, 154, 189, 214-215
R/FilteredDatasetDataframe.R      123       3  97.56%   87, 148, 158
R/FilteredDatasetDefault.R         18       4  77.78%   104-117
R/FilteredDatasetMAE.R            133      15  88.72%   56, 118-123, 160-165, 169-170
R/FilterPanelAPI.R                 10       0  100.00%
R/FilterState-utils.R             101       2  98.02%   264, 294
R/FilterState.R                   366      21  94.26%   91, 155, 266-267, 273-274, 328, 330, 416, 632, 675-679, 698, 762-768, 779
R/FilterStateChoices.R            349      10  97.13%   303, 426-429, 541-544, 589
R/FilterStateDate.R               221      46  79.19%   233, 361-371, 382-387, 391-396, 404-419, 438-445
R/FilterStateDatettime.R          316     206  34.81%   269, 321-559
R/FilterStateEmpty.R               53      31  41.51%   89, 99-104, 117, 129-169
R/FilterStateExpr.R                81       1  98.77%   244
R/FilterStateLogical.R            201     149  25.87%   139, 161, 221, 225-414
R/FilterStateRange.R              409     121  70.42%   265, 387, 498-505, 508-518, 521, 532-538, 549-561, 565-575, 579-581, 594-620, 635-642, 645-652, 666-683, 718-723, 733-735
R/FilterStates-utils.R             70       7  90.00%   108, 127, 188-194
R/FilterStates.R                  379      19  94.99%   63, 92-96, 208, 425, 470, 559-563, 608, 726-729
R/FilterStatesDF.R                  5       0  100.00%
R/FilterStatesMAE.R                10       1  90.00%   40
R/FilterStatesMatrix.R              7       0  100.00%
R/FilterStatesSE.R                171      47  72.51%   36, 73-75, 85-87, 119, 191-201, 213-223, 230-237, 245-252, 259
R/include_css_js.R                  5       0  100.00%
R/teal_slice.R                    108       1  99.07%   206
R/teal_slices.R                    85       5  94.12%   150-155
R/test_utils.R                     21       0  100.00%
R/utils.R                          29       0  100.00%
R/variable_types.R                 15       1  93.33%   48
R/zzz.R                            16      16  0.00%    3-46
TOTAL                            4352     849  80.49%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: 5b70d59

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
FilteredData 💔 $23.47$ $+1.13$ $0$ $0$ $0$ $0$

Results for commit 51ecc4c

♻️ This comment has been updated with latest results.

Copy link
Contributor

@m7pr m7pr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, left just one comment that maybe we can introduce

escape_js_selector <- function(selector) {
  selector <- gsub("\\", "\\\\", selector, fixed = TRUE)
  selector <- gsub('"', '\\"', selector, fixed = TRUE)
  selector
}

so that some functions could be simplified to

click_button_js <- function(selector) {
  checkmate::assert(
    .var.name = "selector",
    combine = "and",
    checkmate::check_string(selector)
  )
  
  selector_escaped <- escape_js_selector(selector)
  
  sprintf("(btn = document.querySelector(\"%s\")) ? (btn.click(), true) : false;", selector_escaped)
}

@averissimo
Copy link
Contributor Author

averissimo commented Jan 19, 2026

(edit: moved my reply to the code comment)

@averissimo averissimo merged commit e5c1dcf into main Jan 20, 2026
26 checks passed
@averissimo averissimo deleted the fix_integration_tests branch January 20, 2026 12:56
@github-actions github-actions bot locked and limited conversation to collaborators Jan 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants