feat: add WhatsApp QR channel

This commit is contained in:
xmanrui 2026-08-16 17:30:38 +08:00
parent f8841da76f
commit c54463843f
29 changed files with 4565 additions and 224 deletions

View file

@ -65,7 +65,7 @@ const QQ_SOURCE_URL = new URL(
import.meta.url,
);
test('IM settings renders seven compact logo channel tabs without enable switches', async () => {
test('IM settings renders eight compact logo channel tabs without enable switches', async () => {
const styles = await readFile(STYLES_URL, 'utf8');
const markup = renderToStaticMarkup(React.createElement(IMSettingsTab, {
feishuRpcCall: async () => ({ ok: true, value: {} }),
@ -75,6 +75,7 @@ test('IM settings renders seven compact logo channel tabs without enable switche
qqRpcCall: async () => ({ ok: true, value: {} }),
telegramRpcCall: async () => ({ ok: true, value: {} }),
discordRpcCall: async () => ({ ok: true, value: {} }),
whatsappRpcCall: async () => ({ ok: true, value: {} }),
}));
assert.match(markup, /IM机器人/);
@ -87,6 +88,7 @@ test('IM settings renders seven compact logo channel tabs without enable switche
assert.match(markup, />QQ</);
assert.match(markup, />Telegram</);
assert.match(markup, />Discord</);
assert.match(markup, />WhatsApp</);
assert.match(markup, /dim-logoWeixin/);
assert.match(markup, /dim-logoFeishu/);
assert.match(markup, /dim-logoDingtalk/);
@ -94,8 +96,9 @@ test('IM settings renders seven compact logo channel tabs without enable switche
assert.match(markup, /dim-logoQq/);
assert.match(markup, /dim-logoTelegram/);
assert.match(markup, /dim-logoDiscord/);
assert.match(markup, /dim-logoWhatsapp/);
assert.match(styles, /\.dim-logoFeishu svg \{ width: 28px; height: 28px; \}/);
assert.equal((markup.match(/role="tab"/g) ?? []).length, 7);
assert.equal((markup.match(/role="tab"/g) ?? []).length, 8);
assert.equal((markup.match(/aria-selected="true"/g) ?? []).length, 1);
assert.doesNotMatch(markup, /role="switch"|type="checkbox"/);
assert.doesNotMatch(markup, /dim-chevron|扫码绑定<\/small>|扫码接入<\/small>/);