feat(web): add peripheral card quick controls
This commit is contained in:
@@ -116,3 +116,18 @@ def test_homepage_only_reveals_nfc_devices_detected_in_this_run() -> None:
|
||||
assert "const detectedNfcIds = new Set(" in unified
|
||||
assert "detectedNfcIds.has(normalizeCardUid(device.cardUid))" in unified
|
||||
assert "检测到已绑定的 NFC 后,外设将在本次运行期间持续显示" in unified
|
||||
|
||||
|
||||
def test_homepage_peripheral_cards_are_single_expand_and_quick_control_surfaces() -> None:
|
||||
source = SOURCE_PATH.read_text(encoding="utf-8")
|
||||
unified = _function_source(
|
||||
source,
|
||||
" function buildUnifiedExtensionSync() {",
|
||||
"\n function init()",
|
||||
)
|
||||
|
||||
assert "expandedPeripheralDeviceId === device.id" in unified
|
||||
assert 'data-hide-peripheral-card="${escapeHtml(device.id)}"' in unified
|
||||
assert 'data-toggle-peripheral-card="${escapeHtml(device.id)}"' in unified
|
||||
assert 'data-run-peripheral-quick-action="${escapeHtml(action.id)}"' in unified
|
||||
assert "hiddenPeripheralDevices.has(device.id)" in unified
|
||||
|
||||
Reference in New Issue
Block a user