Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ private void selectFavoriteFoodIfPossible(String food) {
try{
ViewInteraction appCompatTextView = onView(
allOf(withId(android.R.id.text1), withText(food),
withParent(allOf(withId(R.id.select_dialog_listview),
withParent(withId(R.id.contentPanel)))),
withParent(allOf(withId(androidx.appcompat.R.id.select_dialog_listview),
withParent(withId(androidx.appcompat.R.id.contentPanel)))),
Comment thread
thatfiredev marked this conversation as resolved.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we import all libraries at the beginning of the class, instead of inside the functions? (Same comment for all 3 test files in this PR).

isDisplayed()));
appCompatTextView.perform(click());
} catch (NoMatchingViewException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ public void setUp() {

@After
public void tearDown() {
getView(R.id.collapse_button).perform(click());
getView(com.google.firebase.inappmessaging.display.R.id.collapse_button).perform(click());
}


@Test
public void testFiamDisplaysOnForegroundCampaign() {
reopen_app(); // reopen app to correctly trigger fetch
getView(R.id.modal_root).check(matches(isDisplayed()));
getView(com.google.firebase.inappmessaging.display.R.id.modal_root).check(matches(isDisplayed()));
}

@Test
public void testFiamDisplaysContextualTriggerCampaign() {
onView(withId(R.id.eventTriggerButton)).perform(click());
getView(R.id.modal_root).check(matches(isDisplayed()));
getView(com.google.firebase.inappmessaging.display.R.id.modal_root).check(matches(isDisplayed()));
Comment thread
thatfiredev marked this conversation as resolved.
}

private void reopen_app() {
Expand Down
5 changes: 0 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,3 @@ org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=6g -XX:ReservedCodeCacheSize=2g -
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.caching=true

## Play and Firebase moving to AndroidX
android.useAndroidX=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;

import com.google.firebase.fiamquickstart.R;


Comment thread
thatfiredev marked this conversation as resolved.
/**
* Instrumented test, which will execute on an Android device.
Expand All @@ -48,20 +46,20 @@ public void setUp() {

@After
public void tearDown() {
getView(R.id.collapse_button).perform(click());
getView(com.google.firebase.inappmessaging.display.R.id.collapse_button).perform(click());
}


@Test
public void testFiamDisplaysOnForegroundCampaign() {
reopen_app(); // reopen app to correctly trigger fetch
getView(R.id.modal_root).check(matches(isDisplayed()));
getView(com.google.firebase.inappmessaging.display.R.id.modal_root).check(matches(isDisplayed()));
}

@Test
public void testFiamDisplaysContextualTriggerCampaign() {
onView(withId(R.id.eventTriggerButton)).perform(click());
getView(R.id.modal_root).check(matches(isDisplayed()));
getView(com.google.firebase.inappmessaging.display.R.id.modal_root).check(matches(isDisplayed()));
Comment thread
thatfiredev marked this conversation as resolved.
}

private void reopen_app() {
Expand Down
Loading