fix: scope mobile share install to dashboard path (#223)
CI / lint (pull_request) Successful in 17s
CI / build-frontend (pull_request) Successful in 4s

This commit is contained in:
timmy committed 2026-08-07 20:26:14 +00:00
1 parent 4499a7f947
commit a25b547d20
5 files changed
+20 -11

No files matched your search

+1 -1
View File
@@ -545,7 +545,7 @@ async def test_dashboard_launches_share_capture_with_draft_conflict_choices():
assert 'id="shared-content-conflict"' in html
assert '.shared-content-actions button { min-height:44px;' in html
assert "history.replaceState({}, '', cleanUrl)" in html
assert "navigator.serviceWorker.register('/service-worker.js')" in html
assert "navigator.serviceWorker.register('service-worker.js')" in html
@pytest.mark.anyio
+6 -2
View File
@@ -73,12 +73,16 @@ async def test_pwa_assets_expose_root_scoped_share_target_without_caching_api_da
assert manifest.status_code == 200
assert manifest.headers["content-type"].startswith("application/manifest+json")
assert manifest.json()["id"] == "./"
assert manifest.json()["start_url"] == "./"
assert manifest.json()["scope"] == "./"
assert manifest.json()["share_target"] == {
"action": "/", "method": "GET", "enctype": "application/x-www-form-urlencoded",
"action": "./", "method": "GET", "enctype": "application/x-www-form-urlencoded",
"params": {"title": "title", "text": "text", "url": "url"},
}
assert worker.status_code == 200
assert worker.headers["content-type"].startswith("application/javascript")
assert worker.headers["service-worker-allowed"] == "/"
assert "request.url.includes('/api/')" in worker.text
assert "request.method !== 'GET'" in worker.text
assert "request.method !== 'GET'" in worker.text
assert "new URL('./', self.location.href).pathname" in worker.text