Checkpoint peering identity and opt-in discovery

This commit is contained in:
Codex committed 2026-10-13 22:00:54 +02:00
1 parent eba9b50e30
commit 47de081721
44 files changed
+1557 -55

No files matched your search

+20 -3
View File
@@ -19,7 +19,7 @@ module.exports = async function testQueueUI(url, cookie) {
];
state.queue = [
{ id: 'pilot-fixture', title: 'bleach', source: 'mangadex', kind: 'inspection', status: 'ready', sourceTitle: 'Bleach (Pre-Serialization)', availability: { selectedChapters: 2, specialReleases: 2, coverage: 'unknown' } },
{ id: 'main-fixture', title: 'Bleach', source: 'mangadex', kind: 'download', status: 'complete', publishedCount: 1, sourceTitle: 'Bleach', availability: { selectedChapters: 1, expectedLastChapter: '686', coverage: 'partial' } },
{ id: 'main-fixture', title: 'Bleach', source: 'mangadex', kind: 'download', status: 'complete', publishedCount: 1, sourceTitle: 'Bleach', availability: { selectedChapters: 1, numberedChapters: 1, expectedLastChapter: '686', highestHostedChapter: 686.1, coverage: 'unknown' } },
{ id: 'external-fixture', title: 'Claymore', source: 'mangadex', kind: 'download', status: 'unavailable', error: 'MangaDex lists 8 English external-link releases, but no hosted English pages. External links are not downloaded.' },
{ id: 'other-source-fixture', title: 'Another manga', source: 'weebcentral', kind: 'download', status: 'queued' },
];
@@ -63,7 +63,8 @@ module.exports = async function testQueueUI(url, cookie) {
await page.waitForTimeout(3500);
assert.equal(await queuePanel.locator('.scraper-completed').evaluate(el => el.open), true, 'Completed section lost a click during redraw');
await queuePanel.getByText(/1 chapter published · finished/).waitFor();
await queuePanel.getByText(/Partial source coverage/).waitFor();
await queuePanel.getByText('Hosted selection complete', { exact: true }).waitFor();
await queuePanel.getByText('Series coverage partial', { exact: true }).waitFor();
page.once('dialog', dialog => dialog.accept());
await page.getByRole('button', { name: 'Clear completed downloads (1)' }).click();
assert.deepEqual(commands.at(-1), { command: 'clear-completed', source: '' });
@@ -95,7 +96,23 @@ module.exports = async function testQueueUI(url, cookie) {
await page.screenshot({ path: path.join(shots, 'mobile.png'), fullPage: true });
const detailWidth = await page.locator('[data-scraper-tab=queue] .scraper-queue .scraper-item > .grow').first().evaluate(el => el.getBoundingClientRect().width);
assert.ok(detailWidth > 280, `Queue details squeezed by action buttons (${detailWidth}px)`);
await page.route('**/api/manga?*', async route => {
const title = new URL(route.request().url()).searchParams.get('m');
const first = title === 'Bleach' ? 336 : 1;
await route.fulfill({ contentType: 'application/json', body: JSON.stringify({
id: title, title, meta: { title, sources: [{ name: 'MangaDex', url: 'https://mangadex.org/' }] },
cover: null, direction: 'rtl', books: [{ key: 'v01', label: 'Vol. 1' }],
chapters: [{ id: `v01/c${first}`, book: 'v01', label: `Ch. ${first}`, title: '',
versions: [{ id: 'fixture', pages: 1, added: '2026-10-01', source: 'MangaDex', score: 0, my: 0 }] }],
collections: [], relations: [], following: false, reading: null, continue: null,
}) });
});
await page.goto(url + '/manga.html?m=Bleach');
await page.getByText('Series coverage partial', { exact: true }).waitFor();
await page.getByText(/starts at chapter 336/).waitFor();
await page.goto(url + '/manga.html?m=Complete%20Fixture');
assert.equal(await page.getByText('Series coverage partial', { exact: true }).count(), 0);
assert.deepEqual(errors, []); assert.deepEqual(upstream, []);
console.log('PASS: scraper activity, queue cleanup, source filters, edition controls, add form and mobile layout; no source traffic');
console.log('PASS: scraper activity, queue coverage, manga gap warning, cleanup, source filters, edition controls and mobile layout; no source traffic');
} finally { await browser.close(); }
};