Skip to content
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

Update TCA to latest version #228

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

added back function so we can say it's verbatim

a556b42
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

Update TCA to latest version #228

added back function so we can say it's verbatim
a556b42
Select commit
Loading
Failed to load commit list.
GitHub Actions / Xcode test results succeeded Jan 3, 2025 in 0s

Xcode test results

Testing workspace klaviyo-swift-sdk with scheme klaviyo-swift-sdk-Package

Summary

TotalSuccess PassedFailure FailedSkipped SkippedExpected Failure Expected Failure⏱️ Time
1361360002.85s

Test Summary

KlaviyoCoreTests

  • Device: iPhone 15 Pro, 17.4 (21E213)
  • SDK: Simulator - iOS 17.5, 17.5
TestTotalSuccessFailureSkippedExpected Failure
test-class ArchivalSystemTest11000
test-class ArchivalUtilsTests88000
test-class EncodableTests55000
test-class FileUtilsTests22000
test-class KlaviyoAPITests77000
test-class NetworkSessionTests33000

KlaviyoSwiftTests

  • Device: iPhone 15 Pro, 17.4 (21E213)
  • SDK: Simulator - iOS 17.5, 17.5
TestTotalSuccessFailureSkippedExpected Failure
test-class APIRequestErrorHandlingTests1515000
test-class AppLifeCycleEventsTests1111000
test-class EncodableTests11000
test-class KlaviyoEventTests11000
test-class KlaviyoModelsTest33000
test-class KlaviyoSDKTests1111000
test-class KlaviyoStateTests88000
test-class StateChangePublisherTests11000
test-class StateManagementEdgeCaseTests3030000
test-class StateManagementTests2727000

KlaviyoUITests

  • Device: iPhone 15 Pro, 17.4 (21E213)
  • SDK: Simulator - iOS 17.5, 17.5
TestTotalSuccessFailureSkippedExpected Failure
test-class KlaviyoUITests22000

Failure Failures

All tests passed 🎉


Code Coverage

Coverage Covered Executable
KlaviyoCoreTests 33.49 % 3237 9665
  FileUtils.swift 77.78 % 28 36
  AppLifeCycleEvents.swift 100.00 % 72 72
  PrivateMethods.swift 0.00 % 0 6
  SwiftTesting.swift 15.26 % 49 321
  ReportIssue.swift 0.00 % 0 132
  AsyncThrowingStream.swift 0.00 % 0 36
  TestUtils.swift 58.23 % 46 79
  SignPostReducer.swift 32.24 % 59 183
  PushTokenPayload.swift 93.62 % 44 47
  AnyHashableSendable.swift 0.00 % 0 22
  LoggerClient.swift 16.67 % 3 18
  CasePathsLockIsolated.swift 0.00 % 0 11
  ActorIsolated.swift 0.00 % 0 11
  CollectionDifference.swift 0.00 % 0 6
  Task.swift 44.90 % 22 49
  CreateEventPayload.swift 98.48 % 65 66
  AnyDecodable.swift 11.45 % 15 131
  Mirror.swift 34.55 % 19 55
  ReachabilitySwift.swift 17.87 % 42 235
  RuntimeWarningReporter.swift 0.00 % 0 73
  SimpleMockURLProtocol.swift 100.00 % 12 12
  Reducer.swift 0.00 % 0 19
  Result.swift 0.00 % 0 7
  Warn.swift 0.00 % 0 3
  Optional+CasePathable.swift 0.00 % 0 61
  IssueReportingUncheckedSendable.swift 0.00 % 0 3
  UnregisterPushTokenPayload.swift 100.00 % 48 48
  BreakpointReporter.swift 0.00 % 0 42
  ExpectDifference.swift 0.00 % 0 114
  XCTest.swift 0.00 % 0 101
  ArchivalUtilsTests.swift 100.00 % 128 128
  KlaviyoRequest.swift 97.37 % 37 38
  AnyEncodable.swift 35.68 % 76 213
  WithExpectedIssue.swift 0.00 % 0 216
  UncheckedBox.swift 0.00 % 0 3
  IssueReportingLockIsolated.swift 0.00 % 0 11
  KlaviyoAPITests.swift 96.60 % 199 206
  KlaviyoEnvironment.swift 26.23 % 48 183
  PushEnablement.swift 100.00 % 14 14
  Effect.swift 50.00 % 119 238
  LockIsolated.swift 88.24 % 45 51
  Debug.swift 0.00 % 0 4
  Identifiable.swift 0.00 % 0 12
  EmptyReducer.swift 0.00 % 0 7
  TestContext.swift 22.58 % 7 31
  MainSerialExecutor.swift 45.45 % 10 22
  Logger.swift 19.05 % 4 21
  IsTesting.swift 8.70 % 2 23
  CasePathable.swift 0.00 % 0 136
  Cancellation.swift 90.74 % 245 270
  Box.swift 60.00 % 3 5
  SDKRequestIterator.swift 0.00 % 0 143
  RootStore.swift 68.88 % 259 376
  ArchivalUtils.swift 100.00 % 46 46
  CustomDumpReflectable.swift 100.00 % 4 4
  Create.swift 90.79 % 138 152
  AnyType.swift 97.62 % 41 42
  UIScheduler.swift 45.00 % 9 20
  CasePathsUncheckedSendable.swift 0.00 % 0 4
  FailureObserver.swift 0.00 % 0 10
  ProfilePayload.swift 100.00 % 44 44
  AssumeIsolated.swift 100.00 % 21 21
  PushBackground.swift 100.00 % 12 12
  FatalErrorReporter.swift 0.00 % 0 10
  TypeName.swift 85.71 % 36 42
  String.swift 45.83 % 11 24
  Reduce.swift 76.92 % 10 13
  ExpectNoDifference.swift 0.00 % 0 55
  CreateProfilePayload.swift 100.00 % 3 3
  AppHostWarning.swift 0.00 % 0 75
  KlaviyoEndpoint.swift 86.49 % 32 37
  Diff.swift 0.00 % 0 1877
  AnyCasePath.swift 0.00 % 0 43
  AsyncStream.swift 22.22 % 8 36
  KlaviyoAPI.swift 77.59 % 45 58
  EnumReflection.swift 0.00 % 0 473
  ReducerBuilder.swift 15.00 % 9 60
  EncodableTests.swift 100.00 % 45 45
  Publisher.swift 97.73 % 43 44
  IssueReporter.swift 0.00 % 0 38
  Never+CasePathable.swift 0.00 % 0 21
  Locking.swift 62.50 % 10 16
  Rethrows.swift 0.00 % 0 7
  CurrentValueRelay.swift 15.17 % 22 145
  Unimplemented.swift 0.00 % 0 163
  AnyCodable.swift 42.45 % 45 106
  Dump.swift 75.56 % 674 892
  WithIssueContext.swift 50.00 % 6 12
  NetworkSessionTests.swift 100.00 % 27 27
  FileUtilsTests.swift 84.78 % 39 46
  AppContextInfo.swift 14.89 % 21 141
  NetworkSession.swift 69.00 % 69 100
  Result+CasePathable.swift 0.00 % 0 40
  OpenExistential.swift 0.00 % 0 6
  UncheckedSendable.swift 12.90 % 4 31
  Store.swift 15.69 % 43 274
KlaviyoSwift 77.16 % 1257 1629
  StateChangePublisher.swift 38.36 % 28 73
  Event.swift 100.00 % 42 42
  Klaviyo.swift 60.84 % 101 166
  ProfileAPIExtension.swift 100.00 % 32 32
  LifecycleEventsExtension.swift 100.00 % 12 12
  KlaviyoState.swift 74.31 % 295 397
  StateManagement.swift 93.06 % 563 605
  Profile.swift 100.00 % 27 27
  KlaviyoSwiftEnvironment.swift 35.75 % 64 179
  APIRequestErrorHandling.swift 96.88 % 93 96
KlaviyoSwiftExtension 0.00 % 0 0
KlaviyoSwiftTests 46.32 % 7766 16766
  AnyCodable.swift 42.45 % 45 106
  Profile.swift 100.00 % 27 27
  Result.swift 0.00 % 0 7
  Klaviyo.swift 60.84 % 101 166
  ProfileAPIExtension.swift 100.00 % 32 32
  IsTesting.swift 8.70 % 2 23
  ReducerBuilder.swift 15.00 % 9 60
  ArchivalUtils.swift 100.00 % 46 46
  ActorIsolated.swift 0.00 % 0 11
  AnyCasePath.swift 0.00 % 0 43
  AsyncThrowingStream.swift 0.00 % 0 36
  Identifiable.swift 0.00 % 0 12
  PrivateMethods.swift 0.00 % 0 6
  SignPostReducer.swift 32.24 % 59 183
  XCTest.swift 0.00 % 0 101
  SharedChangeTracker.swift 18.37 % 18 98
  WithIssueContext.swift 50.00 % 6 12
  OpenExistential.swift 0.00 % 0 6
  CollectionDifference.swift 0.00 % 0 6
  Logger.swift 19.05 % 4 21
  StateManagement.swift 93.06 % 563 605
  OpenExistential.swift 0.00 % 0 16
  Task.swift 44.90 % 22 49
  UncheckedSendable.swift 12.90 % 4 31
  AppHostWarning.swift 0.00 % 0 75
  CasePathsUncheckedSendable.swift 0.00 % 0 4
  WithExpectedIssue.swift 0.00 % 0 216
  AppLifeCycleEvents.swift 100.00 % 72 72
  EventTests.swift 100.00 % 6 6
  ExpectDifference.swift 0.00 % 0 114
  StateChangePublisherTests.swift 98.70 % 76 77
  Effect.swift 50.00 % 119 238
  Store.swift 15.69 % 43 274
  Optional+CasePathable.swift 0.00 % 0 61
  Publisher.swift 97.73 % 43 44
  Box.swift 60.00 % 3 5
  KlaviyoModelsTest.swift 100.00 % 132 132
  ReachabilitySwift.swift 17.87 % 42 235
  SDKRequestIterator.swift 0.00 % 0 143
  String.swift 45.83 % 11 24
  Never+CasePathable.swift 0.00 % 0 21
  IssueReportingUncheckedSendable.swift

