feat(ui): Styleguide-Tokens und Theme-Auswahl, Playground mit festen Einstellungen und Eingabe (#1075, #1089, #1098)
- tokens.css und theme.js des Styleguides eingebettet (/ui/stil/), app.css ohne eigene Farbwerte; Darstellung System, Dunkel, Hell in der Fußzeile. - Wortmarke nutzt --accent-strong, im hellen Theme dunkler (Kontrast). - Playground: Einstellungen oben, Eingabe unten, nur der Verlauf scrollt. - Test für die Einbindung und das Layout; im Browser lokal geprüft. Klicktests browser2stil.1 bis .3 angelegt. - components.css bewusst nicht übernommen (andere Klassennamen). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -1163,6 +1163,47 @@ async fn pwa_manifest_und_symbole_sind_ohne_sitzung_lesbar() {
|
||||
assert!(!login.contains("serviceWorker"));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn styleguide_tokens_theme_und_playground_layout_sind_eingebunden() {
|
||||
let gw = gateway(0, false).await;
|
||||
let cookie = ui_cookie(&gw).await;
|
||||
// Tokens und Theme-Skript des Styleguides liegen wie app.css ohne Anmeldung bereit.
|
||||
let (status, headers, css) = ui_get(&gw, "/ui/stil/tokens.css", None).await;
|
||||
assert_eq!(status, 200);
|
||||
assert!(
|
||||
headers["content-type"]
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.starts_with("text/css")
|
||||
);
|
||||
assert!(css.contains("--accent-strong") && css.contains("data-theme"));
|
||||
let (status, headers, js) = ui_get(&gw, "/ui/stil/theme.js", None).await;
|
||||
assert_eq!(status, 200);
|
||||
assert!(
|
||||
headers["content-type"]
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.starts_with("text/javascript")
|
||||
);
|
||||
assert!(js.contains("styleguideTheme"));
|
||||
// Jede Seite bindet beide ein und bietet die Darstellung (System, Dunkel, Hell) an.
|
||||
let (_, _, seite) = ui_get(&gw, "/ui/modelle", Some(&cookie)).await;
|
||||
assert!(
|
||||
seite.contains("href=\"/ui/stil/tokens.css\"")
|
||||
&& seite.contains("src=\"/ui/stil/theme.js\"")
|
||||
);
|
||||
assert!(seite.contains("data-theme-wahl"));
|
||||
// Die Farbwerte kommen aus den Tokens, nicht mehr aus app.css.
|
||||
let (_, _, app) = ui_get(&gw, "/ui/app.css", None).await;
|
||||
assert!(
|
||||
!app.contains("--accent-text:#1a1005"),
|
||||
"app.css trägt noch eigene Farbwerte"
|
||||
);
|
||||
// Playground: Einstellungen und Eingabe bleiben stehen, nur der Verlauf scrollt (#1098).
|
||||
assert!(app.contains("#chat{display:flex;flex-direction:column"));
|
||||
assert!(app.contains("#chat .verlauf{flex:1 1 auto;min-height:0;overflow-y:auto"));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn tabellen_skript_mit_ortszeit_und_filter_ist_eingebunden() {
|
||||
let gw = gateway(0, false).await;
|
||||
|
||||
Reference in New Issue
Block a user