Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
feat(statuslistener): append OK string on successful response
Browse files Browse the repository at this point in the history
  • Loading branch information
jpollak committed Dec 6, 2017
1 parent 60181a7 commit e8307be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void tearDown() {
public void testAnonymousLogin() throws InterruptedException {
onView(withId(R.id.appLoginAnonymous)).perform(scrollTo(), click());

onView(withId(R.id.mobileEngageStatusLabel)).check(matches(withText("Anonymous login: Accepted")));
onView(withId(R.id.mobileEngageStatusLabel)).check(matches(withText("Anonymous login: OK")));
}

@Test
Expand All @@ -67,7 +67,7 @@ public void testLogin() throws InterruptedException {

onView(withId(R.id.appLogin)).perform(scrollTo(), click());

onView(withId(R.id.mobileEngageStatusLabel)).check(matches(withText("Login: Accepted")));
onView(withId(R.id.mobileEngageStatusLabel)).check(matches(withText("Login: OK")));
}

@Test
Expand All @@ -77,7 +77,7 @@ public void testCustomEvent_noAttributes() throws InterruptedException {
onView(withId(R.id.customEvent)).perform(scrollTo(), click());


onView(withId(R.id.mobileEngageStatusLabel)).check(matches(withText("Custom event: Created")));
onView(withId(R.id.mobileEngageStatusLabel)).check(matches(withText("Custom event: OK")));
}

@Test
Expand All @@ -88,7 +88,7 @@ public void testCustomEvent_withAttributes() throws InterruptedException {
onView(withId(R.id.customEvent)).perform(scrollTo(), click());


onView(withId(R.id.mobileEngageStatusLabel)).check(matches(withText("Custom event: Created")));
onView(withId(R.id.mobileEngageStatusLabel)).check(matches(withText("Custom event: OK")));
}

@Test
Expand All @@ -98,14 +98,14 @@ public void testMessageOpen() throws InterruptedException {
onView(withId(R.id.messageOpen)).perform(scrollTo(), click());


onView(withId(R.id.mobileEngageStatusLabel)).check(matches(withText("Message open: Created")));
onView(withId(R.id.mobileEngageStatusLabel)).check(matches(withText("Message open: OK")));
}

@Test
public void testLogout() throws InterruptedException {
onView(withId(R.id.appLogout)).perform(scrollTo(), click());


onView(withId(R.id.mobileEngageStatusLabel)).check(matches(withText("Logout: Accepted")));
onView(withId(R.id.mobileEngageStatusLabel)).check(matches(withText("Logout: OK")));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public void onClick(View v) {
@Override
public void onStatusLog(String id, String message) {
Log.i(TAG, message);
statusLabel.append(message);
statusLabel.append("OK");
if (id.equals(requestId)) {
((MainActivity) getActivity()).updateBadgeCount();
}
Expand Down

0 comments on commit e8307be

Please sign in to comment.