Details

Test Details

KlaviyoCoreTestsback

ArchivalSystemTest back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testArchiveUnarchive()

ArchivalUtilsTests back

SuccessFailureSkippedExpected Failure⏱️
8 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testArchiveFails()
Successtest-method testArchiveUnarchive()
Successtest-method testArchiveWriteFails()
Successtest-method testUnarchive()
Successtest-method testUnarchiveInvalidData()
Successtest-method testUnarchiveUnableToRemoveFile()
Successtest-method testUnarchiveUnarchiveFails()
Successtest-method testUnarchiveWhereFileDoesNotExist()

EncodableTests back

SuccessFailureSkippedExpected Failure⏱️
5 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testEventPayload()
Successtest-method testKlaviyoRequest()
Successtest-method testProfilePayload()
Successtest-method testTokenPayload()
Successtest-method testUnregisterTokenPayload()

FileUtilsTests back

SuccessFailureSkippedExpected Failure⏱️
2 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testFilePathForData()
Successtest-method testRemoveItemWithError()

KlaviyoAPITests back

SuccessFailureSkippedExpected Failure⏱️
7 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testEncodingError()
Successtest-method testInvalidStatusCode()
Successtest-method testInvalidURL()
Successtest-method testNetworkError()
Successtest-method testSuccessfulResponseWithEvent()
Successtest-method testSuccessfulResponseWithProfile()
Successtest-method testSuccessfulResponseWithStoreToken()

NetworkSessionTests back

SuccessFailureSkippedExpected Failure⏱️
3 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testCreateEmphemeralSesionHeaders()
Successtest-method testDefaultUserAgent()
Successtest-method testSessionDataTask()

KlaviyoSwiftTestsback

APIRequestErrorHandlingTests back

SuccessFailureSkippedExpected Failure⏱️
15 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testMissingOrInvalidResponse()
Successtest-method testRateLimitErrorWithExistingBackoffRetry()
Successtest-method testRateLimitErrorWithExistingRetry()
Successtest-method testRetryWithRetryAfter()
Successtest-method testSendRequestDataEncodingError()
Successtest-method testSendRequestFailureIncrementsRetryCount()
Successtest-method testSendRequestFailureWithBackoff()
Successtest-method testSendRequestHttpFailureDequesRequest()
Successtest-method testSendRequestHttpFailureForEmailResetsStateAndDequesRequest()
Successtest-method testSendRequestHttpFailureForPhoneNumberResetsStateAndDequesRequest()
Successtest-method testSendRequestInternalError()
Successtest-method testSendRequestInternalRequestError()
Successtest-method testSendRequestInvalidData()
Successtest-method testSendRequestMaxRetries()
Successtest-method testSendRequestUnknownError()

AppLifeCycleEventsTests back

SuccessFailureSkippedExpected Failure⏱️
11 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testAppBackgroundGetsStopAction()
Successtest-method testAppBackgroundStopsReachability()
Successtest-method testAppBecomeActiveGetsStartAction()
Successtest-method testAppBecomesActiveStartsReachibility()
Successtest-method testAppTerminateGetsStopAction()
Successtest-method testAppTerminateStopsReachability()
Successtest-method testReachabilityNotificationStatusHandled()
Successtest-method testReachabilityStartFailureIsHandled()
Successtest-method testReachabilityStatusNilThenNotNil()
Successtest-method testReachaibilityNotificationGetsRightAction()
Successtest-method testStartReachabilityCalledOnSubscription()

EncodableTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testKlaviyoState()

KlaviyoEventTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testOpenedPushEvent()

KlaviyoModelsTest back

SuccessFailureSkippedExpected Failure⏱️
3 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testEmptyStringIdsConvertToNil()
Successtest-method testProfileModelConvertsToAPIModel()
Successtest-method testProfileWithNoIdsModelConvertsToAPIModel()

KlaviyoSDKTests back

