-
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,9 @@ class UserFeedbackUITests: BaseUITest { | |
|
||
// Input field placeholders | ||
XCTAssertEqual(try XCTUnwrap(nameField.placeholderValue), "Your Name") | ||
XCTAssertNil(nameField.value) | ||
XCTAssertEqual(try XCTUnwrap(emailField.placeholderValue), "[email protected]") | ||
XCTAssertNil(emailField.value) | ||
XCTAssert(app.staticTexts["What's the bug? What did you expect?"].exists) | ||
|
||
// Input field labels | ||
|
@@ -97,6 +99,17 @@ class UserFeedbackUITests: BaseUITest { | |
XCTAssertFalse(app.staticTexts["Thy name (Required)"].exists) | ||
} | ||
|
||
func testPrefilledUserInformation() throws { | ||
launchApp(args: ["--io.sentry.feedback.use-sentry-user"], env: [ | ||
"--io.sentry.user.name": "ui test user", | ||
"--io.sentry.user.email": "[email protected]" | ||
]) | ||
|
||
widgetButton.tap() | ||
XCTAssertEqual(try XCTUnwrap(nameField.value as? String), "ui test user") | ||
XCTAssertEqual(try XCTUnwrap(emailField.value as? String), "[email protected]") | ||
} | ||
|
||
// MARK: Tests validating happy path / successful submission | ||
|
||
func testSubmitFullyFilledForm() throws { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters