mirror of
https://github.com/fxm90/GradientLoadingBar.git
synced 2026-06-16 12:24:31 +00:00
Merge branch 'main' into feature/add-support-for-swiftui
# Conflicts: # Example/ExampleTests/ViewModel/NotchGradientLoadingBarViewModelTestCase.swift # Example/Podfile.lock # Example/Pods/Manifest.lock # GradientLoadingBar/NotchGradientLoadingBarController.swift
This commit is contained in:
@@ -13,7 +13,7 @@ import XCTest
|
||||
final class NotchGradientLoadingBarViewModelTestCase: XCTestCase {
|
||||
func test_initializer_shouldSetSafeAreaDevice_toIPhoneX() {
|
||||
// Given
|
||||
let deviceIdentifiers = ["iPhone10,3", "iPhone10,6", "iPhone11,2", "iPhone11,4", "iPhone11,6", "iPhone11,8"]
|
||||
let deviceIdentifiers = ["iPhone10,3", "iPhone10,6", "iPhone11,2", "iPhone11,4", "iPhone11,6"]
|
||||
deviceIdentifiers.forEach { deviceIdentifier in
|
||||
|
||||
// When
|
||||
@@ -24,6 +24,19 @@ final class NotchGradientLoadingBarViewModelTestCase: XCTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
func test_initializer_shouldSetSafeAreaDevice_toIPhoneXR() {
|
||||
// Given
|
||||
let deviceIdentifiers = ["iPhone11,8"]
|
||||
deviceIdentifiers.forEach { deviceIdentifier in
|
||||
|
||||
// When
|
||||
let viewModel = NotchGradientLoadingBarViewModel(deviceIdentifier: deviceIdentifier)
|
||||
|
||||
// Then
|
||||
XCTAssertEqual(viewModel.safeAreaDevice, .iPhoneXR)
|
||||
}
|
||||
}
|
||||
|
||||
func test_initializer_shouldSetSafeAreaDevice_toIPhone11() {
|
||||
// Given
|
||||
let deviceIdentifiers = ["iPhone12,1", "iPhone12,3", "iPhone12,5"]
|
||||
|
||||
Reference in New Issue
Block a user