Pin the notice kind names and the settings page title again

The social split deleted `notice_names_and_setting_pages` from voelin-ui
without moving it. The Slint side picks the bell's colours and icons by the
kind names ("poke", "mention", "event", "friend") and nothing but the one
"mention" assertion and the Keybinds search pinned them. The names of all
five kinds are tested next to `NoticeKind`, and the "Voice & Video" title
next to the list it is in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-24 19:39:49 +03:00
1 parent 91d70702f3
commit 56ce2cb739
2 files changed
+20

No files matched your search

+8
View File
@@ -1552,6 +1552,14 @@ mod tests {
assert!(ups[0].refresh.conversations && ups[0].rest.is_none());
}
/// The search lists the settings pages by these titles, which the pages
/// are shown under.
#[test]
fn the_settings_pages_the_search_finds_are_named_as_the_settings_name_them() {
let titles: Vec<&str> = SETTING_PAGES.iter().map(|(title, _, _)| *title).collect();
assert!(titles.contains(&"Voice & Video"), "{titles:?}");
}
fn spot(session: i64, channel: &str) -> FriendSpot {
FriendSpot {
session: session as u64,
+12
View File
@@ -441,6 +441,18 @@ mod tests {
NaiveDateTime::parse_from_str(text, "%Y-%m-%d %H:%M").unwrap()
}
/// The bell's rows carry the kind's name and the Slint side picks the
/// colour and the icon by it (`ui/screens/overlays.slint`; the message is
/// what no other name matches), so a renamed kind must fail here.
#[test]
fn notice_kinds_are_named_as_the_bell_keys_them() {
use NoticeKind::{Event, Friend, Mention, Message, Poke};
assert_eq!(
[Mention, Poke, Message, Event, Friend].map(NoticeKind::name),
["mention", "poke", "message", "event", "friend"]
);
}
#[test]
fn times() {
let now = 1_800_000_000_000;