Skip to content
Snippets Groups Projects
Commit 3a1a3fd1 authored by Martin's avatar Martin
Browse files

OZG-7507 add data-test-class to components

parent 30d4248b
Branches
Tags
1 merge request!82OZG-7507 use new open dialog button
...@@ -16,6 +16,7 @@ import { first } from 'rxjs'; ...@@ -16,6 +16,7 @@ import { first } from 'rxjs';
[text]="label" [text]="label"
[size]="size" [size]="size"
[dataTestId]="dataTestId" [dataTestId]="dataTestId"
[dataTestClass]="dataTestClass"
data-test-id="open-dialog" data-test-id="open-dialog"
> >
<ng-container icon> <ng-container icon>
...@@ -34,6 +35,7 @@ export class OpenDialogButtonComponent { ...@@ -34,6 +35,7 @@ export class OpenDialogButtonComponent {
@Input() label: string; @Input() label: string;
@Input() dataTestId: string; @Input() dataTestId: string;
@Input() dataTestClass: string;
@Input() variant: ButtonVariants['variant'] = 'primary'; @Input() variant: ButtonVariants['variant'] = 'primary';
@Input() dialogData: any; @Input() dialogData: any;
@Input() size: ButtonVariants['size']; @Input() size: ButtonVariants['size'];
......
...@@ -96,6 +96,7 @@ export type ButtonVariants = VariantProps<typeof buttonVariants>; ...@@ -96,6 +96,7 @@ export type ButtonVariants = VariantProps<typeof buttonVariants>;
[attr.aria-disabled]="isDisabled" [attr.aria-disabled]="isDisabled"
[attr.aria-label]="text" [attr.aria-label]="text"
[attr.data-test-id]="dataTestId" [attr.data-test-id]="dataTestId"
[attr.data-test-class]="dataTestClass"
(click)="clickEmitter.emit()" (click)="clickEmitter.emit()"
> >
<ng-content *ngIf="!isLoading" select="[icon]"></ng-content> <ng-content *ngIf="!isLoading" select="[icon]"></ng-content>
...@@ -106,6 +107,7 @@ export type ButtonVariants = VariantProps<typeof buttonVariants>; ...@@ -106,6 +107,7 @@ export type ButtonVariants = VariantProps<typeof buttonVariants>;
export class ButtonComponent { export class ButtonComponent {
@Input() text: string = ''; @Input() text: string = '';
@Input() dataTestId: string = ''; @Input() dataTestId: string = '';
@Input() dataTestClass: string = '';
@Input() disabled: boolean = false; @Input() disabled: boolean = false;
@Input() isLoading: boolean = false; @Input() isLoading: boolean = false;
@Input({ transform: booleanAttribute }) destructive: boolean = false; @Input({ transform: booleanAttribute }) destructive: boolean = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment