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

E2e tests #116

Merged
merged 45 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
0300845
fix: removing commented code
federiva Jul 24, 2023
fe0bd45
fix: Updating script running tests
federiva Jul 24, 2023
faddc6b
chore: Adding cypress/videos
federiva Jul 24, 2023
7d072cb
fix: Updating screenshots https://github.com/cypress-io/cypress/issue…
federiva Jul 24, 2023
21d9d2f
fix: Specifying port
federiva Jul 24, 2023
45aa1d2
feat: Adding R script for barchart example
federiva Jul 24, 2023
3cc0f08
feat: Adding tests and scripts for barchart
federiva Jul 24, 2023
9e8e195
feat: Adding snapshot tests for areachart
federiva Jul 24, 2023
fbf3caf
chore: empty line
federiva Jul 24, 2023
21295b9
feat: Adding circularVisualEncoding test
federiva Jul 24, 2023
d7b3878
feat: Adding script to create testfiles
federiva Jul 24, 2023
da75055
feat: adding ideogram
federiva Jul 24, 2023
a929827
feat: Adding pointplot
federiva Jul 24, 2023
9320bf0
feat: adding multitrack
federiva Jul 24, 2023
66d6a41
tests: Adding tests for lineChart
federiva Jul 24, 2023
88ff42f
tests: Adding tests for ruleMarks
federiva Jul 24, 2023
ea31763
feat: Adding template for code generating scripts
federiva Jul 24, 2023
8b84fc3
tests: Adding sarsCov
federiva Jul 24, 2023
04d2f9b
tests: Adding tests
federiva Jul 24, 2023
6fe70f6
feat: adding script to run all of the tests
federiva Jul 24, 2023
e58804a
fix: adding paths
federiva Jul 25, 2023
307ae8b
fix: Avoid appending
federiva Jul 28, 2023
f783a4a
feat: Adding threshold at 5 percent
federiva Jul 29, 2023
7adf0ca
fix: Removing
federiva Jul 29, 2023
92ded6b
chore: reordering
federiva Jul 31, 2023
e51cffc
chore: sorting
federiva Jul 31, 2023
555c991
feat: Adding port
federiva Jul 31, 2023
757d705
feat: Adding readme
federiva Jul 31, 2023
0db8808
fix: Removing hardcoded port
federiva Jul 31, 2023
d214b3c
fix: Updating README
federiva Jul 31, 2023
e385458
feat: adding CI
federiva Jul 31, 2023
686e565
fix: Adding .lock file
federiva Jul 31, 2023
23761e7
feat: Ensuring that the script returns when a test fails
federiva Jul 31, 2023
98877ce
fix
federiva Jul 31, 2023
54f0556
fix: ci
federiva Jul 31, 2023
ac19f34
fix: ci syntax
federiva Jul 31, 2023
d77c767
fix: conf
federiva Aug 1, 2023
88c2012
fix: typo
federiva Aug 1, 2023
f10a5e6
fix: specifying IP
federiva Aug 1, 2023
036512e
fix: Passing port as options
federiva Aug 1, 2023
0172442
fix: Removing unused script
federiva Aug 1, 2023
f9af8d2
fix: Removing unused job
federiva Aug 1, 2023
52ae644
fix: Incrementing timeout for screesnhots
federiva Aug 1, 2023
9f3d24d
feat: Simplifying script for running tests (#120)
federiva Aug 23, 2023
4106f44
Merge branch 'dev' of github.com:Appsilon/shiny.gosling into e2e-tests
federiva Aug 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,8 @@ inst/doc
data/

*.DS_Store

# Cypress
tests/yarn-error.log
tests/cypress/downloads
tests/cypress/videos
2 changes: 1 addition & 1 deletion inst/examples/areaChart/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ server <- function(input, output, session) {
})
}

shinyApp(ui, server)
shinyApp(ui, server, options = list(port = 8888))
federiva marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 1 addition & 2 deletions inst/examples/barChart/app.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Based in https://gosling.js.org/?example=doc_bar

library(shiny)
library(shiny.gosling)

Expand Down Expand Up @@ -118,4 +117,4 @@ server <- function(input, output, session) {
})
}

