Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
fc65445
D121 oracle — shell: CA, with no channel « Partager » offers « Ajoute…
kitokey-marc[bot] Nov 28, 2026
4286936
D121 — shell: Settings' channel form a function of its own, its ids f…
kitokey-marc[bot] Nov 28, 2026
0dcf274
Merge origin/main (52370d3, #1320) into d121-2b-channel: « Partager »…
kitokey-marc[bot] Nov 28, 2026
4564a3b
D121 — shell: with no channel, « Partager »'s send becomes « Ajouter …
kitokey-marc[bot] Nov 28, 2026
faed636
D121 — shell: the channel sheet's answers together, « Annuler » then …
kitokey-marc[bot] Nov 28, 2026
8a40f9d
e2e oracle — shell: CA, « Ajouter un canal » with its « + », room und…
kitokey-marc[bot] Nov 28, 2026
b16a55b
D121 — shell: « Ajouter un canal » with its « + », room under the she…
kitokey-marc[bot] Nov 28, 2026
113cdd2
e2e — shell: DB shoots the sheet at 420 px once its pop has ended, ne…
kitokey-marc[bot] Nov 28, 2026
b9e8c9d
Merge main into d121-2b-channel (#1329, #1346, #1347, #1349 landed); …
kitokey-marc[bot] Nov 28, 2026
ba31096
D121 — shell e2e: « a channel added in the sheet… said once » waits f…
kitokey-marc[bot] Nov 28, 2026
b758292
Merge main into d121-2b-channel (#1351 landed: axe reads the page at …
kitokey-marc[bot] Nov 28, 2026
42180bc
D121 — shell e2e: DB reads « Destination … ajoutée. » under Settings'…
kitokey-marc[bot] Nov 28, 2026
08f4bad
Merge main (6dfcfe2) into d121-2b-channel: window.js keeps channelShe…
kitokey-marc[bot] Nov 29, 2026
395b252
Merge origin/main (80c4e948) into d121-2b-channel (#1333)
kitokey-marc[bot] Nov 30, 2026
374f0b4
D121 — shell e2e: DB checks « Envoyer… » with a channel and no summar…
kitokey-marc[bot] Nov 30, 2026
f38b497
D121 — shell: « Partager › Envoyer… » never silent with no summary or…
kitokey-marc[bot] Nov 30, 2026
03ea16f
D121 — shell e2e: DB checks « Envoyer… » pressed before the channels …
kitokey-marc[bot] Nov 30, 2026
e8fdd7a
D121 — shell e2e: CZ expects « Ajouter un canal » with no channel; DB…
kitokey-marc[bot] Nov 30, 2026
7be901c
D121 — shell e2e: DB asserts Escape closes the channel's sheet, befor…
kitokey-marc[bot] Nov 30, 2026
b12d5c9
Merge main into d121-2b-channel
kitokey-marc[bot] Dec 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 174 additions & 2 deletions modules/shell/scripts/e2e_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -6655,6 +6655,11 @@ def add(kind, name, address):
check("checked, the destination is listed: its name, its kind, its address as its host and the end of its path",
kept and "#équipe" in row and "Slack" in row and "hooks.example" in row and secret not in row and secret[-4:] in row, row)
check("the address field is emptied once kept", browser.find_element(By.ID, "destination-address").get_attribute("value") == "")
# Said once the page is drawn again, by its name, never its address (#1333's rewrite of the announcement, nora's m10).
added = wait_for(browser, lambda b: b.execute_script("return document.getElementById('destination-said')?.textContent") == "Destination #équipe ajoutée.", 5)
check("kept: « Destination #équipe ajoutée. » said under the form, never the address",
added and secret not in browser.execute_script("return document.getElementById('destination-said')?.textContent ?? ''"),
browser.execute_script("return document.getElementById('destination-said')?.textContent"))
# For an eye (lina's): the card with one destination, at the two widths, in both looks.
for width in (1100, 420):
browser.set_window_size(width, 800)
Expand Down Expand Up @@ -8419,6 +8424,171 @@ def page_estimate(now: dt.datetime) -> None:
(WORK / "fail-minutes").unlink(missing_ok=True)


def channel_added_from_page(now: dt.datetime) -> None:
"""DB. D121, criterion 2: with no channel set up, « Partager » offers « Ajouter un canal », which opens the channel's
form — Settings' own, its kind, its name, its address — in a sheet of the page, a modal dialog (D120), never
Settings; Escape closes it, nothing kept; a channel added there is said, kept in the settings, and « Partager »
then sends to it. French light, English dark; axe with the sheet open."""
print("DB. « Partager » with no channel: « Ajouter un canal », Settings' form in a sheet of the page (D121)")
meetings = WORK / "channel-from-page"
folder = meetings / "2026-11-25_10-00"
# A meeting with no summary yet: « Envoyer… » has nothing to send, and says so (D67, nora's remark on #1333).
bare = meetings / "2026-11-26_09-00"
session(bare, now - dt.timedelta(hours=6), 20, {"local.wav": 1000})
session(folder, now - dt.timedelta(days=1), 20, {"local.wav": 1000})
(folder / "minutes.md").write_text(
"---\ncontract: minutes/v3\nmade: 2026-11-25T10:30:00+01:00\nprovider: local\nmodel: qwen3:8b\ncontext: null\n---\n\n"
"## 1.\n\nLe devis est validé.\n\n## 2.\n\n- Rien\n\n## 3.\n\n- Rien\n")
good = "https://hooks.example/services/T00/B00/made-up-secret-ca"
menu = ("const m = document.getElementById('share-menu'); if (!m || m.hidden || !m.getClientRects().length) return null;"
" return [...m.querySelectorAll('[role=menuitem]')].map((i) => [i.id, i.textContent.trim()])")
sheet = ("const d = document.querySelector('dialog[open]'); if (!d) return null;"
" return {modal: d.matches(':modal'), title: d.querySelector('h2')?.textContent ?? '', labelled: d.getAttribute('aria-labelledby'),"
" kinds: [...d.querySelectorAll('[role=radiogroup] input[type=radio]')].map((i) => i.value),"
" name: !!d.querySelector('input[type=text]'), address: !!d.querySelector('input[type=url]'),"
" focused: document.activeElement && d.contains(document.activeElement) ? document.activeElement.getAttribute('type') : null,"
" settings: !!document.querySelector('#settings:not([hidden])') && document.getElementById('settings').getClientRects().length > 0}")
for language, theme, words in (
("fr_FR.UTF-8", "light", {"add": "Ajouter un canal", "send": "Envoyer…", "button": "Ajouter", "added": "Destination Équipe produit ajoutée.",
"nothing": "Rien à envoyer\u00a0: le compte rendu n’est pas encore rédigé.", "unread": "Les canaux d’envoi ne sont pas encore lus."}),
("en_US.UTF-8", "dark", {"add": "Add a channel", "send": "Send…", "button": "Add", "added": "Destination Équipe produit added.",
"nothing": "Nothing to send: the summary is not written yet.", "unread": "The channels to send to are not read yet."}),
):
short = language[:2]
window = Window(meetings, language, "reminder = false\n")
window.env.update(GTK_THEME="Adwaita:dark" if theme == "dark" else "Adwaita")
with window as browser:
browser.set_window_size(1100, 800)
browser.execute_script(f"location.hash = '#/meeting/{folder.name}'")
wait_for(browser, lambda b: b.find_elements(By.ID, "share-open"), 10)
time.sleep(0.6)
# Pressed before the channels are read: said, never silent (D67); once read, the sheet. `sending_of` held 800 ms
# by a double of invoke (ines's, #1400), `__late` proving the wait happened.
browser.execute_script(
"const t = window.__TAURI__, core = t.core; window.__tauri = t; window.__late = 0;"
" const late = Object.assign(Object.create(Object.getPrototypeOf(core)), core, { invoke: (asked, rest, options) =>"
" asked === 'sending_of'"
" ? new Promise((done) => setTimeout(() => (window.__late++, done(core.invoke(asked, rest, options))), 800))"
" : core.invoke(asked, rest, options) });"
" const top = Object.assign({}, t, { core: late }); try { window.__TAURI__ = top; } catch (x) {}"
" if (window.__TAURI__ !== top) Object.defineProperty(window, '__TAURI__', { configurable: true, writable: true, value: top });")
held = browser.execute_script("return window.__TAURI__ !== window.__tauri")
browser.execute_script("location.hash = '#/'")
browser.execute_script(f"location.hash = '#/meeting/{folder.name}'")
wait_for(browser, lambda b: b.execute_script("return document.getElementById('meeting').dataset.name") == folder.name
and b.find_elements(By.ID, "share-open"), 5)
press(browser, "share-open")
wait_for(browser, lambda b: b.execute_script(menu), 2)
press(browser, "share-send")
early = wait_for(browser, lambda b: b.execute_script("return document.getElementById('share-said')?.textContent") == words["unread"], 2)
early_got = browser.execute_script("return [document.getElementById('share-said')?.textContent, window.__late, !!document.querySelector('dialog[open]')]")
read = wait_for(browser, lambda b: b.execute_script("return window.__late") > 0, 3)
time.sleep(0.3)
press(browser, "share-open")
wait_for(browser, lambda b: b.execute_script(menu), 2)
press(browser, "share-send")
then = wait_for(browser, lambda b: b.execute_script(sheet), 3)
check(f"{short}: « Envoyer… » pressed before the channels are read says « {words['unread']} »; once read, the sheet (D67)",
held and early and early_got[1] == 0 and early_got[2] is False and read and bool(then), [held, early_got, read, bool(then)])
ActionChains(browser).send_keys(Keys.ESCAPE).perform()
shut = wait_for(browser, lambda b: not b.execute_script(sheet), 3)
browser.execute_script("Object.defineProperty(window, '__TAURI__', { configurable: true, writable: true, value: window.__tauri })")
# Asserted, never assumed: a sheet left open blocks every click after it (nora's m11 on #1333).
check(f"{short}: Escape closes the channel's sheet", shut, browser.execute_script(sheet))
if not shut:
continue
time.sleep(0.3)
press(browser, "share-open")
items = wait_for(browser, lambda b: b.execute_script(menu), 3) and browser.execute_script(menu)
check(f"{short}: no channel, « Partager » offers « {words['add']} », never a send to nowhere (D121)",
bool(items) and [said for _, said in items].count(words["add"]) == 1 and words["send"] not in [said for _, said in items], items)
plus = browser.execute_script("const i = [...document.querySelectorAll('#share-menu [role=menuitem]')].find((e) => e.textContent.trim() === arguments[0]);"
" return i ? !!i.querySelector('svg') : null", words["add"])
check(f"{short}: « {words['add']} » begins with its « + », as v5 draws it (l. 728)", plus is True, plus)
target = next((i for i, said in (items or []) if said == words["add"]), "share-send")
press(browser, target)
opened = wait_for(browser, lambda b: b.execute_script(sheet), 3)
got = browser.execute_script(sheet) or {}
check(f"{short}: a sheet of the page, modal, titled « {words['add']} », Settings' form in it — its kind, its name, its address —, the focus in it, Settings not opened",
bool(opened) and got.get("modal") is True and got.get("title") == words["add"] and got.get("labelled")
and got.get("kinds") == ["webhook", "discord", "slack"] and got.get("name") and got.get("address")
and got.get("focused") is not None and got.get("settings") is False, got)
# The audit of #1333 against v5: room under the sheet's lead, and Tab going round it (roundTheDialog, WAI-ARIA APG).
gap = browser.execute_script("const d = document.querySelector('dialog[open]'), p = d.querySelector(':scope > p.says'), f = d.querySelector('.adding');"
" return p && f ? f.getBoundingClientRect().top - p.getBoundingClientRect().bottom : null")
check(f"{short}: the sheet's lead has room under it, 8 px at least before the form", gap is not None and gap >= 8, gap)
stops = ("const d = document.querySelector('dialog[open]'); const s = [...d.querySelectorAll('button, input, select, textarea, a[href], [tabindex]:not([tabindex=\"-1\"])')]"
".filter((e) => !e.disabled && e.getClientRects().length && !(e.type === 'radio' && !e.checked)); return s")
browser.execute_script("const s = (() => { " + stops + " })(); s[s.length - 1].focus()")
ActionChains(browser).send_keys(Keys.TAB).perform()
first = browser.execute_script("const s = (() => { " + stops + " })(); return document.activeElement === s[0]")
ActionChains(browser).key_down(Keys.SHIFT).send_keys(Keys.TAB).key_up(Keys.SHIFT).perform()
last = browser.execute_script("const s = (() => { " + stops + " })(); return document.activeElement === s[s.length - 1]")
check(f"{short}: Tab goes round the sheet: past its last control, its first; before its first, its last", first is True and last is True, [first, last])
# Measured once the sheet's pop has ended (D120's animation): mid-way, its text is faded and axe reads a contrast
# the sheet never has at rest (the full run of #1333 at 03ea16f6, 5 shards side by side). An endless one is not waited for.
browser.execute_async_script("const done = arguments[arguments.length - 1]; Promise.all(document.getAnimations()"
".filter((a) => a.effect?.getTiming().iterations !== Infinity).map((a) => a.finished)).then(() => done(true), () => done(false))")
found = axe_violations(browser)
check(f"{short}, {theme}: the sheet open, no violation of axe's WCAG 2.2 A and AA rules", found == [], found)
shot_themed(browser, f"db-sheet-{short}-{theme}", theme)
ActionChains(browser).send_keys(Keys.ESCAPE).perform()
closed = wait_for(browser, lambda b: b.execute_script(sheet) is None, 3)
check(f"{short}: Escape closes the sheet, nothing kept, the focus back on « Partager »",
closed and "destinations" not in window.file.read_text() and browser.execute_script("return document.activeElement?.id") == "share-open",
[closed, browser.execute_script("return document.activeElement?.id")])
# At 420 px (the audit of #1333): the sheet within the window, its three kinds wrapping, nothing cut.
browser.set_window_size(420, 800)
wait_for(browser, lambda b: b.execute_script("return innerWidth") <= 440, 3)
press(browser, "share-open")
wait_for(browser, lambda b: b.execute_script(menu), 3)
press(browser, target)
wait_for(browser, lambda b: b.execute_script(sheet), 3)
fits = browser.execute_script("const d = document.querySelector('dialog[open]'), r = d.getBoundingClientRect();"
" return [r.left >= 0, r.right <= innerWidth + 0.5, d.scrollWidth <= d.clientWidth + 1,"
" [...d.querySelectorAll('.tile')].every((t) => t.getBoundingClientRect().right <= r.right + 0.5)]")
check(f"{short}: at 420 px, the sheet within the window, its kinds and fields uncut, nothing scrolls sideways", fits == [True, True, True, True], fits)
# Shot once the sheet's pop has ended (D120's animation): mid-way, the page shows through it.
browser.execute_async_script("const done = arguments[arguments.length - 1]; Promise.all(document.getAnimations().map((a) => a.finished)).then(() => done(true), () => done(false))")
shot_themed(browser, f"db-sheet-420-{short}-{theme}", theme)
ActionChains(browser).send_keys(Keys.ESCAPE).perform()
wait_for(browser, lambda b: b.execute_script(sheet) is None, 3)
browser.set_window_size(1100, 800)
time.sleep(0.4)
press(browser, "share-open")
wait_for(browser, lambda b: b.execute_script(menu), 3)
press(browser, target)
wait_for(browser, lambda b: b.execute_script(sheet), 3)
browser.execute_script(
"const d = document.querySelector('dialog[open]'); const set = (e, v) => { e.value = v; e.dispatchEvent(new Event('input', {bubbles: true})); };"
" set(d.querySelector('input[type=text]'), 'Équipe produit'); set(d.querySelector('input[type=url]'), arguments[0]);", good)
browser.execute_script("const d = document.querySelector('dialog[open]'); [...d.querySelectorAll('button')].find((b) => b.textContent.trim() === arguments[0]).click()", words["button"])
kept = wait_for(browser, lambda b: b.execute_script(sheet) is None and "Équipe produit" in window.file.read_text(), 10)
# Said once `refresh()` has answered, after the file is written: waited for, never read at once (nora on #1333).
statuses = "return [...document.querySelectorAll('[role=status]')].map((e) => e.textContent.trim()).filter(Boolean)"
wait_for(browser, lambda b: words["added"] in b.execute_script(statuses), 5)
said = browser.execute_script(statuses)
check(f"{short}: a channel added in the sheet: kept in the settings, the sheet closed, said once (#1252)",
kept and said.count(words["added"]) == 1 and good not in " ".join(said), said)
time.sleep(0.6)
press(browser, "share-open")
items = wait_for(browser, lambda b: b.execute_script(menu), 3) and browser.execute_script(menu)
check(f"{short}: then « Partager » sends to it, « {words['add']} » no longer offered",
bool(items) and words["add"] not in [said for _, said in items] and any(said.startswith(words["send"][:-1]) for _, said in items), items)
ActionChains(browser).send_keys(Keys.ESCAPE).perform()
# A channel set up, no summary yet: « Envoyer… » pressed is never silent (D67), said beside « Partager ».
browser.execute_script(f"location.hash = '#/meeting/{bare.name}'")
wait_for(browser, lambda b: b.execute_script("return document.getElementById('meeting').dataset.name") == bare.name
and b.find_elements(By.ID, "share-open"), 10)
time.sleep(0.6)
press(browser, "share-open")
wait_for(browser, lambda b: b.execute_script(menu), 3)
press(browser, "share-send")
nothing = wait_for(browser, lambda b: b.execute_script("return document.getElementById('share-said')?.textContent") == words["nothing"], 3)
check(f"{short}: a channel, no summary yet: « {words['send']} » says « {words['nothing']} », never silent (D67)",
nothing, browser.execute_script("return document.getElementById('share-said')?.textContent"))


def meeting_actions_bar(now: dt.datetime) -> None:
"""MA. D121, criteria 1 and 6: a meeting's page holds one bar of actions — « Partager », « Agenda (n) » once a date
is found, « Refaire » and « Plus » —, each its words and its icon, its accessible name beginning with its words
Expand Down Expand Up @@ -11445,8 +11615,9 @@ def options(got: dict, group: str) -> list:
browser.execute_script("document.activeElement?.blur()")
opened(browser)
got = typed(browser, "partager")
check("on a meeting, « partager »: « Partager » and its items listed (« Envoyer… »)",
any("Envoyer…" in o for o in options(got, "Actions")), got.get("groups"))
# No channel set up here: « Partager »'s send is « Ajouter un canal » (D121, #1333), as its menu holds it.
check("on a meeting with no channel, « partager »: « Partager » and its items listed (« Ajouter un canal », no « Envoyer… »)",
any("Ajouter un canal" in o for o in options(got, "Actions")) and not any("Envoyer…" in o for o in options(got, "Actions")), got.get("groups"))
got = typed(browser, "refaire")
check("« refaire »: « Refaire »'s items listed", len(options(got, "Actions")) >= 1, got.get("groups"))
got = typed(browser, "copier le compte")
Expand Down Expand Up @@ -18811,6 +18982,7 @@ def aside(folder):
settings_tabbed(now)
focus_swept(now)
meeting_actions_bar(now)
channel_added_from_page(now)
meeting_exported(now)
redo_from_the_bar(now)
meeting_trashed(now)
Expand Down
Loading
Loading