Skip to content

Commit

Permalink
Resolve feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Nov 20, 2023
1 parent 108ca3f commit 7a3f228
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ extension FirebaseAccountService {
try await changeRequest.commitChanges()
}

// non of the above request will trigger our state change listener, therefore just call it manually.
// None of the above requests will trigger our state change listener, therefore, we just call it manually.
try await context.notifyUserSignIn(user: currentUser, for: self)

Check warning on line 123 in Sources/SpeziFirebaseAccount/Account Services/FirebaseAccountService.swift

View check run for this annotation

Codecov / codecov/patch

Sources/SpeziFirebaseAccount/Account Services/FirebaseAccountService.swift#L122-L123

Added lines #L122 - L123 were not covered by tests
} catch let error as NSError {
Self.logger.error("Received NSError on firebase dispatch: \(error)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ public actor FirestoreAccountStorage: Module, AccountStorageStandard {

private let collection: () -> CollectionReference


public init(storeIn collection: @Sendable @autoclosure @escaping () -> CollectionReference) {
self.collection = collection
}


private func userDocument(for accountId: String) -> DocumentReference {
collection().document(accountId)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import SwiftUI
struct BiographyKey: AccountKey {
typealias Value = String


static let name: LocalizedStringResource = "Biography" // we don't bother to translate
static let category: AccountKeyCategory = .personalDetails
}
Expand All @@ -37,6 +38,7 @@ extension BiographyKey {
public struct DataEntry: DataEntryView {
public typealias Key = BiographyKey


@Binding private var biography: Value

public init(_ value: Binding<Value>) {
Expand Down
1 change: 1 addition & 0 deletions Tests/UITests/TestApp/Shared/FeatureFlags.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import Foundation


enum FeatureFlags {
static let accountStorageTests = ProcessInfo.processInfo.arguments.contains("--account-storage")
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ final class FirebaseAccountStorageTests: XCTestCase {
XCTAssertTrue(app.staticTexts["Biography, Hello Stanford"].waitForExistence(timeout: 2.0))


// NOW TEST ACCOUNT EDIT
// TEST ACCOUNT EDIT
XCTAssertTrue(app.navigationBars.buttons["Edit"].exists)
app.navigationBars.buttons["Edit"].tap()

Expand Down

0 comments on commit 7a3f228

Please sign in to comment.