From e077d5d8e0bab0e51e030d75b381a8cdfd87c9df Mon Sep 17 00:00:00 2001 From: Xiao Liang Date: Thu, 30 Apr 2020 00:24:55 +0800 Subject: [PATCH 1/2] test(AppNavigationTest/clickOnNavigationDrawerItem_ChangeTheme): label as flaky After performing changing the theme, the background color might not be changed before the check. --- .../io/github/marktony/espresso/packages/AppNavigationTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/androidTest/java/io/github/marktony/espresso/packages/AppNavigationTest.java b/app/src/androidTest/java/io/github/marktony/espresso/packages/AppNavigationTest.java index 3ce328b..ce2c16f 100644 --- a/app/src/androidTest/java/io/github/marktony/espresso/packages/AppNavigationTest.java +++ b/app/src/androidTest/java/io/github/marktony/espresso/packages/AppNavigationTest.java @@ -2,6 +2,7 @@ import android.graphics.drawable.ColorDrawable; import android.support.test.filters.LargeTest; +import android.support.test.filters.FlakyTest; import android.support.test.rule.ActivityTestRule; import android.support.test.runner.AndroidJUnit4; import android.support.v7.widget.Toolbar; @@ -119,6 +120,7 @@ public void clickOnNavigationDrawerItem_ShowsAboutScreen() { .check(matches(isDisplayed())); } + @FlakyTest @Test public void clickOnNavigationDrawerItem_ChangeTheme() { // Open drawer to click on navigation. From 5634175664c01d20c6d2dbb3cbe0b07c071182a1 Mon Sep 17 00:00:00 2001 From: Xiao Liang Date: Thu, 30 Apr 2020 00:26:57 +0800 Subject: [PATCH 2/2] test(AppNavigationTest/clickOnNavigationDrawerItem_ChangeTheme): add flaky reason --- .../io/github/marktony/espresso/packages/AppNavigationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/androidTest/java/io/github/marktony/espresso/packages/AppNavigationTest.java b/app/src/androidTest/java/io/github/marktony/espresso/packages/AppNavigationTest.java index ce2c16f..d4edcfb 100644 --- a/app/src/androidTest/java/io/github/marktony/espresso/packages/AppNavigationTest.java +++ b/app/src/androidTest/java/io/github/marktony/espresso/packages/AppNavigationTest.java @@ -120,7 +120,7 @@ public void clickOnNavigationDrawerItem_ShowsAboutScreen() { .check(matches(isDisplayed())); } - @FlakyTest + @FlakyTest(detail = "After performing changing the theme, the background color might not be changed before the check.") @Test public void clickOnNavigationDrawerItem_ChangeTheme() { // Open drawer to click on navigation.