Skip to content
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

Direct login tests #5628

Merged
merged 4 commits into from
Mar 29, 2022
Merged

Direct login tests #5628

merged 4 commits into from
Mar 29, 2022

Conversation

ouchadam
Copy link
Contributor

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Adds unit tests around the direct login flow via the OnboardingViewModel and the happy paths of the extracted DirectLoginUseCase

Motivation and context

To ensure the direct login flow is treated as a sign in and avoid regressions such as #5623

Screenshots / GIFs

WRONG ID WRONG CREDENTIALS OFFLINE 404 HOMESERVER
after-wrong-id after-wrong-credentials after-offline after-404-hs

Tests

  • Via the sign in flow -
  • Sign in with matrix id

Tested devices

  • Physical
  • Emulator
  • OS version(s): Android 10

{ copy(isLoading = true) },
{ copy(isLoading = false) }
)
.assertEvents(OnboardingViewEvents.OnAccountSignedIn)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this test fails when the fix from #5623 is missing

@ouchadam ouchadam force-pushed the feature/adm/direct-login-tests branch from c9d2ed7 to 56f2aed Compare March 24, 2022 16:31
@ouchadam ouchadam force-pushed the feature/adm/direct-login-tests branch from 56f2aed to 776cf24 Compare March 25, 2022 11:15
@ouchadam ouchadam requested review from a team and ganfra and removed request for a team March 25, 2022 11:15
@github-actions
Copy link

Unit Test Results

110 files  +  4  110 suites  +4   1m 15s ⏱️ -18s
195 tests +  7  195 ✔️ +  7  0 💤 ±0  0 ±0 
650 runs  +28  650 ✔️ +28  0 💤 ±0  0 ±0 

Results for commit 776cf24. ± Comparison against base commit 1097436.

Copy link
Contributor

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

LGTM, thanks thats really nice to have tests

@ouchadam ouchadam merged commit 1b2e350 into develop Mar 29, 2022
@ouchadam ouchadam deleted the feature/adm/direct-login-tests branch March 29, 2022 10:44
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.

None yet

2 participants