Commit Graph

27 Commits

Author SHA1 Message Date
Doug 123661537a Make LinkNewDeviceScreen fall back to the App Lock PIN code when there's no passcode. (#5794)
* Fall back to the AppLock PIN code when there's no passcode.

* Add extra tests on the LinkNewDeviceFlowCoordinator.

* Misc tweaks for clarification.

* Regenerate snapshots.
2026-07-01 10:13:18 +01:00
Doug f3da459d16 Ensure that the current user is the device owner before linking a new device. (#5773) 2026-06-26 16:24:18 +01:00
Stefan Ceriu a6cad41b12 Remove all underlyingFoo mock property usage (unnecessary) 2026-06-03 08:57:04 +03:00
Doug fa67713726 Run SwiftFormat. 2026-05-27 17:11:42 +01:00
Michael 22d14ff8e4 AppSettings are Mockable (#5589)
* create DependenciesProtocol and replace ServiceLocator registration with it

replace mocking calls for ServiceLocator to Dependencies

replace ServiceLocator with instance level calls

replace ServiceLocator configs with TestDependencies config in Tests

replace servicelocator usage in analytics service

replace remaining ServiceLocator calls in unit tests

that depended on the UnitTestAppCoordinator configuration with per suite dependencies instances

fix swiftlint warning

remove remaining references to ServiceLocator

make dependencies properties consistent in tests

delete Dependencies and DependenciesProtocol

fix whitespace modifications

updates from PR feedback

a pass over converting AppSettings and AnalyticsService test instance properties to per test instantiation

fix a missed PR feedback

Sync up after rebase

create DependenciesProtocol and replace ServiceLocator registration with it

replace mocking calls for ServiceLocator to Dependencies

replace ServiceLocator with instance level calls

replace ServiceLocator configs with TestDependencies config in Tests

replace servicelocator usage in analytics service

replace remaining ServiceLocator calls in unit tests

that depended on the UnitTestAppCoordinator configuration with per suite dependencies instances

fix swiftlint warning

remove remaining references to ServiceLocator

make dependencies properties consistent in tests

delete Dependencies and DependenciesProtocol

* AppSettings is instance level mockable now

* replace mocked and preview usages of reset + AppSettings global init with

AppSettings(store: UserDefaultsMock())

* AppSettings.UserDefaultsKeys is now a RawRep struct, making it extensible

* update tests with new AppSettings so it builds

* update remaining AppSettings test/mock inits

* AppSettings.UserDefaultsKey conformed to ExpressibleByStringLiteral

* addressed issues found in first pass ai review

* update AppSettings instantiations after rebase

* fix accessibility tests coordinator after rebase

* Rename to VolatileUserDefaults

* AppSettings init uses mandatory parameter

* Revert UserDefaultsKey to enum

* Add TrackedUserDefaults to be able to reset the defaults object

* Added volatile static func to AppSettings

* Use .volatile() static func instead of full init

* review fixups

* Resolve build issues after rebase

* updated enterprise module

* remove the static reset settings call from the preview tests

---------

Co-authored-by: Mauro Romito <mauro.romito@element.io>
2026-05-22 15:14:08 +02:00
Stefan Ceriu 0ab6458e4e Fix new redundantSendable and redundantSwiftTestingSuite swiftformat errors 2026-03-04 17:02:11 +02:00
Mauro 7982aef855 Swift Testing for Unit Tests PART 1 (#5119)
* migrated a lot of unit tests to Swift Testing and added a new implementation for deferred fulfillment

more tests migration

Cleaned the code manually to establish some good patterns

more code improvements

some more code improvements

removed empty tests

update project

* more pr suggestions and cleanups

* removed the TestSetup pattern

* fixing claude not reusing tests

* pr suggestion + added indent rule to swiftformat so that we can prevent AIs to change that
2026-02-19 16:20:47 +01:00
Stefan Ceriu 23062901c0 Update files following swiftformat upgrade 2026-01-27 12:50:57 +02:00
Mauro f7dd9cdcf8 Update copyright holding and dates (#4640)
* Update copyright holding and dates

* compound IDE Macros updated

* update copyright

* update copyrights done

* update templates and README
2025-10-21 14:34:56 +02:00
manuroe 3950cac085 Dual licensing: AGPL + Element Commercial (#3657)
* New LICENSE-COMMERCIAL file

* Apply dual licenses: AGPL + Element Commercial to file headers

* Update README with dual licensing
2025-01-06 11:27:37 +01:00
Stefan Ceriu 664e87fe87 Switch license to AGPL (#3237)
* Switch license file to AGPL

* Update file copyright headers

* Update the default project file header
2024-09-06 16:34:30 +03:00
Doug c51593476c SwiftLint fixes. (#2899)
non_optional_string_data_conversion and static_over_final_class

* Revert Data -> String changes for upcoming rule change.
2024-06-05 07:31:49 +01:00
Doug b7d492c206 Add Forgot PIN button to AppLockSetupPINScreen. (#2833) 2024-05-13 15:41:35 +01:00
Stefan Ceriu a62c96f1c5 Onboarding flow coordinator and FTUE changes (#2578)
Fixes #2595, fixes #2594, fixes #2593, fixes #2592, fixes #2591
2024-03-21 14:01:23 +02:00
Doug 9a52dcf9ac Add a state machine to AppLockFlowCoordinator. (#2166)
Fixes a bug when cancelling Face ID would loop back round to presenting Face ID.
2023-11-24 16:03:38 +00:00
Doug 0b9da83470 Show the lock screen placeholder on willResignActive. (#2086) 2023-11-15 15:31:35 +00:00
Doug 07313926c9 Add UI tests for optional app lock setup. (#2046) 2023-11-08 15:33:40 +00:00
Doug b10d534c94 Debounce PIN entry to show the last digit before submitting. (#2017) 2023-11-03 07:31:01 +00:00
Doug af3732541e Enable the App Lock feature. (#1990) 2023-10-31 08:55:30 +00:00
Doug 84a16091b2 Handle invalid PIN input in the settings flow. (#1972) 2023-10-27 14:08:06 +01:00
Doug 11563c6297 Add support for Face ID/Touch ID to app lock. (#1966)
* Fix biometrics with low grace period and backgrounding before unlocked.

* Trigger permissions alert when enabling Face ID.
2023-10-27 09:09:12 +00:00
Doug c6e4dc2a37 Initial implementation for AppLockSetupFlowCoordinator. (#1949)
Rename AppLockSettingsScreen to AppLockSetupSettingsScreen.
Implement forced logout and persist PIN entry attempts.
2023-10-25 11:03:37 +00:00
Doug 65b7c1df20 Add AppLockSetupBiometricsScreen. (#1942) 2023-10-23 16:18:25 +01:00
Doug 5356a56a00 Add AppLockSetupPINScreen. (#1930) 2023-10-23 09:07:13 +00:00
Doug ceee6b1853 Implement AppLockScreen as per the designs. (#1925)
Fix a bug in the unlock flow
2023-10-20 17:35:57 +01:00
Doug ebd9f4c916 Add App Lock settings screen (#1917) 2023-10-19 12:26:34 +01:00
Doug 99c28784a9 Initial service implementation for using a PIN code. (#1912)
* Initial service implementation for using a PIN code.

* Tweak Danger for commit size

600-800 lines is perfectly normal for our PRs, up it to 1000.
2023-10-19 10:42:12 +01:00