Skip to content

[tests] ValueBox controller assumes showcase is present #1214

Closed
@gadenbuie

Description

@gadenbuie

loc="> div > .value-box-grid",
)
value_box_grid = self.loc
self.loc_showcase = value_box_grid.locator("> .value-box-showcase")
self.loc_title = value_box_grid.locator("> .value-box-area > .value-box-title")

loc uses .value-box-grid, but this class may not be present if a plain value box without a showcase is used. It might be easier to use .bslib-value-box as the root selector.

Here's an example app where ValueBox().open_full_screen() will fail because loc_title can't be found.

from shiny.express import ui

with ui.value_box(id="my_value_box", full_screen=True):
    "Hello, value box!"
    "$1,234,567"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions