aboutsummaryrefslogtreecommitdiffstats
path: root/tests/browser.mjs
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-30 13:19:01 +0100
committereunhhu <[email protected]>2026-09-30 13:19:01 +0100
commit611b54fefc8a02f67cd59041c1795a083ac0bb4c (patch)
tree6eaf8bab3ec7d8cb9b2d7d8b5d432df42988cf5c /tests/browser.mjs
parentb3c01b3a26a7b5fe60b70739a6fc7b5967e0d9c8 (diff)
downloadvega-611b54fefc8a02f67cd59041c1795a083ac0bb4c.tar.gz
vega-611b54fefc8a02f67cd59041c1795a083ac0bb4c.zip
Show what would act on a screen as a picture on every surface, and keep a value's bidi within it
Speech wrote a value's C1 controls (U+009B is a CSI to some terminals), DEL, line separators and bidi overrides as they were; the CLI and the TUI wrote line separators (a pipe's reader may break its line there) and the controls that turn text around (a terminal then reverses the rest of its line, other values' cells too); the web page showed controls as they were and let a label's override reverse its badge. Now every surface shows controls, DEL, C1 and line and paragraph separators as pictures (vega_visible); a terminal's cells show embeddings, overrides and isolates as U+FFFD too (vega_cell); speech says a space for the one and nothing for the other; the page shows the pictures and isolates each value, while /screen's JSON keeps values as they are. screen_meaning checks the CLI, the TUI, speech and the JSON against that rule, and that nothing a value holds reaches any output as a control; the browser check sees the page show it.
Diffstat (limited to 'tests/browser.mjs')
-rw-r--r--tests/browser.mjs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/browser.mjs b/tests/browser.mjs
index 0f77585..15c94a8 100644
--- a/tests/browser.mjs
+++ b/tests/browser.mjs
@@ -129,6 +129,10 @@ try {
[a.options.map(name), await evaluate(places)]);
const entry = a.nodes.find(n => role(n) === 'textbox');
check('the text input is named for its input', entry && name(entry) === 'add', entry);
+ // A value holding what would act on a screen: shown as the other surfaces show it, its bidi kept within it.
+ await evaluate(`post('/text', 'esc \\u001b[31m sep \\u2028 rlo \\u202e.')`);
+ await until('a value is shown as the other surfaces show it', `document.querySelectorAll('li')[4]?.querySelector('.label').textContent === 'esc \\u241b[31m sep \\u2424 rlo \\u202e.'`);
+ check('its bidi stays within it', await evaluate(`getComputedStyle(document.querySelectorAll('li')[4].querySelector('.label')).unicodeBidi`) === 'isolate', null);
await finish(true);
} catch (error) {
await finish(false, String(error.message || error));