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

Add basic AuthenticationService and missing UI tests. #126

Merged
merged 6 commits into from
Jul 4, 2022

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Jun 30, 2022

Moves authentication into a basic AuthenticationService, adds a mock of this service and tests for both server selection and the whole auth flow.

@pixlwave pixlwave force-pushed the doug/authentication-service branch from 236ba6c to 0bfd858 Compare June 30, 2022 17:02
@github-actions
Copy link

github-actions bot commented Jun 30, 2022

Warnings
⚠️ This pull request seems relatively large. Please consider splitting it into multiple smaller ones.
⚠️ Some of the commits are missing ticket numbers. Please consinder using them for better tracking.
⚠️ You seem to have made changes to views. Please consider adding screenshots.

Generated by 🚫 Danger Swift against e8852bc

@github-actions
Copy link

github-actions bot commented Jun 30, 2022

Changes in 126 (2022-07-05)

✨ Features

  • Implement rageshake service. (#23)
  • Add filtering for rooms by name. (#26)
  • Settings screen minimal implementation. (#37)
  • DesignKit: Add initial implementation of DesignKit to the repo as a Swift package. (#43)
  • Room timeline: Add plain styler and add timeline option in settings screen. (#92)
  • Implement and use background tasks. (#99)

🙌 Improvements

  • Implement new ClientBuilder pattern for login (#120)
  • Flatten the room list by removing the encrypted groups. (#121)
  • Add AuthenticationService and missing UI tests on the flow. (#126)
  • Room: Use bubbles in the timeline. (#34)
  • Room: Add header view containing room avatar and encryption badge. (#35)
  • Add the splash, login and server selection screens from Element iOS along with a UserSessionStore. (#40)
  • DesignKit: Add DesignKit to the ElementX project, style the login screen with it and tint the whole app. (#43)
  • Settings: Auto dismiss bug report screen and show a success indicator when bug report completed. (#76)
  • Bug report: Add GH labels. (#77)
  • Danger: Add a check for png files and warn to use SVG and PDF files. (#87)
  • Add localizations to UI tests target and add some checks. (#101)

🐛 Bugfixes

  • ElementInfoPlist: Use custom template for Info.plist. (#71)

🧱 Build

  • Use v0.0.1 of the DesignTokens package. (#78)
  • Update to v0.0.2 of the DesignTokens package. (#90)
  • Fix Danger's changelog detection. (#74)

Others

  • Add Screen as a suffix to all screens and tidy up the template. (#125)
  • Fix project urls in Towncrier configuration. (#96)

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/e4LtWn

@pixlwave pixlwave changed the title Add UI tests for server selection and the whole auth flow. Add basic AuthenticationService and missing UI tests. Jun 30, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jun 30, 2022

Codecov Report

Merging #126 (5173a29) into develop (0a199ee) will increase coverage by 5.01%.
The diff coverage is 56.03%.

❗ Current head 5173a29 differs from pull request most recent head e8852bc. Consider uploading reports for the commit e8852bc to get more accurate results

@@             Coverage Diff             @@
##           develop     #126      +/-   ##
===========================================
+ Coverage    30.56%   35.57%   +5.01%     
===========================================
  Files          161      166       +5     
  Lines        11429    11530     +101     
  Branches      5576     5636      +60     
===========================================
+ Hits          3493     4102     +609     
+ Misses        7846     7337     -509     
- Partials        90       91       +1     
Impacted Files Coverage Δ
ElementX/Sources/AppCoordinator.swift 0.00% <0.00%> (ø)
ElementX/Sources/AppCoordinatorStateMachine.swift 0.00% <0.00%> (ø)
...cation/ServerSelection/ServerSelectionModels.swift 100.00% <ø> (+75.00%) ⬆️
...ion/ServerSelection/ServerSelectionViewModel.swift 96.29% <ø> (+7.40%) ⬆️
...ervices/Authentication/AuthenticationService.swift 0.00% <0.00%> (ø)
ElementX/Sources/Services/Client/ClientError.swift 0.00% <0.00%> (ø)
...entX/Sources/Services/Client/MockClientProxy.swift 0.00% <0.00%> (ø)
...ntX/Sources/Services/Session/MockUserSession.swift 0.00% <0.00%> (ø)
...s/Services/UserSessionStore/UserSessionStore.swift 0.00% <ø> (ø)
ElementX/Sources/UITestScreenIdentifier.swift 100.00% <ø> (ø)
... and 34 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a199ee...e8852bc. Read the comment docs.

@pixlwave pixlwave marked this pull request as ready for review July 1, 2022 09:45
@pixlwave pixlwave requested review from a team and ismailgulek and removed request for a team July 1, 2022 09:45
@pixlwave pixlwave force-pushed the doug/authentication-service branch from a816988 to 5173a29 Compare July 1, 2022 17:57
Copy link
Contributor

@ismailgulek ismailgulek left a comment

Choose a reason for hiding this comment

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

Looks great to me. It's perfect to see our coverage is climbing 👍

@sonarcloud
Copy link

sonarcloud bot commented Jul 4, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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