From 1bb3d7e8169432569100b7c728e50a958b8862d7 Mon Sep 17 00:00:00 2001 From: Alberto Balbo Date: Sat, 28 Nov 2026 14:28:27 +0100 Subject: [PATCH] =?UTF-8?q?Schermata=20della=20sezione=20Telegram=20con=20?= =?UTF-8?q?=C2=ABProva=20gli=20avvisi=C2=BB=20premuto=20(#35)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La schermata delle Impostazioni mostra solo le prime sezioni, quindi il bottone nuovo non si vedeva. Mimante.Schermate porta in vista la sezione Telegram, preme «Prova gli avvisi» e fotografa il messaggio al centro: nel simulatore non c'è un token, quindi il bot deve rispondere che mancano token e chat. Se il messaggio non compare la prova delle schermate fallisce, così il comando telegram.samples si controlla per intero a ogni giro. Co-Authored-By: Claude Opus 5.5 --- tools/Mimante.Schermate/Program.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/Mimante.Schermate/Program.cs b/tools/Mimante.Schermate/Program.cs index fe6e11d..1c481f2 100644 --- a/tools/Mimante.Schermate/Program.cs +++ b/tools/Mimante.Schermate/Program.cs @@ -224,6 +224,14 @@ else await Eval("[...document.querySelectorAll('.panel .tabs button')].find(b => b.textContent === 'Paletti e valore')?.click()"); // Le impostazioni vere e proprie, sotto la sezione dell'accesso a Bidoo. await Shot("05-impostazioni", "#/impostazioni", "document.querySelector('.access-section + .section')?.scrollIntoView()"); + // La sezione Telegram con «Prova gli avvisi» premuto (#35): senza token il bot risponde subito che mancano token e + // chat, con il messaggio al centro. Così si vedono i due bottoni e si prova il comando telegram.samples per intero. + const string telegramSection = "[...document.querySelectorAll('.section')].find(s => s.querySelector('h2')?.textContent === 'Telegram')"; + await Shot("16-impostazioni-telegram", "#/impostazioni", + $"{telegramSection}?.scrollIntoView(); [...({telegramSection}?.querySelectorAll('button') ?? [])].find(b => b.textContent === 'Prova gli avvisi')?.click()", 1500); + if ((await Eval("!!document.querySelector('.modal .notice')")).ValueKind != JsonValueKind.True) + errors.Add("Telegram: nessun messaggio dopo «Prova gli avvisi»"); + await Eval("document.querySelector('.modal footer .btn')?.click()"); await Shot("06-storico", "#/storico", clickFirst); await Shot("09-cerca", "#/cerca", null, 4000); await Shot("10-registro", "#/registro");