Skip to content

Commit 4c7b3c9

Browse files
committed
Fix link hover test to disable built-with-reflex badge
Use REFLEX_SHOW_BUILT_WITH_REFLEX env var to set the Config value, avoiding the need for a custom environment variable definition.
1 parent eaa4237 commit 4c7b3c9

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

tests/integration/tests_playwright/test_link_hover.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
from collections.abc import Generator
23

34
import pytest
@@ -27,12 +28,16 @@ def index():
2728

2829
@pytest.fixture
2930
def link_app(tmp_path_factory) -> Generator[AppHarness, None, None]:
30-
with AppHarness.create(
31-
root=tmp_path_factory.mktemp("link_app"),
32-
app_source=LinkApp,
33-
) as harness:
34-
assert harness.app_instance is not None, "app is not running"
35-
yield harness
31+
os.environ["REFLEX_SHOW_BUILT_WITH_REFLEX"] = "false"
32+
try:
33+
with AppHarness.create(
34+
root=tmp_path_factory.mktemp("link_app"),
35+
app_source=LinkApp,
36+
) as harness:
37+
assert harness.app_instance is not None, "app is not running"
38+
yield harness
39+
finally:
40+
os.environ.pop("REFLEX_SHOW_BUILT_WITH_REFLEX", None)
3641

3742

3843
def test_link_hover(link_app: AppHarness, page: Page):

0 commit comments

Comments
 (0)