From 0fbbc81b711075f7c8a785658772442d9b9e9c12 Mon Sep 17 00:00:00 2001 From: Nessar Date: Tue, 17 Nov 2026 22:59:48 +0100 Subject: [PATCH] Test that the app's asset source serves the sort icons (#20) The icons were invisible because no asset source was registered; main now registers gpui-kit's default assets (#19). Guard the three header icons. Co-Authored-By: Claude Sonnet 5.5 --- crates/app/src/champion_table.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/crates/app/src/champion_table.rs b/crates/app/src/champion_table.rs index 3175be4..2062685 100644 --- a/crates/app/src/champion_table.rs +++ b/crates/app/src/champion_table.rs @@ -334,6 +334,21 @@ pub(crate) mod tests { assert_eq!(cell_text(&row, SortKey::State), "Validé"); } + #[test] + fn the_app_asset_source_serves_the_sort_icons() { + use gpui_kit::AssetSource; + use gpui_kit::component::{IconName, IconNamed as _}; + for icon in [ + IconName::SortAscending, + IconName::SortDescending, + IconName::ChevronsUpDown, + ] { + let path = icon.path(); + let svg = AssetSource::load(&gpui_kit::assets::Assets, &path); + assert!(matches!(svg, Ok(Some(_))), "icon manquante : {path}"); + } + } + #[test] fn attempts_column_is_hidden_outside_a_season() { let mut table = ChampionTable::new();