SuccessFailureSkippedExpected Failure⏱️
11 (100%)0 (0%)0 (0%)0 (0%)1.01s
Successtest-method testCreateEvent()
Successtest-method testCreateEventFromDocumentation()
Successtest-method testHandlePushNotification()
Successtest-method testInitializeSDk()
Successtest-method testKlaviyoSDKInit()
Successtest-method testPropertyGetters()
Successtest-method testSetExternalId()
Successtest-method testSetFirstName()
Successtest-method testSetProfile()
Successtest-method testSetPushToken()
Successtest-method testUnhandlePushNotification()

KlaviyoStateTests back

SuccessFailureSkippedExpected Failure⏱️
8 (100%)0 (0%)0 (0%)0 (0%)0.21s
Successtest-method testBackgroundStates()
Successtest-method testFullKlaviyoStateEncodingDecodingIsEqual()
Successtest-method testLoadNewKlaviyoState()
Successtest-method testPushEnablementStates()
Successtest-method testSaveKlaviyoStateWithMissingApiKeyLogsError()
Successtest-method testStateFileExistsInvalidData()
Successtest-method testStateFileExistsInvalidJSON()
Successtest-method testValidStateFileExists()

StateChangePublisherTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)1.04s
Successtest-method testPublisherCallsEmitsOnlyOnce()

StateManagementEdgeCaseTests back

SuccessFailureSkippedExpected Failure⏱️
30 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testCompleteInitializationWhileAlreadyInitialized()
Successtest-method testCompleteInitializationWithExistingIdentifiers()
Successtest-method testDefaultBadgeClearingOff()
Successtest-method testDefaultBadgeClearingOn()
Successtest-method testEnqueueNonOpenedPushEventUninitializedDoesNotAddToPendingRequest()
Successtest-method testInitializeAfterInitialized()
Successtest-method testInitializeWhileInitializing()
Successtest-method testNetworkStatusChangedUninitialized()
Successtest-method testOpenedPushEventUninitializedAddsToPendingRequests()
Successtest-method testSendRequestBeforeInitialization()
Successtest-method testSetEmailMissingAnonymousIdStillSetsEmail()
Successtest-method testSetEmailUninitializedDoesNotAddToPendingRequest()
Successtest-method testSetEmailWithWhiteSpace()
Successtest-method testSetEmptyEmail()
Successtest-method testSetEmptyExternalId()
Successtest-method testSetEmptyPhoneNumber()
Successtest-method testSetExternalIdMissingAnonymousIdStillSetsExternalId()
Successtest-method testSetExternalIdUninitializedDoesNotAddToPendingRequest()
Successtest-method testSetExternalIdWithWhiteSpaces()
Successtest-method testSetPhoneNumberMissingApiKeyStillSetsPhoneNumber()
Successtest-method testSetPhoneNumberUninitializedDoesNotAddToPendingRequest()
Successtest-method testSetPhoneNumberWithWhiteSpaces()
Successtest-method testSetProfileUnitialized()
Successtest-method testSetProfileWithEmptyStringIdentifiers()
Successtest-method testSetPushTokenUninitializedDoesNotAddToPendingRequest()
Successtest-method testSetPushTokenWithMissingAnonymousId()
Successtest-method testStartUninitialized()
Successtest-method testStopInitializing()
Successtest-method testStopUninitialized()
Successtest-method testTokenRequestMissingApiKey()

StateManagementTests back

SuccessFailureSkippedExpected Failure⏱️
27 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testEmptyQueueDoesNotFlush()
Successtest-method testEnqueueEvents()
Successtest-method testEnqueueEventWhenInitilizingSendsEvent()
Successtest-method testFetchFormsDecodingError()
Successtest-method testFetchForms()
Successtest-method testFlushQueueDuringExponentialBackoff()
Successtest-method testFlushQueueExponentialBackoffGoesToSize()
Successtest-method testFlushQueueWithMultipleRequests()
Successtest-method testFlushUninitializedQueueDoesNotFlush()
Successtest-method testFlushWithPendingProfile()
Successtest-method testInitializeSubscribesToAppropriatePublishers()
Successtest-method testInitialize()
Successtest-method testNetworkConnectivityChanges()
Successtest-method testQueueThatIsFlushingDoesNotFlush()
Successtest-method testSendRequestWhenNotFlushing()
Successtest-method testSendRequestWithNoRequestsInFlight()
Successtest-method testSetEmail()
Successtest-method testSetExternalId()
Successtest-method testSetPhoneNumber()
Successtest-method testSetProfileWithAllProfileIdentifiersAndProperties()
Successtest-method testSetProfileWithExistingProperties()
Successtest-method testSetPushEnablementChanged()
Successtest-method testSetPushEnablementPushTokenIsNil()
Successtest-method testSetPushTokenEnablementChanged()
Successtest-method testSetPushTokenMultipleTimes()
Successtest-method testSetPushToken()
Successtest-method testStopWithRequestsInFlight()

KlaviyoUITests[<img src="https://xcresulttool-static.netlify.app/i/back.png" al