fix: preserve reconnect across deferred workspace startup
This commit is contained in:
1 parent
0a4c9a0ae8
commit
377fd889c5
4 files changed
+36
-4
No files matched your search
@@ -48,4 +48,5 @@ def test_dashboard_uses_reconnect_flush_after_live_identity_refresh():
|
||||
assert '<script src="static/reconnect-outboxes.js"></script>' in index
|
||||
assert "const reconnectOutboxes = createReconnectOutboxes({" in dashboard
|
||||
assert "restoreIdentity: login => { activeFlushLogin = login; confirmedOwnerLogin = login; }" in dashboard
|
||||
assert "window.addEventListener('online', reconnectOutboxes);" in dashboard
|
||||
assert "window.addEventListener('online', reconnectAfterOnline);" in dashboard
|
||||
assert "setTimeout(reconnectOutboxes, 500)" in dashboard
|
||||
@@ -1108,6 +1108,25 @@ def test_offline_activation_migrates_cached_optional_feature_before_deleting_old
|
||||
assert state["claimed"] is True
|
||||
|
||||
|
||||
def test_successful_optional_feature_fetch_is_cached_for_offline_reopen():
|
||||
result = run_worker_scenario(
|
||||
"""
|
||||
const asset = '/dashboard/feature-today-timer-test.js';
|
||||
context.self.__testOptionalFeatures.push(asset);
|
||||
const response = await dispatch('fetch', {
|
||||
method: 'GET', mode: 'cors',
|
||||
url: 'https://forge.example/dashboard/feature-today-timer-test.js',
|
||||
});
|
||||
process.stdout.write(JSON.stringify({ body: await response.text(), state }));
|
||||
"""
|
||||
)
|
||||
|
||||
assert result["body"] == "network"
|
||||
assert result["state"]["puts"] == [
|
||||
"https://forge.example/dashboard/feature-today-timer-test.js"
|
||||
]
|
||||
|
||||
|
||||
def test_activate_warms_optional_features_without_blocking_siblings_or_claim():
|
||||
result = run_worker_scenario(
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user