Skip to content

Commit

Permalink
Merge branch 'master' into exui-1729
Browse files Browse the repository at this point in the history
  • Loading branch information
RiteshHMCTS committed May 7, 2024
2 parents e4811e9 + d4dcfb4 commit 542abe9
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 32 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/rpx-xui-common-lib",
"version": "2.0.17-search-venue-fix-rc1",
"version": "2.0.17-search-venue-fix-rc2",
"engines": {
"node": ">=18.17.0"
},
Expand Down
2 changes: 1 addition & 1 deletion projects/exui-common-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/rpx-xui-common-lib",
"version": "2.0.17-search-venue-fix-rc1",
"version": "2.0.17-search-venue-fix-rc2",
"peerDependencies": {
"launchdarkly-js-client-sdk": "^2.15.2",
"ngx-pagination": "^3.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h2 class="govuk-cookie-banner__heading govuk-heading-m">{{'Cookies on' | rpxTra

<div class="govuk-cookie-banner__content">
<p>{{'We use some essential cookies to make this service work.' | rpxTranslate}}</p>
<p>{{'We\d also like to use analytics cookies so we can understand how you use the service and make improvements.' | rpxTranslate}}</p>
<p>{{'We\'d also like to use analytics cookies so we can understand how you use the service and make improvements.' | rpxTranslate}}</p>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
class="govuk-button govuk-button--secondary govuk-!-margin-bottom-0" data-module="govuk-button"
*ngIf="field?.enableAddButton" id="add-service">
{{ 'Add' | rpxTranslate}}
<span class="govuk-visually-hidden">{{'service' | rpxTranslate}}</span>
</a>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,13 @@ describe('SearchJudicialsComponent', () => {

fixture = TestBed.createComponent(SearchJudicialsComponent);
component = fixture.componentInstance;
const judicialService = TestBed.get(FindAPersonService);
spyOn(component.keyUpSubject$, 'next');
spyOn(component.keyUpSubject$, 'pipe').and.returnValue(of('MARCUS'));
component.displayedJudicials = JUDICIAL_RESULTS;
spyOn(component, 'searchJudicials').and.callThrough();
spyOn(component, 'onFocus').and.callThrough();

judicialService.searchJudicial.and.returnValue(of(JUDICIAL_RESULTS));
searchFilterServiceMock.searchJudicial.and.returnValue(of(JUDICIAL_RESULTS));

fixture.detectChanges();
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,13 @@ describe('SearchVenueComponent', () => {

fixture = TestBed.createComponent(SearchVenueComponent);
component = fixture.componentInstance;
const locationService = TestBed.get(LocationService);
spyOn(component.keyUpSubject$, 'next');
spyOn(component.keyUpSubject$, 'pipe').and.returnValue(of('MARCUS'));
component.displayedLocations = LOCATION_RESULTS;
spyOn(component, 'searchLocations').and.callThrough();
spyOn(component, 'onFocus').and.callThrough();

locationService.searchLocations.and.returnValue(of(LOCATION_RESULTS));
searchFilterServiceMock.searchLocations.and.returnValue(of(LOCATION_RESULTS));

fixture.detectChanges();
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ <h2 class="govuk-heading-m case-share-confirm__title">{{ sharedCase.caseTitle }}
<div class="govuk-caption-m case-share-confirm__caption">
{{ sharedCase.caseId }}
</div>
<a [routerLink]="changeLink" class="case-share-confirm__change-link govuk-link govuk-!-font-size-19">{{'Change' | rpxTranslate}}</a>
<a [routerLink]="changeLink" class="case-share-confirm__change-link govuk-link govuk-!-font-size-19">
{{'Change' | rpxTranslate}}
<span class="govuk-visually-hidden">{{'selected case' | rpxTranslate}}</span>
</a>
</div>
<table class="govuk-table">
<thead class="govuk-table__head">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ <h1 *ngIf="title" class="govuk-heading-xl govuk-!-margin-top-2">
class="govuk-button govuk-button--secondary" [disabled]="isDisabledAdd()"
title="{{'Add user to selected cases' | rpxTranslate}}">
{{'Add' | rpxTranslate}}
<span class="govuk-visually-hidden">{{'user' | rpxTranslate}}</span>
</button>
</div>
</div>
Expand Down Expand Up @@ -57,6 +58,7 @@ <h1 *ngIf="title" class="govuk-heading-xl govuk-!-margin-top-2">
<div class="govuk-grid-column-one-thirds">
<button id="btn-remove-user" (click)="removeUser()" class="govuk-button govuk-button--secondary" title="{{'Remove user from selected cases' | rpxTranslate}}">
{{'Remove' | rpxTranslate}}
<span class="govuk-visually-hidden"> {{'user' | rpxTranslate}}</span>
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
<div class="hmcts-identity-bar" *ngIf="value">

<div class="hmcts-identity-bar__container">

<div class="hmcts-identity-bar__details">

<span class="hmcts-identity-bar__title">{{value | rpxTranslate}}</span>

</div>

<div class="hmcts-identity-bar__container">
<div class="hmcts-identity-bar__details">
<span class="hmcts-identity-bar__title">{{value | rpxTranslate}}</span>
</div>

</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class FindAPersonService {
const people = caseworkers ? this.mapCaseworkers(caseworkers, roleCategory) : [];
const finalPeopleList = people.filter(person => person && person.name && person.name.toLowerCase().includes(searchTerm));
return searchOptions.userIncluded ? finalPeopleList.filter(person => person && person.id !== this.assignedUser)
: finalPeopleList.filter(person => person && person.id !== this.userId && person.id !== this.assignedUser);
: finalPeopleList.filter(person => person?.id !== this.assignedUser);
}

public searchJudicial(value: string, serviceId: string): Observable<JudicialUserModel[]> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const windowMock: Window = { gtag: () => {}} as any;
describe('GoogleAnalyticsService', () => {

let titleTestBed: Title;
let windowTestBed: Window;
let windowTestBed: any;

beforeEach(() => {
TestBed.configureTestingModule({
Expand All @@ -41,8 +41,8 @@ describe('GoogleAnalyticsService', () => {
]
});

titleTestBed = TestBed.get(Title);
windowTestBed = TestBed.get(windowToken);
titleTestBed = TestBed.inject(Title);
windowTestBed = TestBed.inject(windowToken);

});

Expand All @@ -59,11 +59,11 @@ describe('GoogleAnalyticsService', () => {
it('init should call router navigation end and gtag with correct config',
inject([GoogleAnalyticsService], (service: GoogleAnalyticsService) => {
const event = new NavigationEnd(42, '/url', '/redirect-url');
TestBed.get(Router).events.next(event);
(TestBed.inject(Router).events as any).next(event);
spyOn(titleTestBed, 'getTitle').and.returnValue('testTitle');
spyOn(windowTestBed as any, 'gtag').and.callThrough();
spyOn(windowTestBed, 'gtag').and.callThrough();
service.init('testId');
expect((windowTestBed as any).gtag).toHaveBeenCalledWith('config', 'testId', {
expect(windowTestBed.gtag).toHaveBeenCalledWith('config', 'testId', {
page_path: '/redirect-url',
page_title: 'testTitle'
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const windowMock: Window = { dataLayer : []} as any;
describe('GoogleTagManagerService', () => {

let titleTestBed: Title;
let windowTestBed: Window;
let windowTestBed: any;

beforeEach(() => {
TestBed.configureTestingModule({
Expand All @@ -41,8 +41,8 @@ describe('GoogleTagManagerService', () => {
]
});

titleTestBed = TestBed.get(Title);
windowTestBed = TestBed.get(windowToken);
titleTestBed = TestBed.inject(Title);
windowTestBed = TestBed.inject(windowToken);

});

Expand All @@ -58,13 +58,13 @@ describe('GoogleTagManagerService', () => {
}));

it('init should call router navigation end and gtag with correct config',
inject([GoogleTagManagerService], (service: GoogleTagManagerService) => {
inject([GoogleTagManagerService], (service: GoogleTagManagerService) => {
const event = new NavigationEnd(42, '/url', '/redirect-url');
TestBed.get(Router).events.next(event);
(TestBed.inject(Router).events as any).next(event);
spyOn(titleTestBed, 'getTitle').and.returnValue('testTitle');
spyOn((windowTestBed as any).dataLayer, 'push').and.callThrough();
spyOn(windowTestBed.dataLayer, 'push').and.callThrough();
service.init('testId');
expect((windowTestBed as any).dataLayer.push).toHaveBeenCalledWith({
expect(windowTestBed.dataLayer.push).toHaveBeenCalledWith({
event: 'pageview',
page: {
path: '/redirect-url',
Expand Down

0 comments on commit 542abe9

Please sign in to comment.