Skip to content

Commit b4479c3

Browse files
committed
Merge branch 'trunk' into issue/16202-remove-msd-default-tab-expr
2 parents aea51ea + 49223b7 commit b4479c3

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package org.wordpress.android
2+
3+
import androidx.lifecycle.ProcessLifecycleOwner
4+
import dagger.hilt.android.testing.HiltAndroidTest
5+
import org.junit.Assert.assertFalse
6+
import org.junit.Test
7+
import org.wordpress.android.AppInitializer.ApplicationLifecycleMonitor
8+
import org.wordpress.android.support.BaseTest
9+
10+
/**
11+
* This tests if [ProcessLifecycleOwner] observer works at the app startup.
12+
*
13+
* [WordPress.appIsInTheBackground] is set to false when [ApplicationLifecycleMonitor.onAppComesFromBackground] is
14+
* called.
15+
*/
16+
@HiltAndroidTest
17+
class AppInitializerTest : BaseTest() {
18+
@Test
19+
fun verifyOnAppComesFromBackgroundCalled() {
20+
assertFalse(WordPress.appIsInTheBackground)
21+
}
22+
}

WordPress/src/androidTest/java/org/wordpress/android/e2e/pages/MySitesPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ public void goToBackup() {
175175
public StatsPage goToStats() {
176176
goToMenuTab();
177177
clickQuickActionOrSiteMenuItem(R.id.quick_action_stats_button, R.string.stats);
178+
idleFor(4000);
178179
dismissJetpackAdIfPresent();
179180
waitForElementToBeDisplayedWithoutFailure(R.id.tabLayout);
180181

0 commit comments

Comments
 (0)