From 3817ffa8f5d4e01f684571e7230163d684045cb2 Mon Sep 17 00:00:00 2001
From: Martin <git@mail.de>
Date: Mon, 20 Jan 2025 12:54:53 +0100
Subject: [PATCH] fix unit test; change buttonTestId -> dataTestId

---
 .../dropdown-menu-button-item.component.ts                    | 4 ++--
 .../user-profile-in-header.component.html                     | 2 +-
 .../user-profile-in-header.component.spec.ts                  | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/alfa-client/libs/design-system/src/lib/dropdown-menu/dropdown-menu-button-item/dropdown-menu-button-item.component.ts b/alfa-client/libs/design-system/src/lib/dropdown-menu/dropdown-menu-button-item/dropdown-menu-button-item.component.ts
index 842ff45f45..2c1b542792 100644
--- a/alfa-client/libs/design-system/src/lib/dropdown-menu/dropdown-menu-button-item/dropdown-menu-button-item.component.ts
+++ b/alfa-client/libs/design-system/src/lib/dropdown-menu/dropdown-menu-button-item/dropdown-menu-button-item.component.ts
@@ -32,7 +32,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
     class="flex min-h-12 w-full items-center gap-4 border-2 border-transparent px-4 py-3 text-start outline-none hover:border-primary focus-visible:border-focus"
     role="menuitem"
     (click)="itemClicked.emit()"
-    [attr.data-test-id]="buttonTestId"
+    [attr.data-test-id]="dataTestId"
   >
     <ng-content select="[icon]" />
     <p class="text-text">{{ caption }}</p>
@@ -40,7 +40,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
 })
 export class DropdownMenuButtonItemComponent {
   @Input({ required: true }) caption!: string;
-  @Input() buttonTestId: string;
+  @Input() dataTestId: string;
 
   @Output() itemClicked: EventEmitter<MouseEvent> = new EventEmitter();
 }
diff --git a/alfa-client/libs/user-profile/src/lib/user-profile-in-header-container/user-profile-in-header/user-profile-in-header.component.html b/alfa-client/libs/user-profile/src/lib/user-profile-in-header-container/user-profile-in-header/user-profile-in-header.component.html
index c73890ac91..a2aac078aa 100644
--- a/alfa-client/libs/user-profile/src/lib/user-profile-in-header-container/user-profile-in-header/user-profile-in-header.component.html
+++ b/alfa-client/libs/user-profile/src/lib/user-profile-in-header-container/user-profile-in-header/user-profile-in-header.component.html
@@ -36,7 +36,7 @@
     class="user-profile-icon"
   >
   </alfa-user-icon>
-  <ods-dropdown-menu-button-item caption="Abmelden" (itemClicked)="logoutEmitter.emit()" buttonTestId="logout-button">
+  <ods-dropdown-menu-button-item caption="Abmelden" (itemClicked)="logoutEmitter.emit()" dataTestId="logout-button">
     <ods-logout-icon icon />
   </ods-dropdown-menu-button-item>
 </ods-dropdown-menu>
diff --git a/alfa-client/libs/user-profile/src/lib/user-profile-in-header-container/user-profile-in-header/user-profile-in-header.component.spec.ts b/alfa-client/libs/user-profile/src/lib/user-profile-in-header-container/user-profile-in-header/user-profile-in-header.component.spec.ts
index 536a5722d2..1f91ba4533 100644
--- a/alfa-client/libs/user-profile/src/lib/user-profile-in-header-container/user-profile-in-header/user-profile-in-header.component.spec.ts
+++ b/alfa-client/libs/user-profile/src/lib/user-profile-in-header-container/user-profile-in-header/user-profile-in-header.component.spec.ts
@@ -30,7 +30,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { MatIcon } from '@angular/material/icon';
 import { NoopAnimationsModule } from '@angular/platform-browser/animations';
 import { DropdownMenuButtonItemComponent, DropdownMenuComponent, LogoutIconComponent } from '@ods/system';
-import { getDataTestIdOf } from 'libs/tech-shared/test/data-test';
+import { getDataTestIdAttributeOf, getDataTestIdOf } from 'libs/tech-shared/test/data-test';
 import { createUserProfileResource } from 'libs/user-profile-shared/test/user-profile';
 import { MockComponent } from 'ng-mocks';
 import { UserProfileInHeaderComponent } from './user-profile-in-header.component';
@@ -39,7 +39,7 @@ describe('UserProfileInHeaderComponent', () => {
   let component: UserProfileInHeaderComponent;
   let fixture: ComponentFixture<UserProfileInHeaderComponent>;
 
-  const logoutButton: string = getDataTestIdOf('logout-button');
+  const logoutButton: string = getDataTestIdAttributeOf('logout-button');
   const userIconDropDownMenu: string = getDataTestIdOf('user-icon-dropdown-menu');
 
   const userProfile: UserProfileResource = createUserProfileResource();
-- 
GitLab