insightsengineering / teal.modules.hermes

RNA-seq analysis modules to add to a teal application
https://insightsengineering.github.io/teal.modules.hermes/
Other
7 stars 1 forks source link

Fix integration test failures #387

Closed vedhav closed 4 months ago

vedhav commented 4 months ago

Changes:

  1. Wait for app idle before getting the namespace (in test-assaySpec.R) so we don't try to find shiny inputs with ids like NA-module-assay-name.

The integration tests for teal.modules.hermes fails with these test logs:

Loading required package: ggplot2
Loading required package: shiny
Loading required package: teal
Loading required package: teal.data
Loading required package: teal.code
Loading required package: teal.slice

You are using teal version 0.15.2.9045

Attaching package: 'teal'

The following objects are masked from 'package:teal.slice':

    as.teal_slices, teal_slices

Attaching package: 'teal.modules.hermes'

The following object is masked from 'package:teal':

    validate_n_levels

The following object is masked from 'package:teal.data':

    rADTTE

> testthat::test_check(pkg_name)
Error received while setting inputs: Unable to find input binding for element with id NA-module-experiment-name
    x
 1. \-app$set_inputs(`:=`(!!ns("experiment-name"), "hd2")) at test-assaySpec.R:42:3
 2.   \-shinytest2:::app_set_inputs(...)
Error received while setting inputs: Unable to find input binding for element with id NA-module-assay-name
    x
 1. \-app$set_inputs(`:=`(!!ns("assay-name"), "voom")) at test-assaySpec.R:51:3
 2.   \-shinytest2:::app_set_inputs(...)
Error received while setting inputs: Unable to find input binding for element with id NA-module-assay-name
    x
 1. \-app$set_inputs(`:=`(!!ns("assay-name"), "cpm")) at test-assaySpec.R:57:3
 2.   \-shinytest2:::app_set_inputs(...)
set_inputs(app$set_inputs(`:=`(!!ns("experiment-name"), "hd2"))): Server did not update any output values within 4 seconds. If this is expected, use `wait_ = FALSE` or increase the value of `timeout_`.
    x
 1. \-app$set_inputs(`:=`(!!ns("experiment-name"), "hd2")) at test-scatterplot.R:87:3
 2.   \-shinytest2:::app_set_inputs(...)
[ FAIL 5 | WARN 0 | SKIP 0 | PASS 205 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-assaySpec.R:39:3'): assaySpecServer module works as expected in the test app ──
res$message (`actual`) not identical to "No assays eligible for this experiment, please make sure to add normalized assays" (`expected`).

`actual` is NULL
`expected` is a character vector ('No assays eligible for this experiment, please make sure to add normalized assays')
── Failure ('test-assaySpec.R:46:3'): assaySpecServer module works as expected in the test app ──
`res` (`actual`) not identical to "rpkm" (`expected`).

`actual` is NULL
`expected` is a character vector ('rpkm')
── Failure ('test-assaySpec.R:49:3'): assaySpecServer module works as expected in the test app ──
`res` (`actual`) not identical to "[1] \"rpkm\"" (`expected`).

`actual` is NULL
`expected` is a character vector ('[1] "rpkm"')
── Failure ('test-assaySpec.R:54:3'): assaySpecServer module works as expected in the test app ──
`res` (`actual`) not identical to "[1] \"voom\"" (`expected`).

`actual` is NULL
`expected` is a character vector ('[1] "voom"')
── Failure ('test-assaySpec.R:60:3'): assaySpecServer module works as expected in the test app ──
`res` (`actual`) not identical to "[1] \"\"" (`expected`).

`actual` is NULL
`expected` is a character vector ('[1] ""')

[ FAIL 5 | WARN 0 | SKIP 0 | PASS 205 ]
github-actions[bot] commented 4 months ago

CLA Assistant Lite bot ✅ All contributors have signed the CLA

github-actions[bot] commented 4 months ago

badge

Code Coverage Summary

Filename              Stmts    Miss  Cover    Missing
------------------  -------  ------  -------  -------------------------------------------------------------------------------------------------------------------------------
R/adtteSpec.R           171     124  27.49%   253-401
R/assaySpec.R            54      40  25.93%   104-147
R/barplot.R             188     152  19.15%   39-66, 129-280
R/boxplot.R             190     159  16.32%   40-67, 125-279
R/checkmate.R            18       9  50.00%   110-118
R/experimentSpec.R       91      58  36.26%   97, 215-284
R/forestplot.R          214     186  13.08%   58-92, 152-327
R/geneSpec.R            257     154  40.08%   154-169, 296-481
R/km.R                  208     174  16.35%   61-92, 156-326
R/pca.R                 367     284  22.62%   34-56, 165-477
R/quality.R             320     247  22.81%   18-110, 208-454
R/sampleVarSpec.R       237     104  56.12%   300, 319-328, 334-341, 343, 351-363, 365-366, 368, 371, 379-383, 385-400, 405-429, 432-436, 438, 445-455, 457-458, 466, 511-528
R/scatterplot.R         181     148  18.23%   39-65, 127-273
R/utils.R                16       0  100.00%
R/volcanoplot.R         204     174  14.71%   34-57, 113-293
R/zzz.R                   2       2  0.00%    2-3
TOTAL                  2718    2015  25.86%

Diff against main

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

Results for commit: 2557c5e7dd5068692732dbbc670c3353d519f7b4

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results

vedhav commented 4 months ago

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

github-actions[bot] commented 4 months ago

Unit Tests Summary

 1 files  15 suites   9s :stopwatch: 56 tests 43 :white_check_mark: 13 :zzz: 0 :x: 94 runs  81 :white_check_mark: 13 :zzz: 0 :x:

Results for commit 2557c5e7.

:recycle: This comment has been updated with latest results.