fix: keep deeplink gateway open during app prompt
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user