feat(editor): a modem offers a code or joins one, and says under it how it stands (K4, K5)
The modem's sheet chooses how it finds its partner: the other modem on its port in this project, as FILIUS' file pairs them; another project's, by offering this modem's code (shown large, with a copy button) or by joining a code typed in as one reads it off the board. In the action mode each modem says under it how it stands — connected, waiting, taken, no second modem on the port, cable missing, on the server only. Accepted in three browsers on a real F, each in a copy of FILIUS' modem example: Ben's notebook pings the computer behind Mia's access point; Rita joins the same code, reads that it is taken, and gets it once Ben stops. FILIUS' modem example runs in the page's own room as well. The .fls export writes an offering modem as Java's server and a joining one as its client; the code has no place there and is named as lost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -477,15 +477,15 @@ test("installs and removes programs as Java's installation does, and a program i
|
||||
expect((await desktopOf(page, id))!.programs).toEqual(['commandPrompt']);
|
||||
});
|
||||
|
||||
test('says so when the simulation fails, and goes back to the design', async ({ page }) => {
|
||||
// FILIUS' modem example: the core has no modems yet (remote links); a ping to the other side fails it.
|
||||
test("runs FILIUS' modem example: both modems say they are connected, a ping goes through the pair", async ({ page }) => {
|
||||
await openEditor(page, server.base, 'modem_beispiel.fls');
|
||||
await start(page);
|
||||
const { input } = await commandLine(page, 'Notebook 0.10');
|
||||
for (const name of ['Modem (Zugreifend)', 'Modem (Zugangspunkt)'])
|
||||
await expect(page.locator(`g.device[data-node="${await deviceNamed(page, name)}"] text[data-note]`)).toHaveText('verbunden');
|
||||
const { input, text } = await commandLine(page, 'Notebook 0.10');
|
||||
await input.fill('ping 192.168.0.11');
|
||||
await input.press('Enter');
|
||||
await expect(page.getByRole('alert')).toHaveText('Die Simulation ist auf einen Fehler gestoßen und wurde beendet.', { timeout: 20_000 });
|
||||
await expect(page.locator('svg.filius-canvas')).toHaveAttribute('data-mode', 'design');
|
||||
await expect(text).toContainText('4 Paket(e) gesendet, 4 Paket(e) empfangen', { timeout: 30_000 });
|
||||
});
|
||||
|
||||
test('speaks English when asked', async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user