fix: keep deeplink gateway open during app prompt

This commit is contained in:
3252a8
2026-06-01 20:34:49 +03:00
parent 687fc03e8c
commit 5b19ba2c2f
4 changed files with 17 additions and 6 deletions
+4
View File
@@ -296,6 +296,10 @@ class WebAppRouteContractTests(unittest.TestCase):
self.assertIn("URLSearchParams", response.text)
self.assertIn("Settings added", response.text)
self.assertIn("window.close()", response.text)
self.assertNotIn('window.addEventListener("blur", notePageLeft)', response.text)
self.assertNotIn("window.setTimeout(tryCloseWindow, 120)", response.text)
self.assertIn("const CLOSE_ATTEMPT_DELAY_MS = 2500", response.text)
self.assertIn("if (pageLeft || document.hidden) tryCloseWindow();", response.text)
self.assertIn(r"/^(?:javascript|data|vbscript|https?):/i", response.text)
def test_app_deeplink_gateway_uses_i18n_template(self):
+3
View File
@@ -44,6 +44,9 @@ def test_open_app_route_uses_fallback_screen_without_auth_flow():
assert "AppLaunchScreen" in app_source
assert 'mode = isAppLaunchRoute ? "appLaunch"' in app_source
assert "window.close()" in screen_source
assert 'window.addEventListener("blur", notePageLeft)' not in screen_source
assert "CLOSE_ATTEMPT_DELAY_MS = 2500" in screen_source
assert "if (pageLeft || document.hidden) tryCloseWindow();" in screen_source
launch_guard_pos = app_source.index("if (isAppLaunchRoute) return;")
boot_pos = app_source.index("boot();", launch_guard_pos)