mirror of
https://github.com/bitwarden/ios.git
synced 2025-12-12 18:30:41 -06:00
52 lines
1.3 KiB
Swift
52 lines
1.3 KiB
Swift
// swiftlint:disable:this file_name
|
|
import AVFoundation
|
|
import BitwardenKitMocks
|
|
import BitwardenResources
|
|
import SnapshotTesting
|
|
import XCTest
|
|
|
|
@testable import AuthenticatorShared
|
|
|
|
// MARK: - ScanCodeViewTests
|
|
|
|
class ScanCodeViewTests: BitwardenTestCase {
|
|
// MARK: Properties
|
|
|
|
var processor: MockProcessor<ScanCodeState, ScanCodeAction, ScanCodeEffect>!
|
|
var subject: ScanCodeView!
|
|
|
|
// MARK: Setup & Teardown
|
|
|
|
override func setUp() {
|
|
super.setUp()
|
|
processor = MockProcessor(state: ScanCodeState(showManualEntry: true))
|
|
let store = Store(processor: processor)
|
|
subject = ScanCodeView(
|
|
cameraSession: .init(),
|
|
store: store,
|
|
)
|
|
}
|
|
|
|
override func tearDown() {
|
|
super.tearDown()
|
|
processor = nil
|
|
subject = nil
|
|
}
|
|
|
|
// MARK: Snapshots
|
|
|
|
/// Test a snapshot of the ProfileSwitcherView previews.
|
|
func disabletest_snapshot_scanCodeView_previews() {
|
|
for preview in ScanCodeView_Previews._allPreviews {
|
|
assertSnapshots(
|
|
of: preview.content,
|
|
as: [
|
|
.defaultPortrait,
|
|
.defaultLandscape,
|
|
.defaultPortraitAX5,
|
|
],
|
|
)
|
|
}
|
|
}
|
|
}
|