feat: 分类显示书籍数量并发布 v2.1.2
构建与发布 / 单测与集成测试 (push) Waiting to run
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (arm64, linux, ubuntu-24.04-arm) (push) Blocked by required conditions
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (arm64, macos, macos-15) (push) Blocked by required conditions
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (x64, linux, ubuntu-24.04) (push) Blocked by required conditions
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (x64, windows, windows-2025) (push) Blocked by required conditions
构建与发布 / 发布 GitHub Release (push) Blocked by required conditions
构建与发布 / 单测与集成测试 (push) Waiting to run
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (arm64, linux, ubuntu-24.04-arm) (push) Blocked by required conditions
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (arm64, macos, macos-15) (push) Blocked by required conditions
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (x64, linux, ubuntu-24.04) (push) Blocked by required conditions
构建与发布 / 打包 ${{ matrix.platform }} ${{ matrix.arch }} (x64, windows, windows-2025) (push) Blocked by required conditions
构建与发布 / 发布 GitHub Release (push) Blocked by required conditions
This commit is contained in:
@@ -569,6 +569,22 @@ app.whenReady().then(async () => {
|
||||
);
|
||||
readerWindow.destroy();
|
||||
await wait(200);
|
||||
check(
|
||||
'分类侧栏显示全部、未分类和各书架的真实书籍数量',
|
||||
await js(`(() => {
|
||||
const all = document.querySelector('#libraryTab .library-filter[data-shelf=""]');
|
||||
const uncategorized = document.querySelector(
|
||||
'#libraryTab .library-filter[data-shelf="__uncategorized__"]'
|
||||
);
|
||||
const shelves = Array.from(document.querySelectorAll('#libraryShelfList .library-filter'));
|
||||
const research = shelves.find((button) => button.textContent.includes('研究书架'));
|
||||
const review = shelves.find((button) => button.textContent.includes('待复核书架'));
|
||||
return all.querySelector('.library-filter-count').textContent === '3'
|
||||
&& uncategorized.querySelector('.library-filter-count').textContent === '1'
|
||||
&& research.querySelector('.library-filter-count').textContent === '1'
|
||||
&& review.querySelector('.library-filter-count').textContent === '1';
|
||||
})()`)
|
||||
);
|
||||
check(
|
||||
'标签侧栏显示真实聚合计数',
|
||||
await js(`(() => {
|
||||
@@ -632,7 +648,7 @@ app.whenReady().then(async () => {
|
||||
|
||||
await js(`(() => {
|
||||
const button = Array.from(document.querySelectorAll('#libraryShelfList .library-filter'))
|
||||
.find((candidate) => candidate.textContent.trim() === '研究书架');
|
||||
.find((candidate) => candidate.firstElementChild.textContent.trim() === '研究书架');
|
||||
button.click();
|
||||
})()`);
|
||||
await pollJs(
|
||||
@@ -681,7 +697,7 @@ app.whenReady().then(async () => {
|
||||
!!uiShelf
|
||||
&& await js(`(() => {
|
||||
const button = Array.from(document.querySelectorAll('#libraryShelfList .library-filter'))
|
||||
.find((candidate) => candidate.textContent.trim() === '界面书架');
|
||||
.find((candidate) => candidate.firstElementChild.textContent.trim() === '界面书架');
|
||||
return !!button && button.classList.contains('active')
|
||||
&& document.getElementById('libStatus').textContent === '显示 0 条,共 3 条';
|
||||
})()`)
|
||||
@@ -783,7 +799,7 @@ app.whenReady().then(async () => {
|
||||
|
||||
await js(`(() => {
|
||||
const button = Array.from(document.querySelectorAll('#libraryShelfList .library-filter'))
|
||||
.find((candidate) => candidate.textContent.trim() === '界面书架已重命名');
|
||||
.find((candidate) => candidate.firstElementChild.textContent.trim() === '界面书架已重命名');
|
||||
button.click();
|
||||
})()`);
|
||||
await pollJs(
|
||||
@@ -859,7 +875,7 @@ app.whenReady().then(async () => {
|
||||
// 否则批量操作会误伤用户看不到的书
|
||||
await js(`(() => {
|
||||
const button = Array.from(document.querySelectorAll('#libraryShelfList .library-filter'))
|
||||
.find((candidate) => candidate.textContent.trim() === '研究书架');
|
||||
.find((candidate) => candidate.firstElementChild.textContent.trim() === '研究书架');
|
||||
button.click();
|
||||
})()`);
|
||||
await pollJs(
|
||||
|
||||
Reference in New Issue
Block a user