Skip to content

OAWebView Init #70

Closed
Closed

Description

@codefiesta

Testing SwiftUI can be relatively painful as it usually requires XCUIApplication or abstracting out bits of internal view logic into ViewModels which just offers a layer of abstraction.

Currently the OAWebView is initialized with an empty constructor and has the OAuth object injected with

@Environment(\.oauth)
var oauth: OAuth

If we change the OAWebView to be initialized with an OAuth object instead of using the @Environment injection, we should be able to greatly improve the test coverage because this will allow tests to call the OAWebViewCoordinator methods without using a .default injected OAuth object.

public init(oauth: OAuth) { 
    self.oauth = oauth
}

Originally posted by @codefiesta in #67

Activity

  1. self-assigned this
    on Jun 15, 2025
  2. added this to the 1.2.0 milestone on Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions