feat: 固定操作间延迟设置并更新相关文档和测试
This commit is contained in:
@@ -276,7 +276,7 @@ test('SAVE_SETTING broadcasts operation delay setting without background success
|
||||
addLog: async (message, level = 'info') => logs.push({ message, level }),
|
||||
buildLuckmailSessionSettingsPayload: () => ({}),
|
||||
buildPersistentSettingsPayload: (input = {}) => Object.prototype.hasOwnProperty.call(input, 'operationDelayEnabled')
|
||||
? { operationDelayEnabled: input.operationDelayEnabled === false ? false : true }
|
||||
? { operationDelayEnabled: true }
|
||||
: {},
|
||||
broadcastDataUpdate: (payload) => broadcasts.push(payload),
|
||||
getState: async () => ({ ...state }),
|
||||
@@ -291,8 +291,8 @@ test('SAVE_SETTING broadcasts operation delay setting without background success
|
||||
});
|
||||
|
||||
assert.equal(response.ok, true);
|
||||
assert.equal(state.operationDelayEnabled, false);
|
||||
assert.deepStrictEqual(broadcasts.at(-1), { operationDelayEnabled: false });
|
||||
assert.equal(state.operationDelayEnabled, true);
|
||||
assert.deepStrictEqual(broadcasts.at(-1), { operationDelayEnabled: true });
|
||||
assert.equal(logs.length, 0);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user