@@ -7,32 +7,33 @@ app_driver_tm_a_pca <- function() {
77 })
88
99 init_teal_app_driver(
10- data = data ,
11- modules = tm_a_pca(
12- dat = teal.transform :: data_extract_spec(
13- dataname = " USArrests" ,
14- select = teal.transform :: select_spec(
15- choices = teal.transform :: variable_choices(
16- data = data [[" USArrests" ]],
17- c(" Murder" , " Assault" , " UrbanPop" , " Rape" )
18- ),
19- selected = c(" Murder" , " Assault" ),
20- multiple = TRUE
21- )
22- ),
23- size = c(3 , 1 , 5 ),
24- alpha = c(.5 , 0 , 1 ),
25- font_size = c(10 , 8 , 15 ),
26- ggtheme = " light" ,
27- rotate_xaxis_labels = TRUE ,
28- pre_output = shiny :: tags $ div(id = " unique_id_pre" , " A pre output" ),
29- post_output = shiny :: tags $ div(id = " unique_id_post" , " A post output" )
10+ teal :: init(
11+ data = data ,
12+ modules = tm_a_pca(
13+ dat = teal.transform :: data_extract_spec(
14+ dataname = " USArrests" ,
15+ select = teal.transform :: select_spec(
16+ choices = teal.transform :: variable_choices(
17+ data = data [[" USArrests" ]],
18+ c(" Murder" , " Assault" , " UrbanPop" , " Rape" )
19+ ),
20+ selected = c(" Murder" , " Assault" ),
21+ multiple = TRUE
22+ )
23+ ),
24+ size = c(3 , 1 , 5 ),
25+ alpha = c(.5 , 0 , 1 ),
26+ font_size = c(10 , 8 , 15 ),
27+ ggtheme = " light" ,
28+ rotate_xaxis_labels = TRUE ,
29+ pre_output = shiny :: tags $ div(id = " unique_id_pre" , " A pre output" ),
30+ post_output = shiny :: tags $ div(id = " unique_id_post" , " A post output" )
31+ )
3032 )
3133 )
3234}
3335
3436testthat :: test_that(" e2e - tm_a_pca: Module is initialised with the specified defaults in function call." , {
35- testthat :: skip(" chromium" )
3637 skip_if_too_deep(5 )
3738
3839 app_driver <- app_driver_tm_a_pca()
@@ -44,9 +45,14 @@ testthat::test_that("e2e - tm_a_pca: Module is initialised with the specified de
4445 c(" Murder" , " Assault" )
4546 )
4647
47- module_parent_id <- gsub(" -module$" , " " , app_driver $ active_module_ns())
48- testthat :: expect_equal(app_driver $ get_text(sprintf(" #%s %s" , module_parent_id , " #unique_id_pre" )), " A pre output" )
49- testthat :: expect_equal(app_driver $ get_text(sprintf(" #%s %s" , module_parent_id , " #unique_id_post" )), " A post output" )
48+ testthat :: expect_equal(
49+ app_driver $ get_text(" #unique_id_pre" ),
50+ " A pre output"
51+ )
52+ testthat :: expect_equal(
53+ app_driver $ get_text(" #unique_id_post" ),
54+ " A post output"
55+ )
5056
5157 # Plot options that can be changed in call
5258 testthat :: expect_true(app_driver $ get_active_module_input(" rotate_xaxis_labels" ))
@@ -57,7 +63,6 @@ testthat::test_that("e2e - tm_a_pca: Module is initialised with the specified de
5763})
5864
5965testthat :: test_that(" e2e - tm_a_pca: Eigenvector table should have data extract selection Murder/Assault on header." , {
60- testthat :: skip(" chromium" )
6166 skip_if_too_deep(5 )
6267
6368 app_driver <- app_driver_tm_a_pca()
@@ -75,7 +80,6 @@ testthat::test_that("e2e - tm_a_pca: Eigenvector table should have data extract
7580})
7681
7782testthat :: test_that(" e2e - tm_a_pca: Eigenvector table should have data extract selection Murder/UrbanPop on header." , {
78- testthat :: skip(" chromium" )
7983 skip_if_too_deep(5 )
8084
8185 app_driver <- app_driver_tm_a_pca()
@@ -93,7 +97,6 @@ testthat::test_that("e2e - tm_a_pca: Eigenvector table should have data extract
9397})
9498
9599testthat :: test_that(" e2e - tm_a_pca: Color by columns (data_extract) must be from non-selected variable set." , {
96- testthat :: skip(" chromium" )
97100 skip_if_too_deep(5 )
98101
99102 app_driver <- app_driver_tm_a_pca()
@@ -111,7 +114,6 @@ testthat::test_that("e2e - tm_a_pca: Color by columns (data_extract) must be fro
111114})
112115
113116testthat :: test_that(" e2e - tm_a_pca: Changing output encodings of tables_display does not generate errors." , {
114- testthat :: skip(" chromium" )
115117 skip_if_too_deep(5 )
116118
117119 app_driver <- app_driver_tm_a_pca()
@@ -133,7 +135,6 @@ testthat::test_that("e2e - tm_a_pca: Changing output encodings of tables_display
133135})
134136
135137testthat :: test_that(" e2e - tm_a_pca: Changing output encodings for 'plot type' does not generate errors." , {
136- testthat :: skip(" chromium" )
137138 skip_if_too_deep(5 )
138139
139140 app_driver <- app_driver_tm_a_pca()
@@ -157,7 +158,6 @@ testthat::test_that("e2e - tm_a_pca: Changing output encodings for 'plot type' d
157158})
158159
159160testthat :: test_that(" e2e - tm_a_pca: Changing output encodings of 'standardization' does not generate errors." , {
160- testthat :: skip(" chromium" )
161161 skip_if_too_deep(5 )
162162
163163 app_driver <- app_driver_tm_a_pca()
@@ -176,7 +176,6 @@ testthat::test_that("e2e - tm_a_pca: Changing output encodings of 'standardizati
176176})
177177
178178testthat :: test_that(" e2e - tm_a_pca: Changing output encodings of 'NA action' does not generate errors." , {
179- testthat :: skip(" chromium" )
180179 skip_if_too_deep(5 )
181180
182181 app_driver <- app_driver_tm_a_pca()
@@ -191,31 +190,26 @@ testthat::test_that("e2e - tm_a_pca: Changing output encodings of 'NA action' do
191190})
192191
193192testthat :: test_that(" e2e - tm_a_pca: Changing output encodings of 'plot_type' hides and shows options." , {
194- testthat :: skip(" chromium" )
195193 skip_if_too_deep(5 )
196194
197195 app_driver <- app_driver_tm_a_pca()
198196 app_driver $ expect_no_validation_error()
199197
200198 # Selected plot's specific settings is not visible
201- no_plot_settings_selector <- sprintf(" #%s-%s %s" , app_driver $ active_module_ns(), " plot_settings" , " span.help-block" )
202- x_axis_selector <- sprintf(" #%s-%s" , app_driver $ active_module_ns(), " x_axis" )
203- color_by_selector <- sprintf(
204- " #%s-%s" ,
205- app_driver $ active_module_ns(),
206- " response-dataset_USArrests_singleextract-select_input"
207- )
199+ no_plot_settings_selector <- app_driver $ namespaces(TRUE )$ module(" plot_settings span.help-block" )
200+ x_axis_selector <- app_driver $ namespaces(TRUE )$ module(" x_axis" )
201+ color_by_selector <- app_driver $ namespaces(TRUE )$ module(" response-dataset_USArrests_singleextract-select_input" )
208202
209- app_driver $ set_active_module_input(" plot_type" , " Elbow plot" , wait = FALSE )
203+ app_driver $ set_active_module_input(" plot_type" , " Elbow plot" , wait_ = FALSE )
210204 testthat :: expect_true(app_driver $ is_visible(no_plot_settings_selector ))
211205 testthat :: expect_false(app_driver $ is_visible(x_axis_selector ))
212206 testthat :: expect_false(app_driver $ is_visible(color_by_selector ))
213207
214- app_driver $ set_active_module_input(" plot_type" , " Circle plot" , wait = FALSE )
208+ app_driver $ set_active_module_input(" plot_type" , " Circle plot" , wait_ = FALSE )
215209 testthat :: expect_false(app_driver $ is_visible(no_plot_settings_selector ))
216210 testthat :: expect_true(app_driver $ is_visible(x_axis_selector ))
217211
218- app_driver $ set_active_module_input(" plot_type" , " Biplot" , wait = FALSE )
212+ app_driver $ set_active_module_input(" plot_type" , " Biplot" , wait_ = FALSE )
219213 testthat :: expect_false(app_driver $ is_visible(no_plot_settings_selector ))
220214 testthat :: expect_true(app_driver $ is_visible(x_axis_selector ))
221215 testthat :: expect_true(app_driver $ is_visible(color_by_selector ))
@@ -224,7 +218,6 @@ testthat::test_that("e2e - tm_a_pca: Changing output encodings of 'plot_type' hi
224218})
225219
226220testthat :: test_that(" e2e - tm_a_pca: Changing output encodings of 'theme' does not generate errors." , {
227- testthat :: skip(" chromium" )
228221 skip_if_too_deep(5 )
229222
230223 app_driver <- app_driver_tm_a_pca()
@@ -243,7 +236,6 @@ testthat::test_that("e2e - tm_a_pca: Changing output encodings of 'theme' does n
243236})
244237
245238testthat :: test_that(" e2e - tm_a_pca: Changing output encodings of 'font size' does not generate errors." , {
246- testthat :: skip(" chromium" )
247239 skip_if_too_deep(5 )
248240
249241 app_driver <- app_driver_tm_a_pca()
0 commit comments