Skip to content

Commit

Permalink
[PM-10137] Updated SDK to a6987cf (#769)
Browse files Browse the repository at this point in the history
  • Loading branch information
fedemkr authored Jul 29, 2024
1 parent a60f5bc commit 2981028
Show file tree
Hide file tree
Showing 24 changed files with 26 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class MockClientAuth: ClientAuthProtocol {
var validatePasswordUserKeyPassword: String?
var validatePasswordUserKeyResult: Result<String, Error> = .success("MASTER_PASSWORD_HASH")

var validatePinResult: Result<Bool, Error> = .success(false)

var trustDeviceResult: Result<TrustDeviceResponse, Error> = .success(
TrustDeviceResponse(
deviceKey: "DEVICE_KEY",
Expand Down Expand Up @@ -144,4 +146,8 @@ class MockClientAuth: ClientAuthProtocol {
validatePasswordUserKeyEncryptedUserKey = encryptedUserKey
return try validatePasswordUserKeyResult.get()
}

func validatePin(pin: String, pinProtectedUserKey: BitwardenSdk.EncString) throws -> Bool {
try validatePinResult.get()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,15 @@ class ExtensionActivationViewTests: BitwardenTestCase {
// MARK: Snapshots

/// The autofill extension activation view renders correctly.
func test_snapshot_extensionActivationView_autofillExtension() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_extensionActivationView_autofillExtension() {
assertSnapshots(
of: subject.navStackWrapped,
as: [.defaultPortrait, .defaultPortraitDark, .defaultPortraitAX5]
)
}

/// The app extension activation view renders correctly.
func test_snapshot_extensionActivationView_appExtension() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_extensionActivationView_appExtension() {
processor.state.extensionType = .appExtension
assertSnapshots(
of: subject.navStackWrapped,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ class GeneratorViewTests: BitwardenTestCase {
// MARK: Snapshots

/// Test a snapshot of the copied value toast.
func test_snapshot_generatorViewToast() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_generatorViewToast() {
processor.state.generatedValue = "pa11w0rd"
processor.state.showCopiedValueToast()
assertSnapshot(
Expand All @@ -187,8 +186,7 @@ class GeneratorViewTests: BitwardenTestCase {
}

/// Test a snapshot of the passphrase generation view.
func test_snapshot_generatorViewPassphrase() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_generatorViewPassphrase() {
processor.state.passwordState.passwordGeneratorType = .passphrase
assertSnapshot(
matching: subject,
Expand All @@ -197,8 +195,7 @@ class GeneratorViewTests: BitwardenTestCase {
}

/// Test a snapshot of the password generation view.
func test_snapshot_generatorViewPassword() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_generatorViewPassword() {
processor.state.passwordState.passwordGeneratorType = .password
assertSnapshot(
matching: subject,
Expand All @@ -207,16 +204,14 @@ class GeneratorViewTests: BitwardenTestCase {
}

/// Test a snapshot of the password generation view with the select button.
func test_snapshot_generatorViewPassword_inPlace() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_generatorViewPassword_inPlace() {
processor.state.passwordState.passwordGeneratorType = .password
processor.state.presentationMode = .inPlace
assertSnapshot(of: subject, as: .tallPortrait)
}

/// Test a snapshot of the password generation view with a policy in effect.
func test_snapshot_generatorViewPassword_policyInEffect() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_generatorViewPassword_policyInEffect() {
processor.state.isPolicyInEffect = true
assertSnapshot(
matching: subject,
Expand All @@ -225,8 +220,7 @@ class GeneratorViewTests: BitwardenTestCase {
}

/// Test a snapshot of the catch-all username generation view.
func test_snapshot_generatorViewUsernameCatchAll() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_generatorViewUsernameCatchAll() {
processor.state.generatorType = .username
processor.state.usernameState.usernameGeneratorType = .catchAllEmail
assertSnapshot(
Expand All @@ -236,8 +230,7 @@ class GeneratorViewTests: BitwardenTestCase {
}

/// Test a snapshot of the forwarded email alias generation view.
func test_snapshot_generatorViewUsernameForwarded() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_generatorViewUsernameForwarded() {
processor.state.generatorType = .username
processor.state.usernameState.usernameGeneratorType = .forwardedEmail
assertSnapshot(
Expand All @@ -247,8 +240,7 @@ class GeneratorViewTests: BitwardenTestCase {
}

/// Test a snapshot of the plus addressed username generation view.
func test_snapshot_generatorViewUsernamePlusAddressed() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_generatorViewUsernamePlusAddressed() {
processor.state.generatorType = .username
processor.state.usernameState.usernameGeneratorType = .plusAddressedEmail
assertSnapshot(
Expand All @@ -258,17 +250,15 @@ class GeneratorViewTests: BitwardenTestCase {
}

/// Test a snapshot of the plus addressed username generation view with the select button.
func test_snapshot_generatorViewUsernamePlusAddressed_inPlace() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_generatorViewUsernamePlusAddressed_inPlace() {
processor.state.generatorType = .username
processor.state.usernameState.usernameGeneratorType = .plusAddressedEmail
processor.state.presentationMode = .inPlace
assertSnapshot(matching: subject, as: .defaultPortrait)
}

/// Test a snapshot of the random word username generation view.
func test_snapshot_generatorViewUsernameRandomWord() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_generatorViewUsernameRandomWord() {
processor.state.generatorType = .username
processor.state.usernameState.usernameGeneratorType = .randomWord
assertSnapshot(
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,13 @@ class SendListViewTests: BitwardenTestCase {
}

/// The view renders correctly when there are search results.
func test_snapshot_search_results_light() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_search_results_light() {
processor.state = .hasSearchResults
assertSnapshot(of: subject, as: .defaultPortrait)
}

/// The view renders in dark mode correctly when there are search results.
func test_snapshot_search_results_dark() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_search_results_dark() {
processor.state = .hasSearchResults
assertSnapshot(of: subject, as: .defaultPortraitDark)
}
Expand All @@ -112,36 +110,31 @@ class SendListViewTests: BitwardenTestCase {
}

/// The view renders in light mode correctly when there are sends.
func test_snapshot_values_light() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_values_light() {
processor.state = .content
assertSnapshot(of: subject, as: .defaultPortrait)
}

/// The view renders in dark mode correctly when there are sends.
func test_snapshot_values_dark() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_values_dark() {
processor.state = .content
assertSnapshot(of: subject, as: .defaultPortrait)
}

/// The view renders in large accessibility sizes correctly when there are sends.
func test_snapshot_values_ax5() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_values_ax5() {
processor.state = .content
assertSnapshot(of: subject, as: .defaultPortrait)
}

/// The view renders in light mode correctly when there are sends.
func test_snapshot_textValues_light() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_textValues_light() {
processor.state = .contentTextType
assertSnapshot(of: subject, as: .defaultPortrait)
}

/// The view renders in dark mode correctly when there are sends.
func test_snapshot_textValues_dark() throws {
throw XCTSkip("Updating XCode to 15.4, this will be updated in the next PR so tests can pass")
func test_snapshot_textValues_dark() {
processor.state = .contentTextType
assertSnapshot(of: subject, as: .defaultPortraitDark)
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ settings:
packages:
BitwardenSdk:
url: https://github.com/bitwarden/sdk-swift
revision: 7fe05589206abf1ac1a4935b1c2501a36735ca7e
revision: a6987cf34e6ec7456f2f55f14b794bdb8ba1f368
Firebase:
url: https://github.com/firebase/firebase-ios-sdk
exactVersion: 10.24.0
Expand Down

0 comments on commit 2981028

Please sign in to comment.