Skip to content
Snippets Groups Projects
Commit 8d066bc3 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6300 Rename data test ids

parent d80a3779
No related branches found
No related tags found
No related merge requests found
......@@ -11,11 +11,11 @@
</div>
<div class="flex items-center gap-6">
<ods-button text="Zuarbeit anfragen" data-test-id="zuarbeit-anfragen-button"></ods-button>
<ods-button text="Zuarbeit anfragen" dataTestId="collaboration-request-send-button"></ods-button>
<ods-button
variant="outline"
text="Abbrechen"
data-test-id="collaboration-request-abbrechen-button"
dataTestId="collaboration-request-cancel-button"
(clickEmitter)="hideRequestForm.emit()"
>
<ods-close-icon icon class="fill-primary"></ods-close-icon>
......
......@@ -11,7 +11,7 @@ describe('CollaborationRequestContainerComponent', () => {
let component: CollaborationRequestContainerComponent;
let fixture: ComponentFixture<CollaborationRequestContainerComponent>;
const abbrechenButton: string = getDataTestIdOf('collaboration-request-abbrechen-button');
const cancelButton: string = getDataTestIdOf('collaboration-request-cancel-button');
beforeEach(async () => {
await TestBed.configureTestingModule({
......@@ -33,11 +33,11 @@ describe('CollaborationRequestContainerComponent', () => {
expect(component).toBeTruthy();
});
describe('abbrechen button', () => {
describe('cancel button', () => {
it('should emit hideRequestForm', () => {
const emitSpy = (component.hideRequestForm.emit = jest.fn());
dispatchEventFromFixture(fixture, abbrechenButton, 'clickEmitter');
dispatchEventFromFixture(fixture, cancelButton, 'click');
expect(emitSpy).toHaveBeenCalled();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment