Open jonreid opened 1 day ago
The fill color in this view is currently hardcoded to blue. I'd like to vary the color. Is there a way to test the fill Color?
private struct CheckButton: View { var body: some View { Button(action: { }, label: { RoundedRectangle(cornerRadius: 10) .fill(Color.blue) .frame(width: 100, height: 200) .overlay( Text("Check") .foregroundColor(.white) .font(.title) ) }) .tag("checkButton") } }
let color = try sut.inspect().<path_to_rounded_rectangle>.shape().fillShapeStyle(Color.self) XCTAssertEqual(color, .blue)
The fill color in this view is currently hardcoded to blue. I'd like to vary the color. Is there a way to test the fill Color?