-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable block editor UI test to match #11530
- Loading branch information
Showing
1 changed file
with
71 additions
and
71 deletions.
There are no files selected for viewing
142 changes: 71 additions & 71 deletions
142
WordPress/src/androidTest/java/org/wordpress/android/e2e/BlockEditorTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,72 @@ | ||
package org.wordpress.android.e2e; | ||
|
||
import android.Manifest.permission; | ||
|
||
import androidx.test.rule.ActivityTestRule; | ||
import androidx.test.rule.GrantPermissionRule; | ||
|
||
import org.junit.Before; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.wordpress.android.e2e.components.MasterbarComponent; | ||
import org.wordpress.android.e2e.pages.BlockEditorPage; | ||
import org.wordpress.android.e2e.pages.EditorPage; | ||
import org.wordpress.android.e2e.pages.MySitesPage; | ||
import org.wordpress.android.e2e.pages.PostPreviewPage; | ||
import org.wordpress.android.e2e.pages.SiteSettingsPage; | ||
import org.wordpress.android.support.BaseTest; | ||
import org.wordpress.android.ui.WPLaunchActivity; | ||
|
||
import static androidx.test.espresso.Espresso.pressBack; | ||
import static org.wordpress.android.support.WPSupportUtils.sleep; | ||
|
||
public class BlockEditorTests extends BaseTest { | ||
@Rule | ||
public ActivityTestRule<WPLaunchActivity> mActivityTestRule = new ActivityTestRule<>(WPLaunchActivity.class); | ||
|
||
@Rule | ||
public GrantPermissionRule mRuntimeImageAccessRule = GrantPermissionRule.grant(permission.WRITE_EXTERNAL_STORAGE); | ||
|
||
@Before | ||
public void setUp() { | ||
logoutIfNecessary(); | ||
wpLogin(); | ||
} | ||
|
||
@Test | ||
public void testSwitchToClassicAndPreview() { | ||
String title = "Hello Espresso!"; | ||
|
||
MasterbarComponent mb = new MasterbarComponent().goToMySitesTab(); | ||
sleep(); | ||
|
||
MySitesPage mySitesPage = new MySitesPage(); | ||
mySitesPage.gotoSiteSettings(); | ||
|
||
// Set to Gutenberg. Apparently the site is defaulting to Aztec still. | ||
new SiteSettingsPage().toggleGutenbergSetting(); | ||
|
||
// exit the Settings page | ||
pressBack(); | ||
|
||
mb.clickBlogPosts(); | ||
|
||
new MySitesPage() | ||
.startNewPost(); | ||
|
||
BlockEditorPage blockEditorPage = new BlockEditorPage(); | ||
blockEditorPage.waitForTitleDisplayed(); | ||
|
||
blockEditorPage.enterTitle(title); | ||
|
||
blockEditorPage.switchToClassic(); | ||
|
||
EditorPage editorPage = new EditorPage(); | ||
editorPage.hasTitle(title); | ||
|
||
editorPage.previewPost(); | ||
sleep(); | ||
|
||
new PostPreviewPage(); | ||
} | ||
} | ||
// | ||
//import android.Manifest.permission; | ||
// | ||
//import androidx.test.rule.ActivityTestRule; | ||
//import androidx.test.rule.GrantPermissionRule; | ||
// | ||
//import org.junit.Before; | ||
//import org.junit.Rule; | ||
//import org.junit.Test; | ||
//import org.wordpress.android.e2e.components.MasterbarComponent; | ||
//import org.wordpress.android.e2e.pages.BlockEditorPage; | ||
//import org.wordpress.android.e2e.pages.EditorPage; | ||
//import org.wordpress.android.e2e.pages.MySitesPage; | ||
//import org.wordpress.android.e2e.pages.PostPreviewPage; | ||
//import org.wordpress.android.e2e.pages.SiteSettingsPage; | ||
//import org.wordpress.android.support.BaseTest; | ||
//import org.wordpress.android.ui.WPLaunchActivity; | ||
// | ||
//import static androidx.test.espresso.Espresso.pressBack; | ||
//import static org.wordpress.android.support.WPSupportUtils.sleep; | ||
// | ||
//public class BlockEditorTests extends BaseTest { | ||
// @Rule | ||
// public ActivityTestRule<WPLaunchActivity> mActivityTestRule = new ActivityTestRule<>(WPLaunchActivity.class); | ||
// | ||
// @Rule | ||
// public GrantPermissionRule mRuntimeImageAccessRule = GrantPermissionRule.grant(permission.WRITE_EXTERNAL_STORAGE); | ||
// | ||
// @Before | ||
// public void setUp() { | ||
// logoutIfNecessary(); | ||
// wpLogin(); | ||
// } | ||
// | ||
// @Test | ||
// public void testSwitchToClassicAndPreview() { | ||
// String title = "Hello Espresso!"; | ||
// | ||
// MasterbarComponent mb = new MasterbarComponent().goToMySitesTab(); | ||
// sleep(); | ||
// | ||
// MySitesPage mySitesPage = new MySitesPage(); | ||
// mySitesPage.gotoSiteSettings(); | ||
// | ||
// // Set to Gutenberg. Apparently the site is defaulting to Aztec still. | ||
// new SiteSettingsPage().toggleGutenbergSetting(); | ||
// | ||
// // exit the Settings page | ||
// pressBack(); | ||
// | ||
// mb.clickBlogPosts(); | ||
// | ||
// new MySitesPage() | ||
// .startNewPost(); | ||
// | ||
// BlockEditorPage blockEditorPage = new BlockEditorPage(); | ||
// blockEditorPage.waitForTitleDisplayed(); | ||
// | ||
// blockEditorPage.enterTitle(title); | ||
// | ||
// blockEditorPage.switchToClassic(); | ||
// | ||
// EditorPage editorPage = new EditorPage(); | ||
// editorPage.hasTitle(title); | ||
// | ||
// editorPage.previewPost(); | ||
// sleep(); | ||
// | ||
// new PostPreviewPage(); | ||
// } | ||
//} |