Closed averissimo closed 4 months ago
Let's also introduce TESTING_DEPTH
functionality in the testthat setup to help avoid these tests on CRAN and when wanting to run only unit tests as suggested here.
The teal.modules.helios has an example of how it was done before.
I think we should also remove the sole pipe operator on TealAppDriver
I think we should also remove the sole pipe operator on TealAppDriver
Thank you. I always forget that :(
To run the e2e tests make sure to set the option for TESTING_DEPTH
above or equal to 5. Alternatively, a env variable with the same name can also be set. But, the precedence would be given to the option in case both are set.
options(TESTING_DEPTH = 5)
Filename Stmts Miss Cover Missing
------------------------------ ------- ------ ------- -------------------------------------------------------------------------------------------------------------------------------
R/dummy_functions.R 30 21 30.00% 21-33, 36-43
R/get_rcode_utils.R 31 1 96.77% 50
R/include_css_js.R 22 0 100.00%
R/init.R 86 31 63.95% 108-115, 161-162, 164, 176-197, 227-228, 230
R/landing_popup_module.R 25 25 0.00% 61-87
R/module_filter_manager.R 107 36 66.36% 37-43, 50-58, 67-72, 195, 200-213
R/module_nested_tabs.R 154 58 62.34% 39-112, 128, 180, 202, 228
R/module_snapshot_manager.R 209 157 24.88% 87-99, 127-136, 140-152, 154-161, 168-182, 186-188, 190-195, 198-208, 211-227, 236-251, 265-288, 291-302, 305-311, 325, 343-366
R/module_tabs_with_filters.R 76 33 56.58% 33-68, 100, 116
R/module_teal_with_splash.R 114 4 96.49% 110, 131, 197-198
R/module_teal.R 106 29 72.64% 57, 68, 77, 150-151, 157, 176-207
R/modules.R 152 26 82.89% 127-130, 147-151, 206-209, 291-292, 344, 356-364, 418-421
R/reporter_previewer_module.R 18 2 88.89% 30, 34
R/show_rcode_modal.R 19 19 0.00% 17-36
R/tdata.R 53 1 98.11% 154
R/teal_data_module-eval_code.R 27 0 100.00%
R/teal_data_module-within.R 7 0 100.00%
R/teal_data_module.R 6 0 100.00%
R/teal_reporter.R 62 5 91.94% 69, 118-119, 122, 139
R/teal_slices-store.R 29 0 100.00%
R/teal_slices.R 59 12 79.66% 137-150
R/TealAppDriver.R 231 231 0.00% 29-469
R/utils.R 173 1 99.42% 255
R/validate_inputs.R 32 0 100.00%
R/validations.R 58 37 36.21% 110-377
R/zzz.R 12 8 33.33% 3-15
TOTAL 1898 737 61.17%
Filename Stmts Miss Cover
----------------------------- ------- ------ -------
R/dummy_functions.R 0 +21 -70.00%
R/init.R 0 +6 -6.98%
R/module_filter_manager.R 0 +20 -18.69%
R/module_nested_tabs.R 0 +55 -35.71%
R/module_tabs_with_filters.R 0 +33 -43.42%
R/module_teal_with_splash.R 0 +3 -2.63%
R/module_teal.R 0 +28 -26.42%
R/modules.R 0 +3 -1.97%
R/reporter_previewer_module.R 0 +2 -11.11%
R/teal_slices.R 0 +12 -20.34%
R/TealAppDriver.R +6 +176 -75.56%
TOTAL +6 +359 -18.85%
Results for commit: 748a869863298a49d5f06e3c9e5dc8025a25c1de
Minimum allowed coverage is 80%
:recycle: This comment has been updated with latest results
1 files 27 suites 11s :stopwatch: 229 tests 208 :white_check_mark: 21 :zzz: 0 :x: 440 runs 419 :white_check_mark: 21 :zzz: 0 :x:
Results for commit 748a8698.
:recycle: This comment has been updated with latest results.
Test Suite | $Status$ | Time on main |
$±Time$ | $±Tests$ | $±Skipped$ | $±Failures$ | $±Errors$ |
---|---|---|---|---|---|---|---|
shinytest2-filter_panel | 💚 | $19.17$ | $-19.10$ | $-2$ | $+3$ | $0$ | $0$ |
shinytest2-init | 💚 | $10.48$ | $-10.44$ | $-14$ | $+3$ | $0$ | $0$ |
shinytest2-modules | 💚 | $16.76$ | $-16.69$ | $-1$ | $+5$ | $0$ | $0$ |
shinytest2-reporter | 💚 | $14.46$ | $-14.43$ | $-1$ | $+3$ | $0$ | $0$ |
shinytest2-show-rcode | 💚 | $3.82$ | $-3.80$ | $-8$ | $+1$ | $0$ | $0$ |
shinytest2-teal_data_module | 💚 | $9.90$ | $-9.86$ | $-1$ | $+3$ | $0$ | $0$ |
shinytest2-teal_slices | 💚 | $10.79$ | $-10.77$ | $-16$ | $+2$ | $0$ | $0$ |
shinytest2-utils | 💚 | $3.35$ | $-3.34$ | $-3$ | $+1$ | $0$ | $0$ |
Results for commit f8e5b6feaffaa01ead9e4dbee85443c1ad8cacc5
♻️ This comment has been updated with latest results.
Works as expected, for TESTING_DEPTH = 5
runs all tests, and for higher it omits {shinytest2}
tests.
Sys.setenv(TESTING_DEPTH = 5)
> devtools::test()
ℹ Testing teal
You are using teal version 0.15.2.9010
✔ | F W S OK | Context
✔ | 4 | filter_manager
✔ | 10 | init
✔ | 33 | module_nested_tabs [1.1s]
✔ | 8 | module_tabs_with_filters [1.0s]
✔ | 8 | module_teal
✔ | 41 | module_teal_with_splash
✔ | 95 | modules
✔ | 7 | rcode_utils
✔ | 5 | report_previewer_module
✖ | 2 1 | shinytest2-filter_panel [21.7s]
> Sys.setenv(TESTING_DEPTH = 3)
> devtools::test()
ℹ Testing teal
You are using teal version 0.15.2.9010
✔ | F W S OK | Context
✔ | 4 | filter_manager
✔ | 10 | init [1.1s]
✔ | 33 | module_nested_tabs
✔ | 8 | module_tabs_with_filters
✔ | 8 | module_teal
✔ | 41 | module_teal_with_splash
✔ | 95 | modules
✔ | 7 | rcode_utils
✔ | 5 | report_previewer_module
✔ | 3 0 | shinytest2-filter_panel
✔ | 3 0 | shinytest2-init
✔ | 5 0 | shinytest2-modules
✔ | 3 0 | shinytest2-reporter
✔ | 1 0 | shinytest2-show-rcode
✔ | 2 0 | shinytest2-teal_slices
✔ | 1 0 | shinytest2-utils
✔ | 2 | snapshot_manager
✔ | 41 | tdata
✔ | 16 | teal_data_module-eval_code
✔ | 3 | teal_data_module
✔ | 25 | teal_reporter
✔ | 15 | teal_slices-store
✔ | 18 | teal_slices
✔ | 35 | utils
✔ | 17 | validate_has_data
✔ | 36 | validate_inputs
══ Results ═════════════════════════════════════════════════════════════════
Duration: 7.3 s
── Skipped tests (18) ──────────────────────────────────────────────────────
• testing depth 3 is below current testing specification 5 (18):
test-shinytest2-filter_panel.R:2:3, test-shinytest2-filter_panel.R:31:3,
test-shinytest2-filter_panel.R:74:3, test-shinytest2-init.R:2:3,
test-shinytest2-init.R:13:3, test-shinytest2-init.R:70:3,
test-shinytest2-modules.R:2:3, test-shinytest2-modules.R:41:3,
test-shinytest2-modules.R:58:3, test-shinytest2-modules.R:75:3,
test-shinytest2-modules.R:95:3, test-shinytest2-reporter.R:2:3,
test-shinytest2-reporter.R:23:3, test-shinytest2-reporter.R:44:3,
test-shinytest2-show-rcode.R:2:3, test-shinytest2-teal_slices.R:2:3,
test-shinytest2-teal_slices.R:47:3, test-shinytest2-utils.R:2:3
[ FAIL 0 | WARN 0 | SKIP 18 | PASS 419 ]
Great job with TESTING_DEPTH
. Is it worth to propagate these changes to other repos that use it?
Eventually, we will have to do it once we setup the shinytest2 for them.
I have read the CLA Document and I hereby sign the CLA
Pull Request
Part of https://github.com/insightsengineering/coredev-tasks/issues/503
Changes description:
get_active_data_filters
to return active selection valueTealAppDriver