Skip to content

[PM-27139] feat: Adds TOTP form view along with action, effect, processor & state.#2753

Open
morganzellers-bw wants to merge 8 commits into
mainfrom
pm-27139-testharness-totp-form
Open

[PM-27139] feat: Adds TOTP form view along with action, effect, processor & state.#2753
morganzellers-bw wants to merge 8 commits into
mainfrom
pm-27139-testharness-totp-form

Conversation

@morganzellers-bw

@morganzellers-bw morganzellers-bw commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-27139

📔 Objective

Add an input form to test TOTP autofill from Bitwarden

📸 Screenshots

Expand Simulator Screenshot - iPhone 17 Pro - 2026-06-09 at 11 09 45

@morganzellers-bw morganzellers-bw self-assigned this Jun 4, 2026
@github-actions github-actions Bot added the app:password-manager Bitwarden Password Manager app context label Jun 4, 2026
@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.96%. Comparing base (1372c15) to head (e7bb3dd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2753      +/-   ##
==========================================
- Coverage   87.90%   86.96%   -0.95%     
==========================================
  Files        1719     1903     +184     
  Lines      167804   180905   +13101     
==========================================
+ Hits       147507   157319    +9812     
- Misses      20297    23586    +3289     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Warning

@morganzellers-bw Uploading code coverage report failed. Please check the "Upload to codecov.io" step of Process Test Reports job for more details.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Warning

@morganzellers-bw Uploading code coverage report failed. Please check the "Upload to codecov.io" step of Process Test Reports job for more details.

@morganzellers-bw morganzellers-bw changed the title Adds TOTP form view along with action, effect, processor & state. [PM-27139] feat: Adds TOTP form view along with action, effect, processor & state. Jun 8, 2026
@morganzellers-bw morganzellers-bw added the ai-review Request a Claude code review label Jun 9, 2026
@morganzellers-bw morganzellers-bw marked this pull request as ready for review June 9, 2026 16:10
@morganzellers-bw morganzellers-bw requested review from a team and matt-livefront as code owners June 9, 2026 16:10
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR adds a TOTP autofill test scenario to the BWTH (Bitwarden Test Harness) following the established Action/Effect/Processor/State/View pattern used by the sibling SimpleLoginForm and CardAutofillForm test scenarios. Changes are limited to the TestHarnessShared target — no production app code, repositories, services, or vault-handling logic are affected. The processor, state, view, route, coordinator wiring, and localization additions all conform to the existing test harness conventions, and prior review feedback on localization key naming was addressed in commit e633c6c5c.

Code Review Details

No findings.

Comment on lines +3 to +5
/// Effects that can be processed by a `TOTPAutofillFormProcessor`.
///
enum TOTPAutofillFormEffect: Equatable {}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🎨 If there's no effect then you don't need this file and you can pass Void to the StateProcessor. Check e.g. ExpiredLinkProcessor.

Comment on lines +8 to +9
/// The title of the screen.
var title: String = Localizations.totpAutofillForm

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🎨 As far as I can see the title doesn't change so I think we can move the localization directly to the view.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

⛏️ I think we should be adding the .accessibilityIdentifier as in the main apps in case QA then wants to automate this.

Comment on lines +45 to +46
Text(Localizations.xColonY(Localizations.totpCode, store.state.totpCode))
.styleGuide(.body)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤔 ♻️ Perhaps not for this PR as I think this is following the same structure as in other views but I'm not sure if we should keep duplicating the values in here as it's the same as the above TextField for TOTP code. Do you think duplicating this here in "view" mode could be useful for something else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review app:password-manager Bitwarden Password Manager app context t:feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants