We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an accessor for the prompt when inspecting a TextField.
prompt
TextField
Given code like the following:
struct MyView: View { @Binding var myText: String = "" var prompt: String = "" var body: some View { TextField("My Label", text: $myText, prompt: self.prompt) } }
We would be able to do something like:
func test_promptIsCorrect() throws { var textBinding = Binding<String>(wrappedValue: "") let sut = MyView(prompt: "My Prompt") let prompt = try sut.inspect().view(MyView.self).textField().prompt() let promptText = try prompt.string() XCTAssertEqual(promptText, "My Prompt") }
The text was updated successfully, but these errors were encountered:
#259 Add support for prompt() inspection on TextField
1c9ede2
Released in v0.9.9
Sorry, something went wrong.
No branches or pull requests
Add an accessor for the
prompt
when inspecting aTextField
.Given code like the following:
We would be able to do something like:
Discussed in #258
The text was updated successfully, but these errors were encountered: