Skip to content
Snippets Groups Projects
Commit 2977c4fe authored by Martin's avatar Martin
Browse files

OZG-7507 adjust component data-test-id and test

parent 3a1a3fd1
No related branches found
No related tags found
1 merge request!82OZG-7507 use new open dialog button
......@@ -35,7 +35,8 @@
[tooltip]="'Organisationseinheit löschen'"
variant="ghost"
size="fit"
dataTestId="delete-button"
dataTestClass="delete-button"
data-test-id="delete-organisations-einheit-dialog-button"
[dialogData]="{ organisationsEinheitName: organisationsEinheit.name, organisationsEinheitId: organisationsEinheit.id }"
>
<ods-delete-icon icon />
......
......@@ -29,7 +29,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ActivatedRoute } from '@angular/router';
import { OpenDialogButtonComponent } from '@ods/component';
import { ExclamationIconComponent, ListComponent, ListItemComponent } from '@ods/system';
import { getConvertedDataTestIdOf, getDataTestIdAttributeOf, getDataTestIdOf } from 'libs/tech-shared/test/data-test';
import { getConvertedDataTestIdOf, getDataTestIdOf } from 'libs/tech-shared/test/data-test';
import { MockComponent } from 'ng-mocks';
import { createAdminOrganisationsEinheit } from '../../../../../organisations-einheit-shared/src/test/organisations-einheit';
import { OrganisationsEinheitListComponent } from './organisations-einheit-list.component';
......@@ -40,7 +40,7 @@ describe('OrganisationsEinheitListComponent', () => {
const listSelector: string = getDataTestIdOf('organisations-einheit-list');
const listItemSuffux: string = '-organisation-item';
const deleteButtonTestId: string = getDataTestIdAttributeOf('delete-button');
const deleteButtonTestId: string = getDataTestIdOf('delete-organisations-einheit-dialog-button');
beforeEach(async () => {
await TestBed.configureTestingModule({
......
......@@ -35,10 +35,9 @@ export function getDataTestIdOf(value: string): string {
return `[data-test-id="${value}"]`;
}
/**
* @deprecated use getDataTestIfOf instead and a direct data-test-id at the component
*/
export function getDataTestIdAttributeOf(value: string): string {
return `[dataTestId="${value}"]`;
}
export function getDynamicDataTestIdAttributOf(value: string): string {
return `[ng-reflect-data-test-id="${value}"]`;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment