Skip to content

Commit

Permalink
changed names in list
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhesh195 committed Aug 5, 2024
1 parent 607d94e commit 93478c6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/testthat/test-renderer1-knit-print.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ get_elements <- function(id){
legend_show_hide <- runtime_evaluate_helper(id=id,class_name='table.legend tr.label_variable',list_num=0,return.value=TRUE)
legend_widget <- runtime_evaluate_helper(id=id,class_name='table.legend tr.label_variable',list_num=1,return.value=TRUE)

list(a178=top_widget_show_hide,
b934=bottom_widget_show_hide,
list(top_widget_show_hide=top_widget_show_hide,
bottom_widget_show_hide=bottom_widget_show_hide,
show_hide=legend_show_hide,
widget=legend_widget)
}
Expand All @@ -98,32 +98,32 @@ plot1bottom <- get_elements("plot1bottom")
test_that("clicking top legend adds/remove points", {
expect_equal(get_circles(), list(10, 10))

clickID("plot1top_q_label_variable_a178")
clickID("plot1top_q_label_variable_top_widget_show_hide")
expect_equal(get_circles(), list(5, 10))

clickID("plot1top_q_label_variable_b934")
clickID("plot1top_q_label_variable_bottom_widget_show_hide")
expect_equal(get_circles(), list(0, 10))

clickID("plot1top_q_label_variable_b934")
clickID("plot1top_q_label_variable_bottom_widget_show_hide")
expect_equal(get_circles(), list(5, 10))

clickID("plot1top_q_label_variable_a178")
clickID("plot1top_q_label_variable_top_widget_show_hide")
expect_equal(get_circles(), list(10, 10))
})

test_that("clicking bottom legend adds/remove points", {
expect_equal(get_circles(), list(10, 10))

clickID("plot1bottom_q_label_variable_a178")
clickID("plot1bottom_q_label_variable_top_widget_show_hide")
expect_equal(get_circles(), list(10, 5))

clickID("plot1bottom_q_label_variable_b934")
clickID("plot1bottom_q_label_variable_bottom_widget_show_hide")
expect_equal(get_circles(), list(10, 0))

clickID("plot1bottom_q_label_variable_b934")
clickID("plot1bottom_q_label_variable_bottom_widget_show_hide")
expect_equal(get_circles(), list(10, 5))

clickID("plot1bottom_q_label_variable_a178")
clickID("plot1bottom_q_label_variable_top_widget_show_hide")
expect_equal(get_circles(), list(10, 10))
})
clickSide<- function(position=NULL){
Expand Down

0 comments on commit 93478c6

Please sign in to comment.