reflex/tests/units
Masen Furer 39cdce6960
[HOS-333] Send a "reload" message to the frontend after state expiry (#4442)
* Unit test updates

* test_client_storage: simulate backend state expiry

* [HOS-333] Send a "reload" message to the frontend after state expiry

1. a state instance expires on the backing store
2. frontend attempts to process an event against the expired token and gets a
   fresh instance of the state without router_data set
3. backend sends a "reload" message on the websocket containing the event and
   immediately stops processing
4. in response to the "reload" message, frontend sends
   [hydrate, update client storage, on_load, <previous_event>]

This allows the frontend and backend to re-syncronize on the state of the app
before continuing to process regular events.

If the event in (2) is a special hydrate event, then it is processed normally
by the middleware and the "reload" logic is skipped since this indicates an
initial load or a browser refresh.

* unit tests working with redis
2024-11-28 13:56:41 +01:00
..
assets rx._x.asset improvements (#3624) 2024-11-21 17:16:43 -08:00
compiler stop ignoring some lint rules (#4311) 2024-11-06 13:32:31 -08:00
components fix: do not allow instantiation of State mixins (#4347) 2024-11-18 19:15:01 -08:00
middleware reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
states rx.event(background=True) (#4263) 2024-10-30 11:10:51 -07:00
utils [ENG-4010]Codeblock cleanup in markdown (#4233) 2024-11-07 19:18:14 -08:00
vars improve object var symantics (#4290) 2024-11-05 09:56:10 -08:00
__init__.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
conftest.py add workflow to check dependencies on release branch (#4050) 2024-10-07 20:57:02 +02:00
test_app.py [HOS-333] Send a "reload" message to the frontend after state expiry (#4442) 2024-11-28 13:56:41 +01:00
test_attribute_access_type.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_base.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_config.py More env var cleanup (#4248) 2024-11-05 12:25:13 -08:00
test_db_config.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_event.py Allow bound method as event handler (#4348) 2024-11-21 11:53:50 -08:00
test_health_endpoint.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_model.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_page.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_prerequisites.py expose staticPageGenerationTimeout (#4266) 2024-10-29 22:02:35 -07:00
test_route.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_sqlalchemy.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_state_tree.py add workflow to check dependencies on release branch (#4050) 2024-10-07 20:57:02 +02:00
test_state.py [HOS-333] Send a "reload" message to the frontend after state expiry (#4442) 2024-11-28 13:56:41 +01:00
test_style.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_telemetry.py use pathlib as much as possible (#3967) 2024-10-03 17:50:39 +02:00
test_testing.py improve app_src typing (#4324) 2024-11-07 14:08:37 -08:00
test_var.py add typing to function vars (#4372) 2024-11-12 20:00:02 -08:00