From 9d6dd7f4633f68d750830ba7fa6bb42ae1287d65 Mon Sep 17 00:00:00 2001 From: atlldwp Date: Mon, 9 Sep 2024 16:13:04 +0200 Subject: [PATCH] BC-7824 add data testid for classes (#3518) * dataTestId * added datatestid * added datatestid * added data testids * added testid * updated testid name --------- Co-authored-by: Martin Schuhmacher <55735359+MartinSchuhmacher@users.noreply.github.com> --- controllers/administration.js | 9 ++++++++- views/administration/classes.hbs | 2 +- views/administration/forms/form-classes-edit.hbs | 10 +++++----- views/administration/forms/form-classes-manage.hbs | 6 +++--- views/lib/components/table.hbs | 2 +- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/controllers/administration.js b/controllers/administration.js index 7588fc305e..be89823e7f 100644 --- a/controllers/administration.js +++ b/controllers/administration.js @@ -2128,15 +2128,19 @@ router.get( key: 'upcoming', title: `${upcomingYears.pop().name}`, link: `/administration/classes/?showTab=upcoming${filterQueryString}`, + testId: 'upcoming-tab' }, { key: 'current', title: `${currentYear.name}`, link: `/administration/classes/?showTab=current${filterQueryString}`, - }, { + testId: 'current-tab' + }, + { key: 'archive', title: res.$t('global.tab.label.archive'), link: `/administration/classes/?showTab=archive${filterQueryString}`, + testId: 'archive-tab' }, ]; @@ -2162,11 +2166,13 @@ router.get( link: `${basePath + item._id}/manage`, icon: 'users', title: res.$t('administration.controller.link.manageClass'), + testId: 'manage-class' }, { link: `${basePath + item._id}/edit`, icon: 'edit', title: res.$t('administration.controller.link.editClass'), + testId: 'edit-class' }, { link: basePath + item._id, @@ -2174,6 +2180,7 @@ router.get( icon: 'trash-o', method: 'delete', title: res.$t('administration.controller.link.deleteClass'), + testId: 'delete-class' }, ]; if (lastDefinedSchoolYear !== (item.year || {})._id diff --git a/views/administration/classes.hbs b/views/administration/classes.hbs index a6990f9eb6..18fa18d77b 100644 --- a/views/administration/classes.hbs +++ b/views/administration/classes.hbs @@ -12,7 +12,7 @@
{{#each classesTabs}} - + {{this.title}} {{/each}} diff --git a/views/administration/forms/form-classes-edit.hbs b/views/administration/forms/form-classes-edit.hbs index c43e4362bb..5be961629a 100644 --- a/views/administration/forms/form-classes-edit.hbs +++ b/views/administration/forms/form-classes-edit.hbs @@ -5,7 +5,7 @@ + title="Klasse '{{../class.name}}' verwalten." data-testid="manage-class-btn"> {{$t "administration.classes.text.manageClass" }} {{/ifeq}} @@ -17,7 +17,7 @@ {{/each}} {{/ifeq}} -
+
-
+
{{$t "administration.classes.label.maintainSchoolYearAssignment" }} @@ -112,7 +112,7 @@ {{/userHasPermission}} {{/ifeq}} {{#ifeq mode "edit"}} - + {{#if ../isUpgradable}} {{$t "administration.classes.button.transferClassToTheNextSchoolYear" }} {{/if}} diff --git a/views/administration/forms/form-classes-manage.hbs b/views/administration/forms/form-classes-manage.hbs index 4164d306e1..105f58d697 100644 --- a/views/administration/forms/form-classes-manage.hbs +++ b/views/administration/forms/form-classes-manage.hbs @@ -6,13 +6,13 @@
-
+
{{#each students}} diff --git a/views/lib/components/table.hbs b/views/lib/components/table.hbs index 0ac494b34b..4a378b75fa 100644 --- a/views/lib/components/table.hbs +++ b/views/lib/components/table.hbs @@ -36,7 +36,7 @@ {{> "lib/components/csrfInput"}} -