Skip to content

Commit 2267465

Browse files
committed
address PR feedback
* `messageViewImpressionRequest` was removed from the `OSMessagingController` header file, so update `OSMessagingControllerOverrider` to expose it for internal usage. * Delete old tests that have been migrated
1 parent 2dfbb32 commit 2267465

File tree

2 files changed

+2
-34
lines changed

2 files changed

+2
-34
lines changed

iOS_SDK/OneSignalSDK/UnitTests/InAppMessagingIntegrationTests.m

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,39 +1422,6 @@ of this software and associated documentation files (the "Software"), to deal
14221422
// XCTAssertTrue(action.promptActions[1].hasPrompted);
14231423
// }
14241424

1425-
/// ✅ Migrated to `testPausingIAMs_doesNotCreateMessageQueue`... This test statement below is no longer true as of `5.2.9`.
1426-
// - (void)testDisablingIAMs_stillCreatesMessageQueue_butPreventsMessageDisplay {
1427-
// let message = [OSInAppMessageTestHelper testMessageJsonWithTriggerPropertyName:OS_DYNAMIC_TRIGGER_KIND_SESSION_TIME withId:@"test_id1" withOperator:OSTriggerOperatorTypeLessThan withValue:@10.0];
1428-
// let registrationResponse = [OSInAppMessageTestHelper testRegistrationJsonWithMessages:@[message]];
1429-
1430-
// // this should prevent message from being shown
1431-
// [OneSignal pauseInAppMessages:true];
1432-
1433-
// // the trigger should immediately evaluate to true and should
1434-
// // be shown once the SDK is fully initialized.
1435-
// [OneSignalClientOverrider setMockResponseForRequest:NSStringFromClass([OSRequestRegisterUser class]) withResponse:registrationResponse];
1436-
1437-
// [UnitTestCommonMethods initOneSignal_andThreadWait];
1438-
1439-
// // Make sure no IAM is showing, but the queue has any IAMs
1440-
// XCTAssertFalse(OSMessagingControllerOverrider.isInAppMessageShowing);
1441-
// XCTAssertEqual(OSMessagingControllerOverrider.messageDisplayQueue.count, 1);
1442-
// }
1443-
1444-
/// ✅ Migrated to `testPreviewIAMIsDisplayedOnPause`
1445-
// /*
1446-
// Test IAMs should display even when IAMs are paused
1447-
// */
1448-
// - (void)testPreviewIAMIsDisplayedOnPause {
1449-
// [OneSignal pauseInAppMessages:true];
1450-
1451-
// let message = [OSInAppMessageTestHelper testMessageWithPreview];
1452-
1453-
// [self initOneSignalWithInAppMessage:message];
1454-
1455-
// XCTAssertTrue(OSMessagingControllerOverrider.isInAppMessageShowing);
1456-
// }
1457-
14581425
// - (void)testInAppMessageIdTracked {
14591426
// [OneSignal pauseInAppMessages:false];
14601427

iOS_SDK/OneSignalSDK/UnitTests/Shadows/OSMessagingControllerOverrider.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ @interface OSMessagingController ()
4646
@property (strong, nonatomic, nonnull) NSMutableSet <NSString *> *clickedClickIds;
4747
@property (nonatomic, readwrite) NSTimeInterval (^dateGenerator)(void);
4848
@property (nonatomic, nullable) NSObject<OSInAppMessagePrompt>*currentPromptAction;
49+
- (void)messageViewImpressionRequest:(OSInAppMessageInternal *)message;
4950
@end
5051

5152

@@ -112,7 +113,7 @@ - (void)overrideShowMessage:(OSInAppMessageInternal *)message {
112113

113114
- (void)overrideWebViewContentFinishedLoading:(OSInAppMessageInternal *)message {
114115
if (message) {
115-
// [OSMessagingController.sharedInstance messageViewImpressionRequest:message];
116+
[OSMessagingController.sharedInstance messageViewImpressionRequest:message];
116117
}
117118
}
118119

0 commit comments

Comments
 (0)