Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wave 1 - tm_g_ci shinytests #1125

Merged
merged 15 commits into from
Apr 25, 2024
Merged

Conversation

gogonzo
Copy link
Contributor

@gogonzo gogonzo commented Apr 21, 2024

Part of #1108

@gogonzo gogonzo added the core label Apr 21, 2024
Copy link
Contributor

github-actions bot commented Apr 21, 2024

Unit Tests Summary

  1 files  ± 0   38 suites  +2   11m 14s ⏱️ + 4m 43s
333 tests +32  219 ✅ +28  110 💤 ±0  4 ❌ +4 
607 runs  +94  377 ✅ +86  222 💤 ±0  8 ❌ +8 

For more details on these failures, see this check.

Results for commit fba18f9. ± Comparison against base commit 6f4a700.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Apr 21, 2024

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
shinytest2-tm_a_gee 💔 $0.25$ $+171.64$ $+35$ $-18$ $+8$ $0$
shinytest2-tm_g_barchart_simple 👶 $+227.98$ $+73$ $0$ $0$ $0$
shinytest2-tm_g_ci 👶 $+102.42$ $+41$ $0$ $0$ $0$
shinytest2-tm_g_forest_rsp 👶 $+167.30$ $+48$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
shinytest2-tm_a_gee 💔 $0.01$ $+7.62$ e2e_tm_a_gee_Change_in_arm_var_changes_the_table_and_does_not_throw_validation_errors.
shinytest2-tm_a_gee 💔 $0.01$ $+6.98$ e2e_tm_a_gee_Deselection_of_arm_var_throws_validation_error.
shinytest2-tm_a_gee 💔 $0.01$ $+6.91$ e2e_tm_a_gee_Deselection_of_conf_level_throws_validation_error.
shinytest2-tm_a_gee 💔 $0.01$ $+26.85$ e2e_tm_a_gee_Deselection_of_cor_struct_throws_validation_error.
shinytest2-tm_a_gee 💔 $0.01$ $+27.08$ e2e_tm_a_gee_Deselection_of_cov_var_throws_validation_error.
shinytest2-tm_a_gee 💔 $0.01$ $+6.90$ e2e_tm_a_gee_Deselection_of_id_var_throws_validation_error.
shinytest2-tm_a_gee 💔 $0.01$ $+6.92$ e2e_tm_a_gee_Deselection_of_paramcd_throws_validation_error.
shinytest2-tm_a_gee 💔 $0.01$ $+7.11$ e2e_tm_a_gee_Deselection_of_visit_var_throws_validation_error.
shinytest2-tm_a_gee 💔 $0.02$ $+7.23$ e2e_tm_a_gee_Module_initializes_in_teal_without_errors_and_produces_table_output.
shinytest2-tm_a_gee 💔 $0.01$ $+7.56$ e2e_tm_a_gee_Selection_of_conf_level_changes_the_table_and_does_not_throw_validation_errors.
shinytest2-tm_a_gee 💔 $0.01$ $+6.87$ e2e_tm_a_gee_Selection_of_conf_level_out_of_0_1_range_throws_validation_error.
shinytest2-tm_a_gee 💔 $0.01$ $+7.50$ e2e_tm_a_gee_Selection_of_cor_struct_changes_the_table_and_does_not_throw_validation_errors.
shinytest2-tm_a_gee 💔 $0.01$ $+7.94$ e2e_tm_a_gee_Selection_of_cov_var_changes_the_table_and_does_not_throw_validation_errors.
shinytest2-tm_a_gee 💔 $0.01$ $+8.16$ e2e_tm_a_gee_Selection_of_id_var_changes_the_table_and_does_not_throw_validation_errors.
shinytest2-tm_a_gee 💔 $0.01$ $+7.67$ e2e_tm_a_gee_Selection_of_output_table_changes_the_table_and_doesn_t_throw_validation_error.
shinytest2-tm_a_gee 💔 $0.01$ $+7.48$ e2e_tm_a_gee_Selection_of_paramcd_changes_the_table_and_does_not_throw_validation_errors.
shinytest2-tm_a_gee 💔 $0.01$ $+7.84$ e2e_tm_a_gee_Selection_of_visit_var_changes_the_table_and_does_not_throw_validation_errors.
shinytest2-tm_a_gee 💔 $0.01$ $+7.01$ e2e_tm_a_gee_Starts_with_specified_label_id_var_arm_var_visit_var_paramcd_cov_var_conf_level_and_conf_struct.
shinytest2-tm_g_barchart_simple 👶 $+9.45$ e2e_tm_g_barchart_simple_Changing_barlayout_changes_the_plot_and_does_not_throw_validation_errors.
shinytest2-tm_g_barchart_simple 👶 $+9.75$ e2e_tm_g_barchart_simple_Changing_expand_y_range_changes_the_plot_and_does_not_throw_validation_errors.
shinytest2-tm_g_barchart_simple 👶 $+9.66$ e2e_tm_g_barchart_simple_Changing_facet_scale_x_changes_the_plot_and_does_not_throw_validation_errors.
shinytest2-tm_g_barchart_simple 👶 $+9.85$ e2e_tm_g_barchart_simple_Changing_facet_scale_y_changes_the_plot_and_does_not_throw_validation_errors.
shinytest2-tm_g_barchart_simple 👶 $+10.11$ e2e_tm_g_barchart_simple_Changing_flip_axis_changes_the_plot_and_does_not_throw_validation_errors.
shinytest2-tm_g_barchart_simple 👶 $+10.14$ e2e_tm_g_barchart_simple_Changing_label_bars_changes_the_plot_and_does_not_throw_validation_errors.
shinytest2-tm_g_barchart_simple 👶 $+12.56$ e2e_tm_g_barchart_simple_Changing_rotate_bar_labels_changes_the_plot_and_does_not_throw_validation_errors.
shinytest2-tm_g_barchart_simple 👶 $+9.97$ e2e_tm_g_barchart_simple_Changing_rotate_x_label_changes_the_plot_and_does_not_throw_validation_errors.
shinytest2-tm_g_barchart_simple 👶 $+9.65$ e2e_tm_g_barchart_simple_Changing_rotate_y_label_changes_the_plot_and_does_not_throw_validation_errors.
shinytest2-tm_g_barchart_simple 👶 $+9.60$ e2e_tm_g_barchart_simple_Changing_show_n_changes_the_plot_and_does_not_throw_validation_errors.
shinytest2-tm_g_barchart_simple 👶 $+10.54$ e2e_tm_g_barchart_simple_De_selection_of_fill_dataset_changes_the_element_and_does_not_throw_validation_errors
shinytest2-tm_g_barchart_simple 👶 $+9.31$ e2e_tm_g_barchart_simple_De_selection_of_x_facet_dataset_changes_the_element_and_does_not_throw_validation_errors
shinytest2-tm_g_barchart_simple 👶 $+9.47$ e2e_tm_g_barchart_simple_De_selection_of_y_facet_dataset_changes_the_element_and_does_not_throw_validation_errors
shinytest2-tm_g_barchart_simple 👶 $+7.80$ e2e_tm_g_barchart_simple_Deselection_of_x_throws_validation_error.
shinytest2-tm_g_barchart_simple 👶 $+8.96$ e2e_tm_g_barchart_simple_Duplicate_between_x_and_fill_selection_throws_validation_error
shinytest2-tm_g_barchart_simple 👶 $+10.00$ e2e_tm_g_barchart_simple_Duplicate_between_x_and_x_facet_selection_throws_validation_error
shinytest2-tm_g_barchart_simple 👶 $+10.53$ e2e_tm_g_barchart_simple_Duplicate_between_x_and_y_facet_selection_throws_validation_error
shinytest2-tm_g_barchart_simple 👶 $+7.36$ e2e_tm_g_barchart_simple_Module_initializes_in_teal_without_errors_and_produces_output.
shinytest2-tm_g_barchart_simple 👶 $+11.95$ e2e_tm_g_barchart_simple_Selection_of_fill_dataset_changes_the_element_and_does_not_throw_validation_errors
shinytest2-tm_g_barchart_simple 👶 $+9.99$ e2e_tm_g_barchart_simple_Selection_of_x_changes_the_element_and_does_not_throw_validation_errors
shinytest2-tm_g_barchart_simple 👶 $+11.33$ e2e_tm_g_barchart_simple_Selection_of_x_facet_dataset_changes_the_element_and_does_not_throw_validation_errors
shinytest2-tm_g_barchart_simple 👶 $+11.65$ e2e_tm_g_barchart_simple_Selection_of_y_facet_dataset_changes_the_element_and_does_not_throw_validation_errors
shinytest2-tm_g_barchart_simple 👶 $+8.33$ e2e_tm_g_barchart_simple_Starts_with_specified_label_id_var_arm_var_visit_var_paramcd_cov_var_conf_level_and_conf_struct.
shinytest2-tm_g_ci 👶 $+7.14$ e2e_tm_g_ci_Deselecting_AVISIT_filter_value_throws_validation_error.
shinytest2-tm_g_ci 👶 $+6.97$ e2e_tm_g_ci_Deselecting_PARAMCD_filter_value_throws_validation_error.
shinytest2-tm_g_ci 👶 $+7.55$ e2e_tm_g_ci_Deselecting_color_column_changes_plot_output_and_doesn_t_throw_validation_error.
shinytest2-tm_g_ci 👶 $+7.11$ e2e_tm_g_ci_Deselecting_x_var_column_throws_validation_error.
shinytest2-tm_g_ci 👶 $+7.50$ e2e_tm_g_ci_Deselecting_y_var_column_throws_validation_error.
shinytest2-tm_g_ci 👶 $+7.23$ e2e_tm_g_ci_Module_initializes_with_specified_label_x_var_y_var_ADLB_filters_color_conf_level_and_stat.
shinytest2-tm_g_ci 👶 $+7.87$ e2e_tm_g_ci_Selecting_AVISIT_filter_value_doesn_t_throw_validation_errors.
shinytest2-tm_g_ci 👶 $+7.78$ e2e_tm_g_ci_Selecting_PARAMCD_filter_value_changes_plot_and_doesn_t_throw_validation_errors.
shinytest2-tm_g_ci 👶 $+7.35$ e2e_tm_g_ci_Selecting_color_column_changes_plot_output_and_doesn_t_throw_validation_errors.
shinytest2-tm_g_ci 👶 $+7.30$ e2e_tm_g_ci_Selecting_confidence_interval_value_changes_plot_and_doesn_t_throw_any_errors.
shinytest2-tm_g_ci 👶 $+7.25$ e2e_tm_g_ci_Selecting_statistic_to_use_changes_a_plot_and_doesn_t_throw_any_errors.
shinytest2-tm_g_ci 👶 $+7.59$ e2e_tm_g_ci_Selecting_x_var_column_changes_plot_and_doesn_t_throw_validation_errors.
shinytest2-tm_g_ci 👶 $+7.38$ e2e_tm_g_ci_Selecting_y_var_column_changes_plot_and_doesn_t_throw_validation_errors.
shinytest2-tm_g_ci 👶 $+6.41$ e2e_tm_g_ci_example_ci_module_initializes_in_teal_without_errors_and_produces_plot_output.
shinytest2-tm_g_forest_rsp 👶 $+9.56$ e2e_tm_g_forest_rsp_Changing_font_size_changes_plot_and_doesn_t_throw_validation_errors.
shinytest2-tm_g_forest_rsp 👶 $+9.81$ e2e_tm_g_forest_rsp_Changing_rel_width_forest_changes_plot_and_doesn_t_throw_validation_errors.
shinytest2-tm_g_forest_rsp 👶 $+8.75$ e2e_tm_g_forest_rsp_Deselecting_arm_var_throws_validation_error.
shinytest2-tm_g_forest_rsp 👶 $+8.99$ e2e_tm_g_forest_rsp_Deselecting_conf_level_or_selecting_outside_the_range_of_0_1_throws_validation_error.
shinytest2-tm_g_forest_rsp 👶 $+8.65$ e2e_tm_g_forest_rsp_Deselecting_paramcd_throws_validation_error.
shinytest2-tm_g_forest_rsp 👶 $+8.45$ e2e_tm_g_forest_rsp_Deselecting_responders_throws_validation_error.
shinytest2-tm_g_forest_rsp 👶 $+9.91$ e2e_tm_g_forest_rsp_Deselecting_strata_var_changes_plot_and_doesn_t_throw_validation_errors.
shinytest2-tm_g_forest_rsp 👶 $+9.42$ e2e_tm_g_forest_rsp_Deselecting_subgroup_var_changes_plot_and_doesn_t_throw_validation_errors.
shinytest2-tm_g_forest_rsp 👶 $+7.73$ e2e_tm_g_forest_rsp_Module_initializes_in_teal_without_errors_and_produces_plot_output.
shinytest2-tm_g_forest_rsp 👶 $+8.75$ e2e_tm_g_forest_rsp_Module_initializes_with_specified_label_arm_var_paramcd_aval_var_responders_subgroup_var_strata_var_conf_level_fixed_symbol_size_rel_width_forest_font_size.
shinytest2-tm_g_forest_rsp 👶 $+8.50$ e2e_tm_g_forest_rsp_Selecting_a_non_factors_column_in_subgroup_var_throws_validation_error.
shinytest2-tm_g_forest_rsp 👶 $+9.76$ e2e_tm_g_forest_rsp_Selecting_arm_var_changes_plot_and_doesn_t_throw_validation_errors.
shinytest2-tm_g_forest_rsp 👶 $+9.55$ e2e_tm_g_forest_rsp_Selecting_conf_level_changes_plot_and_doesn_t_throw_validation_errors.
shinytest2-tm_g_forest_rsp 👶 $+10.89$ e2e_tm_g_forest_rsp_Selecting_paramcd_changes_plot_and_doesn_t_throw_validation_errors.
shinytest2-tm_g_forest_rsp 👶 $+9.62$ e2e_tm_g_forest_rsp_Selecting_responders_changes_plot_and_doesn_t_throw_validation_errors.
shinytest2-tm_g_forest_rsp 👶 $+9.75$ e2e_tm_g_forest_rsp_Selecting_strata_var_changes_plot_and_doesn_t_throw_validation_errors.
shinytest2-tm_g_forest_rsp 👶 $+9.78$ e2e_tm_g_forest_rsp_Selecting_subgroup_var_changes_plot_and_doesn_t_throw_validation_errors.
shinytest2-tm_g_forest_rsp 👶 $+9.43$ e2e_tm_g_forest_rsp_Unsetting_fixed_symbol_size_changes_plot_and_doesn_t_throw_validation_errors.

Results for commit 2fdc264

♻️ This comment has been updated with latest results.

@gogonzo gogonzo mentioned this pull request Apr 22, 2024
42 tasks
@m7pr m7pr changed the base branch from main to shinytest2@main April 22, 2024 09:52
@m7pr m7pr changed the title Wave 1 - tm_g_ci tests Wave 1 - tm_g_ci shinytests Apr 22, 2024
@m7pr
Copy link
Contributor

m7pr commented Apr 22, 2024

Hey, this is minor, but we had a convention on a file name in {tmg} test-shinytest2-module_name.R https://github.com/insightsengineering/teal.modules.general/tree/main/tests/testthat
We can unify on a shinytest2@main feature branch

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.

I know this is minor, but in all tests we do prefix functions from other packages

tests/testthat/test-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-tm_g_ci.R Outdated Show resolved Hide resolved
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.

Not a big deal, but you were missing app_driver$stop() at the end of each test.
I am unsure if shinytest2 closes the app/process/driver on its own so we specifically clean-up ourself.

tests/testthat/test-shinytest2-tm_g_ci.R Show resolved Hide resolved
tests/testthat/test-shinytest2-tm_g_ci.R Show resolved Hide resolved
tests/testthat/test-shinytest2-tm_g_ci.R Show resolved Hide resolved
tests/testthat/test-shinytest2-tm_g_ci.R Show resolved Hide resolved
tests/testthat/test-shinytest2-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-shinytest2-tm_g_ci.R Show resolved Hide resolved
tests/testthat/test-shinytest2-tm_g_ci.R Show resolved Hide resolved
tests/testthat/test-shinytest2-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-shinytest2-tm_g_ci.R Show resolved Hide resolved
tests/testthat/test-shinytest2-tm_g_ci.R Show resolved Hide resolved
@m7pr m7pr self-assigned this Apr 22, 2024
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.

Would the check of the validation error message be useful?
Unsure how to get validation message for empty color-dataset_ADSL_singleextract-select

tests/testthat/test-shinytest2-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-shinytest2-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-shinytest2-tm_g_ci.R Outdated Show resolved Hide resolved
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.

app_driver <- app_driver_tm_g_ci()
[INFO] 2024-04-22 13:50:57.5636 pid:23284 token:[] teal.modules.clinical Initializing tm_g_ci
[ERROR] 2024-04-22 13:50:57.5671 pid:23284 token:[] teal.modules.clinical In ‘app_driver_tm_g_ci()’: object 'ADLB' not found
Error in app_driver_tm_g_ci() : object 'ADLB' not found

tests/testthat/test-shinytest2-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-shinytest2-tm_g_ci.R Outdated Show resolved Hide resolved
tests/testthat/test-shinytest2-tm_g_ci.R Outdated Show resolved Hide resolved
@gogonzo gogonzo linked an issue Apr 23, 2024 that may be closed by this pull request
42 tasks
@m7pr
Copy link
Contributor

m7pr commented Apr 23, 2024

@gogonzo I think this is ready to go. Last things to sort out

@gogonzo
Copy link
Contributor Author

gogonzo commented Apr 23, 2024

use new TealAppDriver method ($get_active_module_pws_output) instead of a custom active_module_pws_output function once this is discussed, reviewed and merged

