Skip to content

Conversation

@m7pr
Copy link
Contributor

@m7pr m7pr commented Nov 21, 2025

Removed 391 occurrences across 36 test files. The tests should now run without those chromium skips.

Fixes

Companion to

@m7pr m7pr requested a review from llrs-roche November 21, 2025 10:09
@m7pr m7pr added the core label Nov 21, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 2025

Unit Tests Summary

    1 files     71 suites   1h 51m 46s ⏱️
  734 tests   609 ✅ 117 💤 8 ❌
2 001 runs  1 876 ✅ 117 💤 8 ❌

For more details on these failures, see this check.

Results for commit 01af5a0.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 2025

Unit Test Performance Difference

Test suite performance difference
Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
shinytest2-tm_a_gee 💔 $0.23$ $+3.44$ $0$ $0$ $0$ $0$
shinytest2-tm_a_mmrm 💔 $0.66$ $+7.66$ $0$ $0$ $0$ $0$
shinytest2-tm_g_barchart_simple 💔 $0.33$ $+2.67$ $0$ $0$ $0$ $0$
shinytest2-tm_g_ci 💔 $0.20$ $+1.14$ $0$ $0$ $0$ $0$
shinytest2-tm_g_forest_rsp 💔 $0.25$ $+2.70$ $0$ $0$ $0$ $0$
shinytest2-tm_g_ipp 💔 $0.19$ $+2.73$ $0$ $0$ $0$ $0$
shinytest2-tm_g_km 💔 $0.38$ $+3.08$ $0$ $0$ $0$ $0$
shinytest2-tm_g_lineplot 💔 $0.14$ $+1.16$ $0$ $0$ $0$ $0$
shinytest2-tm_g_pp_adverse_events 💔 $0.25$ $+1.87$ $0$ $0$ $0$ $0$
shinytest2-tm_g_pp_patient_timeline 💔 $0.37$ $+4.80$ $0$ $0$ $0$ $0$
shinytest2-tm_g_pp_therapy 💔 $0.33$ $+7.24$ $0$ $0$ $0$ $0$
shinytest2-tm_t_abnormality 💔 $0.13$ $+1.12$ $0$ $0$ $0$ $0$
shinytest2-tm_t_abnormality_by_worst_grade 💔 $0.12$ $+1.35$ $0$ $0$ $0$ $0$
shinytest2-tm_t_ancova 💔 $0.37$ $+1.99$ $0$ $0$ $0$ $0$
shinytest2-tm_t_binary_outcome 💔 $0.14$ $+1.37$ $0$ $0$ $0$ $0$
shinytest2-tm_t_events_by_grade 💔 $0.13$ $+1.54$ $0$ $0$ $0$ $0$
shinytest2-tm_t_events_summary 💔 $0.11$ $+2.46$ $0$ $0$ $0$ $0$
shinytest2-tm_t_exposure 💔 $0.13$ $+3.13$ $0$ $0$ $0$ $0$
shinytest2-tm_t_pp_laboratory 💔 $0.22$ $+1.49$ $0$ $0$ $0$ $0$
shinytest2-tm_t_pp_prior_medication 💔 $0.16$ $+1.53$ $0$ $0$ $0$ $0$
shinytest2-tm_t_shift_by_arm 💔 $0.11$ $+1.29$ $0$ $0$ $0$ $0$
shinytest2-tm_t_shift_by_arm_by_worst 💔 $0.17$ $+1.96$ $0$ $0$ $0$ $0$
shinytest2-tm_t_shift_by_grade 💔 $0.13$ $+1.91$ $0$ $0$ $0$ $0$
shinytest2-tm_t_smq 💔 $0.11$ $+1.29$ $0$ $0$ $0$ $0$
shinytest2-tm_t_summary_by 💔 $0.15$ $+1.58$ $0$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
shinytest2-tm_g_km 👶 $+0.13$ e2e_tm_g_km_Starts_with_collapsed_additional_plot_settings.
shinytest2-tm_g_km 💀 $0.01$ $-0.01$ e2e_tm_g_km_Starts_with_specified_collapsed_additional_plot_settings.

Results for commit f8fe8df

♻️ This comment has been updated with latest results.

m7pr and others added 3 commits November 25, 2025 13:20
# Pull Request

Fixes #1440 
Companion of #1441 


Test with `devtools::test(filter = "tm_t_shift_by")`

