2026-10-30 17:31:27 +03:00
|
|
|
|
// The web version in a headless browser (Firefox; Chromium with CP_BROWSER=chromium):
|
|
|
|
|
|
// the page for phones, the program, opening a PGN by its button (Ctrl+O) and by
|
|
|
|
|
|
// dropping it, a game from the classics, moves, a download of the PGN, a move on the
|
|
|
|
|
|
// board, the browser's Back. Screenshots go to <out-dir>; what is checked is printed.
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
//
|
|
|
|
|
|
// node apps/web/check/app.mjs <app-dir> <out-dir> (app-dir: apps/web/build.sh's)
|
|
|
|
|
|
import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
|
|
|
|
import { join, resolve } from 'node:path';
|
|
|
|
|
|
import { fileURLToPath } from 'node:url';
|
2026-10-30 17:31:27 +03:00
|
|
|
|
import { session } from './steps.mjs';
|
|
|
|
|
|
import { sleep } from './bidi.mjs';
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
|
|
|
|
|
|
const [appDir, outDir] = process.argv.slice(2).map((p) => resolve(p));
|
|
|
|
|
|
const root = fileURLToPath(new URL('../../..', import.meta.url));
|
|
|
|
|
|
mkdirSync(outDir, { recursive: true });
|
|
|
|
|
|
let failures = 0;
|
|
|
|
|
|
const check = (ok, what) => {
|
|
|
|
|
|
console.log(`${ok ? 'ok ' : 'FAIL'} ${what}`);
|
|
|
|
|
|
if (!ok) failures++;
|
|
|
|
|
|
};
|
2026-10-30 17:31:27 +03:00
|
|
|
|
// Places of buttons in a 1400×860 window.
|
|
|
|
|
|
const DOWNLOAD = [Number(process.env.DOWNLOAD_X || 1263), Number(process.env.DOWNLOAD_Y || 24)];
|
|
|
|
|
|
const E2 = [519, 703];
|
|
|
|
|
|
const E4 = [519, 505];
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
|
2026-10-30 17:31:27 +03:00
|
|
|
|
const s = await session(appDir, 18766);
|
|
|
|
|
|
const { t } = s;
|
|
|
|
|
|
const shot = async (name) => writeFileSync(join(outDir, name), await t.screenshot());
|
|
|
|
|
|
const text = () => t.evaluate(`document.getElementById('cp-device').innerText`);
|
|
|
|
|
|
const started = () => t.waitFor(`document.getElementById('cp-status').hidden && !document.getElementById('cp-app').hidden`, 30000);
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
try {
|
2026-10-30 17:31:27 +03:00
|
|
|
|
// ----- the page for phones and tablets, without the program ----------------------------
|
|
|
|
|
|
await t.navigate(`${s.base}?phone=1&lang=ru`);
|
|
|
|
|
|
await sleep(800);
|
|
|
|
|
|
check(/ChessPenguin на телефоне и планшете/.test(await text()), 'the device page in Russian');
|
|
|
|
|
|
check(/Всё равно открыть веб-версию/.test(await text()), 'with «open the web version anyway»');
|
|
|
|
|
|
const wasm = await t.evaluate(`performance.getEntriesByType('resource').some(e => e.name.endsWith('.wasm'))`);
|
|
|
|
|
|
check(!wasm, 'the program is not downloaded on it');
|
|
|
|
|
|
await shot('web-phone-ru.png');
|
|
|
|
|
|
await t.navigate(`${s.base}?phone=1&lang=de`);
|
|
|
|
|
|
await sleep(500);
|
|
|
|
|
|
check(/auf Handy und Tablet/.test(await text()), 'the device page in German');
|
|
|
|
|
|
await t.navigate(`${s.base}?phone=android&lang=ru`);
|
|
|
|
|
|
await sleep(800);
|
|
|
|
|
|
check(/Скачать для Android/.test(await text()), 'the Android variant');
|
|
|
|
|
|
await t.navigate(`${s.base}?phone=ios&lang=en`);
|
|
|
|
|
|
await sleep(800);
|
|
|
|
|
|
check(/iPhone and iPad app is coming soon/.test(await text()), 'the iPhone and iPad variant');
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
|
|
|
|
|
|
// ----- the program -------------------------------------------------------------------------
|
2026-10-30 17:31:27 +03:00
|
|
|
|
await t.navigate(`${s.base}?lang=en`);
|
|
|
|
|
|
await started();
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
await sleep(2500);
|
2026-10-30 17:31:27 +03:00
|
|
|
|
check(true, `the program started in ${s.b.name}`);
|
|
|
|
|
|
await shot('web-1-library.png');
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
|
|
|
|
|
|
// Open a PGN by the button's shortcut: the browser's file chooser gets the file.
|
2026-10-30 17:31:27 +03:00
|
|
|
|
const pgn = join(s.b.profile, 'Test games.pgn');
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
copyFileSync(join(root, 'examples/alekhine.pgn'), pgn);
|
2026-10-30 17:31:27 +03:00
|
|
|
|
await t.key('o', ['ctrl']);
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
await t.waitFor(`!!document.getElementById('cp-open-files')`, 5000);
|
2026-10-30 17:31:27 +03:00
|
|
|
|
await t.setFiles('cp-open-files', [pgn]);
|
|
|
|
|
|
await sleep(3000);
|
|
|
|
|
|
await shot('web-2-opened.png');
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
|
|
|
|
|
|
// Drop a file on the window.
|
|
|
|
|
|
const dropped = readFileSync(join(root, 'examples/classics.pgn'), 'utf8');
|
|
|
|
|
|
await t.evaluate(`(() => {
|
|
|
|
|
|
const dt = new DataTransfer();
|
|
|
|
|
|
dt.items.add(new File([${JSON.stringify(dropped)}], 'Dropped classics.pgn', { type: 'application/x-chess-pgn' }));
|
|
|
|
|
|
const c = document.getElementById('cp-canvas');
|
|
|
|
|
|
for (const type of ['dragenter', 'dragover', 'drop'])
|
|
|
|
|
|
c.dispatchEvent(new DragEvent(type, { dataTransfer: dt, bubbles: true, cancelable: true, clientX: 700, clientY: 400 }));
|
|
|
|
|
|
return true;
|
|
|
|
|
|
})()`);
|
2026-10-30 17:31:27 +03:00
|
|
|
|
await sleep(3000);
|
|
|
|
|
|
await shot('web-3-dropped.png');
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
|
2026-10-30 17:31:27 +03:00
|
|
|
|
// A game from the table (double click), its moves on the board.
|
|
|
|
|
|
await t.click(300, 322, { double: true });
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
await sleep(1500);
|
2026-10-30 17:31:27 +03:00
|
|
|
|
await shot('web-4-game.png');
|
|
|
|
|
|
await t.key('right', [], 12);
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
await sleep(800);
|
2026-10-30 17:31:27 +03:00
|
|
|
|
await shot('web-5-moves.png');
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
|
|
|
|
|
|
// Download the PGN of the game (the header's button).
|
2026-10-30 17:31:27 +03:00
|
|
|
|
await t.click(...DOWNLOAD);
|
|
|
|
|
|
await sleep(2500);
|
|
|
|
|
|
const files = existsSync(s.b.downloads) ? readdirSync(s.b.downloads).filter((f) => f.endsWith('.pgn')) : [];
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
check(files.length === 1, `a PGN downloaded: ${files.join(', ') || 'none'}`);
|
|
|
|
|
|
if (files.length) {
|
2026-10-30 17:31:27 +03:00
|
|
|
|
const body = readFileSync(join(s.b.downloads, files[0]), 'utf8');
|
|
|
|
|
|
check(/\[White "/.test(body) && /1\. /.test(body), 'the download is the game in PGN');
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-30 17:31:27 +03:00
|
|
|
|
// The browser's Back is «← Library».
|
|
|
|
|
|
await t.evaluate(`history.back()`);
|
|
|
|
|
|
await sleep(1500);
|
|
|
|
|
|
await shot('web-6-back.png');
|
|
|
|
|
|
check(await t.evaluate(`history.state === null || !history.state.cpGame`), 'Back left the game for the library');
|
|
|
|
|
|
|
|
|
|
|
|
// A move on the board of a new game (Ctrl+N; N in a browser): e2–e4 by two clicks.
|
|
|
|
|
|
await t.key('n');
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
await sleep(1200);
|
2026-10-30 17:31:27 +03:00
|
|
|
|
await t.click(...E2);
|
|
|
|
|
|
await sleep(300);
|
|
|
|
|
|
await t.click(...E4);
|
|
|
|
|
|
await sleep(1000);
|
|
|
|
|
|
await shot('web-8-e4.png');
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
|
2026-10-30 17:31:27 +03:00
|
|
|
|
// The settings and the shelf after a reload (the browser's storage).
|
|
|
|
|
|
await t.navigate(`${s.base}?lang=en`);
|
|
|
|
|
|
await started();
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
await sleep(2500);
|
2026-10-30 17:31:27 +03:00
|
|
|
|
await shot('web-9-reloaded.png');
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
} finally {
|
2026-10-30 17:31:27 +03:00
|
|
|
|
await s.stop();
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
}
|
2026-10-30 17:31:27 +03:00
|
|
|
|
for (const e of s.errors) console.log('console:', e);
|
|
|
|
|
|
check(s.errors.length === 0, 'no panic or error in the console');
|
Web version: what the browser lacks is not offered, files dropped on the window, checks, docs
The interface hides what the platform does not have (platform::CAPS): play,
new databases, adding to a database, preparation, translation, their
shortcuts and the Translation tab. Files dropped on the window open like
chosen ones (in a browser; the desktop program takes no drops, as before),
with «Release to open» while they are dragged over it.
/app/: ?phone=android and ?phone=ios show those variants of the device page.
apps/web/check: device.test.mjs (14 devices: computer, iPhone, iPad as a Mac,
Android phone and tablet, desktop-site modes, Chromebook, touch laptop) and
app.mjs (headless Firefox: the device page in three languages without the
program, the program, a PGN opened by Ctrl+O and the file chooser, a dropped
PGN, a game of the classics, moves, «Download PGN», e2-e4 on the board, the
settings after a reload). All pass.
docs/dev/web.md: the architecture, the platform layer, what is not built for
a browser, the build and the checks, what comes next; docs/dev/uci.md and
desktop.md updated, web/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:45 +03:00
|
|
|
|
console.log(failures ? `${failures} failed` : 'all ok');
|
|
|
|
|
|
process.exit(failures ? 1 : 0);
|