fix integrations for real
This commit is contained in:
parent
5ee6ad7d84
commit
a5b8043cb1
@ -8,26 +8,17 @@ from selenium.common.exceptions import NoSuchElementException
|
|||||||
from selenium.webdriver.common.by import By
|
from selenium.webdriver.common.by import By
|
||||||
|
|
||||||
from reflex import constants
|
from reflex import constants
|
||||||
|
from reflex.config import environment
|
||||||
from reflex.testing import AppHarness, WebDriver
|
from reflex.testing import AppHarness, WebDriver
|
||||||
|
|
||||||
from .utils import SessionStorage
|
from .utils import SessionStorage
|
||||||
|
|
||||||
|
|
||||||
def ConnectionBanner(
|
def ConnectionBanner():
|
||||||
compile_context: constants.CompileContext = constants.CompileContext.RUN,
|
"""App with a connection banner."""
|
||||||
):
|
|
||||||
"""App with a connection banner.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
compile_context: The value used to set the compile context.
|
|
||||||
"""
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
from reflex.config import environment
|
|
||||||
|
|
||||||
# Simulate reflex cloud deploy
|
|
||||||
environment.REFLEX_COMPILE_CONTEXT.set(compile_context)
|
|
||||||
|
|
||||||
class State(rx.State):
|
class State(rx.State):
|
||||||
foo: int = 0
|
foo: int = 0
|
||||||
@ -82,11 +73,11 @@ def connection_banner(
|
|||||||
Yields:
|
Yields:
|
||||||
running AppHarness instance
|
running AppHarness instance
|
||||||
"""
|
"""
|
||||||
|
environment.REFLEX_COMPILE_CONTEXT.set(simulate_compile_context)
|
||||||
|
|
||||||
with AppHarness.create(
|
with AppHarness.create(
|
||||||
root=tmp_path,
|
root=tmp_path,
|
||||||
app_source=functools.partial(
|
app_source=functools.partial(ConnectionBanner),
|
||||||
ConnectionBanner, compile_context=simulate_compile_context
|
|
||||||
),
|
|
||||||
app_name=(
|
app_name=(
|
||||||
"connection_banner_reflex_cloud"
|
"connection_banner_reflex_cloud"
|
||||||
if simulate_compile_context == constants.CompileContext.DEPLOY
|
if simulate_compile_context == constants.CompileContext.DEPLOY
|
||||||
|
Loading…
Reference in New Issue
Block a user