Note that here the tests use the class of the elements instead of the id
of the elements like in other PR (#1443, #1442 )
m7pr and others added 6 commits November 26, 2025 15:14
# Pull Request

Part of #1440 
Companion of #1441

---------

Co-authored-by: Marcin <[email protected]>
# Pull Request

<!--- Replace `#nnn` with your issue link for reference. -->

Part of #1440 

This was after a discussion to use the shorter selector for the UI of
the modules

Test the two modules affected with `devtools::test(filter =
"tm_t_summary")`.

Short selectors used operators as found on
https://www.w3schools.com/cssref/css_selectors.php
# Pull Request

Part of #1440
Companion #1441

While reviewing [this
PR](#1444)
I found that one e2e test on the edited files was failing.
The fix was simple, I was working on a similar fix for `g_pp` modules.

Please test it with `devtools::test(filter = "tm_t_shift_by")`

---------

Signed-off-by: Oriol Senan  <[email protected]>
Co-authored-by: osenan <[email protected]>
Co-authored-by: Lluís Revilla <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

✅ All contributors have signed the CLA
Posted by the CLA Assistant Lite bot.

# Fix e2e tests

Fixes #1440 
Companion #1441

To verify the result of tests, you should do the following:
1. Install [this
branch](insightsengineering/teal#1653) of teal
2. Install teal modules clinical on this version
3.
```
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 <[email protected]>
Co-authored-by: Lluís Revilla <[email protected]>
Co-authored-by: Marcin <[email protected]>
@osenan
Copy link

osenan commented Nov 27, 2025

I have read the CLA Document and I hereby sign the CLA

osenan and others added 3 commits November 27, 2025 10:45
# Pull Request

Fixes #1440 
Companion #1441

This PR contains the remaining failing e2e test of the package. I am
based on the issue #1440. According to the issue 4 tests from 4
different test files are failing. I ran the test and found that actually
only two of them are failing. Here the screenshot of the other two files
that all test are passing:

<img width="698" height="216" alt="image"
src="https://github.com/user-attachments/assets/2129630b-ad17-49f0-949e-df6f5bb24ab3"
/>

Please test locally the fixed tests with the following instructions:
```
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_barchart_simple.R)
testthat::test_file("tests/testthat/test-shinytest2-tm_t_binary_outcome.R")
```

---------

Signed-off-by: Oriol Senan  <[email protected]>
Co-authored-by: osenan <[email protected]>
Co-authored-by: Marcin <[email protected]>
m7pr and others added 5 commits November 27, 2025 15:53
# Pull Request

Part of #1440 

There was an update on the selector.

Please run manually with:
```
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_t_events_by_grade")
```

Co-authored-by: osenan <[email protected]>
@osenan
Copy link

osenan commented Dec 1, 2025

There is one module not passing the tests. The error seems with the app_driver function and not with the modules.
tm_t_pp_laboratory
If I run the module there are no errors

# run the module
devtools::load_all()

  data <- teal.data::teal_data()
  data <- within(data, {
    ADSL <- teal.data::rADSL
    ADLB <- teal.data::rADLB
  })
  teal.data::join_keys(data) <- teal.data::default_cdisc_join_keys[names(data)]

  app <- init_teal_app_driver(
    teal::init(
      data = data,
      modules = tm_t_pp_laboratory(
        label = "Vitals",
        dataname = "ADLB",
        parentname = "ADSL",
        patient_col = "USUBJID",
        paramcd = teal.transform::choices_selected(
          choices = teal.transform::variable_choices(data[["ADLB"]], c("PARAMCD", "STUDYID")),
          selected = "PARAMCD"
        ),
        param = teal.transform::choices_selected(
          choices = teal.transform::variable_choices(data[["ADLB"]], c("PARAM", "SEX")),
          selected = "PARAM"
        ),
        timepoints = teal.transform::choices_selected(
          choices = teal.transform::variable_choices(data[["ADLB"]], c("ADY", "AGE")),
          selected = "ADY"
        ),
        anrind = teal.transform::choices_selected(
          choices = teal.transform::variable_choices(data[["ADLB"]], c("ANRIND", "AGEU")),
          selected = "ANRIND"
        ),
        aval_var = teal.transform::choices_selected(
          choices = teal.transform::variable_choices(data[["ADLB"]], c("AVAL", "AGE")),
          selected = "AVAL"
        ),
        avalu_var = teal.transform::choices_selected(
          choices = teal.transform::variable_choices(data[["ADLB"]], c("AVALU", "SEX")),
          selected = "AVALU"
        ),
        pre_output = NULL,
        post_output = NULL
      )
    )
    
 shinyApp(app$ui, app$server)

The app looks ok
image

On the other hand if I run the app with the init_teal_app_driver as all e2e tests it fails.

devtools::load_all()
library(shinytest2)
source("tests/testthat/helper-TealAppDriver.R")

app_driver_tm_t_pp_laboratory <- function() {
  data <- teal.data::teal_data()
  data <- within(data, {
    ADSL <- teal.data::rADSL
    ADLB <- teal.data::rADLB
  })
  teal.data::join_keys(data) <- teal.data::default_cdisc_join_keys[names(data)]

  init_teal_app_driver(
    teal::init(
      data = data,
      modules = tm_t_pp_laboratory(
        label = "Vitals",
        dataname = "ADLB",
        parentname = "ADSL",
        patient_col = "USUBJID",
        paramcd = teal.transform::choices_selected(
          choices = teal.transform::variable_choices(data[["ADLB"]], c("PARAMCD", "STUDYID")),
          selected = "PARAMCD"
        ),
        param = teal.transform::choices_selected(
          choices = teal.transform::variable_choices(data[["ADLB"]], c("PARAM", "SEX")),
          selected = "PARAM"
        ),
        timepoints = teal.transform::choices_selected(
          choices = teal.transform::variable_choices(data[["ADLB"]], c("ADY", "AGE")),
          selected = "ADY"
        ),
        anrind = teal.transform::choices_selected(
          choices = teal.transform::variable_choices(data[["ADLB"]], c("ANRIND", "AGEU")),
          selected = "ANRIND"
        ),
        aval_var = teal.transform::choices_selected(
          choices = teal.transform::variable_choices(data[["ADLB"]], c("AVAL", "AGE")),
          selected = "AVAL"
        ),
        avalu_var = teal.transform::choices_selected(
          choices = teal.transform::variable_choices(data[["ADLB"]], c("AVALU", "SEX")),
          selected = "AVALU"
        ),
        pre_output = NULL,
        post_output = NULL
      )
    )
  )
}

# run line by line, check with app_driver$view()
app_driver <- app_driver_tm_t_pp_laboratory()
app_view()

I see this:
image

@osenan
Copy link

osenan commented Dec 2, 2025

By running again the tests on my machine is passing.
image
I suggest to fix lintrs, merge teal and teal.transform and see if in main is passing. We have also to remove the check on other branches that are not main

Signed-off-by: André Veríssimo <[email protected]>
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.

5 participants