shinyApp(ui, server)
shinyApp(ui, server, options = list(port = 8888))
165 changes: 81 additions & 84 deletions inst/examples/circularVisualEncoding/app.R
Original file line number Diff line number Diff line change
@@ -1,94 +1,91 @@
if (interactive()) {
library(shiny)
library(shiny.gosling)
library(shiny)
library(shiny.gosling)

cistrome_data <-
"https://server.gosling-lang.org/api/v1/tileset_info/?d=cistrome-multivec"
cistrome_data <-
"https://server.gosling-lang.org/api/v1/tileset_info/?d=cistrome-multivec"

single_track <- add_single_track(
id = "track1",
data = track_data(
url = cistrome_data,
type = "multivec",
row = "sample",
column = "position",
value = "peak",
categories = c("sample 1", "sample 2", "sample 3", "sample 4"),
binSize = 4,
),
mark = "rect",
x = visual_channel_x(field = "start", type = "genomic", axis = "top"),
xe = visual_channel_x(field = "end", type = "genomic"),
row = visual_channel_row(
field = "sample",
type = "nominal",
legend = TRUE
),
color = visual_channel_color(
field = "peak",
type = "quantitative",
legend = TRUE
),
tooltip = visual_channel_tooltips(
visual_channel_tooltip(field = "start", type = "genomic",
alt = "Start Position"),
visual_channel_tooltip(field = "end", type = "genomic",
alt = "End Position"),
visual_channel_tooltip(
field = "peak",
type = "quantitative",
alt = "Value",
format = "0.2"
)
),
width = 600,
height = 130
)

single_composed_track <- compose_view(
tracks = single_track
)

single_composed_views <- arrange_views(
title = "Single Track",
subtitle = "This is the simplest single track visualization with a linear layout",
layout = "circular", #"linear"
views = single_composed_track,
xDomain = list(
chromosome = "chr1",
interval = c(1, 3000500)
single_track <- add_single_track(
id = "track1",
data = track_data(
url = cistrome_data,
type = "multivec",
row = "sample",
column = "position",
value = "peak",
categories = c("sample 1", "sample 2", "sample 3", "sample 4"),
binSize = 4,
),
mark = "rect",
x = visual_channel_x(field = "start", type = "genomic", axis = "top"),
xe = visual_channel_x(field = "end", type = "genomic"),
row = visual_channel_row(
field = "sample",
type = "nominal",
legend = TRUE
),
color = visual_channel_color(
field = "peak",
type = "quantitative",
legend = TRUE
),
tooltip = visual_channel_tooltips(
visual_channel_tooltip(field = "start", type = "genomic",
alt = "Start Position"),
visual_channel_tooltip(field = "end", type = "genomic",
alt = "End Position"),
visual_channel_tooltip(
field = "peak",
type = "quantitative",
alt = "Value",
format = "0.2"
)
)
),
width = 600,
height = 130
)

ui <- fluidPage(
use_gosling(),
fluidRow(
column(6, goslingOutput("gosling_plot")),
column(
1, br(), actionButton(
"download_pdf",
"PDF",
icon = icon("cloud-arrow-down")
)
)
)
)
single_composed_track <- compose_view(
tracks = single_track
)

single_composed_views <- arrange_views(
title = "Single Track",
subtitle = "This is the simplest single track visualization with a linear layout",
layout = "circular", #"linear"
views = single_composed_track,
xDomain = list(
chromosome = "chr1",
interval = c(1, 3000500)
)
)

server <- function(input, output, session) {
output$gosling_plot <- renderGosling({
gosling(
component_id = "component_1",
single_composed_views,
clean_braces = TRUE
)
})
ui <- fluidPage(
use_gosling(),
fluidRow(
column(6, goslingOutput("gosling_plot")),
column(
1, br(), actionButton(
"download_pdf",
"PDF",
icon = icon("cloud-arrow-down")
)
)
)
)

observeEvent(input$download_pdf, {
export_pdf(component_id = "component_1")
})
}

shinyApp(ui, server)
server <- function(input, output, session) {
output$gosling_plot <- renderGosling({
gosling(
component_id = "component_1",
single_composed_views,
clean_braces = TRUE
)
})

observeEvent(input$download_pdf, {
export_pdf(component_id = "component_1")
})
}

shinyApp(ui, server, options = list(port = 8888))
2 changes: 1 addition & 1 deletion inst/examples/ideograms/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ server <- function(input, output, session) {
})
}

shinyApp(ui, server)
shinyApp(ui, server, options = list(port = 8888))
2 changes: 1 addition & 1 deletion inst/examples/lineChart/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ server <- function(input, output, session) {
})
}

shinyApp(ui, server)
shinyApp(ui, server, options = list(port = 8888))
2 changes: 1 addition & 1 deletion inst/examples/pointPlot/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ server <- function(input, output, session) {
})
}

shinyApp(ui, server)
shinyApp(ui, server, options = list(port = 8888))
2 changes: 1 addition & 1 deletion inst/examples/ruleMarks/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ server <- function(input, output, session) {
})
}

shinyApp(ui, server)
shinyApp(ui, server, options = list(port = 8888))
Loading
Loading