Skip to content
Snippets Groups Projects
Commit 3a5ed77d authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5793 Fix searchbar focus

parent c50dd67f
No related branches found
No related tags found
No related merge requests found
......@@ -167,7 +167,7 @@ describe('VorgangSearchComponent', () => {
});
describe('ngOnInit', () => {
it('should set focus if path is "/alle/search"', () => {
it('should set focus if path ends with "/search"', () => {
component.focus = jest.fn();
routerEvents.next(new NavigationEnd(1, '/alle/search', ''));
......@@ -176,7 +176,7 @@ describe('VorgangSearchComponent', () => {
expect(component.focus).toHaveBeenCalled();
});
it('should not set focus if path is not "/alle/search"', () => {
it('should not set focus if path does not end with "/search"', () => {
component.focus = jest.fn();
routerEvents.next(new NavigationEnd(1, '/alle', ''));
......
......@@ -36,7 +36,7 @@ export function getEmpfaenger(vorgangWithEingangResource: VorgangWithEingangReso
}
export function isVorgangSearchRoute(navigationEnd: NavigationEnd): boolean {
return navigationEnd.url === '/alle/search';
return navigationEnd.url.endsWith('/search');
}
function getVorname(vorgangWithEingangResource: VorgangWithEingangResource): string {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment