Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork51
Follow-up changes to TealAppDriver#1653
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
github-actionsbot commentedNov 24, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Code Coverage SummaryDiff against mainResults for commit:5bdede4 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
github-actionsbot commentedNov 24, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Unit Tests Summary 1 files 33 suites 2m 41s ⏱️ Results for commit5bdede4. ♻️ This comment has been updated with latest results. |
github-actionsbot commentedNov 24, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Unit Test Performance Difference
Additional test case details
Results for commite09e0ff ♻️ This comment has been updated with latest results. |
llrs-roche left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't see any test failing and I agree this might be more sensible.
Is there a test case where the difference that makes on tests are clear?
What I noticed is that with TRUE it will have #:
app_driver$namespaces(FALSE)$module("a > img")## [1] "teal-teal_modules-nav-summary_by_row_groups_table-module-a-plot_main > img"app_driver$namespaces(TRUE)$module("a > img")## [1] "#teal-teal_modules-nav-summary_by_row_groups_table-module-a-plot_main > img"
Couldn't that be an option ofget_active_module_plot_output to control for this?
Uh oh!
There was an error while loading.Please reload this page.
# Fix e2e testsFixes#1440 Companion#1441To verify the result of tests, you should do the following:1. Install [thisbranch](insightsengineering/teal#1653) of teal2. Install teal modules clinical on this version3.```devtools::load_all()library(shinytest2)source("tests/testthat/helper-TealAppDriver.R")source("tests/testthat/helper-testing-depth.R")testthat::test_file("tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R")testthat::test_file("tests/testthat/test-shinytest2-tm_g_pp_vitals.R")testthat::test_file("tests/testthat/test-shinytest2-tm_g_pp_therapy.R")testthat::test_file("tests/testthat/test-shinytest2-tm_g_pp_adverse_events.R")```---------Co-authored-by: osenan <oriol@praenoscere.com>Co-authored-by: Lluís Revilla <185338939+llrs-roche@users.noreply.github.com>Co-authored-by: Marcin <133694481+m7pr@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull request overview
This PR modifies theTealAppDriver class to improve the robustness of namespace detection by changing when and how the active module namespace is determined. The changes address timing issues where namespace extraction was failing due to the page not being fully loaded or stable.
Key changes:
- Moved
set_active_ns()call to afterwait_for_idle()in the initialization sequence - Updated
get_active_module_plot_output()to usenamespaces(TRUE)for proper CSS selector generation - Added comprehensive fallback logic in
set_active_ns()to handle cases where active module detection fails
💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
get_active_input/output
osenan left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This PR fixes our issues of reviewing plot content and other problems while executing e2e tests.
I only added a suggestion to control better the additionalSys.sleep as suggested by @copilot.
I think in the future we should do a performance analysis of teal app and ofteal_app_driver in order to optimize the performance execution of e2e tests.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
osenan commentedDec 2, 2025
@copilot we do not need any new PR, please do not do any action for the moment |
Co-authored-by: Oriol Senan <35930244+osenan@users.noreply.github.com>Signed-off-by: Lluís Revilla <185338939+llrs-roche@users.noreply.github.com>
averissimo left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I have some concerns on this, please don't merge yet
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
llrs-roche left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Double checking the logic of the changes I have some concerns too:
- We omit some selectors on
extract_wrapper_idand then we have to try so hard onset_active_nsto get new ones. - On
set_active_nswe duplicate searching withextract_wrapper_id(".teal-modules-tree li a.module-button[href*='-wrapper']:not([href='#'])"). This suggest the order or logic could be improved. set_active_nshas a waiting period that might affects public methodsinitialize,navigate_teal_tab,add_filter_var. This requires longer testing time without changing the application itself.
I thinkextract_wrapper_id could return multiple ids, and then it is the responsibility ofset_active_ns to pick the right one of the valid ones.
Uh oh!
There was an error while loading.Please reload this page.
llrs-roche left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I haven't tested yet but I left several comments to simplify the code. I'll test it and update the status of the review
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Lluís Revilla <185338939+llrs-roche@users.noreply.github.com>Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
Add tests for bookmarking options and behavior in Shiny modules.Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
llrs-roche left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
After discussing with Marcin about tests/testthat/test-module_bookmark_manager.R we decided to bring it back.
Uh oh!
There was an error while loading.Please reload this page.
Companion to
Changes