New issue
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
feat: Enhance the UIViewController breadcrumbs with more data #1945
Conversation
|
* master: meta: Add Pre Commit Hook (#1946)
Question: how would we add unit tests for all these properties? Like the window, presentingViewController, beingPresented, etc. Does it make sense to create such a view hierarchy in a unit test? Can we even add a presentingViewController in the first place? |
I find it odd to test this with unit tests, maybe we could test this with an UITest. |
* master: fix: Properly sanitize the event context and SDK info (#1943)
Isn't that overkill just to test |
Yes, we have UI tests. You can find them at iOS-SwiftUITests project. |
Ah, I missed those. Will dig in! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just need to take a look at CI.
Looks like Sauce Labs have a problem, but there is other tests failing.
The iOS tests failed because of testMultipleListeners again, which should hopefully be solved if we merge master into this branch. It's unrelated to this feature. |
There is also |
Good point, that's fixed now. |
Can someone take that look at CI? I don't know what's going on there. It's not the test itself that's failing but the whole build itself? |
It is complaining that you added 'import Combine' in ViewController.swift. Do you really need this? |
Ah! Good find. Nah, at first I wanted to use Combine to observe changes in the breadcrumbs, but since the sample app runs on iOS 9 (🤯) that didn't work. Forgot to remove the import though. |
Now I'm getting actual test failures in CI, while they complete just fine locally. "Home Screen doesn't exist" - completely unrelated to my changes. |
Im under the impression Sauce Labs is messing with something. |
After looking at the test logs from SauceLabs, I don't think that SauceLabs is the problem, but rather our tests or the new functionality breaks something. |
Some test say that they can't even find the home screen anymore, which it checks by looking for In another run the newly added test fails. I think it's because of the other that the notifications come in: sometimes the one from the navigation controller comes after the view controller, and thus the message we're checking for doesn't match. This is such a wonky way to test this functionality. But I think I may have fixed the problem by simply checking the breadcrumb before setting the label. Still, not sure what to do about the ones that fail to even find the home screen. |
Hooray, tests pass! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could simplify the UITest a bit.
@@ -20,6 +20,12 @@ class LaunchUITests: XCTestCase { | |||
super.tearDown() | |||
} | |||
|
|||
func testBreadcrumbData() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding a UITest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 💯 @kevinrenskers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ups, should be LGTM.
Just need to fix this:
|
Too bad we're not getting these warnings within Xcode itself by integrating SwiftLint there as a build step :( |
* master: ci: Don't run benchmarks on release (#1971) Don't track OOMs for simulators (#1970) feat: Automatic nest new spans with the ui life cycle function (#1959) docs: update some docs/comments to read a little better (#1966) ci: benchmarking updates (#1926) feat: upload list of slow/frozen rendered frame timestamps during a profile (#1910) feat: Enhance the UIViewController breadcrumbs with more data (#1945) # Conflicts: # Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_System.h
📜 Description
We're adding more UIViewController information in the
viewDidAppear
breadcrumbs.💡 Motivation and Context
Closes #1727
💚 How did you test it?
By running the iOS-Swift sample app.
📝 Checklist
🔮 Next steps