Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@
} @if (submitted) {
<div class="text-left orc-font-body-small">
<span i18n="@@recovery.weHaveSent">We have sent a recovery email to</span
>&nbsp;<b>{{ recoveryForm.get('email').value }}</b>
>&nbsp;<b>{{ recoveryForm.get('email').value }}</b
>@if (isPasswordReset) {&nbsp;<span
i18n="@@recovery.andAnyOtherVerifiedEmails"
>and any other verified email addresses on your account</span
>}
<br />
<br />
<div i18n="@@recovery.ifYouDoNotReceive">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,35 @@ describe('PasswordRecoveryComponent', () => {
it('should create', () => {
expect(component).toBeTruthy()
})

/** Renders the confirmation branch for the given recovery type and returns its text. */
function confirmationTextFor(recoveryType: string): string {
component.recoveryForm.get('recoveryType').setValue(recoveryType)
component.recoveryForm.get('email').setValue('josiah_carberry@brown.edu')
component.submitted = true
fixture.detectChanges()
return fixture.nativeElement.textContent
}

it('mentions the other verified addresses after a password reset', () => {
expect(confirmationTextFor('password')).toContain(
'and any other verified email addresses on your account'
)
})

it('does not mention other verified addresses on the forgot-iD path', () => {
// /forgot-id.json still emails a single address, so the fan out wording would be a lie here.
expect(confirmationTextFor('orcidId')).not.toContain(
'and any other verified email addresses on your account'
)
})

it('still shows the submitted email in both modes', () => {
expect(confirmationTextFor('password')).toContain(
'josiah_carberry@brown.edu'
)
expect(confirmationTextFor('orcidId')).toContain(
'josiah_carberry@brown.edu'
)
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ export class PasswordRecoveryComponent implements OnInit {
ariaLabelMyOrcidAccountPassword = $localize`:@@recovery.myOrcidAccountPassword:my ORCID account password`
ariaLabelMy16DigitOrcidId = $localize`:@@recovery.my16DigitOrcidId:my 16-digit ORCID iD`

/**
* The confirmation block is shared with the "remind me my ORCID iD" flow, which still emails a
* single address, so only the password reset path may claim the fan out.
*/
get isPasswordReset(): boolean {
return this.recoveryForm?.get('recoveryType')?.value === 'password'
}

ngOnInit() {
this.recoveryForm = new FormGroup({
recoveryType: new FormControl('password', Validators.required),
Expand Down
12 changes: 10 additions & 2 deletions src/locale/messages.lr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -11831,19 +11831,27 @@
</context-group>
<target>LR</target>
</trans-unit>
<trans-unit id="recovery.andAnyOtherVerifiedEmails" datatype="html" resname="recovery.andAnyOtherVerifiedEmails">
<source>and any other verified email addresses on your account</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/password-recovery/pages/password-recovery/password-recovery.component.html</context>
<context context-type="linenumber">168</context>
</context-group>
<target>LR</target>
</trans-unit>
<trans-unit id="recovery.ifYouDoNotReceive" datatype="html" resname="recovery.ifYouDoNotReceive">
<source>If you do not receive the recovery email within 10 minutes please check your spam folder.</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/password-recovery/pages/password-recovery/password-recovery.component.html</context>
<context context-type="linenumber">168,171</context>
<context context-type="linenumber">172,175</context>
</context-group>
<target>LR</target>
</trans-unit>
<trans-unit id="recovery.backToSignIn" datatype="html" resname="recovery.backToSignIn">
<source>Back to sign in</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/password-recovery/pages/password-recovery/password-recovery.component.html</context>
<context context-type="linenumber">178</context>
<context context-type="linenumber">182</context>
</context-group>
<target>LR</target>
</trans-unit>
Expand Down
12 changes: 10 additions & 2 deletions src/locale/messages.rl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -11831,19 +11831,27 @@
</context-group>
<target>RL</target>
</trans-unit>
<trans-unit id="recovery.andAnyOtherVerifiedEmails" datatype="html" resname="recovery.andAnyOtherVerifiedEmails">
<source>and any other verified email addresses on your account</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/password-recovery/pages/password-recovery/password-recovery.component.html</context>
<context context-type="linenumber">168</context>
</context-group>
<target>RL</target>
</trans-unit>
<trans-unit id="recovery.ifYouDoNotReceive" datatype="html" resname="recovery.ifYouDoNotReceive">
<source>If you do not receive the recovery email within 10 minutes please check your spam folder.</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/password-recovery/pages/password-recovery/password-recovery.component.html</context>
<context context-type="linenumber">168,171</context>
<context context-type="linenumber">172,175</context>
</context-group>
<target>RL</target>
</trans-unit>
<trans-unit id="recovery.backToSignIn" datatype="html" resname="recovery.backToSignIn">
<source>Back to sign in</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/password-recovery/pages/password-recovery/password-recovery.component.html</context>
<context context-type="linenumber">178</context>
<context context-type="linenumber">182</context>
</context-group>
<target>RL</target>
</trans-unit>
Expand Down
11 changes: 9 additions & 2 deletions src/locale/messages.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -10623,18 +10623,25 @@
<context context-type="linenumber">164</context>
</context-group>
</trans-unit>
<trans-unit id="recovery.andAnyOtherVerifiedEmails" datatype="html" resname="recovery.andAnyOtherVerifiedEmails">
<source>and any other verified email addresses on your account</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/password-recovery/pages/password-recovery/password-recovery.component.html</context>
<context context-type="linenumber">168</context>
</context-group>
</trans-unit>
<trans-unit id="recovery.ifYouDoNotReceive" datatype="html" resname="recovery.ifYouDoNotReceive">
<source>If you do not receive the recovery email within 10 minutes please check your spam folder.</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/password-recovery/pages/password-recovery/password-recovery.component.html</context>
<context context-type="linenumber">168,171</context>
<context context-type="linenumber">172,175</context>
</context-group>
</trans-unit>
<trans-unit id="recovery.backToSignIn" datatype="html" resname="recovery.backToSignIn">
<source>Back to sign in</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/password-recovery/pages/password-recovery/password-recovery.component.html</context>
<context context-type="linenumber">178</context>
<context context-type="linenumber">182</context>
</context-group>
</trans-unit>
<trans-unit id="recovery.iveForgotten" datatype="html" resname="recovery.iveForgotten">
Expand Down
12 changes: 10 additions & 2 deletions src/locale/messages.xx.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -11831,19 +11831,27 @@
</context-group>
<target>X</target>
</trans-unit>
<trans-unit id="recovery.andAnyOtherVerifiedEmails" datatype="html" resname="recovery.andAnyOtherVerifiedEmails">
<source>and any other verified email addresses on your account</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/password-recovery/pages/password-recovery/password-recovery.component.html</context>
<context context-type="linenumber">168</context>
</context-group>
<target>X</target>
</trans-unit>
<trans-unit id="recovery.ifYouDoNotReceive" datatype="html" resname="recovery.ifYouDoNotReceive">
<source>If you do not receive the recovery email within 10 minutes please check your spam folder.</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/password-recovery/pages/password-recovery/password-recovery.component.html</context>
<context context-type="linenumber">168,171</context>
<context context-type="linenumber">172,175</context>
</context-group>
<target>X</target>
</trans-unit>
<trans-unit id="recovery.backToSignIn" datatype="html" resname="recovery.backToSignIn">
<source>Back to sign in</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/password-recovery/pages/password-recovery/password-recovery.component.html</context>
<context context-type="linenumber">178</context>
<context context-type="linenumber">182</context>
</context-group>
<target>X</target>
</trans-unit>
Expand Down
Loading