-
-
Notifications
You must be signed in to change notification settings - Fork 336
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
33 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -97,6 +97,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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,8 +152,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate { | |
user.email = env["--io.sentry.user.email"] ?? "[email protected]" | ||
// first check if the username has been overridden in the scheme for testing purposes; then try to use the system username so each person gets an automatic way to easily filter things on the dashboard; then fall back on a hardcoded value if none of these are present | ||
let username = env["--io.sentry.user.username"] ?? (env["SIMULATOR_HOST_HOME"] as? NSString)? | ||
.lastPathComponent ?? "cocoa developer" | ||
.lastPathComponent ?? "cocoadev" | ||
user.username = username | ||
user.name = env["--io.sentry.user.name"] ?? "cocoa developer" | ||
scope.setUser(user) | ||
|
||
if let path = Bundle.main.path(forResource: "Tongariro", ofType: "jpg") { | ||
|
@@ -174,6 +175,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { | |
return | ||
} | ||
config.animations = !args.contains("--io.sentry.feedback.no-animations") | ||
config.useSentryUser = args.contains("--io.sentry.feedback.use-sentry-user") | ||
config.useShakeGesture = true | ||
config.showFormForScreenshots = true | ||
config.configureWidget = { widget in | ||
|
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