Skip to content

Commit

Permalink
Remove failed-verification-modal from register-account-modal
Browse files Browse the repository at this point in the history
  • Loading branch information
canac committed Jan 28, 2025
1 parent 10ae579 commit ef5f9a4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class RegisterAccountModalController {
} else if (donorDetails['registration-state'] === 'MATCHED') {
this.onContactInfoSuccess()
} else if (donorDetails['registration-state'] === 'FAILED') {
this.stateChanged('failed-verification')
this.stateChanged('user-match')
} else {
// Proceed to Step 3
this.stateChanged('contact-info')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,12 @@ describe('registerAccountModal', function () {
})

describe('\'registration-state\' FAILED', () => {
it('changes state to \'failed-verification\'', () => {
it('changes state to \'user-match\'', () => {
$ctrl.orderService.getDonorDetails.mockImplementation(() => Observable.of({ 'registration-state': 'FAILED' }))
$ctrl.checkDonorDetails()

expect($ctrl.orderService.getDonorDetails).toHaveBeenCalled()
expect($ctrl.stateChanged).toHaveBeenCalledWith('failed-verification')
expect($ctrl.stateChanged).toHaveBeenCalledWith('user-match')
})
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,5 @@ <h3 translate>Create Your Account</h3>
on-success="$ctrl.onUserMatchSuccess()"
set-loading="$ctrl.setLoading({loading: loading})"
></user-match-modal>
<failed-verification-modal
ng-switch-when="failed-verification"
modal-title="$ctrl.modalTitle"
on-ok="$ctrl.onCancel()"
></failed-verification-modal>
<div ng-switch-default class="modal-body" style="height: 100px;"></div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class UserMatchModalController {
} else if (donorDetails['registration-state'] === 'NEW') {
// Do donor matching if
this.postDonorMatch()
} else if (donorDetails['registration-state'] === 'FAILED') {
this.changeMatchState('failure')
} else {
this.changeMatchState('intro')
}
Expand Down

0 comments on commit ef5f9a4

Please sign in to comment.