Yup I will update once teal PR gets through

m7pr added a commit to insightsengineering/teal that referenced this pull request Apr 24, 2024
Motivated by the need to check current plot and table contents

- insightsengineering/teal.modules.clinical#1125
- insightsengineering/teal.modules.clinical#1127

---------

Signed-off-by: Marcin <[email protected]>
Co-authored-by: kartikeya kirar <[email protected]>
@m7pr
Copy link
Contributor

m7pr commented Apr 24, 2024

I think you are good to use new methods since insightsengineering/teal#1208 was merged

@gogonzo
Copy link
Contributor Author

gogonzo commented Apr 24, 2024

I think you are good to use new methods since insightsengineering/teal#1208 was merged

Implemented appDr$get_active_module_pws_output()

m7pr and others added 2 commits April 25, 2024 13:58
Part of #1108 

We can move `active_module_tws_output` to be a method of
`teal:::TealAppDriver`

---------

Signed-off-by: Marcin <[email protected]>
Co-authored-by: kartikeya kirar <[email protected]>
@m7pr
Copy link
Contributor

m7pr commented Apr 25, 2024

@gogonzo I think you are ready to squash and merge

@gogonzo gogonzo merged commit 8917d04 into shinytest2@main Apr 25, 2024
20 of 22 checks passed
@gogonzo gogonzo deleted the 1108_shinytest2_tm_g_ci@main branch April 25, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement shinytest2 for tmc
5 participants