'use strict' const assert = require('assert') const fs = require('fs') const path = require('path') const source = fs.readFileSync(path.join(__dirname, '..', 'app.js'), 'utf8') const css = fs.readFileSync(path.join(__dirname, '..', 'style.css'), 'utf8') for (const text of ['导出选中', '删除选中', '导入画布', '新建画布', '重命名画布', '删除画布', '设置分类', '清空回收站']) assert.ok(source.includes(text), text) assert.ok(!source.includes("className: 'iwb-home-card-check'")) assert.ok(source.includes('const [homeSelectedWs, setHomeSelectedWs] = useState([])')) assert.ok(source.includes('homeSelectedWs.includes(w.id)')) assert.ok(source.includes("homeSelectedWs.forEach((id) => (homeView === 'trash' ? purgeWs(id) : trashWs(id)))")) // v3.26.46(M4-B3):首页头部是「左侧栏 + 主区」两栏,旧的 .iwb-home-head 已无生产者(DOM 里 0 次), // 断言改为钉真正在用的布局类。 assert.ok(css.includes('.iwb-home-side {') && css.includes('.iwb-home-main {')) assert.ok(css.includes('.iwb-home-card-actions')) console.log('home canvas library checks passed')