feat: 添加更新卡片提醒样式和测试

This commit is contained in:
QLHazyCoder
2026-04-24 23:57:08 +08:00
parent ee64f8202d
commit 6b9f3d9c44
3 changed files with 24 additions and 1 deletions
+10
View File
@@ -19,6 +19,16 @@ test('sidepanel source binds the icloud fetch mode control before using it', ()
assert.match(source, /selectIcloudFetchMode\?\.addEventListener\('change'/);
});
test('update card highlights exporting config before upgrade', () => {
const html = fs.readFileSync('sidepanel/sidepanel.html', 'utf8');
const css = fs.readFileSync('sidepanel/sidepanel.css', 'utf8');
assert.match(html, /<p class="update-card-reminder">请更新前导出配置<\/p>/);
assert.match(css, /\.update-card-reminder\s*\{/);
assert.match(css, /font-weight:\s*700;/);
assert.match(css, /color:\s*var\(--orange\);/);
});
test('icloud manager exposes a factory and renders empty state', () => {
const source = fs.readFileSync('sidepanel/icloud-manager.js', 'utf8');
const windowObject = {};