Skip to content

test: [IOPID-2880] add unit test on authentication folder #6896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Apr 22, 2025

Conversation

Ladirico
Copy link
Contributor

@Ladirico Ladirico commented Apr 11, 2025

Short description

This pull request improves the test coverage of the authentication feature, focusing on reducers, selectors, hooks and key screens. The update includes both unit and integration tests, covering previously untested branches and edge cases.
Also, the structure of the test files has been changed to make them clearer and more understandable

File % Stmts % Branch % Funcs % Lines
Before ❌ 43.13 28.33 32.58 43.33
After ✅ 79.48 65.42 73.65 79.78

How to test

To verify that the tests run successfully and coverage is correctly calculated, run the following command:

yarn jest ts/features/authentication --coverage --collectCoverageFrom="ts/features/authentication/**/*.{ts,tsx}"

Ensure all tests pass and the coverage summary reflects the expected increase.
No app behavior should be impacted, as only test files were modified.
However, some files have been modified by adding testID, exporting functions or types, or changing names.

Copy link
Contributor

github-actions bot commented Apr 11, 2025

Jira Pull Request Link

This Pull Request refers to Jira issues:

Copy link
Contributor

github-actions bot commented Apr 11, 2025

PR Title Validation for conventional commit type

All good! PR title follows the conventional commit type.

Copy link
Member

@shadowsheep1 shadowsheep1 left a comment

Choose a reason for hiding this comment

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

LGTM

@Ladirico Ladirico added this pull request to the merge queue Apr 22, 2025
Merged via the queue into master with commit bc4af5f Apr 22, 2025
22 checks passed
@Ladirico Ladirico deleted the IOPID-2880-add-unit-test-authentication-folder branch April 22, 2025 12:27
github-merge-queue bot pushed a commit that referenced this pull request Apr 22, 2025
…ndingScreen and refactor test login (#6904)

> [!Warning] 
> This PR depends on #6896

## Short description
This PR introduces a new info icon in the header of the `LandingScreen`.
When pressed, it opens a bottomsheet containing useful resources for the
user.

## List of changes proposed in this pull request
- Added an info icon to the `LandingScreen` header
- Created a new bottomsheet that displays useful resources
- Moved the Privacy Policy link into the bottomsheet (previously
displayed directly on the `LandingScreen`)
- Added links to the showcase website and account access management page
- MP Events have been added on the new logic: 
- `LOGIN_START_FLOW_INFO` -> upon clicking on the icon that opens the
bottomsheet
- `LOGIN_START_FLOW_RESOURCES_TAP` -> upon clicking on links within the
bottomsheet
- Refactored the test login trigger logic and moved it inside the
bottomsheet
- Fixed tsc error caused by DS update on this file ->
`ts/features/services/details/components/ServiceDetailsMetadata.tsx`

## Demo 
| iOS emulator | 
| - | 
| <video
src="https://github.com/user-attachments/assets/b2bf6997-5209-4629-8cb7-20c473da88b1"/>
|

## How to test
Run the app and follow the user flow shown in the demo video.
Make sure:
- The info icon appears in the header of the landing screen
- Tapping it opens the bottom sheet
- All resources are visible and navigable
- The test login flow is accessible after 5 taps on the version
component

---------

Co-authored-by: mariateresaventura <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO-A&I IO - Autenticazione e Identità
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants