feat: 发布 v2.1.0 开放书源扩展
构建与发布 / 单测与集成测试 (push) Has been cancelled
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (arm64, linux, ubuntu-24.04-arm) (push) Has been cancelled
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (arm64, macos, macos-15) (push) Has been cancelled
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (x64, linux, ubuntu-24.04) (push) Has been cancelled
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (x64, windows, windows-2025) (push) Has been cancelled
构建与发布 / 发布 GitHub Release (push) Has been cancelled
构建与发布 / 单测与集成测试 (push) Has been cancelled
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (arm64, linux, ubuntu-24.04-arm) (push) Has been cancelled
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (arm64, macos, macos-15) (push) Has been cancelled
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (x64, linux, ubuntu-24.04) (push) Has been cancelled
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (x64, windows, windows-2025) (push) Has been cancelled
构建与发布 / 发布 GitHub Release (push) Has been cancelled
This commit is contained in:
@@ -57,6 +57,19 @@ app.whenReady().then(async () => {
|
||||
const configReadyMs = Date.now() - startedAt;
|
||||
check('慢速书库扫描不会阻塞窗口配置加载', configReadyMs < 1200, `${configReadyMs}ms`);
|
||||
|
||||
const sourceRows = await waitUntil(() => win.webContents.executeJavaScript(`(() => {
|
||||
const rows = Array.from(document.querySelectorAll('#sourceList input[data-id]')).map((input) => ({
|
||||
id: input.dataset.id,
|
||||
checked: input.checked,
|
||||
name: input.parentElement.querySelector('span').textContent
|
||||
}));
|
||||
return rows.length >= 16 ? rows : null;
|
||||
})()`));
|
||||
const expectedSources = ['openstax', 'opentextbook', 'wikisource-zh', 'wikisource-en'];
|
||||
check('新增开放书源出现在设置页且新安装默认启用',
|
||||
expectedSources.every((id) => sourceRows.some((row) => row.id === id && row.checked)),
|
||||
sourceRows.filter((row) => expectedSources.includes(row.id)).map((row) => `${row.id}:${row.name}`).join(', '));
|
||||
|
||||
await waitUntil(() => scanStartedAt > 0, 7000);
|
||||
check('启动维护在首屏完成后延迟执行', scanStartedAt - startedAt >= 1400,
|
||||
`${scanStartedAt - startedAt}ms`);
|
||||
|
||||
Reference in New Issue
Block a user