fix notice display

This commit is contained in:
2026-08-03 18:20:23 +08:00
parent 8c3df90a87
commit 1f9c096d05
2 changed files with 34 additions and 9 deletions
+15 -2
View File
@@ -552,8 +552,12 @@ test("panel notifications and volume configuration stay isolated by device", asy
type: "ackPanelNotification", deviceId, notificationId: notification.notification.notificationId,
adminToken: "test-token"
});
assert.equal(duplicatedAck.success, false);
assert.equal(duplicatedAck.errMsg, "Panel 通知不存在");
assert.equal(duplicatedAck.success, true);
assert.equal(duplicatedAck.idempotent, true);
assert.equal(duplicatedAck.deleted, 0);
assert.equal((await post({
type: "getPendingPanelNotification", deviceId, adminToken: "test-token"
})).pending, false);
async function uploadResult(folderName, fileName, content) {
const result = await post({ type: "uploadDataFile", fileName, folder: `${deviceId}/${folderName}` });
@@ -567,6 +571,15 @@ test("panel notifications and volume configuration stay isolated by device", asy
});
assert.equal(volumeResult.notification.type, "volume_result_ready");
assert.ok(volumeResult.notification.fileID);
const fallbackAck = await post({
type: "ackPanelNotification",
deviceId: otherDeviceId,
notificationId: volumeResult.notification.notificationId,
adminToken: "test-token"
});
assert.equal(fallbackAck.success, true);
assert.equal(fallbackAck.idempotent, true);
assert.equal(fallbackAck.deleted, 1);
await post({
type: "ackPanelNotification", deviceId, notificationId: volumeResult.notification.notificationId,
adminToken: "test-token"