From 2ddd22078dbcc93aabe3e7212d1958b8c0dbb841 Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 3 Feb 2026 17:16:08 +0100 Subject: [PATCH] Sidebar: use PagePaths, add testid for Administration Gate menu items via PagePaths; add data-testid=sidebar-administration for stable tests. menu_group accepts optional testid attr. --- lib/mv_web/components/layouts/sidebar.ex | 33 +++++++++++++----------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/lib/mv_web/components/layouts/sidebar.ex b/lib/mv_web/components/layouts/sidebar.ex index 19f5547..26c0d7a 100644 --- a/lib/mv_web/components/layouts/sidebar.ex +++ b/lib/mv_web/components/layouts/sidebar.ex @@ -4,6 +4,8 @@ defmodule MvWeb.Layouts.Sidebar do """ use MvWeb, :html + alias MvWeb.PagePaths + attr :current_user, :map, default: nil, doc: "The current user" attr :club_name, :string, required: true, doc: "The name of the club" attr :mobile, :boolean, default: false, doc: "Whether this is mobile view" @@ -70,7 +72,7 @@ defmodule MvWeb.Layouts.Sidebar do defp sidebar_menu(assigns) do ~H"""