From 3779d0a256755de803980917f325be36ba46aaa3 Mon Sep 17 00:00:00 2001 From: Karan Gathani Date: Thu, 9 Jan 2025 13:36:04 -0800 Subject: [PATCH] use regex pattern that matches any string (including an empty string) --- shiny/playwright/controller/_input_buttons.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shiny/playwright/controller/_input_buttons.py b/shiny/playwright/controller/_input_buttons.py index 0b287a563..37433a80a 100644 --- a/shiny/playwright/controller/_input_buttons.py +++ b/shiny/playwright/controller/_input_buttons.py @@ -1,6 +1,7 @@ from __future__ import annotations import pathlib +import re from typing import Literal, Optional from playwright.sync_api import FilePayload, Locator, Page @@ -61,7 +62,7 @@ def expect_disabled(self, value: bool, *, timeout: Timeout = None): The maximum time to wait for the expectation to be fulfilled. Defaults to `None`. """ _expect_attribute_to_have_value( - self.loc, "disabled", "" if value else None, timeout=timeout + self.loc, "disabled", re.compile(".*") if value else None, timeout=timeout )