fix(web): reveal NFC peripherals after detection
This commit is contained in:
@@ -102,3 +102,17 @@ def test_device_card_surfaces_extension_toy_mqtt_delivery() -> None:
|
||||
assert "extensionToySnapshot.last_error" in apply_toy
|
||||
assert "applyExtensionToySnapshot(value.extension_toy" in apply_nfc
|
||||
assert "正在准备 extension/toy 消息" in apply_nfc
|
||||
|
||||
|
||||
def test_homepage_only_reveals_nfc_devices_detected_in_this_run() -> None:
|
||||
source = SOURCE_PATH.read_text(encoding="utf-8")
|
||||
unified = _function_source(
|
||||
source,
|
||||
" function buildUnifiedExtensionSync() {",
|
||||
"\n function init()",
|
||||
)
|
||||
|
||||
assert "detected_nfc_ids" in source
|
||||
assert "const detectedNfcIds = new Set(" in unified
|
||||
assert "detectedNfcIds.has(normalizeCardUid(device.cardUid))" in unified
|
||||
assert "检测到已绑定的 NFC 后,外设将在本次运行期间持续显示" in unified
|
||||
|
||||
Reference in New Issue
Block a user