Skip to content

Commit

Permalink
Mes release 9990 practice mode modal mot fix (#1735)
Browse files Browse the repository at this point in the history
* Fixed a bug where practice mode would not cancel the spinner and not allow the user to further use the feature

* linting

* update version number
  • Loading branch information
RLCorp authored Sep 24, 2024
1 parent e10a5b9 commit 7a0ea75
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="uk.gov.dvsa.drivingexaminerservices" version="4.14.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="uk.gov.dvsa.drivingexaminerservices" version="4.14.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>DES</name>
<description>An application for DVSA driving examiners to conduct driving tests digitally</description>
<content src="index.html" />
Expand Down
4 changes: 2 additions & 2 deletions ios/App/App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.14.0.0</string>
<string>4.14.0.1</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand All @@ -40,7 +40,7 @@
<string>companyportal</string>
</array>
<key>CFBundleVersion</key>
<string>4.14.0.0</string>
<string>4.14.0.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,16 @@ export class VehicleRegistrationComponent implements OnChanges {
// If the user indicates that the MOT failed, load the failed MOT modal
if (fakeModalReturn === PracticeModeMOTType.FAILED) {
await this.loadFailedMOTModal();
// If the modal was cancelled, stop the spinner and return
if (this.modalData === ModalEvent.CANCEL) {
this.isSearchingForMOT = false;
return;
}
}

// If the user cancelled the practice mode modal, reset motData and stop the spinner
if (fakeModalReturn === ModalEvent.CANCEL) {
this.isSearchingForMOT = false;
this.motData = null;
return;
}
Expand All @@ -136,6 +142,13 @@ export class VehicleRegistrationComponent implements OnChanges {
// Make a mock API call to get the MOT result based on the practice mode response
this.motApiService
.getMockResultByIdentifier(value, fakeModalReturn as PracticeModeMOTType)
.pipe(
takeUntil(this.abortSubject),
finalize(() => {
// Stop the search spinner
this.isSearchingForMOT = false;
})
)
.subscribe((val: MotHistoryWithStatus) => {
// Assign the mock API response to the motData property
this.motData = val;
Expand Down

0 comments on commit 7a0ea75

Please sign in to comment.