Skip to content

Commit 5beb2d3

Browse files
authored
Merge pull request #17323 from wordpress-mobile/uitii-publish-full-post-flaky-fix
[UI Tests] - Update click element on image library
2 parents 7dc0df9 + e148fd1 commit 5beb2d3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public BlockEditorPage addPostSettings(String categoryName, String tagName) {
7575
}
7676

7777
public void openPostSetting() {
78+
waitForElementToBeDisplayed(R.id.toolbar_main);
7879
openActionBarOverflowOrOptionsMenu(ApplicationProvider.getApplicationContext());
7980
clickOn(onView(withText(R.string.post_settings)));
8081
}
@@ -141,8 +142,8 @@ public BlockEditorPage addImage() {
141142
clickOn("Image");
142143
clickOn("WordPress Media Library");
143144
waitForElementToBeDisplayed(onView(withText("WordPress media")));
144-
waitForElementToBeDisplayed(onView(withIndex(withId(R.id.image_thumbnail), 0)));
145-
onView(withIndex(withId(R.id.image_thumbnail), 0)).perform(click());
145+
waitForElementToBeDisplayed(onView(withIndex(withId(R.id.text_selection_count), 0)));
146+
onView(withIndex(withId(R.id.text_selection_count), 0)).perform(click());
146147
clickOn(R.id.mnu_confirm_selection);
147148
return this;
148149
}

0 commit comments

Comments
 (0)