Skip to content

Conversation

@einsteinx2
Copy link
Contributor

Summary

  • Port MParticleWebView to Swift
  • Refactor MPLogger.swift

Testing Plan

  • Was this tested locally? If not, explain why.
  • Smoke tested and confirmed working in test app, and all unit tests pass

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

Copy link
Collaborator

@BrandonStalnaker BrandonStalnaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few questions

XCTAssertEqualObjects(_webView.originalDefaultAgent, defaultAgent);
}

- (void)testBackgroundCollection {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this test and the other removed for any particular reason? I'm not against it as they seem to be more testing mocking and Apple code but I'm curious if that's your reson

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yesh, so the 2 tests I removed were because OCMock wasn't properly detecting the call of the method (the "expect") even though it was 100% being called, confirmed via breakpoints. Seems to be some incompatibility with OCMock and Swift. In any case, when I looked closer at what was really being tested, it was just testing that a method was called that is literally always called, it wasn't really testing the logic.

Basically on iOS evaluateAgent is always called after calling startWithCustomUserAgent and on tvOS it never is, so this and the other test I removed ultimately were just testing that the #if os(iOS) worked, which isn't really useful.

Copy link
Collaborator

@BrandonStalnaker BrandonStalnaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@einsteinx2 einsteinx2 merged commit 6cc3db7 into refactor/blackout Dec 11, 2024
11 of 12 checks passed
@einsteinx2 einsteinx2 deleted the refactor/6987-Port-MParticleWebView-to-Swift branch December 11, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants