Skip to content

Conversation

@transphorm
Copy link
Member

Motivation

  • Align unit tests with the redesigned proof request UI in DocumentSelectorForProvingScreen and remove assertions that no longer match the updated components.
  • Ensure routing logic for the proving flow is covered by new tests for ProvingScreenRouter so skip/auto-select behavior and retry handling are validated.
  • Standardize mocks to use the @selfxyz/mobile-sdk-alpha helpers (isDocumentValidForProving, getDocumentAttributes, useSelfClient) used by the new implementation.

Description

  • Updated app/tests/src/screens/verification/DocumentSelectorForProvingScreen.test.tsx to mock @selfxyz/mobile-sdk-alpha functions, adapt testIDs to the redesigned proof request card, and add tests covering disclosure items and the wallet badge/modal while removing outdated cases.
  • Added new test file app/tests/src/screens/verification/ProvingScreenRouter.test.tsx that covers routing to DocumentDataNotFound, auto-select+route to Prove, routing to DocumentSelectorForProving, and retry flow on load failure.
  • Reworked document test helpers to include nationality and expiry slices and provided stable selfApp/selfClient/passport context mocks to avoid infinite re-renders.
  • Adjusted expectations to use updated testIDs and component behavior (e.g. header logo testID and wallet modal full address testID).

Testing

  • No automated test runs were executed as part of this change (tests were added/modified but not run here).
  • To run the updated tests locally run the mobile app workspace tests with yarn workspace @selfxyz/mobile-app test or the repo-wide test suite with yarn test.
  • Ensure yarn install and test memory guidelines from AGENTS.md are followed before running tests to avoid CI OOM failures.
  • If CI is enabled, the pipeline should execute these unit tests and report pass/fail results (not executed in this rollout).

Codex Task

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 8, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (3)
  • main
  • dev
  • staging

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@transphorm transphorm merged commit a54374a into justin/self-1754-proving-screen-selective-disclosure Jan 8, 2026
4 checks passed
@transphorm transphorm deleted the codex/fix-tests-for-documentselectorforprovingscreen branch January 8, 2026 06:43
transphorm added a commit that referenced this pull request Jan 9, 2026
* add document selector test screen

* clean up mock docs

* update selection options

* Add DocumentSelectorForProving screen and route proof flows through it (#1555)

* Add document selector to proving flow

* fix formatting

* improvements

* redirect user to document not found screen when no documents

* option flow tweaks and tests

* wip tweaks

* fix scrollview bottom padding (#1556)

* tighten up selection text

* create inerstitial

* save wip

* remove not accepted state

* save wip design

* formatting

* update design

* update layout

* Update proving flow tests (#1559)

* Refactor ProveScreen to ProofRequestCard layout and preserve scroll position (#1560)

* Refactor prove screen layout

* fix: amount of hooks rendered needs to be the same for all variants

* long URL ellipsis

* keep titles consistent

* lint

---------

Co-authored-by: Leszek Stachowski <[email protected]>

* wip fix tests

* fix tests

* formatting

* agent feedback

* fix tests

* save wip

* remove text

* fix types

* save working header update

* no transition

* cache document load for proving flow

* save fixes

* small fixes

* match disclosure text

* design updates

* fix approve flow

* fix document type flash

* add min height so text doesn't jump

* update lock

* formatting

* save refactor wip

* don't enable euclid yet

* fix tests

* fix staleness check

* fix select box description

* remove id selector screen

* vertically center

* button updates

* Remove proving document cache (#1567)

* formatting

---------

Co-authored-by: Leszek Stachowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants