Skip to content

Commit a0574e6

Browse files
committed
Fix tests
1 parent aedf447 commit a0574e6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tests/test_app/components.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def django_js():
149149

150150
@reactpy_django.decorators.user_passes_test(
151151
lambda user: user.is_anonymous,
152-
fallback=html.div({"id": "authorized-user-test-fallback"}, "authorized_user: Fail"),
152+
fallback=html.div({"id": "authorized-user-fallback"}, "authorized_user: Fail"),
153153
)
154154
@component
155155
def authorized_user():
@@ -159,7 +159,7 @@ def authorized_user():
159159
@reactpy_django.decorators.user_passes_test(
160160
lambda user: user.is_active,
161161
fallback=html.div(
162-
{"id": "unauthorized-user-test-fallback"}, "unauthorized_user: Success"
162+
{"id": "unauthorized-user-fallback"}, "unauthorized_user: Success"
163163
),
164164
)
165165
@component

tests/test_app/tests/test_components.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def setUpClass(cls):
6767
headless = strtobool(os.environ.get("PLAYWRIGHT_HEADLESS", GITHUB_ACTIONS))
6868
cls.browser = cls.playwright.chromium.launch(headless=bool(headless))
6969
cls.page = cls.browser.new_page()
70+
cls.page.set_default_timeout(5000)
7071

7172
@classmethod
7273
def tearDownClass(cls):
@@ -256,17 +257,17 @@ def test_view_to_iframe_async_func(self):
256257

257258
def test_view_to_iframe_sync_class(self):
258259
self.page.frame_locator("#view_to_iframe_sync_class > iframe").locator(
259-
"#ViewToComponentSyncClass[data-success=true]"
260+
"#ViewToIframeSyncClass[data-success=true]"
260261
).wait_for()
261262

262263
def test_view_to_iframe_async_class(self):
263264
self.page.frame_locator("#view_to_iframe_async_class > iframe").locator(
264-
"#ViewToComponentAsyncClass[data-success=true]"
265+
"#ViewToIframeAsyncClass[data-success=true]"
265266
).wait_for()
266267

267268
def test_view_to_iframe_template_view_class(self):
268269
self.page.frame_locator("#view_to_iframe_template_view_class > iframe").locator(
269-
"#ViewToComponentTemplateViewClass[data-success=true]"
270+
"#ViewToIframeTemplateViewClass[data-success=true]"
270271
).wait_for()
271272

272273
def test_view_to_iframe_args(self):

0 commit comments

Comments
 (0)