diff --git a/src/app/pages/waiting-room-to-car/components/mot-components/mot-card/__tests__/mot-card.component.spec.ts b/src/app/pages/waiting-room-to-car/components/mot-components/mot-card/__tests__/mot-card.component.spec.ts index c05f8f9cc..7c833f410 100644 --- a/src/app/pages/waiting-room-to-car/components/mot-components/mot-card/__tests__/mot-card.component.spec.ts +++ b/src/app/pages/waiting-room-to-car/components/mot-components/mot-card/__tests__/mot-card.component.spec.ts @@ -43,7 +43,7 @@ describe('MotCardComponent', () => { spyOn(component.networkState, 'getNetworkState').and.returnValue(ConnectionStatus.ONLINE); component.data = { status: MotStatusCodes.VALID } as MotHistory; component.status = '200'; - expect(component.isCallWasSuccessful()).toEqual(true); + expect(component.isCallSuccessful()).toEqual(true); }); it( 'should return false if status is not 200 or Already Saved, data.status is ' + @@ -52,20 +52,20 @@ describe('MotCardComponent', () => { spyOn(component.networkState, 'getNetworkState').and.returnValue(ConnectionStatus.ONLINE); component.data = { status: MotStatusCodes.VALID } as MotHistory; component.status = '100'; - expect(component.isCallWasSuccessful()).toEqual(false); + expect(component.isCallSuccessful()).toEqual(false); } ); it('should return false if status is 200, data.status is ' + '"No details" and the app is online', () => { spyOn(component.networkState, 'getNetworkState').and.returnValue(ConnectionStatus.ONLINE); component.data = { status: MotStatusCodes.NO_DETAILS } as MotHistory; component.status = '200'; - expect(component.isCallWasSuccessful()).toBeFalsy(); + expect(component.isCallSuccessful()).toBeFalsy(); }); it('should return false if status is 200, data.status is ' + 'not "No details" and the app is not online', () => { spyOn(component.networkState, 'getNetworkState').and.returnValue(ConnectionStatus.OFFLINE); component.data = { status: MotStatusCodes.NO_DETAILS } as MotHistory; component.status = '200'; - expect(component.isCallWasSuccessful()).toEqual(false); + expect(component.isCallSuccessful()).toEqual(false); }); }); diff --git a/src/app/pages/waiting-room-to-car/components/mot-components/mot-card/mot-card.component.html b/src/app/pages/waiting-room-to-car/components/mot-components/mot-card/mot-card.component.html index dd55af872..dcdf0b318 100644 --- a/src/app/pages/waiting-room-to-car/components/mot-components/mot-card/mot-card.component.html +++ b/src/app/pages/waiting-room-to-car/components/mot-components/mot-card/mot-card.component.html @@ -1,4 +1,4 @@ -
+
@@ -34,7 +34,7 @@ [formGroup]="formGroup" >
-
+
diff --git a/src/app/pages/waiting-room-to-car/components/mot-components/mot-card/mot-card.component.ts b/src/app/pages/waiting-room-to-car/components/mot-components/mot-card/mot-card.component.ts index 02da965e6..284f6c35a 100644 --- a/src/app/pages/waiting-room-to-car/components/mot-components/mot-card/mot-card.component.ts +++ b/src/app/pages/waiting-room-to-car/components/mot-components/mot-card/mot-card.component.ts @@ -28,7 +28,7 @@ export class MotCardComponent { constructor(public networkState: NetworkStateProvider) {} - isCallWasSuccessful(): boolean { + isCallSuccessful(): boolean { return ( (+this.status === HttpStatusCodes.OK || this.status === 'Already Saved') && this?.data?.status !== MotStatusCodes.NO_DETAILS &&