Skip to content

Commit

Permalink
Remove switch to classic from Editor Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronvoell committed Mar 24, 2021
1 parent 159ca88 commit 783faf6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,7 @@ public void testSwitchToClassicAndPreview() {

blockEditorPage.enterTitle(title);

blockEditorPage.switchToClassic();

EditorPage editorPage = new EditorPage();
editorPage.hasTitle(title);

editorPage.previewPost();
blockEditorPage.previewPost();
sleep();

new PostPreviewPage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.withHint;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.wordpress.android.support.WPSupportUtils.clickOn;
import static org.wordpress.android.support.WPSupportUtils.waitForElementToBeDisplayed;

Expand All @@ -34,8 +35,8 @@ public void enterTitle(String postTitle) {
titleField.perform(typeText(postTitle), ViewActions.closeSoftKeyboard());
}

public void switchToClassic() {
public void previewPost() {
openActionBarOverflowOrOptionsMenu(ApplicationProvider.getApplicationContext());
clickOn("Switch to classic editor");
clickOn(onView(withText(R.string.menu_preview)));
}
}

0 comments on commit 783faf6

Please sign in to comment.