Skip to content

Commit be363ae

Browse files
committed
fixing iam preview unit tests
1 parent 989224b commit be363ae

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

OneSignalSDK/unittest/src/test/java/com/test/onesignal/GenerateNotificationRunner.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,8 +1201,8 @@ public void shouldShowInAppPreviewWhenInFocus() throws Exception {
12011201

12021202
new FCMBroadcastReceiver().onReceive(blankActivity, intent);
12031203
threadAndTaskWait();
1204-
1205-
assertEquals("PGh0bWw+PC9odG1sPg==", ShadowOSWebView.lastData);
1204+
threadAndTaskWait();
1205+
assertEquals("PGh0bWw+PC9odG1sPgoKPHNjcmlwdD4KICAgIHNldFBsYXllclRhZ3MobnVsbCk7Cjwvc2NyaXB0Pg==", ShadowOSWebView.lastData);
12061206
}
12071207

12081208
@Test
@@ -1223,8 +1223,9 @@ public void shouldShowInAppPreviewWhenOpeningPreviewNotification() throws Except
12231223

12241224
Intent notificationOpenIntent = createOpenIntent(2, inAppPreviewMockPayloadBundle());
12251225
NotificationOpenedProcessor_processFromContext(blankActivity, notificationOpenIntent);
1226-
1227-
assertEquals("PGh0bWw+PC9odG1sPg==", ShadowOSWebView.lastData);
1226+
threadAndTaskWait();
1227+
threadAndTaskWait();
1228+
assertEquals("PGh0bWw+PC9odG1sPgoKPHNjcmlwdD4KICAgIHNldFBsYXllclRhZ3MobnVsbCk7Cjwvc2NyaXB0Pg==", ShadowOSWebView.lastData);
12281229
}
12291230

12301231
@Test

OneSignalSDK/unittest/src/test/java/com/test/onesignal/NotificationOpenedActivityHMSIntegrationTestsRunner.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ public void osIAMPreview_showsPreview() throws Exception {
193193
);
194194

195195
helper_startHMSOpenActivity(intent);
196-
197-
assertEquals("PGh0bWw+PC9odG1sPg==", ShadowOSWebView.lastData);
196+
assertEquals("PGh0bWw+PC9odG1sPgoKPHNjcmlwdD4KICAgIHNldFBsYXllclRhZ3MobnVsbCk7Cjwvc2NyaXB0Pg==", ShadowOSWebView.lastData);
198197
}
199198
}

0 commit comments

Comments
 (0)