Skip to content

Commit

Permalink
Merge branch 'master' into bug/cot-726-final
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonydummer authored Aug 20, 2024
2 parents 3daac4c + ceb2781 commit ff6465d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="location-picker-custom">
<div class="search-location">
<div>
<label id="input-selected-location-label" *ngIf="locationTitle">{{locationTitle}}</label>
<label id="input-selected-location-label" for="inputLocationSearch" *ngIf="locationTitle">{{locationTitle}}</label>
</div>
<exui-search-location class="search-location"
[form]="form"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { iif, Observable, of } from 'rxjs';
import { debounceTime, map, switchMap, tap } from 'rxjs/operators';
import { catchError, debounceTime, map, switchMap, tap } from 'rxjs/operators';
import {
BookingCheckType, FilterConfigOption,
FilterFieldConfig,
Expand Down Expand Up @@ -93,6 +93,10 @@ export class SearchLocationComponent implements OnInit {
() => (!!term && term.length >= this.minSearchCharacters),
this.getLocations(term).pipe(
map((locations) => this.filterUnselectedLocations(locations, this.selectedLocations, this.singleMode)),
catchError(() => {
// returns false so the user is not shown the no results found message
return of(false);
}),
),
of(false)
)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</xuilib-gov-label>
<input class="govuk-input govuk-date-input__input govuk-input--width-2"
[ngClass]="{'govuk-input--error': errorMessage?.isInvalid}"
[id]="config.id"
[id]="config.id+'-day'"
[name]="config.id+'-day'" type="number" value="" pattern="[0-9]*"
[formControlName]="config.id+'_day'">
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('GovUkDateComponent', () => {
});

it('should have input for day, month and year elements', () => {
const day = fixture.debugElement.query(By.css('#id'));
const day = fixture.debugElement.query(By.css('#id-day'));
expect(day).toBeTruthy();
const month = fixture.debugElement.query(By.css('#id-month'));
expect(month).toBeTruthy();
Expand Down

0 comments on commit ff6465d

Please sign in to comment.