From 713e6889e8e876695410fd0a39b2d993dbb0137f Mon Sep 17 00:00:00 2001 From: Karan Gathani Date: Wed, 2 Oct 2024 21:16:30 -0700 Subject: [PATCH 1/7] Add tests for sidebar --- shiny/playwright/controller/_layout.py | 98 ++++++++++++++++++- .../shiny/inputs/sidebar_kitchensink/app.py | 67 +++++++++++++ .../test_sidebar_kitchensink.py | 38 +++++++ 3 files changed, 202 insertions(+), 1 deletion(-) create mode 100644 tests/playwright/shiny/inputs/sidebar_kitchensink/app.py create mode 100644 tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py diff --git a/shiny/playwright/controller/_layout.py b/shiny/playwright/controller/_layout.py index ae82392ad..2f5a5e89a 100644 --- a/shiny/playwright/controller/_layout.py +++ b/shiny/playwright/controller/_layout.py @@ -7,6 +7,7 @@ from .._types import PatternOrStr, Timeout from ..expect._internal import expect_class_to_have_value as _expect_class_to_have_value +from ..expect._internal import expect_style_to_have_value as _expect_style_to_have_value from ._base import UiWithContainer, WidthLocM @@ -32,6 +33,14 @@ class Sidebar( """ Playwright `Locator` for the position of the sidebar. """ + loc_content: Locator + """ + Playwright `Locator` for the content of the sidebar. + """ + loc_title: Locator + """ + Playwright `Locator` for the title of the sidebar. + """ def __init__(self, page: Page, id: str) -> None: """ @@ -52,6 +61,8 @@ def __init__(self, page: Page, id: str) -> None: ) self.loc_handle = self.loc_container.locator("button.collapse-toggle") self.loc_position = self.loc.locator("..") + self.loc_content = self.loc.locator("> div.sidebar-content") + self.loc_title = self.loc_content.locator("> header.sidebar-title") def expect_text(self, value: PatternOrStr, *, timeout: Timeout = None) -> None: """ @@ -64,7 +75,92 @@ def expect_text(self, value: PatternOrStr, *, timeout: Timeout = None) -> None: timeout The maximum time to wait for the text to appear. Defaults to `None`. """ - playwright_expect(self.loc).to_have_text(value, timeout=timeout) + playwright_expect(self.loc_content).to_have_text(value, timeout=timeout) + + def expect_class( + self, + class_name: str, + *, + has_class: bool = True, + timeout: Timeout = None, + ) -> None: + """ + Asserts that the sidebar has or does not have a CSS class. + + Parameters + ---------- + class_name + The CSS class to check for. + has_class + `True` if the sidebar should have the CSS class, `False` otherwise. + timeout + The maximum time to wait for the sidebar to appear. Defaults to `None`. + """ + _expect_class_to_have_value( + self.loc, + class_name, + has_class=has_class, + timeout=timeout, + ) + + def expect_gap(self, value: PatternOrStr, *, timeout: Timeout = None) -> None: + """ + Asserts that the sidebar has the expected gap. + + Parameters + ---------- + value + The expected gap of the sidebar. + timeout + The maximum time to wait for the gap to appear. Defaults to `None`. + """ + _expect_style_to_have_value(self.loc_content, "gap", value, timeout=timeout) + + def expect_bg_color(self, value: PatternOrStr, *, timeout: Timeout = None) -> None: + """ + Asserts that the sidebar has the expected background color. + + Parameters + ---------- + value + The expected background color of the sidebar. + timeout + The maximum time to wait for the background color to appear. Defaults to `None`. + """ + _expect_style_to_have_value( + self.loc_container, "--_sidebar-bg", value, timeout=timeout + ) + + def expect_title(self, value: PatternOrStr, *, timeout: Timeout = None) -> None: + """ + Asserts that the sidebar has the expected title. + + Parameters + ---------- + value + The expected title of the sidebar. + timeout + The maximum time to wait for the title to appear. Defaults to `None`. + """ + playwright_expect(self.loc_title).to_have_text(value, timeout=timeout) + + def expect_padding( + self, value: list[PatternOrStr], *, timeout: Timeout = None + ) -> None: + """ + Asserts that the sidebar has the expected padding. + + Parameters + ---------- + value + The expected padding of the sidebar. + timeout + The maximum time to wait for the padding to appear. Defaults to `None`. + """ + padding_val = " ".join(map(str, value)) + _expect_style_to_have_value( + self.loc_content, "padding", padding_val, timeout=timeout + ) def expect_position( self, diff --git a/tests/playwright/shiny/inputs/sidebar_kitchensink/app.py b/tests/playwright/shiny/inputs/sidebar_kitchensink/app.py new file mode 100644 index 000000000..0ece024d3 --- /dev/null +++ b/tests/playwright/shiny/inputs/sidebar_kitchensink/app.py @@ -0,0 +1,67 @@ +from shiny.express import input, render, ui + +ui.page_opts(fillable=True) + +with ui.card(): + with ui.layout_sidebar(): + with ui.sidebar( + id="sidebar_left", + open="desktop", + title="Left sidebar", + bg="dodgerBlue", + class_="text-white", + max_height_mobile="175px", + gap="20px", + padding="10px", + ): + "Left sidebar content" + + @render.code + def state_left(): + return f"input.sidebar_left(): {input.sidebar_left()}" + + +with ui.card(): + with ui.layout_sidebar(): + with ui.sidebar( + id="sidebar_right", + position="right", + open="desktop", + padding=["10px", "20px"], + bg="SlateBlue", + ): + "Right sidebar content" + + @render.code + def state_right(): + return f"input.sidebar_right(): {input.sidebar_right()}" + + +with ui.card(): + with ui.layout_sidebar(): + with ui.sidebar( + id="sidebar_closed", + open="closed", + bg="LightCoral", + padding=["10px", "20px", "30px"], + ): + "Closed sidebar content" + + @render.code + def state_closed(): + return f"input.sidebar_closed(): {input.sidebar_closed()}" + + +with ui.card(): + with ui.layout_sidebar(): + with ui.sidebar( + id="sidebar_always", + open="always", + bg="PeachPuff", + padding=["10px", "20px", "30px", "40px"], + ): + "Always sidebar content" + + @render.code + def state_always(): + return f"input.sidebar_always(): {input.sidebar_always()}" diff --git a/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py b/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py new file mode 100644 index 000000000..85bdc2358 --- /dev/null +++ b/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py @@ -0,0 +1,38 @@ +from playwright.sync_api import Page + +from shiny.playwright import controller +from shiny.run import ShinyAppProc + + +def test_sidebar_position_and_open(page: Page, local_app: ShinyAppProc) -> None: + page.goto(local_app.url) + + left_sidebar = controller.Sidebar(page, "sidebar_left") + output_txt_left = controller.OutputTextVerbatim(page, "state_left") + left_sidebar.set(True) + left_sidebar.expect_padding(["10px"]) + left_sidebar.expect_title("Left sidebar") + left_sidebar.expect_gap("20px") + left_sidebar.expect_class("text-white", has_class=True) + left_sidebar.expect_bg_color("dodgerBlue") + output_txt_left.expect_value("input.sidebar_left(): True") + left_sidebar.expect_open(True) + left_sidebar.set(False) + output_txt_left.expect_value("input.sidebar_left(): False") + left_sidebar.expect_handle(True) + left_sidebar.expect_open(False) + left_sidebar.loc_handle.click() + left_sidebar.expect_open(True) + output_txt_left.expect_value("input.sidebar_left(): True") + + right_sidebar = controller.Sidebar(page, "sidebar_right") + right_sidebar.expect_padding(["10px", "20px"]) + right_sidebar.expect_bg_color("SlateBlue") + + closed_sidebar = controller.Sidebar(page, "sidebar_closed") + closed_sidebar.expect_padding(["10px", "20px", "30px"]) + closed_sidebar.expect_bg_color("LightCoral") + + always_sidebar = controller.Sidebar(page, "sidebar_always") + always_sidebar.expect_padding(["10px", "20px", "30px", "40px"]) + always_sidebar.expect_bg_color("PeachPuff") From a7160f56e92498a727e611562397cf9cb23209df Mon Sep 17 00:00:00 2001 From: Karan Gathani Date: Thu, 3 Oct 2024 06:58:17 -0700 Subject: [PATCH 2/7] Add more test methods --- shiny/playwright/controller/_layout.py | 61 +++++++++++++++++++ .../shiny/inputs/sidebar_kitchensink/app.py | 4 +- .../test_sidebar_kitchensink.py | 8 +++ 3 files changed, 71 insertions(+), 2 deletions(-) diff --git a/shiny/playwright/controller/_layout.py b/shiny/playwright/controller/_layout.py index 2f5a5e89a..131136c01 100644 --- a/shiny/playwright/controller/_layout.py +++ b/shiny/playwright/controller/_layout.py @@ -6,6 +6,9 @@ from playwright.sync_api import expect as playwright_expect from .._types import PatternOrStr, Timeout +from ..expect._internal import ( + expect_attribute_to_have_value as _expect_attribute_to_have_value, +) from ..expect._internal import expect_class_to_have_value as _expect_class_to_have_value from ..expect._internal import expect_style_to_have_value as _expect_style_to_have_value from ._base import UiWithContainer, WidthLocM @@ -131,6 +134,64 @@ def expect_bg_color(self, value: PatternOrStr, *, timeout: Timeout = None) -> No self.loc_container, "--_sidebar-bg", value, timeout=timeout ) + def expect_desktop_state( + self, value: Literal["open", "closed", "always"], *, timeout: Timeout = None + ) -> None: + """ + Asserts that the sidebar has the expected state on desktop. + + Parameters + ---------- + value + The expected state of the sidebar on desktop. + timeout + The maximum time to wait for the state to appear. Defaults to `None`. + """ + _expect_attribute_to_have_value( + self.loc_container, + name="data-open-desktop", + value=value, + timeout=timeout, + ) + + def expect_mobile_state( + self, value: Literal["open", "closed", "always"], *, timeout: Timeout = None + ) -> None: + """ + Asserts that the sidebar has the expected state on mobile. + + Parameters + ---------- + value + The expected state of the sidebar on mobile. + timeout + The maximum time to wait for the state to appear. Defaults to `None`. + """ + _expect_attribute_to_have_value( + self.loc_container, + name="data-open-mobile", + value=value, + timeout=timeout, + ) + + def expect_mobile_max_height( + self, value: PatternOrStr, *, timeout: Timeout = None + ) -> None: + """ + Asserts that the sidebar has the expected maximum height on mobile. + + Parameters + ---------- + value + The expected maximum height of the sidebar on mobile. + timeout + The maximum time to wait for the maximum height to appear. Defaults to `None`. + """ + self.expect_mobile_state("always", timeout=timeout) + _expect_style_to_have_value( + self.loc_container, "--_mobile-max-height", value, timeout=timeout + ) + def expect_title(self, value: PatternOrStr, *, timeout: Timeout = None) -> None: """ Asserts that the sidebar has the expected title. diff --git a/tests/playwright/shiny/inputs/sidebar_kitchensink/app.py b/tests/playwright/shiny/inputs/sidebar_kitchensink/app.py index 0ece024d3..e5b9b42e6 100644 --- a/tests/playwright/shiny/inputs/sidebar_kitchensink/app.py +++ b/tests/playwright/shiny/inputs/sidebar_kitchensink/app.py @@ -10,7 +10,6 @@ title="Left sidebar", bg="dodgerBlue", class_="text-white", - max_height_mobile="175px", gap="20px", padding="10px", ): @@ -26,7 +25,7 @@ def state_left(): with ui.sidebar( id="sidebar_right", position="right", - open="desktop", + open={"desktop": "closed", "mobile": "open"}, padding=["10px", "20px"], bg="SlateBlue", ): @@ -59,6 +58,7 @@ def state_closed(): open="always", bg="PeachPuff", padding=["10px", "20px", "30px", "40px"], + max_height_mobile="175px", ): "Always sidebar content" diff --git a/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py b/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py index 85bdc2358..86f9602f6 100644 --- a/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py +++ b/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py @@ -15,6 +15,8 @@ def test_sidebar_position_and_open(page: Page, local_app: ShinyAppProc) -> None: left_sidebar.expect_gap("20px") left_sidebar.expect_class("text-white", has_class=True) left_sidebar.expect_bg_color("dodgerBlue") + left_sidebar.expect_desktop_state("open") + left_sidebar.expect_mobile_state("closed") output_txt_left.expect_value("input.sidebar_left(): True") left_sidebar.expect_open(True) left_sidebar.set(False) @@ -28,6 +30,8 @@ def test_sidebar_position_and_open(page: Page, local_app: ShinyAppProc) -> None: right_sidebar = controller.Sidebar(page, "sidebar_right") right_sidebar.expect_padding(["10px", "20px"]) right_sidebar.expect_bg_color("SlateBlue") + right_sidebar.expect_mobile_state("open") + right_sidebar.expect_desktop_state("closed") closed_sidebar = controller.Sidebar(page, "sidebar_closed") closed_sidebar.expect_padding(["10px", "20px", "30px"]) @@ -36,3 +40,7 @@ def test_sidebar_position_and_open(page: Page, local_app: ShinyAppProc) -> None: always_sidebar = controller.Sidebar(page, "sidebar_always") always_sidebar.expect_padding(["10px", "20px", "30px", "40px"]) always_sidebar.expect_bg_color("PeachPuff") + always_sidebar.expect_open(True) + always_sidebar.expect_desktop_state("always") + always_sidebar.expect_mobile_state("always") + always_sidebar.expect_mobile_max_height("175px") From c9214aec9553851661d18873bad65a09c3956067 Mon Sep 17 00:00:00 2001 From: Karan Gathani Date: Thu, 3 Oct 2024 07:00:33 -0700 Subject: [PATCH 3/7] Add checks for closed state for both desktop and mobile --- .../inputs/sidebar_kitchensink/test_sidebar_kitchensink.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py b/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py index 86f9602f6..52fad8f86 100644 --- a/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py +++ b/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py @@ -36,6 +36,8 @@ def test_sidebar_position_and_open(page: Page, local_app: ShinyAppProc) -> None: closed_sidebar = controller.Sidebar(page, "sidebar_closed") closed_sidebar.expect_padding(["10px", "20px", "30px"]) closed_sidebar.expect_bg_color("LightCoral") + closed_sidebar.expect_mobile_state("closed") + closed_sidebar.expect_desktop_state("closed") always_sidebar = controller.Sidebar(page, "sidebar_always") always_sidebar.expect_padding(["10px", "20px", "30px", "40px"]) From 1ac01823318fdd7a68d4815202253027d600b57b Mon Sep 17 00:00:00 2001 From: Karan Gathani Date: Thu, 3 Oct 2024 07:00:56 -0700 Subject: [PATCH 4/7] change name of the test --- .../inputs/sidebar_kitchensink/test_sidebar_kitchensink.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py b/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py index 52fad8f86..64cc2dff9 100644 --- a/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py +++ b/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py @@ -4,7 +4,7 @@ from shiny.run import ShinyAppProc -def test_sidebar_position_and_open(page: Page, local_app: ShinyAppProc) -> None: +def test_sidebar_kitchensink(page: Page, local_app: ShinyAppProc) -> None: page.goto(local_app.url) left_sidebar = controller.Sidebar(page, "sidebar_left") From 5d7f7363c25614eac37ceaea4275c071e3188cb9 Mon Sep 17 00:00:00 2001 From: Karan Gathani Date: Thu, 3 Oct 2024 07:06:30 -0700 Subject: [PATCH 5/7] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0850651f1..60175592d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Small improvements to the default pulse busy indicator to better blend with any background. It's also now slightly smaller by default.(#1707) +* Added `.expect_class()`, `.expect_gap()`, `.expect_bg_color()`, `.expect_desktop_state()`, `.expect_mobile_state()`, `.expect_mobile_max_height()`, `.expect_title()` and `.expect_padding()` for `Sidebar` in `shiny.playwright.controllers` (#1715) + +* Modified `.expect_text()` for `Sidebar` in `shiny.playwright.controllers` to use `loc_content` instead of `loc` for text. (#1715) + ### Bug fixes * A few fixes for `ui.Chat()`, including: From 6eb71679029cfb1861f228d221d957b95a5bdf6a Mon Sep 17 00:00:00 2001 From: Karan Gathani Date: Thu, 3 Oct 2024 12:43:11 -0700 Subject: [PATCH 6/7] Add tests for expect_width() --- CHANGELOG.md | 2 +- shiny/playwright/controller/_layout.py | 24 +++++++++++++++---- .../shiny/inputs/sidebar_kitchensink/app.py | 1 + .../test_sidebar_kitchensink.py | 2 ++ 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60175592d..d7e6cc2dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Small improvements to the default pulse busy indicator to better blend with any background. It's also now slightly smaller by default.(#1707) -* Added `.expect_class()`, `.expect_gap()`, `.expect_bg_color()`, `.expect_desktop_state()`, `.expect_mobile_state()`, `.expect_mobile_max_height()`, `.expect_title()` and `.expect_padding()` for `Sidebar` in `shiny.playwright.controllers` (#1715) +* Added `.expect_class()`, `.expect_gap()`, `.expect_bg_color()`, `.expect_desktop_state()`, `.expect_mobile_state()`, `.expect_mobile_max_height()`, `.expect_title()`, `.expect_width()` and `.expect_padding()` for `Sidebar` in `shiny.playwright.controllers` (#1715) * Modified `.expect_text()` for `Sidebar` in `shiny.playwright.controllers` to use `loc_content` instead of `loc` for text. (#1715) diff --git a/shiny/playwright/controller/_layout.py b/shiny/playwright/controller/_layout.py index 131136c01..49c5071e1 100644 --- a/shiny/playwright/controller/_layout.py +++ b/shiny/playwright/controller/_layout.py @@ -11,11 +11,10 @@ ) from ..expect._internal import expect_class_to_have_value as _expect_class_to_have_value from ..expect._internal import expect_style_to_have_value as _expect_style_to_have_value -from ._base import UiWithContainer, WidthLocM +from ._base import UiWithContainer class Sidebar( - WidthLocM, UiWithContainer, ): """Controller for :func:`shiny.ui.sidebar`.""" @@ -106,6 +105,21 @@ def expect_class( timeout=timeout, ) + def expect_width(self, value: PatternOrStr, *, timeout: Timeout = None) -> None: + """ + Asserts that the sidebar has the expected width. + + Parameters + ---------- + value + The expected width of the sidebar. + timeout + The maximum time to wait for the width to appear. Defaults to `None`. + """ + _expect_style_to_have_value( + self.loc_container, "--_sidebar-width", value, timeout=timeout + ) + def expect_gap(self, value: PatternOrStr, *, timeout: Timeout = None) -> None: """ Asserts that the sidebar has the expected gap. @@ -206,7 +220,7 @@ def expect_title(self, value: PatternOrStr, *, timeout: Timeout = None) -> None: playwright_expect(self.loc_title).to_have_text(value, timeout=timeout) def expect_padding( - self, value: list[PatternOrStr], *, timeout: Timeout = None + self, value: str | list[str], *, timeout: Timeout = None ) -> None: """ Asserts that the sidebar has the expected padding. @@ -218,7 +232,9 @@ def expect_padding( timeout The maximum time to wait for the padding to appear. Defaults to `None`. """ - padding_val = " ".join(map(str, value)) + if not isinstance(value, list): + value = [value] + padding_val = " ".join(value) _expect_style_to_have_value( self.loc_content, "padding", padding_val, timeout=timeout ) diff --git a/tests/playwright/shiny/inputs/sidebar_kitchensink/app.py b/tests/playwright/shiny/inputs/sidebar_kitchensink/app.py index e5b9b42e6..a5e1db5ff 100644 --- a/tests/playwright/shiny/inputs/sidebar_kitchensink/app.py +++ b/tests/playwright/shiny/inputs/sidebar_kitchensink/app.py @@ -12,6 +12,7 @@ class_="text-white", gap="20px", padding="10px", + width="200px", ): "Left sidebar content" diff --git a/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py b/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py index 64cc2dff9..cca90e7c4 100644 --- a/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py +++ b/tests/playwright/shiny/inputs/sidebar_kitchensink/test_sidebar_kitchensink.py @@ -10,6 +10,7 @@ def test_sidebar_kitchensink(page: Page, local_app: ShinyAppProc) -> None: left_sidebar = controller.Sidebar(page, "sidebar_left") output_txt_left = controller.OutputTextVerbatim(page, "state_left") left_sidebar.set(True) + left_sidebar.expect_padding("10px") left_sidebar.expect_padding(["10px"]) left_sidebar.expect_title("Left sidebar") left_sidebar.expect_gap("20px") @@ -17,6 +18,7 @@ def test_sidebar_kitchensink(page: Page, local_app: ShinyAppProc) -> None: left_sidebar.expect_bg_color("dodgerBlue") left_sidebar.expect_desktop_state("open") left_sidebar.expect_mobile_state("closed") + left_sidebar.expect_width("200px") output_txt_left.expect_value("input.sidebar_left(): True") left_sidebar.expect_open(True) left_sidebar.set(False) From 56ddccd0333a7ec5dc4deccc1fc03d2f102ba43f Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Fri, 4 Oct 2024 14:51:42 -0400 Subject: [PATCH 7/7] Apply suggestions from code review --- CHANGELOG.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7e6cc2dd..14987a3b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,9 +27,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Small improvements to the default pulse busy indicator to better blend with any background. It's also now slightly smaller by default.(#1707) -* Added `.expect_class()`, `.expect_gap()`, `.expect_bg_color()`, `.expect_desktop_state()`, `.expect_mobile_state()`, `.expect_mobile_max_height()`, `.expect_title()`, `.expect_width()` and `.expect_padding()` for `Sidebar` in `shiny.playwright.controllers` (#1715) +* Added `.expect_class()`, `.expect_gap()`, `.expect_bg_color()`, `.expect_desktop_state()`, `.expect_mobile_state()`, `.expect_mobile_max_height()`, `.expect_title()`, and `.expect_padding()` for `Sidebar` in `shiny.playwright.controllers` (#1715) + +* Modified `.expect_text()` for `Sidebar` in `shiny.playwright.controllers` to use `.loc_content` instead of `loc` for text. Also modified `.expect_width()` to check the `.loc_container`'s style instead of the `.loc` element. (#1715) + +* Modified `.expect_text()` and `.expect_width()` for `Sidebar` in `shiny.playwright.controllers` to use `loc_content` instead of `loc` for text. (#1715) -* Modified `.expect_text()` for `Sidebar` in `shiny.playwright.controllers` to use `loc_content` instead of `loc` for text. (#1715) ### Bug fixes