Skip to content
Snippets Groups Projects
Commit 82ac8fb9 authored by Albert Bruns's avatar Albert Bruns
Browse files

OZG-725-7894 renaming

parent bbc36b6b
No related branches found
No related tags found
Loading
Showing
with 21 additions and 20 deletions
......@@ -7,9 +7,9 @@
<div class="mb-6" style="height: calc(50vh + 4.5rem)">
@if (!selectedSearchResult) {
<alfa-forwarding-search-organisations-einheit cdkFocusInitial data-test-id="zufi-search" />
<alfa-forwarding-search-organisations-einheit cdkFocusInitial data-test-id="organisations-einheit-search" />
} @else {
<alfa-search-selected [organisationsEinheitResource]="selectedSearchResult" data-test-id="forwarding-item" />
<alfa-search-item-selected [organisationsEinheitResource]="selectedSearchResult" data-test-id="search-item-selected" />
}
</div>
......
......@@ -8,23 +8,24 @@ import { createOrganisationsEinheitResource } from '../../../../../zustaendige-s
import { ForwardingButtonComponent } from './forwarding-button/forwarding-button.component';
import { ForwardingDialogComponent } from './forwarding-dialog.component';
import { ForwardingSearchOrganisationsEinheitComponent } from './search-organisations-einheit/search-organisations-einheit.component';
import { SearchSelectedComponent } from './search-selected/search-selected.component';
import { SearchItemSelectedComponent } from './search-selected/search-item-selected.component';
describe('ForwardingDialogComponent', () => {
let component: ForwardingDialogComponent;
let fixture: ComponentFixture<ForwardingDialogComponent>;
const zufiSearch: string = getDataTestIdOf('zufi-search');
const forwardingItem: string = getDataTestIdOf('forwarding-item');
const organisationsEinheitSearch: string = getDataTestIdOf('organisations-einheit-search');
const searchItemSelected: string = getDataTestIdOf('search-item-selected');
const organisationsEinheitResource: OrganisationsEinheitResource = createOrganisationsEinheitResource();
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ForwardingDialogComponent],
declarations: [
MockComponent(CancelDialogButtonComponent),
MockComponent(ForwardingButtonComponent),
MockComponent(SearchSelectedComponent),
MockComponent(SearchItemSelectedComponent),
MockComponent(ForwardingSearchOrganisationsEinheitComponent),
],
}).compileComponents();
......@@ -45,7 +46,7 @@ describe('ForwardingDialogComponent', () => {
fixture.detectChanges();
existsAsHtmlElement(fixture, zufiSearch);
existsAsHtmlElement(fixture, organisationsEinheitSearch);
});
it('should NOT render if selectedSearchResult is NOT null', () => {
......@@ -53,7 +54,7 @@ describe('ForwardingDialogComponent', () => {
fixture.detectChanges();
notExistsAsHtmlElement(fixture, zufiSearch);
notExistsAsHtmlElement(fixture, organisationsEinheitSearch);
});
});
});
......@@ -71,7 +72,7 @@ describe('ForwardingDialogComponent', () => {
fixture.detectChanges();
existsAsHtmlElement(fixture, forwardingItem);
existsAsHtmlElement(fixture, searchItemSelected);
});
it('should NOT render if selectedSearchResult is null', () => {
......@@ -79,7 +80,7 @@ describe('ForwardingDialogComponent', () => {
fixture.detectChanges();
notExistsAsHtmlElement(fixture, forwardingItem);
notExistsAsHtmlElement(fixture, searchItemSelected);
});
});
});
......
......@@ -6,8 +6,8 @@ import { ReactiveFormsModule } from '@angular/forms';
import { CancelDialogButtonComponent } from '@ods/component';
import { DialogContainerComponent } from '@ods/system';
import { ForwardingButtonComponent } from './forwarding-button/forwarding-button.component';
import { SearchItemSelectedComponent } from './search-item-selected/search-item-selected.component';
import { ForwardingSearchOrganisationsEinheitComponent } from './search-organisations-einheit/search-organisations-einheit.component';
import { SearchSelectedComponent } from './search-selected/search-selected.component';
@Component({
selector: 'alfa-forwarding-dialog',
......@@ -19,7 +19,7 @@ import { SearchSelectedComponent } from './search-selected/search-selected.compo
ZustaendigeStelleModule,
ForwardingButtonComponent,
ForwardingSearchOrganisationsEinheitComponent,
SearchSelectedComponent,
SearchItemSelectedComponent,
DialogContainerComponent,
],
templateUrl: './forwarding-dialog.component.html',
......
......@@ -6,18 +6,18 @@ import { ForwardingItemComponent, ForwardingItemInfoComponent } from '@ods/syste
import { MockComponent } from 'ng-mocks';
import { createOrganisationsEinheitResource } from '../../../../../../zustaendige-stelle-shared/test/organisations-einheit';
import { ChangeButtonContainerComponent } from './change-button-container/change-button-container.component';
import { SearchSelectedComponent } from './search-selected.component';
import { SearchItemSelectedComponent } from './search-item-selected.component';
describe('ForwardingSearchOrganisationsEinheitComponent', () => {
let component: SearchSelectedComponent;
let fixture: ComponentFixture<SearchSelectedComponent>;
let component: SearchItemSelectedComponent;
let fixture: ComponentFixture<SearchItemSelectedComponent>;
const organisationsEinheitResource: OrganisationsEinheitResource = createOrganisationsEinheitResource();
const anschrift: Anschrift = organisationsEinheitResource.anschrift;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [SearchSelectedComponent],
imports: [SearchItemSelectedComponent],
declarations: [
MockComponent(ChangeButtonContainerComponent),
MockComponent(ForwardingItemComponent),
......@@ -25,7 +25,7 @@ describe('ForwardingSearchOrganisationsEinheitComponent', () => {
],
}).compileComponents();
fixture = TestBed.createComponent(SearchSelectedComponent);
fixture = TestBed.createComponent(SearchItemSelectedComponent);
component = fixture.componentInstance;
component.organisationsEinheitResource = organisationsEinheitResource;
fixture.detectChanges();
......
......@@ -4,11 +4,11 @@ import { ForwardingItemComponent, ForwardingItemInfoComponent } from '@ods/syste
import { ChangeButtonContainerComponent } from './change-button-container/change-button-container.component';
@Component({
selector: 'alfa-search-selected',
selector: 'alfa-search-item-selected',
standalone: true,
imports: [ChangeButtonContainerComponent, AnschriftToStringPipe, ForwardingItemComponent, ForwardingItemInfoComponent],
templateUrl: './search-selected.component.html',
templateUrl: './search-item-selected.component.html',
})
export class SearchSelectedComponent {
export class SearchItemSelectedComponent {
@Input() organisationsEinheitResource: OrganisationsEinheitResource;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment