Skip to content

Commit

Permalink
Change data-testids in sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
dyedwiper committed Jan 30, 2025
1 parent ed4e5e2 commit a852a08
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions src/modules/ui/layout/sidebar/SidebarItems.composable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,96 +33,96 @@ export const useSidebarItems = () => {
title: "global.sidebar.item.overview",
href: "/dashboard",
icon: mdiViewGridOutline,
testId: "Übersicht",
testId: "sidebar-overview",
},
{
title: "global.sidebar.item.rooms",
to: "/rooms",
icon: mdiAccountSupervisorCircleOutline,
feature: "FEATURE_ROOMS_ENABLED",
permissions: ["ROOM_CREATE"],
testId: "Rooms",
testId: "sidebar-rooms",
},
{
title: "global.sidebar.item.courses",
to: "/rooms/courses-overview",
icon: mdiSchoolOutline,
testId: "Course-Overview",
testId: "sidebar-courses",
},
{
title: "global.sidebar.item.teams",
href: "/teams",
icon: mdiAccountGroupOutline,
permissions: ["TEAMS_ENABLED"],
testId: "Teams",
testId: "sidebar-teams",
},
{
title: "global.sidebar.item.tasks",
to: "/tasks",
icon: mdiFormatListChecks,
permissions: ["TASK_DASHBOARD_VIEW_V3", "TASK_DASHBOARD_TEACHER_VIEW_V3"],
testId: "Aufgaben",
testId: "sidebar-tasks",
},
{
title: "global.sidebar.item.files-old",
icon: mdiFolderOpenOutline,
testId: "Dateien",
testId: "sidebar-files",
children: [
{
title: "global.sidebar.item.filesPersonal",
href: "/files/my/",
testId: "persönliche Dateien",
testId: "sidebar-files-personalfiles",
},
{
title: "global.sidebar.item.courses",
href: "/files/courses/",
testId: "Kurse",
testId: "sidebar-files-coursefiles",
},
{
title: "global.sidebar.item.teams",
href: "/files/teams/",
permissions: ["TEAMS_ENABLED"],
testId: "Teams",
testId: "sidebar-files-teamfiles",
},
{
title: "global.sidebar.item.filesShared",
href: "/files/shared/",
testId: "geteilte Dateien",
testId: "sidebar-files-sharedfiles",
},
],
},
{
title: "pages.news.title",
href: "/news",
icon: mdiNewspaperVariantOutline,
testId: "Neuigkeiten",
testId: "sidebar-news",
},
{
title: "global.sidebar.item.calendar",
href: "/calendar",
icon: mdiCalendarOutline,
testId: "Termine",
testId: "sidebar-calendar",
},
{
title: "common.words.lernstore",
to: "/content",
icon: "$lernstore_outline",
permissions: ["LERNSTORE_VIEW"],
testId: "Lern-Store",
testId: "sidebar-learningstore",
},
{
title: "feature.media-shelf.title",
to: "/media-shelf",
icon: mdiBookshelf,
feature: "FEATURE_MEDIA_SHELF_ENABLED",
testId: "Media-shelf",
testId: "sidebar-mediashelf",
},
{
title: "global.sidebar.item.addons",
href: "/addons",
icon: mdiPuzzleOutline,
permissions: ["ADDONS_ENABLED"],
testId: "Add-ons",
testId: "sidebar-addons",
},
]);

Expand All @@ -135,7 +135,7 @@ export const useSidebarItems = () => {
"?subject=" +
t("components.legacy.footer.accessibility.report"),
title: "components.legacy.footer.accessibility.report",
testId: "report-accessibility",
testId: "sidebar-accessibilityfeedback",
target: "_blank",
rel: "noopener",
feature: "ACCESSIBILITY_REPORT_EMAIL",
Expand All @@ -145,29 +145,29 @@ export const useSidebarItems = () => {
{
to: "/imprint",
title: "components.legacy.footer.imprint",
testId: "imprint",
testId: "sidebar-imprint",
},
{
href: "/termsofuse",
title: "components.legacy.footer.terms",
target: "_blank",
rel: "noopener",
testId: "terms-of-use",
testId: "sidebar-termsofuse",
},
{
href: "/privacypolicy",
title: "components.legacy.footer.privacy_policy_thr",
target: "_blank",
rel: "noopener",
testId: "privacy-policy",
testId: "sidebar-privacypolicy",
},
]);

const systemLinks: SidebarSingleItem[] = [
{
href: `${envConfigModule.getEnv.ALERT_STATUS_URL}`,
title: "components.legacy.footer.status",
testId: "status",
testId: "sidebar-system-status",
target: "_blank",
rel: "noopener",
feature: "ALERT_STATUS_URL",
Expand All @@ -176,7 +176,7 @@ export const useSidebarItems = () => {
{
href: filePathsModule.getSpecificFiles.accessibilityStatement as string,
title: "components.legacy.footer.accessibility.statement",
testId: "accessibility-statement",
testId: "sidebar-system-accessibilitystatement",
target: "_blank",
rel: "noopener",
theme: [SchulcloudTheme.Brb, SchulcloudTheme.N21, SchulcloudTheme.Thr],
Expand All @@ -185,12 +185,12 @@ export const useSidebarItems = () => {
title: "global.sidebar.item.releaseNotes",
href: "/system/releases",
target: "_self",
testId: "releases",
testId: "sidebar-system-releases",
},
{
title: "components.legacy.footer.github",
href: "https://github.com/hpi-schul-cloud",
testId: "github",
testId: "sidebar-system-github",
target: "_blank",
theme: [
SchulcloudTheme.Brb,
Expand All @@ -201,7 +201,7 @@ export const useSidebarItems = () => {
{
href: "/security",
title: "components.legacy.footer.security",
testId: "security",
testId: "sidebar-system-security",
theme: [SchulcloudTheme.Default],
},
];
Expand All @@ -211,45 +211,45 @@ export const useSidebarItems = () => {
title: "global.sidebar.item.management",
icon: mdiCogOutline,
permissions: ["TEACHER_LIST", "ADMIN_VIEW"],
testId: "Verwaltung",
testId: "sidebar-management",
children: [
{
title: "global.sidebar.item.student",
to: "/administration/students",
permissions: ["STUDENT_LIST"],
testId: "Schüler:innen",
testId: "sidebar-management-students",
},
{
title: "global.sidebar.item.teacher",
to: "/administration/teachers",
testId: "Lehrkräfte",
testId: "sidebar-management-teachers",
},
{
title: "global.sidebar.item.courses",
to: "/administration/rooms/new",
testId: "Kurse",
testId: "sidebar-management-courses",
permissions: ["ADMIN_VIEW"],
feature: "FEATURE_SHOW_NEW_ROOMS_VIEW_ENABLED",
},
{
title: "global.sidebar.item.courses",
href: "/administration/courses",
testId: "Kurse",
testId: "sidebar-management-courses",
permissions: ["ADMIN_VIEW"],
feature: "FEATURE_SHOW_NEW_ROOMS_VIEW_ENABLED",
featureValue: false,
},
{
title: "global.sidebar.item.classes",
to: "/administration/groups/classes",
testId: "Klassen",
testId: "sidebar-management-classes",
permissions: ["ADMIN_VIEW", "TEACHER_LIST"],
feature: "FEATURE_SHOW_NEW_CLASS_VIEW_ENABLED",
},
{
title: "global.sidebar.item.classes",
href: "/administration/classes",
testId: "Klassen",
testId: "sidebar-management-classes",
permissions: ["ADMIN_VIEW", "TEACHER_LIST"],
feature: "FEATURE_SHOW_NEW_CLASS_VIEW_ENABLED",
featureValue: false,
Expand All @@ -258,19 +258,19 @@ export const useSidebarItems = () => {
title: "global.sidebar.item.teams",
href: "/administration/teams",
permissions: ["ADMIN_VIEW"],
testId: "Teams",
testId: "sidebar-management-teams",
},
{
title: "global.sidebar.item.school",
to: "/administration/school-settings",
testId: "Schule",
testId: "sidebar-management-school",
permissions: ["ADMIN_VIEW"],
feature: "FEATURE_NEW_SCHOOL_ADMINISTRATION_PAGE_AS_DEFAULT_ENABLED",
},
{
title: "global.sidebar.item.school",
href: "/administration/school",
testId: "Schule",
testId: "sidebar-management-school",
permissions: ["ADMIN_VIEW"],
feature: "FEATURE_NEW_SCHOOL_ADMINISTRATION_PAGE_AS_DEFAULT_ENABLED",
featureValue: false,
Expand All @@ -280,26 +280,26 @@ export const useSidebarItems = () => {
{
title: "global.sidebar.item.helpArea",
icon: mdiHelpCircleOutline,
testId: "Hilfebereich",
testId: "sidebar-helpsection",
children: [
{
title: "global.sidebar.item.helpSection",
href: "/help",
target: "_self",
testId: "help-articles",
testId: "sidebar-helpsection-helparticles",
},
{
title: "global.sidebar.item.contactSupport",
href: "/help/contact",
target: "_self",
testId: "contact",
testId: "sidebar-helpsection-contact",
},
{
title: "global.sidebar.item.training",
href: `${envConfigModule.getEnv.TRAINING_URL}`,
target: "_blank",
rel: "noopener",
testId: "training",
testId: "sidebar-helpsection-trainings",
feature: "TRAINING_URL",
featureValue: `${envConfigModule.getEnv.TRAINING_URL}`,
},
Expand All @@ -308,7 +308,7 @@ export const useSidebarItems = () => {
{
title: "global.sidebar.item.system",
icon: mdiApplicationBracketsOutline,
testId: "system",
testId: "sidebar-system",
children: systemLinks,
},
]);
Expand Down

0 comments on commit a852a08

Please sign in to comment.