diff --git a/DESCRIPTION b/DESCRIPTION index 458d820..1fdbaf6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: igvShiny Title: igvShiny: a wrapper of Integrative Genomics Viewer (IGV - an interactive tool for visualization and exploration integrated genomic data) -Version: 0.99.5 -Date: 2024-03-14 +Version: 0.99.6 +Date: 2024-03-16 Authors@R: c( person("Paul","Shannon", role = c("aut"), email = "paul.thurmond.shannon@gmail.com"), diff --git a/NEWS.md b/NEWS.md index e8829ae..1a96fe1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +## igvShiny 0.99.6 - 2024-03-16 +* add shinytest2 for igvShinyDemo-GFF3.R + ## igvShiny 0.99.5 - 2024-03-14 * fix issues with GFF3 data * make igvShiny demo app for GFF3 working diff --git a/inst/unitTests/test_shinyApp.R b/inst/unitTests/test_shinyApp.R index 68298c8..f419b42 100644 --- a/inst/unitTests/test_shinyApp.R +++ b/inst/unitTests/test_shinyApp.R @@ -35,12 +35,61 @@ runAppTests <- function() test_shinyAppDemo <- function() { message(sprintf("--- test_shinyAppDemo")) + options(chromote.timeout = 60) + + test_that("{shinytest2} recording: test_app", { + + sf <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") + app <- AppDriver$new( + app_dir = shiny::shinyAppFile(sf), + name = "test_app", + height = 695, + width = 1235, + load_timeout = 1e+6, + timeout = 1e+6 + ) + Sys.sleep(20) + + checkTrue( + .test_click_and_check( + "addBedGraphTrackButton", + "title=\"wig/bedGraph/local\"", + app + ) + ) + checkTrue( + .test_click_and_check( + "addBedGraphTrackFromURLButton", + "title=\"bedGraph/remote\"", + app + ) + ) + checkTrue( + .test_click_and_check( + "addBamViaHttpButton", + "title=\"1kg.bam\"", + app + ) + ) + checkTrue( + .test_click_and_check( + "addCramViaHttpButton", + "title=\"CRAM\"", + app + ) + ) + }) + +} # test_shinyAppDemo +#---------------------------------------------------------------------------------------------------- +test_shinyAppDemoGFF3 <- function() +{ + message(sprintf("--- test_shinyAppDemo-GFF3")) options(chromote.timeout = 60) - test_that("{shinytest2} recording: test_app", { - sf <- system.file(package = "igvShiny", "demos", "igvShinyDemo.R") + sf <- system.file(package = "igvShiny", "demos", "igvShinyDemo-GFF3.R") app <- AppDriver$new( app_dir = shiny::shinyAppFile(sf), name = "test_app", @@ -50,10 +99,28 @@ test_shinyAppDemo <- function() timeout = 1e+6 ) Sys.sleep(20) - checkTrue(.test_click_and_check("addBedGraphTrackButton", "title=\"wig/bedGraph/local\"", app)) - checkTrue(.test_click_and_check("addBedGraphTrackFromURLButton", "title=\"bedGraph/remote\"", app)) - checkTrue(.test_click_and_check("addBamViaHttpButton", "title=\"1kg.bam\"", app)) - checkTrue(.test_click_and_check("addCramViaHttpButton", "title=\"CRAM\"", app)) + + checkTrue( + .test_click_and_check( + "addRemoteGFF3TrackButton", + "title=\"url gff3\"", + app + ) + ) + checkTrue( + .test_click_and_check( + "addRemoteGFF3TrackButtonWithBiotypeColors", + "title=\"url gff3 \\(colors)\\\"", + app + ) + ) + checkTrue( + .test_click_and_check( + "addLocalGFF3TrackButtonWithBiotypeColors", + "title=\"local gff3 \\(colors)\\\"", + app + ) + ) }) -} # test_shinyAppDemo +} # test_shinyAppDemoGFF3