Skip to content

Commit 9a84c63

Browse files
authored
Apply suggestions from code review
1 parent f8ff5dd commit 9a84c63

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

shiny/playwright/controller/_accordion.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,10 @@ def expect_width(self, value: StyleValue, *, timeout: Timeout = None) -> None:
238238
_expect_style_to_have_value(self.loc_container, "width", value, timeout=timeout)
239239

240240
def expect_open(
241-
self, value: list[PatternOrStr], *, timeout: Timeout = None, **kwargs
241+
self,
242+
value: list[PatternOrStr],
243+
*,
244+
timeout: Timeout = None,
242245
) -> None:
243246
expect_locator_values_in_list(
244247
page=self.page,
@@ -252,7 +255,7 @@ def expect_open(
252255
arr=value,
253256
key="data-value",
254257
timeout=timeout,
255-
**kwargs,
258+
alt_verify=True,
256259
)
257260

258261
def expect_panels(
@@ -276,7 +279,7 @@ def expect_panels(
276279
arr=value,
277280
key="data-value",
278281
timeout=timeout,
279-
**kwargs,
282+
alt_verify=True,
280283
)
281284

282285
def set(

shiny/playwright/controller/_expect.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from __future__ import annotations
22

3-
from time import sleep
4-
53
from playwright.sync_api import Locator, Page
64
from playwright.sync_api import expect as playwright_expect
75

@@ -148,7 +146,7 @@ def expect_locator_values_in_list(
148146
is_checked: bool | MISSING_TYPE = MISSING,
149147
timeout: Timeout = None,
150148
key: str = "value",
151-
**kwargs,
149+
alt_verify: bool = False,
152150
) -> None:
153151
"""
154152
Expect the locator to contain the values in the list.

tests/playwright/shiny/components/accordion/test_accordion.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ def test_accordion(page: Page, local_app: ShinyAppProc) -> None:
9090
"Section F",
9191
"Section G",
9292
],
93-
alt_verify=True,
9493
)
9594
acc.expect_open(
9695
[
@@ -101,7 +100,6 @@ def test_accordion(page: Page, local_app: ShinyAppProc) -> None:
101100
"Section F",
102101
"Section G",
103102
],
104-
alt_verify=True,
105103
)
106104
# Should be uncommented once https://github.com/rstudio/bslib/issues/565 is fixed
107105
# output_txt_verbatim.expect_value(

0 commit comments

Comments
 (0)