Skip to content

Commit 14e5aa6

Browse files
committed
add ui test to iOS-SwiftUI
1 parent f1d26b8 commit 14e5aa6

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import XCTest
2+
3+
final class FeedbackUITests: XCTestCase {
4+
func testWidgetDisplayInSwiftUIApp() throws {
5+
let app = XCUIApplication()
6+
app.launchArguments.append(contentsOf: [
7+
"--io.sentry.feedback.all-defaults"
8+
])
9+
app.launch()
10+
11+
// ensure the widget button is displayed
12+
XCTAssert(app.otherElements["Report a Bug"].exists)
13+
14+
// ensure tapping the widget displays the form
15+
app.otherElements["io.sentry.feedback.widget"].tap()
16+
XCTAssert(app.staticTexts["Report a Bug"].exists)
17+
18+
// ensure cancelling the flow hides the form and redisplays the widget
19+
app.buttons["io.sentry.feedback.form.cancel"].tap()
20+
XCTAssert(app.otherElements["Report a Bug"].exists)
21+
}
22+
}

0 commit comments

Comments
 (0)