Skip to content

feat(settings): Enable changing recovery phone#18913

Merged
vpomerleau merged 1 commit intomainfrom
FXA-10372
May 28, 2025
Merged

feat(settings): Enable changing recovery phone#18913
vpomerleau merged 1 commit intomainfrom
FXA-10372

Conversation

@vpomerleau
Copy link
Contributor

@vpomerleau vpomerleau commented May 23, 2025

Because

  • We want to allow users to change their recovery phone

This pull request

  • Adds an alternate CTA in the backup phone row to change the recovery phone if a phone number is already registered
  • Re-use the existing phone setup page with minimal conditional changes for the phone replacement flow
  • Add some stories and tests

Issue that this pull request solves

Closes :FXA-10372

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Other information (Optional)

Draft until - all glean events verified/updated, additional unit and functional tests added

@vpomerleau vpomerleau changed the title feat(settings): Enable chaning recovery phone feat(settings): Enable changing recovery phone May 23, 2025
@vpomerleau vpomerleau marked this pull request as ready for review May 26, 2025 18:42
@vpomerleau vpomerleau requested review from a team as code owners May 26, 2025 18:42
Copy link
Contributor

@nshirley nshirley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done! Glad to see the endpoint appears to be working too! Just one question I had but nothing blocking 😃

const el = await this.page.waitForSelector(
`[data-testid=${this.id}-unit-row]`
);
const el = this.page.getByTestId(`${this.id}-unit-row`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the clean up to use better functions for selecting elements! 🎉

return result;
}

async changeRecoveryPhone(code: string) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question (non-blocking) Is there a reason to change the language from replace to change here? I honestly like the verbiage of saying change more than replace, but I'm wondering if it would make sense to go in and update the backend to match this in a followup ticket (i.e., recoveryPhoneChange() and update all the way down)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good call out - it should be consistent. I'll clean this up to match the wording chosen for the button text ("Change").

@vpomerleau vpomerleau force-pushed the FXA-10372 branch 2 times, most recently from 7bf9105 to 7f6e98f Compare May 28, 2025 17:49
Because:

* We want to allow users to change their recovery phone

This commit:

* Adds an alternate CTA in the backup phone row to change the recovery phone if a phone number is already registered
* Re-use the existing phone setup page with minimal conditional changes for the phone replacement flow
* Add some stories and unit tests
* Add reason code for glean events
* Add functional test

Closes #FXA-10372
@vpomerleau vpomerleau merged commit 8962ca2 into main May 28, 2025
19 checks passed
@vpomerleau vpomerleau deleted the FXA-10372 branch May 28, 2025 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants