Skip to content

Commit ab09e64

Browse files
cpsievertColinFay
authored andcommitted
Update tests to not make strong assumptions about actionButton()'s markup
1 parent ef359fe commit ab09e64

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

inst/utils/test-golem_utils_ui.R

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -167,21 +167,12 @@ test_that("Test undisplay works", {
167167
"go_filter",
168168
"go"
169169
)
170-
expect_s3_class(
171-
b,
172-
"shiny.tag"
173-
)
174170
expect_equal(
175-
as.character(b),
176-
'<button id="go_filter" type="button" class="btn btn-default action-button">go</button>'
177-
)
178-
b_undisplay <- undisplay(b)
179-
expect_s3_class(b, "shiny.tag")
180-
expect_equal(
181-
as.character(
182-
b_undisplay
171+
htmltools::tagGetAttribute(
172+
undisplay(b),
173+
"style"
183174
),
184-
'<button id="go_filter" type="button" class="btn btn-default action-button" style="display: none;">go</button>'
175+
"display: none;"
185176
)
186177

187178
c <- shiny::tags$p(

0 commit comments

Comments
 (0)