|
8 | 8 | def test_valuebox(page: Page, local_app: ShinyAppProc, value_box_id: str) -> None: |
9 | 9 | page.goto(local_app.url) |
10 | 10 |
|
11 | | - value_box = ValueBox(page, value_box_id) |
12 | | - value_box.expect_height(None) |
13 | | - value_box.expect_title("KPI Title") |
14 | | - value_box.expect_full_screen(False) |
15 | | - value_box.open_full_screen() |
16 | | - value_box.expect_full_screen(True) |
17 | | - value_box.expect_body(["$1 Billion Dollars", "30% VS PREVIOUS 30 DAYS"]) |
18 | | - value_box.close_full_screen() |
19 | | - value_box.expect_full_screen(False) |
| 11 | + value_box1 = ValueBox(page, "valuebox1") |
| 12 | + value_box1.expect_height(None) |
| 13 | + value_box1.expect_title("KPI Title") |
| 14 | + value_box1.expect_value("$1 Billion Dollars") |
| 15 | + value_box1.expect_full_screen(False) |
| 16 | + value_box1.open_full_screen() |
| 17 | + value_box1.expect_full_screen(True) |
| 18 | + value_box1.expect_body(["30% VS PREVIOUS 30 DAYS"]) |
| 19 | + value_box1.close_full_screen() |
| 20 | + value_box1.expect_full_screen(False) |
| 21 | + |
| 22 | + value_box2 = ValueBox(page, "valuebox2") |
| 23 | + value_box2.expect_height(None) |
| 24 | + value_box2.expect_title("title") |
| 25 | + value_box2.expect_value("value") |
| 26 | + value_box2.expect_full_screen(False) |
| 27 | + value_box2.open_full_screen() |
| 28 | + value_box2.expect_full_screen(True) |
| 29 | + value_box2.expect_body(["content", "more body"]) |
| 30 | + value_box2.close_full_screen() |
| 31 | + value_box2.expect_full_screen(False) |
| 32 | + |
| 33 | + title_tag_name = value_box2.loc_title.evaluate("el => el.tagName.toLowerCase()") |
| 34 | + assert title_tag_name == "p" |
0 commit comments