mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Fix more unit tests. (#1406)
- Randomise test order. - Use deferred fulfilment in more places. - Make sure to change something before awaiting the fulfilment. - Build a fresh AppSettings after reset(). - Retry tests on failure.
This commit is contained in:
@@ -219,6 +219,18 @@ extension RoomDetailsNotificationSettingsState {
|
||||
return false
|
||||
}
|
||||
|
||||
/// Returns `true` when the settings are loaded and `isDefault` is true.
|
||||
var isDefault: Bool {
|
||||
guard case let .loaded(settings) = self else { return false }
|
||||
return settings.isDefault
|
||||
}
|
||||
|
||||
/// Returns `true` when the settings are loaded and `isDefault` is false.
|
||||
var isCustom: Bool {
|
||||
guard case let .loaded(settings) = self else { return false }
|
||||
return !settings.isDefault
|
||||
}
|
||||
|
||||
var isError: Bool {
|
||||
if case .error = self {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user