Skip to content

Commit 15af694

Browse files
committed
Added an instant fail of test if post menu can't be opened
1 parent 0e6b3ee commit 15af694

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import static org.wordpress.android.support.WPSupportUtils.waitForElementToBeDisplayedWithoutFailure;
2626
import static junit.framework.TestCase.assertTrue;
2727
import static org.wordpress.android.support.WPSupportUtils.withIndex;
28+
import static org.junit.Assert.fail;
2829

2930
public class BlockEditorPage {
3031
private static ViewInteraction titleField = onView(withHint("Add title"));
@@ -89,6 +90,10 @@ public void openPostKebabMenu() {
8990
if (!waitForElementToBeDisplayedWithoutFailure(postSettingButton)) {
9091
openActionBarOverflowOrOptionsMenu(ApplicationProvider.getApplicationContext());
9192
}
93+
94+
if (!waitForElementToBeDisplayedWithoutFailure(postSettingButton)) {
95+
fail("Failed to open post menu.");
96+
}
9297
}
9398

9499
public void openPostSetting() {

0 commit comments

Comments
 (0)