Skip to content

Commit 4ac44db

Browse files
committed
Revision 3
1. Added test to verify if the text passed is visible on empty inbox screen 2. Passing the arguments to IterableInboxFragment in in-case customer just initializes IterableInboxActivity instead of IterableInboxFragment
1 parent c5a6e90 commit 4ac44db

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

app/src/androidTest/java/com/iterable/iterableapi/MainActivityTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,18 @@ public void testSwipeToDeleteInApp() throws Exception {
233233
onView(withText("Tips and tricks 2")).check(doesNotExist());
234234
}
235235

236+
@Test
237+
public void testNoMessagesTitleAndText() throws Exception {
238+
Intent intent = new Intent();
239+
String noMessageTitle = "OOPSY";
240+
String noMessageBody = "No messages for you";
241+
intent.putExtra(IterableConstants.NO_MESSAGES_TITLE,noMessageTitle);
242+
intent.putExtra(IterableConstants.NO_MESSAGES_BODY,noMessageBody);
243+
rule.launchActivity(intent);
244+
onView(withText(noMessageTitle)).check(matches(isDisplayed()));
245+
onView(withText(noMessageBody)).check(matches(isDisplayed()));
246+
}
247+
236248

237249
static class Matchers{
238250
public static Matcher<View> withListSize (final int size) {

iterableapi-ui/src/main/java/com/iterable/iterableapi/ui/inbox/IterableInboxActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
3838
inboxMode = (InboxMode) inboxModeExtra;
3939
}
4040
inboxFragment = IterableInboxFragment.newInstance(inboxMode, itemLayoutId);
41+
inboxFragment.setArguments(intent.getExtras());
4142

4243
if (intent.getStringExtra(ACTIVITY_TITLE) != null) {
4344
setTitle(intent.getStringExtra(ACTIVITY_TITLE));

0 commit comments

Comments
 (0)